MoveValue
No description
type MoveValue {
asAddress: Address
bcs: Base64
display: Display
extract(
path: String!
): MoveValue
format(
format: String!
): JSON
json: JSON
type: MoveType
}
Fields
MoveValue.asAddress ● Address object
Attempts to treat this value as an Address.
If the value is of type address or 0x2::object::ID, it is interpreted as an address pointer, and it is scoped to the current checkpoint.
If the value is of type 0x2::object::UID, it is interpreted as a wrapped object whose version is bounded by the root version of the current value. Such values do not support nested owned object queries, but Address.addressAt can be used to re-scope it to a checkpoint (defaults to the current checkpoint), instead of a root version, allowing owned object queries.
Values of other types cannot be interpreted as addresses, and null is returned.
MoveValue.bcs ● Base64 scalar
The BCS representation of this value, Base64-encoded.
MoveValue.display ● Display object
A rendered JSON blob based on an on-chain template, substituted with data from this value.
Returns null if the value's type does not have an associated Display template.
MoveValue.extract ● MoveValue object
Extract a nested value at the given path.
path is a Display v2 'chain' expression, allowing access to nested, named and positional fields, vector indices, VecMap keys, and dynamic (object) field accesses.
MoveValue.extract.path ● String! non-null scalar
MoveValue.format ● JSON scalar
Render a single Display v2 format string against this value.
Returns null if the value does not have a valid type, or if any of the expressions in the format string fail to evaluate (e.g. field does not exist).
MoveValue.format.format ● String! non-null scalar
MoveValue.json ● JSON scalar
Representation of a Move value in JSON, where:
- Addresses, IDs, and UIDs are represented in canonical form, as JSON strings.
- Bools are represented by JSON boolean literals.
- u8, u16, and u32 are represented as JSON numbers.
- u64, u128, and u256 are represented as JSON strings.
- Balances, Strings, and Urls are represented as JSON strings.
- Vectors of bytes are represented as Base64 blobs, and other vectors are represented by JSON arrays.
- Structs are represented by JSON objects.
- Enums are represented by JSON objects, with a field named
@variantcontaining the variant name. - Empty optional values are represented by
null.
MoveValue.type ● MoveType object
The value's type.
Member Of
CoinMetadata object ● CommandOutput object ● DynamicField object ● Epoch object ● Event object ● IMoveObject interface ● MoveObject object ● MoveValue object ● Validator object ● ValidatorSet object
Implemented By
DynamicFieldValue union ● TransactionInput union