Skip to content

FixedNatClass

Defined in: packages/candid/src/idl.ts:794

Represents an IDL fixed-width Nat(n)

new FixedNatClass(_bits): FixedNatClass

Defined in: packages/candid/src/idl.ts:803

number

FixedNatClass

PrimitiveType.constructor

readonly _bits: number

Defined in: packages/candid/src/idl.ts:803

get name(): string

Defined in: packages/candid/src/idl.ts:845

string

PrimitiveType.name


get typeName(): IdlTypeName

Defined in: packages/candid/src/idl.ts:795

IdlTypeName

PrimitiveType.typeName

_buildTypeTableImpl(_typeTable): void

Defined in: packages/candid/src/idl.ts:257

TypeTable

void

PrimitiveType._buildTypeTableImpl


accept<D, R>(v, d): R

Defined in: packages/candid/src/idl.ts:807

D

R

Visitor<D, R>

D

R

PrimitiveType.accept


buildTypeTable(typeTable): void

Defined in: packages/candid/src/idl.ts:217

TypeTable

void

PrimitiveType.buildTypeTable


checkType(t): Type

Defined in: packages/candid/src/idl.ts:250

Type

Type

PrimitiveType.checkType


covariant(x): x is bigint

Defined in: packages/candid/src/idl.ts:811

Assert that JavaScript’s x is the proper type represented by this Type.

any

x is bigint

PrimitiveType.covariant


decodeValue(b, t): number | bigint

Defined in: packages/candid/src/idl.ts:835

PipeArrayBuffer

Type

number | bigint

PrimitiveType.decodeValue


display(): string

Defined in: packages/candid/src/idl.ts:208

string

PrimitiveType.display


encodeType(): Uint8Array<ArrayBufferLike>

Defined in: packages/candid/src/idl.ts:830

Implement I in the IDL spec. Encode this type for the type table.

Uint8Array<ArrayBufferLike>

PrimitiveType.encodeType


encodeValue(x): Uint8Array<ArrayBufferLike>

Defined in: packages/candid/src/idl.ts:826

Internal

Encode the value. This needs to be public because it is used by encodeValue() from different types.

number | bigint

Uint8Array<ArrayBufferLike>

PrimitiveType.encodeValue


valueToString(x): string

Defined in: packages/candid/src/idl.ts:849

number | bigint

string

PrimitiveType.valueToString


static [hasInstance](instance): instance is FixedNatClass

Defined in: packages/candid/src/idl.ts:799

any

instance is FixedNatClass