Chains

Bitcoin Cash

CashAddr with the checksum verified under the bitcoincash prefix, written or not, CashTokens and 32-byte script hashes included. Legacy base58 stays out.
IDbitcoincash32 / 36utxo · BCH
Chain / UTXO

Bitcoin Cash

"bitcoincash""bch""Bitcoin Cash"

Symbol
BCH · 8 decimals
Coin type
145
CAIP-2
bip122:000…fcbe
Checks
address · txid
fields set 7 / 9

Network

CAIP-2bip122:000000000000000000651ef99cb9fcbe
Magice3e1f3e8
PoWsha256d
RPCnone
Explorerblockchair.com/bitcoin-cash

Access

Createcreate("bitcoincash")
ResolvegetChain("bch")
CLIchains info bch
Tryplayground with a sample address

Address format

CashAddr, the same encoding eCash uses, with the checksum verified under the bitcoincash prefix whether the address carries bitcoincash: or not. The rules are the ones Bitcoin Cash Node decodes by. q… is pay-to-pubkey-hash over a 20-byte hash, p… is pay-to-script-hash over 20 bytes or over 32, the longer P2SH32 form. z… and r… are the token-aware twins CashTokens added, same hashes, same rules. Mixed case fails, all lowercase or all uppercase passes.

A bare eCash address fails here, and a bare Bitcoin Cash address fails on eCash. The two differ in the checksum alone, and the checksum is exactly what gets verified, so identify names one chain and not both.

Legacy 1… and 3… addresses aren't accepted. Wallets still read them, but the bytes are Bitcoin's, so a legacy address says nothing about which chain it's for. Convert it to CashAddr first.

The CAIP-2 reference isn't Bitcoin's genesis. Bitcoin Cash shares that block, so BIP-122 keys the chain by block 478559, the first one after the split.

ts
import { getChain } from "@agntn/chains";

const chain = getChain("bch");
chain.assertAddress("bitcoincash:qz3yjg59ypg6jqpwhaxgvjj44jm4hdx0w5wsxw2qez"); // returned unchanged
chain.bip44; // 145
chain.caip2; // "bip122:000000000000000000651ef99cb9fcbe"

Spellings

bitcoincash, bch, bitcoin-cash, Bitcoin Cash. The key is bitcoincash, the rest resolve through getChain.