Signs EIP-712 typed data using the EVM wallet identified by the supplied walletMetadata. The client formats the typed data, recovers key shares if needed, signs with the wallet’s key, and returns the serialized ECDSA signature as a hex string.Use this for permit flows, order signing, and other structured data that requires typed-data signing.
When you pass externalServerKeyShares (the caller-supplied path), walletMetadata.externalServerKeySharesBackupInfo must also be present — signTypedData throws if shares are supplied but backup metadata is missing. The full walletMetadata returned from createWalletAccount / importPrivateKey already includes it; identity-only metadata from fetchWalletMetadata will be rejected.
walletMetadata (WalletMetadata) — Non-sensitive wallet metadata persisted from createWalletAccount() / importPrivateKey(). The signer address comes from walletMetadata.accountAddress.
typedData (TypedData) — The EIP-712 typed data to sign (viem’s TypedData type)
password (string) — Required if the wallet was created with backUpToDynamic: true. Used for backup decryption when externalServerKeyShares is not provided.
externalServerKeyShares (ServerKeyShare[]) — Caller-supplied plaintext shares. If omitted, the SDK recovers from backup using password.
onError ((error: Error) => void) — Callback invoked if an error occurs during signing
For a viem-style API (e.g. with signTypedData(typedData) where the account is implicit), use getWalletClient. The returned wallet client’s signTypedData forwards to the same client implementation.