SingleKeyAccount

class SingleKeyAccount(val privateKey: PrivateKey, val address: AccountAddressInput? = null) : Account

Signer implementation for the SingleKey authentication scheme. This extends a SingleKeyAccount by adding signing capabilities through a valid private key. Currently, the only supported signature schemes are Ed25519 and Secp256k1. P-256 transaction signing uses PasskeyAccount, because WebAuthn credential acquisition is application-owned.

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

Constructors

Link copied to clipboard
constructor(privateKey: PrivateKey, address: AccountAddressInput? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val accountAddress: AccountAddress

Account address associated with the account

Link copied to clipboard
Link copied to clipboard
open override val isPrivateKeyCleared: Boolean

Whether all private key material owned by this account has been cleared.

Link copied to clipboard
Link copied to clipboard
open override val publicKey: AnyPublicKey

Public key associated with the account

Link copied to clipboard
open override val signingScheme: SigningScheme

Signing scheme used to sign transactions

Functions

Link copied to clipboard
open override fun clearPrivateKey()

Explicitly clear private key material owned by this account.

Link copied to clipboard
open override fun sign(message: HexInput): AnySignature

Sign the given message with the private key.

Link copied to clipboard
Link copied to clipboard

Sign a message using the available signing capabilities.

Link copied to clipboard
open override fun verifySignature(message: HexInput, signature: Signature): Boolean