Skip to content

@temporary-escape/mod-sdk / OptionalU64

Class: OptionalU64 ​

Defined in: optional-u64.ts:8

std::optional<uint64_t> equivalent for CBOR documents. AssemblyScript does not allow nullable value types, so a present flag accompanies the value; the wire format is either the integer or CBOR null, matching the engine.

Extends ​

Constructors ​

Constructor ​

ts
new OptionalU64(): OptionalU64;

Returns ​

OptionalU64

Inherited from ​

Serializable.constructor

Properties ​

PropertyTypeDefault valueDefined in
presentboolfalseoptional-u64.ts:9
valuenumber0optional-u64.ts:10

Methods ​

pack() ​

ts
pack(enc: CborEncoder): void;

Defined in: optional-u64.ts:12

Parameters ​

ParameterType
encCborEncoder

Returns ​

void

Overrides ​

Serializable.pack


unpack() ​

ts
unpack(dec: CborVisitor): void;

Defined in: optional-u64.ts:20

Parameters ​

ParameterType
decCborVisitor

Returns ​

void

Overrides ​

Serializable.unpack