Skip to main content

sui_getObject RPC Method

Return the object information for a specified object.

Updated on
Dec 10, 2024

sui_getObject RPC Method

Parameters

object_id
string
REQUIRED
The ID of the queried object
ObjectDataOptions
object
Optional settings to configure the details returned for an object
showBcs
boolean
Whether to show the content in BCS format. Default is false
showContent
boolean
Whether to show the content (e.g., package content or Move struct content) of the object. Default is false
showDisplay
boolean
Whether to show the Display metadata of the object for frontend rendering. Default is false
showOwner
boolean
Whether to show the owner of the object. Default is false
showPreviousTransaction
boolean
Whether to show the previous transaction digest of the object. Default is false
showStorageRebate
boolean
Whether to show the storage rebate of the object. Default is false
showType
boolean
Whether to show the type of the object. Default is false

Returns

result
object
Details of the queried object
objectId
string
The ID of the object
version
string
The version of the object
digest
string
Digest of the object's data
type
string
The type of the object, including any type arguments
owner
object
Ownership information of the object
Shared
object
(Optional) Shared ownership details
initial_shared_version
string
The initial shared version of the object
previousTransaction
string
The previous transaction affecting this object
storageRebate
string
The storage rebate of the object
content
object
Content of the object
dataType
string
The data type of the object
type
string
The type of the object's data
hasPublicTransfer
boolean
Indicates whether the object has public transfer capabilities
fields
object
Fields associated with the object's data
id
object
ID field of the object
id
string
The unique ID of the object
inner
object
Inner fields of the object
type
string
Type of the inner field
fields
object
Additional fields in the inner structure
id
object
ID field of the inner structure
id
string
The unique ID of the inner structure
version
string
Version of the inner structure
Request
1
curl --location 'https://docs-demo.sui-mainnet.quiknode.pro/' \
2
--header 'Content-Type: application/json' \
3
--data '{
4
"jsonrpc": "2.0",
5
"id": 1,
6
"method": "sui_getObject",
7
"params": [
8
"0x27c4fdb3b846aa3ae4a65ef5127a309aa3c1f466671471a806d8912a18b253e8",
9
{
10
"showType": true,
11
"showOwner": true,
12
"showPreviousTransaction": true,
13
"showDisplay": false,
14
"showContent": true,
15
"showBcs": false,
16
"showStorageRebate": true
17
}
18
]
19
}
20
'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free