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
key
ability, and anid: UID
as 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.