Function verifySignature

  • Verifies that the given transaction has a valid signature based on public-key encryption.

    Parameters

    • tx: string | Transaction

      A transaction to verify the signature of. (Can be in object or encoded string format).

    • Optional publicKey: string

      Specific public key to use to verify. If not specified the SigningPublicKey of tx will be used.

      Optional

    Returns boolean

    Returns true if tx has a valid signature, and returns false otherwise.

    Throws

    Error when transaction is missing TxnSignature

    Throws

    Error when publicKey is not provided and transaction is missing SigningPubKey

Generated using TypeDoc