Options
All
  • Public
  • Public/Protected
  • All
Menu

@dfinity/agent

Index

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Functions

Type aliases

ActorConstructor: new (config: ActorConfig) => ActorSubclass

Type declaration

ActorSubclass<T>: Actor & T

A subclass of an actor. Actor class itself is meant to be a based class.

Type parameters

DerEncodedPublicKey: ArrayBuffer & { __derEncodedPublicKey__: void }

A public key that is DER encoded. This is a branded ArrayBuffer.

Envelope<T>: Signed<T> | UnSigned<T>

Type parameters

  • T

HashTree: [NodeId.Empty] | [NodeId.Fork, HashTree, HashTree] | [NodeId.Labeled, ArrayBuffer, HashTree] | [NodeId.Leaf, ArrayBuffer] | [NodeId.Pruned, ArrayBuffer]
ManagementCanisterRecord: _SERVICE
Nonce: Uint8Array & { __nonce__: void }
RequestId: ArrayBuffer & { __requestId__: void }
Signature: ArrayBuffer & { __signature__: void }

A signature array buffer.

Functions

  • blsVerify(pk: Uint8Array, sig: Uint8Array, msg: Uint8Array): Promise<boolean>
  • Parameters

    • pk: Uint8Array

      primary key: Uint8Array

    • sig: Uint8Array

      signature: Uint8Array

    • msg: Uint8Array

      message: Uint8Array

    Returns Promise<boolean>

    Promise resolving a boolean

  • compare(b1: ArrayBuffer, b2: ArrayBuffer): number
  • concat(...buffers: ArrayBuffer[]): ArrayBuffer
  • fromHex(hex: string): ArrayBuffer
  • hash(data: ArrayBuffer): ArrayBuffer
  • hashTreeToString(tree: HashTree): string
  • hashValue(value: unknown): ArrayBuffer
  • lookup_path(path: (string | ArrayBuffer)[], tree: HashTree): ArrayBuffer | undefined
  • reconstruct(t: HashTree): Promise<ArrayBuffer>
  • requestIdOf(request: Record<string, any>): RequestId
  • toHex(buffer: ArrayBuffer): string
  • Transforms a buffer to an hexadecimal string. This will use the buffer as an Uint8Array.

    Parameters

    • buffer: ArrayBuffer

      The buffer to return the hexadecimal string of.

    Returns string

  • verify(pk: Uint8Array, sig: Uint8Array, msg: Uint8Array): boolean

Generated using TypeDoc