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 IAddressable, IObject {
address: SuiAddress!
balance(
coinType: String!
): Balance
balances(
first: Int
after: String
last: Int
before: String
): BalanceConnection
digest: String!
linkage: [Linkage!]
moduleBcs: Base64
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
storageRebate: BigInt
typeOrigins: [TypeOrigin!]
version: UInt53!
}

Fields

MovePackage.address ● SuiAddress! non-null scalar

The MovePackage's ID.

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

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

MovePackage.balances ● BalanceConnection object

Total balance across coins owned by this address, grouped by coin type.

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

MovePackage.digest ● String! non-null scalar

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

MovePackage.linkage ● [Linkage!] list object

The transitive dependencies of this package.

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.multiGetBalances ● [Balance!] list object

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

If the address does not own any coins of a given type, a balance of zero is returned 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! non-null 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! non-null 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, root version bound, or checkpoint.

If no additional bound is provided, the latest version of this package is fetched at the latest checkpoint.

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! non-null 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! non-null 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.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! non-null scalar

The version of this package 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

multiGetPackages query ● package query

Member Of

MovePackage object ● MovePackageConnection object ● MovePackageEdge object ● Object object