Codec for built-in type struct which fields are fixed-sized.
struct
A list of field keys to specifiy the field order. This is required because JavaScript object does not guarantee the order of fields in old versions.
Optional
import { mol } from "@ckb-cobuild/molecule";const Point = mol.struct( "Point", { x: mol.byte, y: mol.byte, }, ["x", "y"],); Copy
import { mol } from "@ckb-cobuild/molecule";const Point = mol.struct( "Point", { x: mol.byte, y: mol.byte, }, ["x", "y"],);
Generated using TypeDoc
Codec for built-in type
struct
which fields are fixed-sized.