Represents a private key.

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

  • Creates a private key from bytes or a hex string.

    Parameters

    • privateKey: string | Uint8Array

      Input string or byte array.

    Returns PrivateKey

Properties

bytes: Uint8Array

Underlying bytes.

NAME: string

Byte array name (required because constructor.name is dropped during minification).

SIZE: number

Byte size of raw private key.

Methods

  • Returns representation of this object that can be stored in JSON.

    Returns string

    JSON-safe representation of this object.

  • Returns string representation of this object.

    Returns string

    String representation of this object

  • Creates a random private key.

    Returns PrivateKey

    Random private key.