HomePhabricator

[Cashtab] Build all targetOutputs with script instead of address key

Description

[Cashtab] Build all targetOutputs with script instead of address key

Summary:
ecash-lib requires tx builder outputs to have a script: <Script> key, not an address: <cashaddr> key. Currently we are converting all targetOutputs in the sendXec function.

Going forward, we will start to support more complicated txs that may have targetOutputs already fully prepared (e.g. with a custom p2sh Script from ecash-agora. Rather than only convert some targetOutputs and not others in sendXec, we should instead prepare all targetOutputs to the same ecash-lib standard.

With added support in ecash-lib for converting an address to a Script now available, we can now prepare all Cashtab targetOutputs for ecash-lib so that they do not need to go through a Cashtab-specific conversion process at the tx build step.

Test Plan: npm test

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

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

Details

Provenance
bytesofmanAuthored on Jul 5 2024, 21:12
bytesofmanPushed on Jul 9 2024, 18:43
Reviewer
Restricted Project
Differential Revision
D16427: [Cashtab] Build all targetOutputs with script instead of address key
Parents
rABC656b42a2b667: [CI] Update the sha256 sum for the nodejs setup script
Branches
Unknown
Tags
Unknown