HomePhabricator

[ecash-wallet] Add method to get spendable sats utxos

Description

[ecash-wallet] Add method to get spendable sats utxos

Summary:
There are several groupings of utxos that are useful in eCash. For example, utxos of a certain tokenId, mint batons, and non-token utxos.

In this diff we add a getter method to get spendable sats utxos i.e. eCash-only utxos. These are utxos we would use to send eCash or to "fuel" a token tx. They are consumable utxos in a way that is distinct from token utxos.

Since coinbase utxos are consumable in the same way but have a confirmation restriction, we also add a method to get spendable coinbase utxos. This is added as a private method since it would only be useful to a dev in niche cases, and the filtering would still be trivially available to a dev interested in these niche cases without the specific method.

We are currently building up what we need to send an XEC tx.

Test Plan: npm test

Reviewers: #bitcoin_abc, tobias_ruck

Reviewed By: #bitcoin_abc, tobias_ruck

Subscribers: tobias_ruck

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

Details

Provenance
bytesofmanAuthored on Tue, Mar 11, 18:05
bytesofmanPushed on Fri, Mar 14, 21:41
Reviewer
Restricted Project
Differential Revision
D17779: [ecash-wallet] Add method to get spendable sats utxos
Parents
rABC821580a6ab15: [avalanche] Move contender cache to peer manager
Branches
Unknown
Tags
Unknown