Networks
crypto-aio reaches a network through a chain family plugin. The plugin contributes data: chains, networks, native assets, tokens and provider presets. It also contributes one adapter manifest per SDK, whose load() pulls in the driver. The core holds no chain data and imports no SDK. Chains, families and drivers explains the design; this page and its children are the reference.
Built-in families
| Family | Chains (networks) | Ordering | Status |
|---|---|---|---|
| fake | fakechain, fakeexpiry, fakeseqno (local) | nonce, expiry, seqno | Works, from crypto-aio/testing (register fakePlugin()) |
| EVM (ethers, web3) | Ethereum, BSC, Polygon, Avalanche C-Chain, Arbitrum, Optimism, Base | nonce | Works, built in (details) |
| UTXO (bitcoinjs-lib + Esplora) | Bitcoin mainnet, testnet, testnet4, signet, regtest | inputs | Works, built in (details) |
| Tron (tronweb) | mainnet, shasta, nile | expiry | Works, built in (details) |
| Solana (@solana/web3.js) | mainnet, devnet, testnet | expiry | Works, built in (details) |
| TON (@ton/ton) | mainnet, testnet | seqno + expiry | Works, built in; needs an indexer (details) |
| Avalanche (@avalabs/avalanchejs) | avalanche-x, avalanche-p (mainnet, fuji) | inputs | Works, built in; needs an indexer (details) |
Built-in families register in the package's composition root. Install only the SDK you use (npm install crypto-aio ethers, or bitcoinjs-lib for Bitcoin, tronweb for Tron, @solana/web3.js for Solana, @ton/ton @ton/core @ton/crypto for TON, or @avalabs/avalanchejs for the Avalanche X-Chain and P-Chain); a missing one fails with DEPENDENCY_MISSING. What each network can do is in Capabilities, and how to configure each family is in Connect to a real network.
Libraries
| Library | Status |
|---|---|
ethers 6.17 or later | Supported, the EVM default |
web3 4.16 | Deprecated: sunset upstream (4.16.0 is its last release). It works through 1.x (unless a security issue in web3 forces its removal sooner, as a safety fix the changelog announces), warns once per process (CRYPTO_AIO_WEB3), and is removed in 2.0; use ethers |
bitcoinjs-lib 7.0.5 or later | Supported, over an Esplora indexer |
tronweb 6.5.2 or later | Supported; tronweb asks for Node.js 22.23.4 or later on 22, 24.22.1 or later on 24, or 26.12.1 or later |
@solana/web3.js 1.x from 1.99, or 3.x from 3.2.1 (not 2.x) | Supported; the driver builds messages itself, so the two lines differ only in native()'s Connection |
@ton/ton 16.3, with @ton/core 0.63 and @ton/crypto 3.3 | Supported, with toncenter API v3 as the indexer |
@avalabs/avalanchejs 5.2 or later | Supported, with the Avalanche Data API as the indexer; the C-Chain is served as EVM |
@tonconnect/sdk | Replaced by @ton/ton: TonConnect links dApps to user wallets; it is not a node SDK |
@bnb-chain/javascript-sdk | Unsupported: it targets the BNB Beacon Chain, shut down in 2024 (BNB Smart Chain is supported as EVM) |
What works, and what does not
| Area | Status |
|---|---|
| Core: container, handles, configuration, Operations, idempotency, crash recovery, background workers, scanner, transport, signers | Works |
| Store interfaces, in-memory stores and the store contract suites | Works |
| Durable stores (Postgres, Redis, …) | Not shipped: bring your own (Write a durable store); examples/postgres-store in the repository is a reference implementation on PostgreSQL |
Fake chain family (fakechain, fakeexpiry, fakeseqno) from crypto-aio/testing | Works |
| EVM: Ethereum, BSC, Polygon, Avalanche C-Chain, Arbitrum, Optimism, Base (ethers, web3) | Works; no address history yet (it needs an indexer) |
| UTXO / Bitcoin (bitcoinjs-lib with an Esplora indexer) | Works; no tokens, no OP_RETURN memo |
| Tron (tronweb) | Works; address history needs an indexer provider (trongrid or public) |
| Solana (@solana/web3.js) | Works: SOL, classic SPL tokens, memos, scanning and history without an indexer |
| TON (@ton/ton): Gram and jettons, v4r2 and v5r1 wallets | Works; needs an indexer (toncenter API v3); one output per transfer; no block scan (TON is sharded) |
| Avalanche X-Chain and P-Chain (@avalabs/avalanchejs) | Works: AVAX, batches, X-Chain memos; needs an indexer (the Avalanche Data API); no replace or cancel; no Avalanche native tokens |
Provider presets
A preset turns a name and an API key into endpoints. public is never for production: it names free public endpoints, and a handle with no provider configured falls back to it, with a logged warning, where it serves the network.
| Family | Presets |
|---|---|
| EVM | alchemy, infura, ankr (with an apiKey), public |
| Bitcoin | mempool (mempool.space), blockstream (blockstream.info), public (both); each serves as provider and indexer |
| Tron | trongrid (with an apiKey), public; both also serve as the indexer for history |
| Solana | alchemy, infura, ankr (with an apiKey), public |
| TON | toncenter (with an apiKey; API v2 as provider, v3 as indexer), public |
| Avalanche X and P | public (a public node and the keyless Data API), glacier (the Data API, with an apiKey, as indexer) |
Your own node is a provider too: { endpoints: [{ name: 'main', url: secret('https://…') }] }.
Three ways a network becomes available
- Built in. The families above, registered by the package.
- More networks of an existing family. A chain of an existing family is data, served by the family's driver: any EVM chain is a
ChainInfoand one call toevmChainPlugin. See Add networks to a family. - A new family. A plugin with its own adapter and driver. See Write a chain family plugin.
The family pages
- EVM networks: fees, tokens, presets and the fee ceiling.
- Bitcoin networks: address types, coin selection, fees, replace and cancel, limits, and the Bitcoin safeguards.
- Tron networks: bandwidth and energy, fee limits, expiry, memos and TronGrid.
- Solana networks: priority fees, SPL tokens, expiry, scanning and the Solana safeguards.
- TON networks: wallets, jettons, message traces, seqnos and resends.
- Avalanche X-Chain and P-Chain: the two UTXO chains, fees and finality.