Signer implementation for the SingleKey authentication scheme. This class extends a SingleKeyAccount by adding signing capabilities through a valid private key. Currently, the only supported signature schemes are Ed25519 and Secp256k1.

Note: Generating a signer instance does not create the account on-chain.

Implements

Implementation - Account (On-Chain Model)

accountAddress: AccountAddress

Account address associated with the account

privateKey: PrivateKeyInput

Private key associated with the account

publicKey: AnyPublicKey

Public key associated with the account

signingScheme: SingleKey = SigningScheme.SingleKey

Signing scheme used to sign transactions

  • Verify the given message and signature with the account's public key.

    This function checks if the provided signature is valid for the given message using the account's public key.

    Parameters

    • args: {
          aptosConfig: AptosConfig;
          message: HexInput;
          options?: { throwErrorWithReason?: boolean };
          signature: Signature;
      }

      The arguments for verifying the signature.

      • aptosConfig: AptosConfig
      • message: HexInput

        The raw message data in HexInput format.

      • Optionaloptions?: { throwErrorWithReason?: boolean }
        • OptionalthrowErrorWithReason?: boolean

          Whether to throw an error with the reason for the verification failure.

      • signature: Signature

        The signed message signature.

    Returns Promise<boolean>

    A boolean indicating whether the signature is valid for the message.

Methods

MMNEPVFCICPMFPCPTTAAATR