Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BTC]: Add support for signPSBT #4032

Merged
merged 12 commits into from
Sep 24, 2024
Merged

[BTC]: Add support for signPSBT #4032

merged 12 commits into from
Sep 24, 2024

Conversation

satoshiotomakan
Copy link
Collaborator

@satoshiotomakan satoshiotomakan commented Sep 18, 2024

Description

Add support for a limited Bitcoin PSBT signing/planning support.
It includes: P2PK, P2PKH, P2WPKH, P2TR (key-path) UTXO signing. Please note P2SH, P2WSH, P2TR (script-path) are not supported yet.

How to test

Run Rust, C++, Swift, Kotlin tests

Types of changes

  • Add TWBitcoinPsbtSign FFI that takes BitcoinV2.PsbtSigningInput and returns BitcoinV2.PsbtSigningOutput
  • Add TWBitcoinPsbtPlan FFI that takes BitcoinV2.PsbtSigningInput and returns BitcoinV2.TransactionPlan - it can be used to get the transaction details such as fee, inputs and outputs amounts/addresses/scriptPubkeys.
  • Move integration tests from rust/tw_any_coin/tests to rust/tw_tests/tests

Checklist

  • Create pull request as draft initially, unless its complete.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • If there is a related Issue, mention it in the description.

If you're adding a new blockchain

  • I have read the guidelines for adding a new blockchain.

@satoshiotomakan satoshiotomakan marked this pull request as ready for review September 23, 2024 12:46
Copy link

github-actions bot commented Sep 23, 2024

Binary size comparison

➡️ aarch64-apple-ios:

- 12.09 MB
+ 12.14 MB 	 +53 KB

➡️ aarch64-apple-ios-sim:

- 12.09 MB
+ 12.15 MB 	 +53 KB

➡️ aarch64-linux-android:

- 15.50 MB
+ 15.58 MB 	 +79 KB

➡️ armv7-linux-androideabi:

- 13.24 MB
+ 13.30 MB 	 +57 KB

➡️ wasm32-unknown-emscripten:

- 10.98 MB
+ 11.04 MB 	 +61 KB

@JaimeToca
Copy link
Collaborator

Loos great @satoshiotomakan !!! . Quick question, is BIP0322 going to be handled separetly? Thanks !

@satoshiotomakan
Copy link
Collaborator Author

Hi @JaimeToca, BIP0322 will be released separately

@satoshiotomakan satoshiotomakan merged commit bbb9913 into master Sep 24, 2024
13 checks passed
@satoshiotomakan satoshiotomakan deleted the s/bitcoin-psbt branch September 24, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants