本页面使用机器翻译自英语,可能包含错误或不清楚的语言。如需最准确的信息,请参阅英文原文。由于更新频繁,部分内容可能与英文原文有出入。请加入我们在 Crowdin 上的努力,帮助我们改进本页面的翻译。 (Crowdin translation page, Contributing guide)
[Account] kaia_decodeAccountKey
Decodes an RLP encoded account key.
JSONRPC: kaia_decodeAccountKey
Request
- application/json
Body
params DATA[]required
RLP encoded account key
Responses
- 200
Decodes an RLP encoded account key.
- application/json
- Schema
- Example (from schema)
Schema
error
object
result
object
keytype numberrequired
Integer value indicating account key type.
key object[]required
Account key object
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": {
"key": [
{
"key": {
"x": "0xe4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512d",
"y": "0xa5735a23ce1654b14680054a993441eae7c261983a56f8e0da61280758b5919"
},
"keyType": 2
},
{
"key": {
"keys": [
{
"key": {
"x": "0xe4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512d",
"y": "0xa5735a23ce1654b14680054a993441eae7c261983a56f8e0da61280758b5919"
},
"weight": 1
},
{
"key": {
"x": "0x36f6355f5b532c3c1606f18fa2be7a16ae200c5159c8031dd25bfa389a4c9c06",
"y": "0x6fdf9fc87a16ac359e66d9761445d5ccbb417fb7757a3f5209d713824596a50d"
},
"weight": 1
}
],
"threshold": 2
},
"keyType": 4
},
{
"key": {
"x": "0xc8785266510368d9372badd4c7f4a94b692e82ba74e0b5e26b34558b0f081447",
"y": "0x94c27901465af0a703859ab47f8ae17e54aaba453b7cde5a6a9e4a32d45d72b2"
},
"keyType": 2
}
],
"keyType": 5
}
}
- curl
- python
- nodejs
- java
- Curl
curl -X 'POST' \
'https://public-en-kairos.node.kaia.io/kaia/decodeAccountKey' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"method": "kaia_decodeAccountKey",
"id": 1,
"jsonrpc": "2.0",
"params": [
"0x05f898a302a103e4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512db84e04f84b02f848e301a103e4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512de301a10336f6355f5b532c3c1606f18fa2be7a16ae200c5159c8031dd25bfa389a4c9c06a302a102c8785266510368d9372badd4c7f4a94b692e82ba74e0b5e26b34558b0f081447"
]
}'
- CURL
curl -L 'https://public-en-kairos.node.kaia.io/' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"method": "kaia_decodeAccountKey",
"id": 1,
"jsonrpc": "2.0",
"params": [
"0x05f898a302a103e4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512db84e04f84b02f848e301a103e4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512de301a10336f6355f5b532c3c1606f18fa2be7a16ae200c5159c8031dd25bfa389a4c9c06a302a102c8785266510368d9372badd4c7f4a94b692e82ba74e0b5e26b34558b0f081447"
]
}'
ResponseClear