sui_tryMultiGetPastObjects
Note there is no software-level guarantee/SLA that objects with past versions can be retrieved by this API, even if the object and version exists/existed. The result may vary across nodes depending on their pruning policies. Return the object information for a specified version
Parameters
past_objects·GetPastObjectRequest[] · requireda vector of object and versions to be queriedoptions·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
Vec<SuiPastObjectResponse>·ObjectRead[]
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_tryMultiGetPastObjects",
"params": [
[
{
"objectId": "0x38b3186a7bb26a1ab2c982a0a9b482aa70f5a010fffc60f20194ef0f597474e8",
"version": "4"
},
{
"objectId": "0xceaf9ee4582d3a233101e322a22cb2a5bea2e681ea5af4e59bd1abb0bb4fcb27",
"version": "12"
}
],
{
"showType": true,
"showOwner": true,
"showPreviousTransaction": true,
"showDisplay": false,
"showContent": true,
"showBcs": false,
"showStorageRebate": true
}
]
}'Response
json
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"status": "VersionFound",
"details": {
"objectId": "0x38b3186a7bb26a1ab2c982a0a9b482aa70f5a010fffc60f20194ef0f597474e8",
"version": "4",
"digest": "hvBGBXvKVhC7XYgVPujuiLjxASR6UGAkSFrCRtVxX1F",
"type": "0x2::coin::Coin<0x2::sui::SUI>",
"owner": {
"AddressOwner": "0x47866ff92885a3c21a7703f564721c198308aa0c71b771ada6b96c16fc9c0fa7"
},
"previousTransaction": "6heEteheiLZcS8iVNXsNUnU7oVjzT7UHYzprGcuWQ4gG",
"storageRebate": "100",
"content": {
"dataType": "moveObject",
"type": "0x2::coin::Coin<0x2::sui::SUI>",
"hasPublicTransfer": true,
"fields": {
"balance": "10000",
"id": {
"id": "0x38b3186a7bb26a1ab2c982a0a9b482aa70f5a010fffc60f20194ef0f597474e8"
}
}
}
}
},
{
"status": "VersionFound",
"details": {
"objectId": "0xceaf9ee4582d3a233101e322a22cb2a5bea2e681ea5af4e59bd1abb0bb4fcb27",
"version": "12",
"digest": "B5z4YkAgTi78fdxMbxG3fv2V4YBkhpc8PRCPz8MzLtbf",
"type": "0x2::coin::Coin<0x2::sui::SUI>",
"owner": {
"AddressOwner": "0xa6ced287081357950315a8842c3870f2d83f980fe0996a92d351d6749a0a0b47"
},
"previousTransaction": "BLN2oUCHmwmaAXXCxbojTcozUqZYfvXx4Bkgi7xcgyVc",
"storageRebate": "100",
"content": {
"dataType": "moveObject",
"type": "0x2::coin::Coin<0x2::sui::SUI>",
"hasPublicTransfer": true,
"fields": {
"balance": "20000",
"id": {
"id": "0x38b3186a7bb26a1ab2c982a0a9b482aa70f5a010fffc60f20194ef0f597474e8"
}
}
}
}
}
]
}