Options
All
  • Public
  • Public/Protected
  • All
Menu

@dfinity/candid

Index

Type Aliases

JsonValue: boolean | string | number | JsonArray | JsonObject

Functions

  • bufFromBufLike(bufLike: number[] | ArrayBufferLike | ArrayBufferView | DataView | Uint8Array | [number] | { buffer: ArrayBuffer }): ArrayBuffer
  • Returns a true ArrayBuffer from an ArrayBufferLike object.

    Parameters

    • bufLike: number[] | ArrayBufferLike | ArrayBufferView | DataView | Uint8Array | [number] | { buffer: ArrayBuffer }

      a buffer-like object

    Returns ArrayBuffer

    ArrayBuffer

  • concat(...buffers: ArrayBuffer[]): ArrayBuffer
  • fromHexString(hexString: string): ArrayBuffer
  • idlLabelToId(label: string): number
  • lebEncode(value: number | bigint): ArrayBuffer
  • Encode a positive number (or bigint) into a Buffer. The number will be floored to the nearest integer.

    Parameters

    • value: number | bigint

      The number to encode.

    Returns ArrayBuffer

  • renderInput(t: Type<any>): InputBox
  • renderValue(t: Type<any>, input: InputBox, value: any): void
  • slebEncode(value: number | bigint): ArrayBuffer
  • Encode a number (or bigint) into a Buffer, with support for negative numbers. The number will be floored to the nearest integer.

    Parameters

    • value: number | bigint

      The number to encode.

    Returns ArrayBuffer

  • toHexString(bytes: ArrayBuffer): string
  • uint8ToBuf(arr: Uint8Array): ArrayBuffer
  • Returns a true ArrayBuffer from a Uint8Array, as Uint8Array.buffer is unsafe.

    Parameters

    • arr: Uint8Array

      Uint8Array to convert

    Returns ArrayBuffer

    ArrayBuffer

  • writeIntLE(value: number | bigint, byteLength: number): ArrayBuffer
  • writeUIntLE(value: number | bigint, byteLength: number): ArrayBuffer

Generated using TypeDoc