Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

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