Data structure that envelops a Private Key.

Constructors

  • Create a new [PrivateKey] from a hex-encoded string.

    Parameters

    • key: string

    Returns PrivateKey

Methods

  • Returns void

  • Get the [Address] of the PublicKey generated from this PrivateKey. Receives a [NetworkType] to determine the prefix of the address. JavaScript: let address = privateKey.toAddress(NetworkType.MAINNET);.

    Parameters

    Returns Address

  • Get ECDSA [Address] of the PublicKey generated from this PrivateKey. Receives a [NetworkType] to determine the prefix of the address. JavaScript: let address = privateKey.toAddress(NetworkType.MAINNET);.

    Parameters

    Returns Address

  • Generate a [Keypair] from this [PrivateKey].

    Returns Keypair

  • Returns the [PrivateKey] key encoded as a hex string.

    Returns string

Generated using TypeDoc