DynamicField
Dynamic fields are heterogenous fields that can be added or removed from an object at runtime. Their names are arbitrary Move values that have copy, drop, and store.
There are two sub-types of dynamic fields:
- Dynamic fields can store any value that has
store. Objects stored in this kind of field will be considered wrapped (not accessible via its ID by external tools like explorers, wallets, etc. accessing storage). - Dynamic object fields can only store objects (values that have the
keyability, and anid: UIDas its first field) that havestore, but they will still be directly accessible off-chain via their ID after being attached as a field.
type DynamicField implements IAddressable, IMoveObject, IObject {
address: SuiAddress!
balance(
coinType: String!
): Balance
balances(
first: Int
after: String
last: Int
before: String
): BalanceConnection
contents: MoveValue
defaultSuinsName: String
digest: String
dynamicField(
name: DynamicFieldName!
): DynamicField
dynamicFields(
first: Int
after: String
last: Int
before: String
): DynamicFieldConnection
dynamicObjectField(
name: DynamicFieldName!
): DynamicField
hasPublicTransfer: Boolean
moveObjectBcs: Base64
multiGetBalances(
keys: [String!]!
): [Balance!]
multiGetDynamicFields(
keys: [DynamicFieldName!]!
): [DynamicField]!
multiGetDynamicObjectFields(
keys: [DynamicFieldName!]!
): [DynamicField]!
name: MoveValue
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
value: DynamicFieldValue
version: UInt53
}
Fields
DynamicField.address ● SuiAddress! non-null scalar
The DynamicField's ID.
DynamicField.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.
DynamicField.balance.coinType ● String! non-null scalar
DynamicField.balances ● BalanceConnection object
Total balance across coins owned by this address, grouped by coin type.
DynamicField.balances.first ● Int scalar
DynamicField.balances.after ● String scalar
DynamicField.balances.last ● Int scalar
DynamicField.balances.before ● String scalar
DynamicField.contents ● MoveValue object
The structured representation of the object's contents.
DynamicField.defaultSuinsName ● String scalar
The domain explicitly configured as the default SuiNS name for this address.
DynamicField.digest ● String scalar
32-byte hash that identifies the object's contents, encoded in Base58.
DynamicField.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.
DynamicField.dynamicField.name ● DynamicFieldName! non-null input
DynamicField.dynamicFields ● DynamicFieldConnection object
Dynamic fields owned by this object.
Dynamic fields on wrapped objects can be accessed using Address.dynamicFields.
DynamicField.dynamicFields.first ● Int scalar
DynamicField.dynamicFields.after ● String scalar
DynamicField.dynamicFields.last ● Int scalar
DynamicField.dynamicFields.before ● String scalar
DynamicField.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.
DynamicField.dynamicObjectField.name ● DynamicFieldName! non-null input
DynamicField.hasPublicTransfer ● Boolean scalar
Whether this object can be transfered using the TransferObjects Programmable Transaction Command or sui::transfer::public_transfer.
Both these operations require the object to have both the key and store abilities.
DynamicField.moveObjectBcs ● Base64 scalar
The Base64-encoded BCS serialize of this object, as a MoveObject.
DynamicField.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.
DynamicField.multiGetBalances.keys ● [String!]! non-null scalar
DynamicField.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.
DynamicField.multiGetDynamicFields.keys ● [DynamicFieldName!]! non-null input
DynamicField.multiGetDynamicObjectFields ● [DynamicField]! non-null object
Access dynamic object fields on an object using their types and BCS-encoded names.
Returns a list of dynamic object fields that is guaranteed to be the same length as keys. If a dynamic object field in keys could not be found in the store, its corresponding entry in the result will be null.
DynamicField.multiGetDynamicObjectFields.keys ● [DynamicFieldName!]! non-null input
DynamicField.name ● MoveValue object
The dynamic field's name, as a Move value.
DynamicField.objectAt ● Object object
Fetch the object with the same ID, at a different version, root version bound, or checkpoint.
DynamicField.objectAt.version ● UInt53 scalar
DynamicField.objectAt.rootVersion ● UInt53 scalar
DynamicField.objectAt.checkpoint ● UInt53 scalar
DynamicField.objectBcs ● Base64 scalar
The Base64-encoded BCS serialization of this object, as an Object.
DynamicField.objectVersionsAfter ● ObjectConnection object
Paginate all versions of this object after this one.
DynamicField.objectVersionsAfter.first ● Int scalar
DynamicField.objectVersionsAfter.after ● String scalar
DynamicField.objectVersionsAfter.last ● Int scalar
DynamicField.objectVersionsAfter.before ● String scalar
DynamicField.objectVersionsAfter.filter ● VersionFilter input
DynamicField.objectVersionsBefore ● ObjectConnection object
Paginate all versions of this object before this one.