ACINQ / bitcoin-kmp

Kotlin Multiplatform Bitcoin Library
Apache License 2.0
68 stars 15 forks source link

Provide high-level taproot abstractions #109

Closed t-bast closed 9 months ago

t-bast commented 9 months ago

We provide helpers and better high-level abstractions for spending taproot outputs via either the key path or script path. This ensures that callers can't mess up which SigVersion they use, or forget to include the script leaf hash or merkle root depending on what they are spending.

The caller only needs to remember:

That is information that they should always be able to keep around or recompute, and seems to be minimal.

NB: the two commits are somewhat independent and should be reviewed separately.