HomePhabricator

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

Description

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

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

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Differential Revision: https://reviews.bitcoinabc.org/D11928

Details

Provenance
bytesofmanAuthored on Sep 6 2022, 23:39
bytesofmanPushed on Sep 20 2022, 15:27
Reviewer
Restricted Project
Differential Revision
D11928: [Cashtab] [chronik utxo handling p1] Add chronik utxo fetch functionality
Parents
rABCc3172ccad526: [Docs] Upgrade dependencies
Branches
Unknown
Tags
Unknown