Documentation Index
Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
Use this file to discover all available pages before exploring further.
Function Signature
Description
Signs EIP-712 typed data using the specified EVM wallet address. 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.Parameters
Required Parameters
accountAddress(string) — The wallet address to sign with (must include0xprefix)typedData(TypedData) — The EIP-712 typed data to sign (viem’sTypedDatatype)
Optional Parameters
password(string) — Wallet password (if the wallet is password-protected)externalServerKeyShares(ServerKeyShare[]) — Array of external server key shares (for advanced key management)onError((error: Error) => void) — Callback invoked if an error occurs during signing
Returns
Promise<string>— The serialized ECDSA signature as a hex string
Usage
Direct (DynamicEvmWalletClient)
CallsignTypedData on your authenticated DynamicEvmWalletClient:
Viem-style (getWalletClient)
For a viem-style API (e.g. withsignTypedData(typedData) where the account is implicit), use getWalletClient. The returned wallet client’s signTypedData forwards to the same client implementation.
Key shares and password
- If the wallet was created with automatic backup (
backUpToClientShareService: true), you typically do not needexternalServerKeyShares. - If the wallet was created with manual backup (
backUpToClientShareService: false), passexternalServerKeyShareswhen callingsignTypedData. - If the wallet is password-protected, pass
password; otherwise omit it.
Error handling
Related
- signMessage() — Sign a raw message
- signTransaction() — Sign a transaction
- Get a Viem wallet client — Use signTypedData via viem’s WalletClient