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

    Interface ISecretKey

    Interface for the SecretKey class. ISecretKey

    interface ISecretKey {
        bytes: Bytes;
        hex: Hex;
        seed: bigint;
        computePublicKey(): Bytes;
        equals(other: SecretKey): boolean;
        isValid(): boolean;
        json(): SecretKeyObject;
    }

    Implemented by

    Index

    Properties

    bytes: Bytes

    Get the secret key bytes.

    hex: Hex

    Get the secret key as a hex string.

    seed: bigint

    Getter returns the secret key bytes in bigint format. Setter allows alternative method of using a bigint seed for the entropy.

    Methods

    • Uses the secret key to compute the corresponding public key.

      Returns Bytes

      A new PublicKey object.

    • Checks if this secret key is equal to another secret key.

      Parameters

      Returns boolean

      True if the private keys are equal.

    • Checks if the secret key is valid.

      Returns boolean

      Whether the secret key is valid.

    • JSON representation of a SecretKey object.

      Returns SecretKeyObject

      The SecretKey as a JSON object.