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 |
---|---|---|---|
past_objects | ✅ | GetPastObjectRequest | a list of object and versions to be queried |
options | ✅ | ObjectDataOptions | options for specifying the content to be returned |
"params": [
[
{
"objectId": "0x44b5586bc4b4f8fb60565954f83cf2f48e1425d8942b3da043dcde9fd9f52531",
"version": "2257293"
},
{
"objectId": "0x0599979807763892661b90b7dd2f9439986d8aeee387fc9d7ecb73e8ca4d09b2",
"version": "2544630"
}
],
{
"showType": true,
"showOwner": true,
"showPreviousTransaction": true,
"showDisplay": false,
"showContent": true,
"showBcs": false,
"showStorageRebate": true
}
]
Result
Vec<SuiPastObjectResponse> : <[ObjectRead]>
- get Past Objects data.
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "sui_tryMultiGetPastObjects",
"params": [
[
{
"objectId": "0x44b5586bc4b4f8fb60565954f83cf2f48e1425d8942b3da043dcde9fd9f52531",
"version": "2257293"
},
{
"objectId": "0x0599979807763892661b90b7dd2f9439986d8aeee387fc9d7ecb73e8ca4d09b2",
"version": "2544630"
}
],
{
"showType": true,
"showOwner": true,
"showPreviousTransaction": true,
"showDisplay": false,
"showContent": true,
"showBcs": false,
"showStorageRebate": true
}
]
}
'
Response
{
"jsonrpc": "2.0",
"result": [
{
"status": "VersionFound",
"details": {
"objectId": "0x44b5586bc4b4f8fb60565954f83cf2f48e1425d8942b3da043dcde9fd9f52531",
"version": "2257293",
"digest": "7ELcNMRXGak7d8BFeHS2TKdkc6Ww5s89gq5DB23hqxkj",
"type": "0x2::coin::Coin<0x2::sui::SUI>",
"owner": {
"AddressOwner": "0x6d5c5fd5cffba4bd60d39aa508df4060889a133310618b5ec3fb45026c46e710"
},
"previousTransaction": "AT7Fhs8ejUtb5uYdnvt4wf8EFrKxa28xtv154mB8K52b",
"storageRebate": "988000",
"content": {
"dataType": "moveObject",
"type": "0x2::coin::Coin<0x2::sui::SUI>",
"hasPublicTransfer": true,
"fields": {
"balance": "5010000000",
"id": {
"id": "0x44b5586bc4b4f8fb60565954f83cf2f48e1425d8942b3da043dcde9fd9f52531"
}
}
}
}
},
{
"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
}