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

Write example for taproot psbt APIs #893

Closed
sanket1729 opened this issue Mar 19, 2022 · 5 comments
Closed

Write example for taproot psbt APIs #893

sanket1729 opened this issue Mar 19, 2022 · 5 comments

Comments

@sanket1729
Copy link
Member

Similar to #892, but that spends a taproot spend. This is more challenging because

  • Taproot psbt involves encoding a TapTree that is non-trivial to understand/use.
  • There is no spec to compare against. This would have to be checked against a bitcoin-core node to see if the spends and intermediate spends are valid.
@dr-orlovsky dr-orlovsky added this to Todo in Taproot Apr 1, 2022
@dr-orlovsky dr-orlovsky added this to To do in PSBT Apr 1, 2022
@dunxen
Copy link
Contributor

dunxen commented May 3, 2022

I can take a look at this one to get more familiar with TapTrees. Doesn't necessarily depend on a PR for #892, I understand.

@tcharding
Copy link
Member

Correct, there is no dependency on #892, you can take a look at #940 for inspiration if you like.

@dunxen
Copy link
Contributor

dunxen commented May 21, 2022

I've decided to write three different spending scenarios for this workflow:

  1. Via key path with unspendable script path (à la BIP86) - Just a single-sig wallet
  2. Via key path with spendable script path - Inheritance scheme where the benefactor can spend with just their key (key path)
  3. Via script path with spendable key path - Inheritance scheme where the beneficiary can spend after an absolute timelock with their key (script path)

I've completed the first and will work on the remaining two and split them up into separate commits in the PR.

@tcharding
Copy link
Member

tcharding commented May 23, 2022

Nice, sounds good to me (but I know f-all about taproot, perhaps someone else will jump in with a concept ack too). Throw up a draft PR if you want any help/tips. Legendary!

apoelstra added a commit that referenced this issue Oct 25, 2022
1a89d52 examples: Add taproot-psbt workflow example (Duncan Dean)

Pull request description:

  Will address #893.

  Currently includes a BIP86 example (no spendable script path)

  Working on script path and key path spending when both are possible spending paths.

ACKs for top commit:
  tcharding:
    ACK 1a89d52
  apoelstra:
    ACK 1a89d52

Tree-SHA512: 31d23914faedb2632d517f9a827075f1bf387df6d98f151000f70546d1e67ac332e698c6a01bda40a9baf5b25bff0114928edc0879c5e01753ecfc6ad182fe26
@DanGould
Copy link
Contributor

closed by #999

Taproot automation moved this from Todo to Done Oct 31, 2022
PSBT automation moved this from To do to Done Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
PSBT
Done
Development

No branches or pull requests

5 participants