defaultChainId
The default blockchain network to connect to when the SDK initializes.
Type: number
Required: No
Default: 1 (Ethereum Mainnet)
Usage
// Wagmi
import { jaw } from '@jaw.id/wagmi';
const connector = jaw({
apiKey: 'your-api-key',
defaultChainId: 1, // Mainnet
});// EIP-1193 Provider
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:
// Wagmi
import { jaw } from '@jaw.id/wagmi';
const connector = jaw({
apiKey: 'your-api-key',
defaultChainId: 84532, // Base Sepolia
preference: {
showTestnets: true,
},
});// EIP-1193 Provider
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
- preference - Advanced options including testnet visibility
- wallet_switchEthereumChain - Switch networks programmatically