ExternalSigner

data class ExternalSigner(val verifierAddress: String, val keyData: ByteArray) : SmartAccountSigner

An external signer using a verifier contract for custom signature validation.

External signers delegate signature verification to a Soroban contract. The verifier contract receives the public key data and signature, and returns whether the signature is valid. This enables support for non-native signature schemes like WebAuthn (secp256r1) and Ed25519.

The verifier contract address must be a C-address, and the key data contains the public key bytes plus any additional authentication data (like WebAuthn credential IDs).

Example:

// WebAuthn signer
val webAuthnSigner = ExternalSigner.webAuthn(
verifierAddress = "CBCD1234...",
publicKey = secp256r1PublicKey,
credentialId = webAuthnCredentialId
)

// Ed25519 signer
val ed25519Signer = ExternalSigner.ed25519(
verifierAddress = "CDEF5678...",
publicKey = ed25519PublicKey
)

Throws

if validation fails

Constructors

Link copied to clipboard
constructor(verifierAddress: String, keyData: ByteArray)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The public key data and any additional authentication data

Link copied to clipboard
open override val uniqueKey: String

Unique identifier for deduplication.

Link copied to clipboard

The contract address of the signature verifier (C-address)

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Constant-time equals to prevent timing side-channel attacks on key data.

Link copied to clipboard
open override fun hashCode(): Int

Custom hashCode implementation that properly handles ByteArray.

Link copied to clipboard
open override fun toScVal(): SCValXdr

Converts the external signer to its on-chain representation.