parity_newAccountFromSecret - 用私钥创建新账户
parity_newAccountFromSecret
调用使用指定的私钥创建新账户
调用参数
- 用来创建新账户的私钥,32字节,16进制字符串
- 新账户密码,字符串
返回值
parity_newAccountFromSecret
调用返回新创建的账户地址
示例代码
请求:
~$ curl --data '{
"method":"parity_newAccountFromSecret",
"params":[
"0x1db2c0cf57505d0f4a3d589414f0a0025ca97421d2cd596a9486bc7e2cd2bf8b",
"hunter2"
],
"id":1,
"jsonrpc":"2.0"
}' -H "Content-Type: application/json" -X POST localhost:8545
响应结果:
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x407d73d8a49eeb85d32cf465507dd71d507100c1"
}