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 IAddressable, IObject {
address: SuiAddress!
asMoveObject: MoveObject
asMovePackage: MovePackage
balance(
coinType: String!
): Balance
balances(
first: Int
after: String
last: Int
before: String
): BalanceConnection
digest: String!
multiGetBalances(
keys: [String!]!
): [Balance!]
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
storageRebate: BigInt
version: UInt53!
}
Fields
Object.address
● SuiAddress!
non-null scalar
The Object's ID.
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.digest
● String!
non-null scalar
32-byte hash that identifies the object's contents, encoded in Base58.
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.objectAt
● Object
object
Fetch the object with the same ID, at a different version, root version bound, or checkpoint.
If no additional bound is provided, the latest version of this object is fetched at the latest checkpoint.
Object.objectAt.version
● UInt53
scalar
Object.objectAt.rootVersion
● UInt53
scalar
Object.objectAt.checkpoint
● UInt53
scalar
Object.objectBcs
● Base64
scalar
The Base64-encoded BCS serialization of this object, as an Object
.
Object.objectVersionsAfter
● ObjectConnection!
non-null object
Paginate all versions of this object after this one.
Object.objectVersionsAfter.first
● Int
scalar
Object.objectVersionsAfter.after
● String
scalar
Object.objectVersionsAfter.last
● Int
scalar
Object.objectVersionsAfter.before
● String
scalar
Object.objectVersionsAfter.filter
● VersionFilter
input
Object.objectVersionsBefore
● ObjectConnection!
non-null object
Paginate all versions of this object before this one.
Object.objectVersionsBefore.first
● Int
scalar
Object.objectVersionsBefore.after
● String
scalar
Object.objectVersionsBefore.last
● Int
scalar
Object.objectVersionsBefore.before
● String
scalar
Object.objectVersionsBefore.filter
● VersionFilter
input
Object.objects
● MoveObjectConnection
object
Objects owned by this object, optionally filtered by type.
Object.objects.first
● Int
scalar
Object.objects.after
● String
scalar
Object.objects.last
● Int
scalar
Object.objects.before
● String
scalar
Object.objects.filter
● ObjectFilter
input
Object.owner
● Owner
union
The object's owner kind.
Object.previousTransaction
● Transaction
object
The transaction that created this version of the object.
Object.storageRebate
● BigInt
scalar
The SUI returned to the sponsor or sender of the transaction that modifies or deletes this object.
Object.version
● UInt53!
non-null scalar
The version of this object that this content comes from.
Interfaces
IAddressable
interface
Interface implemented by GraphQL types representing entities that are identified by an address.
An address uniquely represents either the public key of an account, or an object's ID, but never both. It is not possible to determine which type an address represents up-front. If an object is wrapped, its contents will not be accessible via its address, but it will still be possible to access other objects it owns.
IObject
interface
Interface implemented by versioned on-chain values that are addressable by an ID (also referred to as its address). This includes Move objects and packages.
Returned By
multiGetObjects
query ● object
query
Member Of
Address
object ● ConsensusObjectRead
object ● DynamicField
object ● Epoch
object ● GasEffects
object ● IObject
interface ● MoveObject
object ● MovePackage
object ● Object
object ● ObjectChange
object ● ObjectConnection
object ● ObjectEdge
object ● OwnedOrImmutable
object ● PerEpochConfig
object ● Receiving
object