HomePhabricator

[Cashtab] [p2 local msg verify] Add stub local method

Description

[Cashtab] [p2 local msg verify] Add stub local method

Summary:
T2730

Depends on D12458

Looks like a lot is going on in this diff, but it is mostly a baseline. Had I known what would be required, would have split it up --- but here's an explanation to simplify things:

  1. bitcoinjs-message is the library used by bch-js to verify signatures. Because this library needs to be modified to work with ecash addresses and ecash signatures, it is added as-is in this diff to the monorepo (so that later diffs in the stack will show only the needed changes)
  2. SignVerifyMsg.js installs this dependency locally from this repo -- so that local testing can be done at increments in future stacked diffs
  3. Snapshot testing of SignVerifyMsg.js is removed because the local dependency breaks it. It will be re-added later in the stack.

Note that bitcoinjs-message only works on legacy formats address. These bch-js methods will be removed as bitcoinjs-mesesage is modified later in this stack.

Test Plan:

cd web/cashtab
npm i
npm start

Verify a few messages and confirm that this new implementation matches the old implementation

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

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

Details

Provenance
bytesofmanAuthored on Nov 10 2022, 11:33
bytesofmanPushed on Nov 14 2022, 15:25
Reviewer
Restricted Project
Differential Revision
D12459: [Cashtab] [p2 local msg verify] Add stub local method
Parents
rABC9f394b935080: [Cashtab] [p1 local msg verify] Verify function is not async
Branches
Unknown
Tags
Unknown