ERCs
ERC-2304 — Multichain ENS addresses
ENS resolvers can store addresses for chains other than Ethereum — Bitcoin, Litecoin, Solana, etc. Each chain has a SLIP-44 coin type identifier; the resolver’s addr(node, coinType) returns the chain-specific bytes.
import { addr_multichain } from "@ethernauta/erc/2304";
const btc = await addr_multichain({
node: namehash("vitalik.eth"),
coin_type: 0, // Bitcoin
})(contract({ chain_id: eip155_1.chain_id, contract: resolver_address })); Surface
| Method | Shape | Purpose |
|---|---|---|
addr_multichain({ node, coin_type }) | Callable<Bytes> | Read a multichain address. |
set_addr_multichain({ node, coin_type, address }) | Signable<Hash32> | Set one. |
SLIP-44 coin types
| Type | Coin |
|---|---|
| 0 | Bitcoin |
| 2 | Litecoin |
| 60 | Ethereum (default) |
| 501 | Solana |
The encoding for each chain’s address bytes follows ENSIP-9.