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

[2/2]: BIP 322 Support #2152

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

mohamedawnallah
Copy link

@mohamedawnallah mohamedawnallah commented Mar 30, 2024

Change Description

  1. Adds to_spend and to_sign transactions in accordance to BIP-322 generic signed message format.
  2. Adds EncodeWitness function that encodes witness stack in a signed BIP-322 PSBT into base-64 encoded format.

Additional Context

Depends on #2151
Closes #2077

How Has This Been Tested?

  1. Added test cases for BuildToSpendTx function with an empty message and "Hello World" message as in BIP-322
  2. Added test cases for BuildToSignTx function with an empty message and "Hello World" message as in BIP-322.
  3. Added test cases for EncodeWitness function where it encodes the input witness FinalScriptWitness of a finalized to_sign transaction into base64 and throws an error if the to_sign transaction is not signed yet.

Remaining Parts

  • Add a signing function following BIP-0322 and integrate it with the codebase.
  • Add a verifying function following BIP-0322 and integrate with the codebase.

I would greatly appreciate your feedback during this draft phase to ensure it aligns with the desired objectives. Thank you. 🙏

@mohamedawnallah mohamedawnallah marked this pull request as draft March 30, 2024 10:05
@gamedevod
Copy link

Hello, can you help please, how it use for taproot addreses?

@gamedevod
Copy link

Hi do you need help to finish ?

yes, i cant use it for taproot(

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.

BIP 322 Support
2 participants