Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

Const _BLOCK_INDEX_SEED_AT_KEY

_BLOCK_INDEX_SEED_AT_KEY: "block_index_seeded_at" = "block_index_seeded_at"

Const _RANDOM_BUFFER_INDEX_KEY

_RANDOM_BUFFER_INDEX_KEY: "random_buffer_index_key" = "random_buffer_index_key"

Const _RANDOM_BUFFER_KEY

_RANDOM_BUFFER_KEY: "random_buffer_key" = "random_buffer_key"

Functions

_uint8ArrayToU32

  • _uint8ArrayToU32(data: Uint8Array): u32

binaryLog

  • binaryLog(bits: u32): u32

hash

  • hash<T>(data: T): Uint8Array
  • Hash given data. Returns hash as 32-byte array.

    Type parameters

    • T

    Parameters

    • data: T

      data can be passed as anything with .toString (hashed as UTF-8 string).

    Returns Uint8Array

hash32

  • hash32<T>(data: T): u32
  • Hash given data. Returns hash as 32-bit integer.

    Type parameters

    • T

    Parameters

    • data: T

      data can be passed as anything with .toString (hashed as UTF-8 string).

    Returns u32

hash32Bytes

  • hash32Bytes(data: Uint8Array): u32
  • Hash a given Uint8Array. Returns hash as 32-bit integer.

    Parameters

    • data: Uint8Array

    Returns u32

keccak256

  • keccak256(inp: Uint8Array): Uint8Array

keccak512

  • keccak512(inp: Uint8Array): Uint8Array

randomBuffer

  • randomBuffer(len: u32, buffer?: Uint8Array | null): Uint8Array

randomSeed

  • randomSeed(): Uint8Array

sha256

  • sha256(inp: Uint8Array): Uint8Array

Generated using TypeDoc