createWebAuthnSigner

fun createWebAuthnSigner(webauthnVerifierAddress: String, publicKey: ByteArray, credentialId: ByteArray): ExternalSigner

Creates a WebAuthn passkey signer.

Convenience wrapper around createExternalSigner that handles the key_data format for WebAuthn (pubkey + credentialId).

Return

An ExternalSigner configured for WebAuthn verification

Parameters

webauthnVerifierAddress

WebAuthn verifier contract address (C-address)

publicKey

65-byte secp256r1 uncompressed public key (0x04 prefix + X + Y)

credentialId

WebAuthn credential identifier bytes

Throws

if the verifier address format is invalid

if the public key size or format is invalid, or if the credential ID is empty

Example:

val signer = SmartAccountBuilders.createWebAuthnSigner(
webauthnVerifierAddress = "CBCD1234...",
publicKey = secp256r1PublicKey,
credentialId = credentialIdBytes
)