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

Constructors

Methods

  • Derives an account from a randomly generated private key based on the specified signing scheme. The default generation scheme is Ed25519, but it can also support Secp256k1Ecdsa.

    Parameters

    Returns SingleKeyAccount

    An account with the generated private key based on the specified signing scheme.

    Error if an unsupported signature scheme is provided.

Properties

accountAddress: AccountAddress

Account address associated with the account

privateKey: PrivateKey

Private key associated with the account

publicKey: AnyPublicKey

Public key associated with the account

signingScheme: SingleKey = SigningScheme.SingleKey

Signing scheme used to sign transactions