get Public Key From Signer
Extracts the secp256r1 public key from a WebAuthn signer's key data.
WebAuthn signers store key data as: publicKey (65 bytes) + credentialId (variable). This function extracts the 65-byte uncompressed public key portion from an ExternalSigner.
Return
The 65-byte uncompressed secp256r1 public key, or null if the signer is not a WebAuthn signer (delegated signers, or external signers whose key data is not longer than 65 bytes)
Example:
val publicKey = SmartAccountBuilders.getPublicKeyFromSigner(signer)Content copied to clipboard
Parameters
signer
The signer to extract the public key from