Skip to main content
Version: main branch

state_getTrustBase

Returns trust base for the given epoch number, in JSON format.

Parameters

  1. epochNumber (string) - Epoch number to get the trust base for. Returns error if trust base does not exist for the given epoch number. Currently, the epochNumber is not validated and the same trust base is always returned.

    params: [
    "1"
    ]

Returns

  • trustBase (string) - JSON encoded trust base.

Example

Request

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

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"epoch": 1,
"epochStartRound": 1,
"rootNodes": {
"16Uiu2HAm4vcXTyhCF9Ss653sh4wiec39KeoUPQpCpqLMxXMwAVMm": {
"nodeId": "16Uiu2HAm4vcXTyhCF9Ss653sh4wiec39KeoUPQpCpqLMxXMwAVMm",
"publicKey": "0x03a4fa16a0c52b5366df58d2de8916325be67c2d7d2a0b77ba7a1dc6657c21cb8e",
"stake": 1
},
"16Uiu2HAmL6WACqWrULAD9k8hPBfqhWFCJCSVKZockoceEjxTvnEb": {
"nodeId": "16Uiu2HAmL6WACqWrULAD9k8hPBfqhWFCJCSVKZockoceEjxTvnEb",
"publicKey": "0x03903b92f15fb32f77abf5a5df99319aad4b7469a3071e902a9a1cba03ca287113",
"stake": 1
},
"16Uiu2HAmPfzdXKi5r3uZYiGWtHqsBdA44JdPQ34iQGRGfMBWcmTF": {
"nodeId": "16Uiu2HAmPfzdXKi5r3uZYiGWtHqsBdA44JdPQ34iQGRGfMBWcmTF",
"publicKey": "0x02513ff6cba5a58a34928ff81b5d0052e4b4d2c2ffc99bf6afcd1082c018745425",
"stake": 1
}
},
"quorumThreshold": 3,
"stateHash": "0xdd2bfe864aae063aafa34be20d247697407aa2ba133e9950227970b52390e8f5",
"changeRecordHash": "",
"previousEntryHash": "",
"signatures": {
"16Uiu2HAm4vcXTyhCF9Ss653sh4wiec39KeoUPQpCpqLMxXMwAVMm": "0xf9da9ea2305d6578f1bbe67b2cf560e964fc7295dd7aef1eb5425863e825a03e45fc21f992626847b172feed9945008b2bfbb04dff212e8a8b53305ebaf9385b01",
"16Uiu2HAmL6WACqWrULAD9k8hPBfqhWFCJCSVKZockoceEjxTvnEb": "0x23507f2927263618072ed66850b2dfca7ba9d1a6559df714a56c6c706abbd5052cfc71094c7929cb955622c4ad559f262a2ada0168917fee6416fe6aca64391301",
"16Uiu2HAmPfzdXKi5r3uZYiGWtHqsBdA44JdPQ34iQGRGfMBWcmTF": "0xf7daaa2f13e19ae1d5fd434f185a12ba2eac5b6061f5b42c7093c8be6dd9ea4d5dd9bcdc67d1b46b8f9f723fb35a01e1bc3b69efb29e1fd4368a57e8ec1e926f01"
}
}
}