Files
Mikael BergandPaperclip b9f9aebd7b feat(watcher): BCH xpub transaction ingestion — watch address, capture on confirmation
- watcher.ts: derives BCH P2PKH CashAddr addresses from BIP44 account xpub
  (coin type 145, external chain m/0/i); polls Blockchair for confirmed txs;
  captures txid, amountBCH, blockHash, blockTimestamp, address
- demo.ts: end-to-end demo — generates test xpub from BIP44 seed, derives
  5 addresses, fetches and captures a real mainnet transaction (verified live)
- index.ts: CLI entry point for the live watcher
- Fix block_hash: Blockchair BCH omits block_hash inline; now fetched via
  /dashboards/block/{id} with in-process cache to avoid duplicate lookups
- Fix ESM imports: .ts extensions required for node --experimental-strip-types
- package.json: add npm run watch script
- README: add xpub watcher section with demo output and API reference

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-17 16:30:02 +00:00

26 lines
722 B
JSON

{
"name": "using-cash-spike",
"version": "0.1.0",
"description": "BCH engineering spike — node evaluation, tx ingestion, price oracle",
"type": "module",
"scripts": {
"demo": "node --experimental-strip-types src/demo.ts",
"watch": "node --experimental-strip-types src/index.ts",
"price-oracle": "node --experimental-strip-types src/price-oracle.ts",
"price-oracle-demo": "node --experimental-strip-types src/price-oracle-demo.ts"
},
"engines": {
"node": ">=22"
},
"dependencies": {
"@scure/bip32": "^2.2.0",
"axios": "^1.16.1",
"cashaddrjs": "^0.4.4"
},
"devDependencies": {
"@types/node": "^20.19.41",
"ts-node": "^10.9.2",
"typescript": "^5.9.3"
}
}