Chains

eCash

CashAddr with the checksum verified under the ecash prefix, written or not. Two decimals, which is the fact most likely to bite.
create
create("ecash")
family
UTXO · utxo
symbol
XEC · 2 decimals
bip44
899
caip2
none
explorer
explorer.e.cash

Address format

CashAddr, the Bech32 relative Bitcoin Cash introduced, with the checksum verified under the ecash prefix whether the address carries ecash: or not. Version 0x00 is pay-to-pubkey-hash (q…), 0x08 is pay-to-script-hash (p…), both over a 20-byte hash with zero padding. Mixed case fails, all lowercase or all uppercase passes.

A bare Bitcoin Cash address fails here on purpose. It differs from its eCash twin in the checksum alone, and the checksum is exactly what is verified. Legacy base58 addresses aren't accepted at all, the bytes are the same as Bitcoin's and would say nothing about eCash.

Two decimals. 100 satoshis per XEC, not 100,000,000. Assume eight because it's a UTXO chain and every amount is off by a million.

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

const chain = getChain("xec");
chain.assertAddress("ecash:qpm2qsznhks23z7629mms6s4cwef74vcwva87rkuu2"); // returned unchanged
chain.type; // "utxo"
chain.caip2; // undefined

Spellings

ecash, xec, eCash. The key is ecash, the rest resolve through getChain.

@agntn/chains·MIT license· A format check, not proof an address exists. Nothing on this site talks to a chain.