Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace utils

Index

Functions

  • bufToHex(buf: Uint8Array | Buffer | ArrayBuffer): string
  • Convert input to hex string (no 0x prefix).

    deprecated

    Use bytesToHex instead.

    Parameters

    • buf: Uint8Array | Buffer | ArrayBuffer

    Returns string

  • bytesToHex(bytes: Uint8Array): string
  • Convert byte array to hex string (no 0x prefix).

    Parameters

    • bytes: Uint8Array

    Returns string

  • equalByteArrays(a: string | Uint8Array, b: string | Uint8Array): boolean
  • Compare both inputs, return true if they represent the same byte array.

    Parameters

    • a: string | Uint8Array
    • b: string | Uint8Array

    Returns boolean

  • hexToBuf(hex: string | Uint8Array | Buffer): Buffer
  • Convert input to a Buffer.

    deprecated

    Use hexToBytes instead.

    Parameters

    • hex: string | Uint8Array | Buffer

    Returns Buffer

  • hexToBytes(hex: string | Uint8Array): Uint8Array
  • Convert input to a byte array.

    Parameters

    • hex: string | Uint8Array

    Returns Uint8Array

  • keccak256Buf(message: Message): Uint8Array
  • Return Keccak-256 of the input.

    Parameters

    • message: Message

    Returns Uint8Array

Generated using TypeDoc