stacks-network / sbtc-developer-release

sBTC primitives, signer components, helper tools
https://sbtc.tech
MIT License
1.98k stars 23 forks source link

[stacks-signer] Construct a BTC transaction from a list of pending stx transaction withdrawals #376

Open jferrant opened 11 months ago

jferrant commented 11 months ago

Description

Create a function to construct a single BTC transaction that fulfills a list of pending stx transactions.

Context

Signers need to be able to convert multiple stx withdrawal transaction into a single BTC transaction that fulfills them. This relies on a clear definition of the withdrawal fulfillment format to enable the stacks node to burn tokens accordingly/clear pending withdrawals from the signer to do list.

Expected Approach

Construct a BTC transaction that consumes the current wallet utxo and constructs an output utxo to each withdrawal address, and change back to the wallet.

Acceptance Criteria