Page MenuHomePhabricator

[Cashtab] [chronik utxo handling p1] Add chronik utxo fetch functionality
ClosedPublic

Authored by bytesofman on Sep 6 2022, 23:43.

Details

Summary

T2447

Add a function to get utxo set using chronik instead of bch-api

This diff creates a new file, chronik.js, to contain functions that wrap chronik API calls. Due to the current limitation in chronik where hash160s are required instead of addresses, together with the need to preserve existing data structures and app functionality, these functions may be slightly more involved than a simple API call and hence warrant specific methods.

Note -- this supersedes D11818. The mock in D11818 was not actually a mock and failed as the wallet utxo state changed.

Test Plan

npm start
Compare the console.log statements for bchApiUtxos and chronikUtxos -- confirm the same number of total utxos

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable