Skip to main content
Install the package, depending on your package manager:
Initialize the client with your website domain. The domain is required because it is embedded in the SIWE message the user signs:
To target testnet, set network: 'sepolia':
For automatic signing, pass a wallet provider directly:

AvatarSDKConfig

The SDK uses chain ID 1 for mainnet and 11155111 for sepolia when building SIWE messages. Before every automatic operation it compares the provider’s chain ID with the configured network and calls switchChain when available, otherwise it throws PROVIDER_CHAIN_MISMATCH.