HomePhabricator

[electrum] start implementing the PSBT format

Description

[electrum] start implementing the PSBT format

Summary:
PSBT is a standardized format for partially signed transactions that will eventually replace the current Electrum specific format used in the app for multisig and offline signing purposes. And the new Ledger app for bitcoin works with this format as well.

This implement basic serialization and deserialization of a Partially Signed Bitcoin Transaction file. For now there is no interpretation of the data except for a few enums defining the expected key types, just parsing of the sections (keypair maps) and keypairs within the sections.

This is inspired by https://github.com/spesmilo/electrum/blob/13d9677e534cc82aeace3d428a6bc78eadb0e1d4/electrum/transaction.py#L1277

The unit test is using the same data as the node's psbt_wallet_tests::psbt_updater_test

Test Plan: python test_runner.py

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
PiRKAuthored on Jun 14 2024, 16:11
PiRKPushed on Jun 17 2024, 15:31
Reviewer
Restricted Project
Differential Revision
D16333: [electrum] start implementing the PSBT format
Parents
rABCe1f67687b71c: [electrum] make read_compact_size return None at EOF instead of raising an error
Branches
Unknown
Tags
Unknown