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

    Interface CryptoSigner

    interface CryptoSigner {
        digest(data: Uint8Array): Bytes;
        sign(data: Hex, keyUri?: string): Promise<Bytes>;
        verify(signature: Bytes, data: Hex, keyUri?: string): Promise<boolean>;
    }

    Implemented by

    Index

    Methods

    • Signs a message with a key pair.

      Parameters

      • data: Hex

        The data to sign.

      • OptionalkeyUri: string

        The URI of the key to sign the data with.

      Returns Promise<Bytes>

      The signature of the input data.

    • Verifies if a signature was produced by a key pair.

      Parameters

      • signature: Bytes

        The signature to verify.

      • data: Hex

        The data that was signed.

      • OptionalkeyUri: string

        The URI of the key to use for verification.

      Returns Promise<boolean>

      A promise that resolves if the signature is valid, and rejects otherwise.