Chain Configuration
Per-chain RPC setup, chain-ID registry, health probe parameters, and Ledger derivation paths.
Chain-ID lock
The chain-ID lock is the core verification gate. Before Defimec invokes the Ledger, it compares the declared chain (from your config) against the chain-ID returned by the active RPC. Any mismatch aborts the signing request.
const dfm = new Defimec({
chains: ['base'],
chainIds: {
base: 8453, // declared; probed value must match
},
verify: {
chainId: true, // default: true — do not disable
abortOnMismatch: true,
},
})
Do not disable chainId verification. Setting verify.chainId: false removes the primary protection against stale-RPC drain. This option exists only for local test networks with non-standard chain IDs.
Solana
| Parameter | Value |
|---|---|
| Network | Mainnet-Beta |
| Cluster | mainnet-beta |
| Ledger app | Solana (1.4.2+) |
| Derivation path | m/44'/501'/0'/0' |
| Signing scheme | Ed25519 |
| Health probe method | getHealth + getSlot |
# Solana RPC config
{
"chain": "solana",
"rpc": {
"primary": "https://api.mainnet-beta.solana.com",
"fallback": "https://solana-mainnet.g.alchemy.com/v2/YOUR_KEY",
"healthProbe": {
"method": "getHealth",
"slotLagThreshold": 20
}
}
}
Base
| Parameter | Value |
|---|---|
| Chain ID | 8453 |
| Network | Base Mainnet |
| Ledger app | Ethereum (1.10.3+) |
| Derivation path | m/44'/60'/0'/0/0 |
| Signing scheme | ECDSA / secp256k1 |
| Health probe method | eth_chainId + eth_blockNumber |
# Base RPC config
{
"chain": "base",
"chainId": 8453,
"rpc": {
"primary": "https://mainnet.base.org",
"fallback": "https://base-mainnet.g.alchemy.com/v2/YOUR_KEY",
"healthProbe": {
"blockLagThreshold": 10
}
}
}
Arbitrum
| Parameter | Value |
|---|---|
| Chain ID | 42161 |
| Network | Arbitrum One (Nitro) |
| Ledger app | Ethereum (1.10.3+) |
| Derivation path | m/44'/60'/0'/0/0 |
| Calldata format | Nitro (post-Nitro upgrade) |
| Health probe method | eth_chainId + eth_blockNumber |
# Arbitrum RPC config
{
"chain": "arbitrum",
"chainId": 42161,
"calldata": { "format": "nitro" },
"rpc": {
"primary": "https://arb1.arbitrum.io/rpc",
"fallback": "https://arb-mainnet.g.alchemy.com/v2/YOUR_KEY",
"healthProbe": {
"blockLagThreshold": 10
}
}
}
Arbitrum Nitro calldata: After the Nitro upgrade, Arbitrum uses a different internal calldata encoding format. Set calldata.format: "nitro" (default) unless you are explicitly on a pre-Nitro fork. Wallets that did not update their decoders will show raw hex — Defimec decodes Nitro-format transactions natively.