As per T2455, this is an initial baseline of xec-js, which is a light-weight fork of bch-js.
It's also intended to serve as a wrapper library to bridge the gap between what eCash web apps may need vs what the chronik-client is not designed for (e.g. hash160 public key hash conversion prior to interacting with chronik, eCash native TransactionBuilder without needing to convert into bitcoincash addresses first...)
Key eCash specific updates in this baseline
- Library instantiates to an eCash REST API by default rather than BCHN.
- Primary library is now instantiated as an XECJS object
- transaction-builder can now directly take in an eCash address as part of adding tx outputs without the need for bitcoincash: address conversion beforehand (see buildXecTx.js example)
- Address.toHash160() can now directly take in an eCash address for conversion to a hash160 public key hash (see addrToHash160.js example)
- Address.toCashAddress() can now directly take in an eCash address for conversion to a cash address
- Updated README with references to the new eCash features and default xec-api rest url
- Library has been trimmed of the following legacy bch-js modules as most are catered via Chronik or not relevant to XEC:
- Blockchain
- Crypto
- Control
- Generating
- Mining
- RawTransactions
- Price
- Schnorr
- Encryption
- Utxo
- DSProof
- Transaction
- Electrum
- PsfSlpIndexer