Skip to main content

MovePackage

A MovePackage is a kind of Object that represents code that has been published on-chain. It exposes information about its modules, type definitions, functions, and dependencies.

type MovePackage implements Node, IAddressable, IObject {
address: SuiAddress!
addressAt(
rootVersion: UInt53
checkpoint: UInt53
): Address
asTransactionObject(
transactionDigest: String
): TransactionObject
balance(
coinType: String!
): Balance
balances(
first: Int
after: String
last: Int
before: String
): BalanceConnection
defaultNameRecord: NameRecord
digest: String
id: ID!
linkage: [Linkage!]
module(
name: String!
): MoveModule
moduleBcs: Base64
modules(
first: Int
after: String
last: Int
before: String
): MoveModuleConnection
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
packageAt(
version: UInt53
checkpoint: UInt53
): MovePackage
packageBcs: Base64
packageVersionsAfter(
first: Int
after: String
last: Int
before: String
filter: VersionFilter
): MovePackageConnection
packageVersionsBefore(
first: Int
after: String
last: Int
before: String
filter: VersionFilter
): MovePackageConnection
previousTransaction: Transaction
receivedTransactions(
first: Int
after: String
last: Int
before: String
filter: TransactionFilter
): TransactionConnection
storageRebate: BigInt
typeOrigins: [TypeOrigin!]
version: UInt53
}

Fields​

MovePackage.address ● SuiAddress! non-null scalar​

The MovePackage's ID.

MovePackage.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.

MovePackage.addressAt.rootVersion ● UInt53 scalar​
MovePackage.addressAt.checkpoint ● UInt53 scalar​

MovePackage.asTransactionObject ● TransactionObject union​

How this object was referenced by a specific transaction.

Returns null if the object was not referenced, or was present only as a non-object marker variant of unchanged consensus input (e.g. cancelled, stream-ended, per-epoch).

The transactionDigest argument may be omitted when the query is scoped under a transaction context (e.g. a parent Transaction, TransactionEffects, or Event); the field then resolves against the in-scope transaction.

Passing an explicit transactionDigest other than the in-scope transaction in subscription context is not supported; for arbitrary transaction lookups, use the indexed Query API.

MovePackage.asTransactionObject.transactionDigest ● String scalar​

MovePackage.balance ● Balance object​

Fetch the balance for coinType (e.g. 0x2::sui::SUI) owned by this address.

The result includes the total balance, the balance held in coin objects, and the balance held in the address's balance accumulator. If this address has no balance of that type, all three values are zero.

MovePackage.balance.coinType ● String! non-null scalar​

MovePackage.balances ● BalanceConnection object​

Balances held by this address, grouped by coin type.

Each result includes the total balance, the balance held in coin objects, and the balance held in the address's balance accumulator.

MovePackage.balances.first ● Int scalar​
MovePackage.balances.after ● String scalar​
MovePackage.balances.last ● Int scalar​
MovePackage.balances.before ● String scalar​

MovePackage.defaultNameRecord ● NameRecord object​

The domain explicitly configured as the default Name Service name for this address.

MovePackage.digest ● String scalar​

32-byte hash that identifies the package's contents, encoded in Base58.

MovePackage.id ● ID! non-null scalar​

The package's globally unique identifier, which can be passed to Query.node to refetch it.

MovePackage.linkage ● [Linkage!] list object​

The transitive dependencies of this package.

MovePackage.module ● MoveModule object​

The module named name in this package.

MovePackage.module.name ● String! non-null scalar​

MovePackage.moduleBcs ● Base64 scalar​

BCS representation of the package's modules. Modules appear as a sequence of pairs (module name, followed by module bytes), in alphabetic order by module name.

MovePackage.modules ● MoveModuleConnection object​

Paginate through this package's modules.

MovePackage.modules.first ● Int scalar​
MovePackage.modules.after ● String scalar​
MovePackage.modules.last ● Int scalar​
MovePackage.modules.before ● String scalar​

MovePackage.multiGetBalances ● [Balance!] list object​

Fetch balances keyed by coin types (e.g. 0x2::sui::SUI) owned by this address.

Each result includes the total balance, the balance held in coin objects, and the balance held in the address's balance accumulator. Returns null when no checkpoint is set in scope (e.g. execution scope). If this address has no balance of a given type, all three values are zero for that type.

MovePackage.multiGetBalances.keys ● [String!]! non-null scalar​

MovePackage.objectAt ● Object object​

Fetch the package as an 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.

MovePackage.objectAt.version ● UInt53 scalar​
MovePackage.objectAt.rootVersion ● UInt53 scalar​
MovePackage.objectAt.checkpoint ● UInt53 scalar​

MovePackage.objectBcs ● Base64 scalar​

The Base64-encoded BCS serialization of this package, as an Object.

MovePackage.objectVersionsAfter ● ObjectConnection object​

Paginate all versions of this package treated as an object, after this one.

MovePackage.objectVersionsAfter.first ● Int scalar​
MovePackage.objectVersionsAfter.after ● String scalar​
MovePackage.objectVersionsAfter.last ● Int scalar​
MovePackage.objectVersionsAfter.before ● String scalar​
MovePackage.objectVersionsAfter.filter ● VersionFilter input​

MovePackage.objectVersionsBefore ● ObjectConnection object​

Paginate all versions of this package treated as an object, before this one.

MovePackage.objectVersionsBefore.first ● Int scalar​
MovePackage.objectVersionsBefore.after ● String scalar​
MovePackage.objectVersionsBefore.last ● Int scalar​
MovePackage.objectVersionsBefore.before ● String scalar​
MovePackage.objectVersionsBefore.filter ● VersionFilter input​

MovePackage.objects ● MoveObjectConnection object​

Objects owned by this package, optionally filtered by type.

MovePackage.objects.first ● Int scalar​
MovePackage.objects.after ● String scalar​
MovePackage.objects.last ● Int scalar​
MovePackage.objects.before ● String scalar​
MovePackage.objects.filter ● ObjectFilter input​

MovePackage.owner ● Owner union​

The object's owner kind.

MovePackage.packageAt ● MovePackage object​

Fetch the package with the same original ID, at a different version, or checkpoint.

If no additional bound is provided, the package is fetched at the latest checkpoint known to the RPC.

MovePackage.packageAt.version ● UInt53 scalar​
MovePackage.packageAt.checkpoint ● UInt53 scalar​

MovePackage.packageBcs ● Base64 scalar​

The Base64-encoded BCS serialization of this package, as a MovePackage.

MovePackage.packageVersionsAfter ● MovePackageConnection object​

Paginate all versions of this package after this one.

MovePackage.packageVersionsAfter.first ● Int scalar​
MovePackage.packageVersionsAfter.after ● String scalar​
MovePackage.packageVersionsAfter.last ● Int scalar​
MovePackage.packageVersionsAfter.before ● String scalar​
MovePackage.packageVersionsAfter.filter ● VersionFilter input​

MovePackage.packageVersionsBefore ● MovePackageConnection object​

Paginate all versions of this package before this one.

MovePackage.packageVersionsBefore.first ● Int scalar​
MovePackage.packageVersionsBefore.after ● String scalar​
MovePackage.packageVersionsBefore.last ● Int scalar​
MovePackage.packageVersionsBefore.before ● String scalar​
MovePackage.packageVersionsBefore.filter ● VersionFilter input​

MovePackage.previousTransaction ● Transaction object​

The transaction that created this version of the object.

MovePackage.receivedTransactions ● TransactionConnection object​

The transactions that sent objects to this object.

MovePackage.receivedTransactions.first ● Int scalar​
MovePackage.receivedTransactions.after ● String scalar​
MovePackage.receivedTransactions.last ● Int scalar​
MovePackage.receivedTransactions.before ● String scalar​
MovePackage.receivedTransactions.filter ● TransactionFilter input​

MovePackage.storageRebate ● BigInt scalar​

The SUI returned to the sponsor or sender of the transaction that modifies or deletes this object.

MovePackage.typeOrigins ● [TypeOrigin!] list object​

A table identifying which versions of a package introduced each of its types.

MovePackage.version ● UInt53 scalar​

The version of this package that this content comes from.

Interfaces​

Node interface​

An interface implemented by types that can be uniquely identified by a globally unique ID, following the GraphQL Global Object Identification specification.

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​

multiGetPackages query ● package query

Member Of​

MoveModule object ● MovePackage object ● MovePackageConnection object ● MovePackageEdge object ● Object object