sui_getObject
Return the object information for a specified object
Parameters
object_id·ObjectID· requiredthe ID of the queried objectoptions·ObjectDataOptions· optionaloptions for specifying the content to be returnedshowBcs·boolean· optionalWhether to show the content in BCS format. Default to be FalseshowContent·boolean· optionalWhether to show the content(i.e., package content or Move struct content) of the object. Default to be FalseshowDisplay·boolean· optionalWhether to show the Display metadata of the object for frontend rendering. Default to be FalseshowOwner·boolean· optionalWhether to show the owner of the object. Default to be FalseshowPreviousTransaction·boolean· optionalWhether to show the previous transaction digest of the object. Default to be FalseshowStorageRebate·boolean· optionalWhether to show the storage rebate of the object. Default to be FalseshowType·boolean· optionalWhether to show the type of the object. Default to be False
Result
SuiObjectResponse·SuiObjectResponsedata·ObjectDataornull· optionalerror·ObjectResponseErrorornull· optional
Example
Request
bash
curl https://mainnet-api.inodra.com/v1/jsonrpc \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "sui_getObject",
"params": [
"0x53e4567ccafa5f36ce84c80aa8bc9be64e0d5ae796884274aef3005ae6733809",
{
"showType": true,
"showOwner": true,
"showPreviousTransaction": true,
"showDisplay": false,
"showContent": true,
"showBcs": false,
"showStorageRebate": true
}
]
}'Response
json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"data": {
"objectId": "0x53e4567ccafa5f36ce84c80aa8bc9be64e0d5ae796884274aef3005ae6733809",
"version": "1",
"digest": "33K5ZXJ3RyubvYaHuEnQ1QXmmbhgtrFwp199dnEbL4n7",
"type": "0x2::coin::Coin<0x2::sui::SUI>",
"owner": {
"AddressOwner": "0xc8ec1d5b84dd6289e193b9f88de4a994358c9f856135236c3e75a925e1c77ac3"
},
"previousTransaction": "5PLgmQye6rraDYqpV3npV6H1cUXoJZgJh1dPCyRa3WCv",
"storageRebate": "100",
"content": {
"dataType": "moveObject",
"type": "0x2::coin::Coin<0x2::sui::SUI>",
"hasPublicTransfer": true,
"fields": {
"balance": "100000000",
"id": {
"id": "0x53e4567ccafa5f36ce84c80aa8bc9be64e0d5ae796884274aef3005ae6733809"
}
}
}
}
}
}