Skip to content

Add method to convert expr_raw_pkh into pkh - #557

Merged
sanket1729 merged 2 commits into
rust-bitcoin:masterfrom
Harshil-Jani:sub_raw_pkh
Jun 20, 2023
Merged

Add method to convert expr_raw_pkh into pkh#557
sanket1729 merged 2 commits into
rust-bitcoin:masterfrom
Harshil-Jani:sub_raw_pkh

Conversation

@Harshil-Jani

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

Nice, concept ACK.

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

@sanket1729 sanket1729 left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
heap-coder added a commit to heap-coder/rust-miniscript that referenced this pull request Sep 27, 2025
…w_pkh into pkh

2f3e457fd21a022db2521280542fd74b624ccc9a Using BTreeMap in place of HashMap (Harshil Jani)
c17965a97c71032d5a0718d59d766b83c6b1762f Add method to convert expr_raw_pkh into pkh (Harshil Jani)

Pull request description:

  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.

ACKs for top commit:
  sanket1729:
    utACK 2f3e457fd21a022db2521280542fd74b624ccc9a. Thanks for the contribution

Tree-SHA512: c98d7dfe0055e01f7ff3b0c23a73faa79136aa1d446f2b1e035931c1d256712668d4a150674dd35448682dd4c91db6ea426557c48ec006f6335af796ddb8a4f4
heap-coder added a commit to heap-coder/rust-miniscript that referenced this pull request Sep 27, 2025
…r taproot

c6bb14216e7c8d3ecfe7fe09bbc98a86fec3aa80 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 : rust-bitcoin/rust-miniscript#557

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

Tree-SHA512: 59fb725776dc4b0ecaf01d09321b70fe9e733621af26250eff389f837d1feb29ba797d7bafbb7b0b902f936e7832ee3617d0dd433c708941b2df96ff626f883d
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