@did-btc1/keypair
    Preparing search index...

    Class SchnorrKeyPair

    Encapsulates a PublicKey and a SecretKey object as a single Keys object. SchnorrKeyPair

    Implements

    Index

    Constructors

    • Creates an instance of Keys. Must provide a at least a secret key. Can optionally provide both a private and public key, but must be a valid pair.

      Parameters

      • secretKey: KeyParams = {}

        The secret key object

      Returns SchnorrKeyPair

    Accessors

    • get multibase(): MultibaseKeys

      Get the Keys in multibase format.

      Returns MultibaseKeys

      The SecretKey in multibase format

    • get raw(): RawKeyPair

      Get the Keys as a raw key pair.

      Returns RawKeyPair

      The Keys as a raw key pair

    Methods

    • JSON representation of a Keys.

      Returns SchnorrKeyPairObject

      The Keys as a JSON object

    • Static method creates a new Keys from a JSON object.

      Parameters

      • keys: SchnorrKeyPairObject

        The JSON object to initialize the Keys.

      Returns SchnorrKeyPair

      The initialized Keys object.

    • Static method creates a new Keys (SecretKey/PublicKey) bigint secret.

      Parameters

      • secret: bigint

        The secret key secret

      Returns SchnorrKeyPair

      A new Keys object

    • Converts key bytes to a hex string.

      Parameters

      • keyBytes: Bytes

        The key bytes (private or public).

      Returns Hex

      The key bytes as a hex string.