Skip to main content

sui_tryGetPastObject

POST

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
param[0]
objectIdstringrequired
The ID of the queried object
param[1]
versionstringrequired
The version of the queried object. If None, default to the latest known version
param[2]
optionsobjectrequired
Options for specifying the content to be returned
showBcsboolean
Whether to show the content in BCS format. Default to be False
showContentboolean
Whether to show the content(i.e., package content or Move struct content) of the object. Default to be False
showDisplayboolean
Whether to show the Display metadata of the object for frontend rendering. Default to be False
showOwnerboolean
Whether to show the owner of the object. Default to be False
showPreviousTransactionboolean
Whether to show the previous transaction digest of the object. Default to be False
showStorageRebateboolean
Whether to show the storage rebate of the object. Default to be False
showTypeboolean
Whether to show the type of the object. Default to be False
Responses
jsonrpcstring
idinteger
resultoneOf
The object exists and is found with this version
bcsoneOf
Move object content or package content in BCS, default to be None unless SuiObjectDataOptions.showBcs is set to true
bcsBytesstringrequired
Base64 encoding
dataTypestringrequired
hasPublicTransferbooleanrequired
typestringrequired
versionstringrequired
contentoneOf
Move object content or package content, default to be None unless SuiObjectDataOptions.showContent is set to true
dataTypestringrequired
fieldsstringrequired
hasPublicTransferbooleanrequired
typestringrequired
digestobjectrequired
The Display metadata for frontend UI rendering, default to be None unless SuiObjectDataOptions.showContent is set to true This can also be None if the struct type does not have Display defined See more details in <https://forums.sui.io/t/nft-object-display-proposal/4872>
dataobject
erroroneOf
codestringrequired
object_idobjectrequired
objectIdobjectrequired
owneroneOf
The owner of this object. Default to be None unless SuiObjectDataOptions.showOwner is set to true
Object is exclusively owned by a single address, and is mutable.
AddressOwnerobjectrequired
previousTransactionobject
storageRebatestring
The amount of SUI we would rebate if this object gets deleted. This number is re-calculated each time the object is mutated based on the present storage gas price.
typestring
The type of the object. Default to be None unless SuiObjectDataOptions.showType is set to true
versionobjectrequired
statusstringrequired
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Bad Request"
}
cURL
curl -X POST 'https://sui-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "sui_tryGetPastObject",
"params": [
"0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760",
4,
{
"showBcs": false,
"showContent": true,
"showDisplay": false,
"showOwner": true,
"showPreviousTransaction": true,
"showStorageRebate": true,
"showType": true
}
]
}'