Skip to content
New issue

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

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

Already on GitHub? # to your account

Add method to convert expr_raw_pkh into pkh #557

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

Harshil-Jani
Copy link
Contributor

@Harshil-Jani Harshil-Jani commented Jun 15, 2023

The PR adds up the method to convert the expr_raw_pkh into pkh by looking at the available keys and their hases being stored inside of the Hashmap of PSBT Input. If the key is found corresponding to given hash, It will update to pkh.

To-Do :

  • Write a test case.
  • Make it work for taproot.

The commit adds up the method to convert the expr_raw_pkh into pkh by
looking at the available keys and their hases being stored inside of the Hashmap of PSBT Input.
If the key is found corresponding to given hash, It will update to pkh.

Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>
@apoelstra
Copy link
Member

Nice, concept ACK.

Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>
Copy link
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 2f3e457. Thanks for the contribution

@sanket1729
Copy link
Member

As noted elsewhere, this does not work for taproot descriptors yet as they are not stored in bip32_keys psbt field. But merging this for now, as this is itself a strict improvement.

@sanket1729 sanket1729 merged commit a3327ba into rust-bitcoin:master Jun 20, 2023
apoelstra added a commit that referenced this pull request Aug 8, 2023
c6bb142 Adding substitution of pkh for taproot (Harshil Jani)

Pull request description:

  Recently , We have introduced the method `substitute_raw_pkh` to deal with the change of pkh to expr_raw_pkh. This is the implementation of that method for the taproot miniscript.
  Reference PR : #557

ACKs for top commit:
  sanket1729:
    utACK c6bb142
  apoelstra:
    ACK c6bb142

Tree-SHA512: 59fb725776dc4b0ecaf01d09321b70fe9e733621af26250eff389f837d1feb29ba797d7bafbb7b0b902f936e7832ee3617d0dd433c708941b2df96ff626f883d
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants