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

  • Compute a 4-byte key fingerprint for this public key as a hex string. Default implementation uses RIPEMD160(SHA256(public_key)).

    Returns string

  • 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

Generated using TypeDoc