Object
An Object on Sui is either a typed value (a Move Object) or a Package (modules containing functions and types).
Every object on Sui is identified by a unique address, and has a version number that increases with every modification. Objects also hold metadata detailing their current owner (who can sign for access to the object and whether that access can modify and/or delete the object), and the digest of the last transaction that modified the object.
type Object implements Node, IAddressable, IObject {
address: SuiAddress!
addressAt(
rootVersion: UInt53
checkpoint: UInt53
): Address
asMoveObject: MoveObject
asMovePackage: MovePackage
balance(
coinType: String!
): Balance
balances(
first: Int
after: String
last: Int
before: String
): BalanceConnection
defaultNameRecord: NameRecord
digest: String
dynamicField(
name: DynamicFieldName!
): DynamicField
dynamicFields(
first: Int
after: String
last: Int
before: String
): DynamicFieldConnection
dynamicObjectField(
name: DynamicFieldName!
): DynamicField
id: ID!
multiGetBalances(
keys: [String!]!
): [Balance!]
multiGetDynamicFields(
keys: [DynamicFieldName!]!
): [DynamicField]!
multiGetDynamicObjectFields(
keys: [DynamicFieldName!]!
): [DynamicField]!
objectAt(
version: UInt53
rootVersion: UInt53
checkpoint: UInt53
): Object
objectBcs: Base64
objectVersionsAfter(
first: Int
after: String
last: Int
before: String
filter: VersionFilter
): ObjectConnection
objectVersionsBefore(
first: Int
after: String
last: Int
before: String
filter: VersionFilter
): ObjectConnection
objects(
first: Int
after: String
last: Int
before: String
filter: ObjectFilter
): MoveObjectConnection
owner: Owner
previousTransaction: Transaction
receivedTransactions(
first: Int
after: String
last: Int
before: String
filter: TransactionFilter
): TransactionConnection
storageRebate: BigInt
version: UInt53
}
Fields
Object.address ● SuiAddress! non-null scalar
The Object's ID.
Object.addressAt ● Address object
Fetch the address as it was at a different root version, or checkpoint.
If no additional bound is provided, the address is fetched at the latest checkpoint known to the RPC.
Object.addressAt.rootVersion ● UInt53 scalar
Object.addressAt.checkpoint ● UInt53 scalar
Object.asMoveObject ● MoveObject object
Attempts to convert the object into a MoveObject.
Object.asMovePackage ● MovePackage object
Attempts to convert the object into a MovePackage.
Object.balance ● Balance object
Fetch the total balance for coins with marker type coinType (e.g. 0x2::sui::SUI), owned by this address.
If the address does not own any coins of that type, a balance of zero is returned.
Object.balance.coinType ● String! non-null scalar
Object.balances ● BalanceConnection object
Total balance across coins owned by this address, grouped by coin type.
Object.balances.first ● Int scalar
Object.balances.after ● String scalar
Object.balances.last ● Int scalar
Object.balances.before ● String scalar
Object.defaultNameRecord ● NameRecord object
The domain explicitly configured as the default Name Service name for this address.
Object.digest ● String scalar
32-byte hash that identifies the object's contents, encoded in Base58.
Object.dynamicField ● DynamicField object
Access a dynamic field on an object using its type and BCS-encoded name.
Returns null if a dynamic field with that name could not be found attached to this object.
Object.dynamicField.name ● DynamicFieldName! non-null input
Object.dynamicFields ● DynamicFieldConnection object
Dynamic fields owned by this object.
Object.dynamicFields.first ● Int scalar
Object.dynamicFields.after ● String scalar
Object.dynamicFields.last ● Int scalar
Object.dynamicFields.before ● String scalar
Object.dynamicObjectField ● DynamicField object
Access a dynamic object field on an object using its type and BCS-encoded name.
Returns null if a dynamic object field with that name could not be found attached to this object.
Object.dynamicObjectField.name ● DynamicFieldName! non-null input
Object.id ● ID! non-null scalar
The object's globally unique identifier, which can be passed to Query.node to refetch it.
Object.multiGetBalances ● [Balance!] list object
Fetch the total balances keyed by coin types (e.g. 0x2::sui::SUI) owned by this address.
Returns None when no checkpoint is set in scope (e.g. execution scope).
If the address does not own any coins of a given type, a balance of zero is returned for that type.
Object.multiGetBalances.keys ● [String!]! non-null scalar
Object.multiGetDynamicFields ● [DynamicField]! non-null object
Access dynamic fields on an object using their types and BCS-encoded names.
Returns a list of dynamic fields that is guaranteed to be the same length as keys. If a dynamic field in keys could not be found in the store, its corresponding entry in the result will be null.