handshake-org / hsd-ledger

Javascript client library for the Handshake Ledger application
Other
18 stars 7 forks source link

all: implement on-device output verification #5

Closed boymanjor closed 4 years ago

boymanjor commented 4 years ago

This change implements the client changes for on-device output verification in ledger-app-hns. The value and address of each output is shown, as well as the covenant type and name (if necessary). For covenant types that do not include a name in their items list, the client is required to send the name with the tx details. The device hashes the name to verify it matches the name hash in the items list.

This change also implements a feature allowing the client to bypass verification of change outputs using p2phk addresses. The client can send a derivation path and index for the change output. The device derives the associated address and checks that it matches the proposed change output's address.