Skip to content

ServiceClass

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

Represents an IDL type.

K extends string = string

Fields extends GenericIdlServiceFields = GenericIdlServiceFields

new ServiceClass<K, Fields>(fields): ServiceClass<K, Fields>

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

Fields

ServiceClass<K, Fields>

ConstructType.constructor

readonly _fields: [K, Fields[K]][]

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

get name(): string

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

string

ConstructType.name


get typeName(): IdlTypeName

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

IdlTypeName

ConstructType.typeName

_buildTypeTableImpl(T): void

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

TypeTable

void

ConstructType._buildTypeTableImpl


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

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

D

R

Visitor<D, R>

D

R

ConstructType.accept


buildTypeTable(typeTable): void

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

TypeTable

void

ConstructType.buildTypeTable


checkType(t): ConstructType<Principal>

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

Type

ConstructType<Principal>

ConstructType.checkType


covariant(x): x is Principal

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

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

any

x is Principal

ConstructType.covariant


decodeValue(b, t): Principal

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

PipeArrayBuffer

Type

Principal

ConstructType.decodeValue


display(): string

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

string

ConstructType.display


encodeType(typeTable): Uint8Array<ArrayBufferLike>

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

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

TypeTable

Uint8Array<ArrayBufferLike>

ConstructType.encodeType


encodeValue(x): Uint8Array

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

Internal

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

Principal

Uint8Array

ConstructType.encodeValue


fieldsAsObject(): Fields

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

Fields


valueToString(x): string

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

Principal

string

ConstructType.valueToString


static [hasInstance](instance): instance is ServiceClass<string, GenericIdlServiceFields>

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

any

instance is ServiceClass<string, GenericIdlServiceFields>