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

ParameterValue
NetworkMainnet-Beta
Clustermainnet-beta
Ledger appSolana (1.4.2+)
Derivation pathm/44'/501'/0'/0'
Signing schemeEd25519
Health probe methodgetHealth + 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

ParameterValue
Chain ID8453
NetworkBase Mainnet
Ledger appEthereum (1.10.3+)
Derivation pathm/44'/60'/0'/0/0
Signing schemeECDSA / secp256k1
Health probe methodeth_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

ParameterValue
Chain ID42161
NetworkArbitrum One (Nitro)
Ledger appEthereum (1.10.3+)
Derivation pathm/44'/60'/0'/0/0
Calldata formatNitro (post-Nitro upgrade)
Health probe methodeth_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.