post https://api.infstones.com/theta/mainnet/
This API creates a new account (i.e. a private key/address pair), and encrypts the private key under ~/.thetacli/keys/encrypted/ by default.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
password | ✅ | String | the password for the new account |
"params":[
{
"password":"qwertyuiop"
}
]
Result
Result Fields
Key | Type | Detail |
---|---|---|
address | String | the address of the newly created account |
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"thetacli.NewKey","params":[{"password":"qwertyuiop"}],"id":1}'
Return
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0x7F7Bf878527AC6DE7b6fe12acD664D59d20E0001"
}
}