Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

ZkComponents: { wasm: Buffer; witnessCalculator: any; zkey: Uint8Array }

Type declaration

  • wasm: Buffer
  • witnessCalculator: any
  • zkey: Uint8Array

Variables

FIELD_SIZE: BigNumber = ...

Functions

  • fetchComponentsFromFilePaths(wasmPath: string, witnessCalculatorPath: string, zkeyPath: string): Promise<ZkComponents>
  • generateFunctionSigHash(functionSignature: string): string
  • getChainIdType(chainID?: number): number
  • Computes the updated chain ID with chain type.

    Parameters

    • chainID: number = 31337

      Chain ID to encode into augmented chain ID Type, defaults to hardhat's chain ID.

    Returns number

  • getExtDataHash(__namedParameters: any): BigNumber
  • getFixedAnchorExtDataHash(__namedParameters: any): BigNumber
  • max(arr: any): any
  • mean(arr: any): number
  • median(arr: number[]): number
  • min(arr: any): any
  • p256(n: bigint): string
  • packEncryptedMessage(encryptedMessage: any): string
  • poseidonHash(items: BigNumberish[]): BigNumber
  • poseidonHash2(a: any, b: any): BigNumber
  • randomBN(nbytes?: number): BigNumber
  • rbigint(nbytes: number): any
  • signMessage(wallet: any, data: any): any
  • toBuffer(value: BigNumberish, length: number): Buffer
  • Convert value into buffer of specified byte length

    Parameters

    • value: BigNumberish
    • length: number

    Returns Buffer

  • toFixedHex(number: BigNumberish, length?: number): string
  • toHex(covertThis: number | bigint | BytesLike, padding: number): string
  • unpackEncryptedMessage(encryptedMessage: any): { ciphertext: string; ephemPublicKey: string; nonce: string; version: string }
  • Parameters

    • encryptedMessage: any

    Returns { ciphertext: string; ephemPublicKey: string; nonce: string; version: string }

    • ciphertext: string
    • ephemPublicKey: string
    • nonce: string
    • version: string

Generated using TypeDoc