Data structure that envelopes a PublicKey. Only supports Schnorr-based addresses.

Constructors

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

    Parameters

    • key: string

    Returns PublicKey

Methods

  • Returns void

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

    Parameters

    Returns Address

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

    Parameters

    Returns Address

  • Returns string