Get state of a nano contract.
GET/wallet/nano-contracts/state
Get state of a nano contract.
Request
Query Parameters
- simple fields
- With dict fields
- balances
- calls
ID of the nano contract to get the state from.
List of fields to retrieve the state.
Only direct fields
Example: token_uidtotalfinal_resultoracle_script
Simple and dict fields (dict fields where the keys are addresses). For an address you must encapsulate the b58 with a''
Example: token_uidtotalfinal_resultoracle_scriptwithdrawals.a'Wi8zvxdXHjaUVAoCJf52t3WovTZYcU9aX6'address_details.a'Wi8zvxdXHjaUVAoCJf52t3WovTZYcU9aX6'
List of balances to retrieve from contract.
Example of balances
Example: 00000008f2ee2059a189322ae7cb1d7e7773dcb4fdc8c4de8767f63022b3731845
List of private method calls to execute and get result in the contract.
Example of calls
Example: private_method_1()private_method_2()
Header Parameters
Define the key of the corresponding wallet it will be executed the request.
Responses
- 200
Success
- application/json
- Schema
- success
- error
Schema
any
Success to get state from nano
{
"success": true,
"nc_id": "3cb032600bdf7db784800e4ea911b10676fa2f67591f82bb62628c234e771595",
"blueprint_name": "Bet",
"fields": {
"token_uid": {
"value": "00"
},
"total": {
"value": 300
},
"final_result": {
"value": "1x0"
},
"oracle_script": {
"value": "76a91441c431ff7ad5d6ce5565991e3dcd5d9106cfd1e288ac"
},
"withdrawals.a'Wi8zvxdXHjaUVAoCJf52t3WovTZYcU9aX6'": {
"value": 300
},
"address_details.a'Wi8zvxdXHjaUVAoCJf52t3WovTZYcU9aX6'": {
"value": {
"1x0": 100
}
}
}
}
Invalid nano contract ID
{
"success": false,
"message": "Invalid nano contract ID."
}