An abstract representation of a private key. It is associated to a signature scheme and provides signing capabilities.

interface PrivateKey {
    publicKey(): PublicKey;
    sign(message: HexInput): Signature;
    toUint8Array(): Uint8Array;
}

Implemented by

Methods

  • Derive the public key associated with the private key

    Returns PublicKey

  • Sign the given message with the private key.

    Parameters

    Returns Signature

  • Get the private key in bytes (Uint8Array).

    Returns Uint8Array