personal_newValKey

描述:生成一套密钥,返回 address、mainPublicKey、blsPublicKey 三个信息。

parameter

数据类型 备注
string 初始 valKey 密码
"params": ["123456"]

return

参数名 数据类型 描述
address string 账户地址
mainPubKey string 已压缩的共识公钥
blsPubKey string 已压缩的 BLS 公钥

example

Request:

curl -X POST \
  http://127.0.0.1:8283 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "personal_newValKey", "params": ["123456"]}'

Response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "address": "0x864aC503EC9f36Eed6792b07848E2c11260384Ef",
        "mainPubKey": "0x033ad8cbc57df4af973a2909c453cb4d6e56fe81a135791fbaeeccb3ffcb51a9c3",
        "blsPubKey": "0xa95fcfc3357d7fe63f54291a66d1fe0c2b17bb7b0a21aa43a4c5a3afac186d87bec10f7b155e384d3ead6506d9a908a0166e60c794d2a35e0159f7b27bb5858ee7ec5788c01ad31a79410e449a05fd62cf9297d77c0a3417e34a970dc73908ad"
    }
}