HomePhabricator

[ChronikClient] Add "UNKNOWN" protocol type

Description

[ChronikClient] Add "UNKNOWN" protocol type

Summary:
In case we add a new token protocol in the future, this gracefully allows querying the tx without throwing an error.

E.g., if we were to add BLP (Better Ledger Protocol), and were to connect an old ChronikClient version to a Chronik instance that implements BLP, this library (without this diff) would always throw an error for any transactions containing BLP tokens. However, it is better to return that the token protocol is unknown.

A corollary is that app devs are now forced to handle UNKNOWN token protocols, however, this is something that should be handled gracefully. Right now, it's impossible to handle it gracefully.

Test Plan: npm test && npm run integration-tests

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

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

Details

Provenance
tobias_ruckAuthored on May 26 2025, 22:18
tobias_ruckPushed on May 27 2025, 10:30
Reviewer
Restricted Project
Differential Revision
D18155: [ChronikClient] Add "UNKNOWN" protocol type
Parents
rABC374de45c36e3: [chronik] Electrum: Implement the *.get_first_use endpoints
Branches
Unknown
Tags
Unknown