HomePhabricator

[ecash-agora] Add `agora.py` plugin to index ONESHOT offers

Description

[ecash-agora] Add agora.py plugin to index ONESHOT offers

Summary:
Now that we have plugin support for Chronik, we can build a plugin to index Agora Oneshot offers efficiently.

Using the /utxos endpoint for the Agora plugin, users can basically fetch the equivalent of an orderbook from the blockchain.

D16551 allows us to use the test_framework's CScript class and all the opcodes.

We have to add a hash160 function; the current impl requires it to be enabled in OpenSSL, but we might add it from ripemd160.py from the test_framework too at some point, or add a function from Rust.

We also add Agora and AgoraOffer to ecash-agora, allowing easy fetching, accepting and cancelling of offers via the plugin, and to have a precise estimation of the required sats.

Depends on D16674.

Test Plan: npm run integration-tests

Reviewers: Fabien, #bitcoin_abc, bytesofman

Reviewed By: #bitcoin_abc, bytesofman

Subscribers: bytesofman

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

Details

Provenance
tobias_ruckAuthored on Thu, Aug 22, 12:10
tobias_ruckPushed on Wed, Aug 28, 07:37
Reviewer
Restricted Project
Differential Revision
D16544: [ecash-agora] Add `agora.py` plugin to index ONESHOT offers
Parents
rABCe890009510c5: [electrum] fix the max value for the ephemeral exponent
Branches
Unknown
Tags
Unknown