personal_importRawKey
描述:导入私钥获取账户。
parameter
数据类型 | 备注 |
---|---|
string | 需要导入的私钥,去掉 '0x' 前缀 |
string | 密码 |
"params": ["2a46e76c7dae72657103328c7e0f9e1efc79e8ff5cc7991038c885cb69e5d04f", "abc"]}
return
数据类型 | 备注 |
---|---|
string | 账户地址 |
example
Request:
curl -X POST \
http://127.0.0.1:8283 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc": "2.0", "id": 1, "method": "personal_importRawKey", "params": ["2a46e76c7dae72657103328c7e0f9e1efc79e8ff5cc7991038c885cb69e5d04f", "abc"]}'
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xade56eb4722c6552b121522ed552efd8721d4008"
}