Optionalvalue: null | TSerialize an argument to BCS-serialized bytes.
Serialize an argument as a type-agnostic, fixed byte sequence. The byte sequence contains the number of the following bytes followed by the BCS-serialized bytes for a typed argument.
StaticBoolFactory method to generate a MoveOptionboolean or undefined.
Optionalvalue: null | booleana MoveOptionvalue
StaticdeserializeStaticMoveFactory method to generate a MoveOptionstring or undefined.
Optionalvalue: null | stringa MoveOptionvalue
MoveOption.MoveString("hello").isSome() === true;
MoveOption.MoveString("").isSome() === true;
MoveOption.MoveString().isSome() === false;
MoveOption.MoveString(undefined).isSome() === false;
value: the value used to fill the MoveOption. If value is undefined
the resulting MoveOption's .isSome() method will return false.
StaticU128Factory method to generate a MoveOptionnumber or a bigint or undefined.
Optionalvalue: null | AnyNumbera MoveOptionvalue
StaticU16Factory method to generate a MoveOptionnumber or undefined.
Optionalvalue: null | numbera MoveOptionvalue
StaticU256Factory method to generate a MoveOptionnumber or a bigint or undefined.
Optionalvalue: null | AnyNumbera MoveOptionvalue
StaticU32Factory method to generate a MoveOptionnumber or undefined.
Optionalvalue: null | numbera MoveOptionvalue
StaticU64Factory method to generate a MoveOptionnumber or a bigint or undefined.
Optionalvalue: null | AnyNumbera MoveOptionvalue
StaticU8Factory method to generate a MoveOptionnumber or undefined.
Optionalvalue: null | numbera MoveOptionvalue
Serializes a
Serializablevalue to its BCS representation. This function is the Typescript SDK equivalent ofbcs::to_bytesin Move.