Skip to main content

MoveStruct

type MoveStruct

A move struct

BCS

The BCS serialized form for this type is defined by the following ABNF:

```text move-struct = compressed-struct-tag u64 bytes

compressed-struct-tag = other-struct-type / gas-coin-type / staked-iota-type / coin-type other-struct-type = %d00 struct-tag gas-coin-type = %d01 staked-iota-type = %d02 coin-type = %d03 type-tag

; The first 32 bytes of the `bytes` contents are the object's object-id. ```

type MoveStruct struct {
// The type of this object
StructType *StructTag
// Number that increases each time a tx takes this object as a mutable
// input This is a lamport timestamp, not a sequentially increasing
// version
Version *Version
// BCS bytes of a Move struct value
Contents []byte
}

func MoveStructFromBcs

func MoveStructFromBcs(bcs []byte) (MoveStruct, error)

Create this type from BCS encoded bytes.

func MoveStructFromJson

func MoveStructFromJson(json string) (MoveStruct, error)

Create this type from JSON encoded string.

func (*MoveStruct) Destroy

func (r *MoveStruct) Destroy()