defaultChainId
The default blockchain network to connect to when the SDK initializes.
Type: number
Required: No
Default: 1 (Ethereum Mainnet)
Usage
With Wagmi (Recommended)
import { jaw } from '@jaw.id/wagmi';
const connector = jaw({
apiKey: 'your-api-key',
defaultChainId: 1, // Mainnet
});With Provider Directly
import { JAW } from '@jaw.id/core';
const jaw = JAW.create({
apiKey: 'your-api-key',
defaultChainId: 1, // Mainnet
});Using Testnets
To use a testnet as the default chain, enable showTestnets in preferences:
With Wagmi (Recommended)
import { jaw } from '@jaw.id/wagmi';
const connector = jaw({
apiKey: 'your-api-key',
defaultChainId: 84532, // Base Sepolia
preference: {
showTestnets: true,
},
});With Provider Directly
import { JAW } from '@jaw.id/core';
const jaw = JAW.create({
apiKey: 'your-api-key',
defaultChainId: 84532, // Base Sepolia
preference: {
showTestnets: true,
},
});Related
- Supported Networks - Full list of supported chains
- mode - Authentication mode options
- wallet_switchEthereumChain - Switch networks programmatically