Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Element

ElementModP and ElementModQ both implement this interface, which is useful for functions and methods that can work on either type.

Hierarchy

Index

Properties

cryptoHashString: string

Accessors

Methods

  • isInBounds(): boolean
  • Validate that the element is actually within the bounds of [0,max). Returns true if all is good, false if something's wrong.

    Returns boolean

  • isInBoundsNoZero(): boolean
  • Validate that the element is actually within the bounds of [1,max). Returns true if all is good, false if something's wrong.

    Returns boolean

  • isZero(): boolean
  • toBigint(): bigint
  • Converts from the internal representation to a regular JS bigint.

    Returns bigint

  • toBytes(): Uint8Array
  • Converts from the internal representation to a big-endian Uint8Array.

    Returns Uint8Array

  • toHex(): string

Generated using TypeDoc