Request connected node to register account.
This query return data needed for calculating pow algorithm.
{"id": 1,"method": "call","params": [REGISTRATION_API_ID,"request_registration_task",[]]}
Option | Description |
| gives a block_id for sha256 calculating |
| gives a salt for sha256 calculating |
| gives a pow complexity |
{"id": 1,"jsonrpc": "2.0","result":{"block_id": "00000a82ec7bc3735ae45a3e5d75dc06c740b04d","rand_num": "3323422951117619593","difficulty": 20}}
Submit PoW task solution to register account.
You need to calcualte hash = sha256(block_id.to_bytes() + rand_num.to_bytes() + nonce.to_bytes())
untill you get first difficulty
bits of hash equal to 0
. Only nonce
should be changed. After you get suitable nonce you can form a request. difficulty
, block_id
and rand_num
is taken from request_registration_task
response.
Option | Description |
| gives a notification whenever transaction for registation account broadcasted |
| name of account |
| active ed25519 key |
| ed25519 key for echorand |
| evm address that will be assosiated with account. could be specified as null |
| used for verification of pow algorithm |
| used as salt for sha256 and id for request_registration_task query |
{"id": 1,"method": "call","params": [REGISTRATION_API_ID,"submit_registration_solution",[CALLBACK_ID,"account_name","ECHODvHDsAfk2M8LhYcxLZTbrNJRWT3UH5zxdaWimWc6uZkH","ECHODvHDsAfk2M8LhYcxLZTbrNJRWT3UH5zxdaWimWc6uZkH","517CF26a16127c4A58072FB7C24D1140F1b63A67"NONCE,RAND_NUM]]}
true
means that client sends correct nonce. If result is false
it means nonce or rand_num is incorrect or time for calculating is expired.
{"id":0,"jsonrpc":"2.0","result":true}
{"method": "notice","params": [CALLBACK_ID,[{"block_num": 1248363,"tx_id": "8b5172b6c95db447ee4b1ca4cd076651189442dd","registered_account_id": "1.2.17"}]]}
Get the registrar account.
{"id": 1,"method": "call","params": [REGISTRATION_API_ID,"get_registrar",[]]}
Account ID of the registrant.
{"id": 4,"jsonrpc": "2.0","result": "1.2.15"}