post https://api.infstones.com/sui/mainnet/
Read API
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
Key | Required | Type | Detail |
---|---|---|---|
object_id | ✅ | ObjectID | the ID of the queried object |
version | ✅ | SequenceNumber | the version of the queried object. If None, default to the latest known version |
options | ✅ | ObjectDataOptions | options for specifying the content to be returned |
"params": [
"0x0599979807763892661b90b7dd2f9439986d8aeee387fc9d7ecb73e8ca4d09b2",
2544630,
{
"showType": true,
"showOwner": true,
"showPreviousTransaction": true,
"showDisplay": false,
"showContent": true,
"showBcs": false,
"showStorageRebate": true
}
]
Result
SuiPastObjectResponse : <ObjectRead>
- get Past Object data.
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "sui_tryGetPastObject",
"params": [
"0x0599979807763892661b90b7dd2f9439986d8aeee387fc9d7ecb73e8ca4d09b2",
2544630,
{
"showType": true,
"showOwner": true,
"showPreviousTransaction": true,
"showDisplay": false,
"showContent": true,
"showBcs": false,
"showStorageRebate": true
}
]
}
'
Response
{
"jsonrpc": "2.0",
"result": {
"status": "VersionFound",
"details": {
"objectId": "0x0599979807763892661b90b7dd2f9439986d8aeee387fc9d7ecb73e8ca4d09b2",
"version": "2544630",
"digest": "9xNeHWyWKAci7YNoZxA7UDU5FNfvTADPchy4bHMDd55N",
"type": "0x80d114c5d474eabc2eb2fcd1a0903f1eb5b5096a8dc4184d72453f7a9be728e4::pool::PurchaseMark",
"owner": {
"AddressOwner": "0xe61858fb2460e9ac985704953db0ab2e116d2f6d81206c36d7a644b9ad0b264a"
},
"previousTransaction": "8ddezJ4eChwY8X1ZiBNVRzxeRat6kTpNKAwcgKfaDH3u",
"storageRebate": "1740400",
"content": {
"dataType": "moveObject",
"type": "0x80d114c5d474eabc2eb2fcd1a0903f1eb5b5096a8dc4184d72453f7a9be728e4::pool::PurchaseMark",
"hasPublicTransfer": false,
"fields": {
"id": {
"id": "0x0599979807763892661b90b7dd2f9439986d8aeee387fc9d7ecb73e8ca4d09b2"
},
"obtain_sale_amount": "0",
"pool_id": "0x2e5778db3fc68f928cfb36f9d2a0f588a19753db20760312615d2ee52bfa4185",
"purchase_total": "902589839506",
"used_raise_amount": "902589839506"
}
}
}
},
"id": 1
}