What is Nostr?
Andrew Poelstra [ARCHIVE] /
npub1ae2ā€¦5t04
2023-08-12 09:56:45
in reply to nevent1qā€¦400w

Andrew Poelstra [ARCHIVE] on Nostr: šŸ“… Original date posted:2023-08-11 šŸ—’ļø Summary of this message: The author is ...

šŸ“… Original date posted:2023-08-11
šŸ—’ļø Summary of this message: The author is seeking input on the function "is_segwit()" and its return value for p2tr transactions. The term "segwit v0" is used for p2wsh or p2wpkh outputs.
šŸ“ Original message:
On Fri, Aug 11, 2023 at 02:45:57PM +1000, Tobin Harding via bitcoin-dev wrote:
> Question for OG bitcoin API designers please.
>
> If you were to see the following function
>
> `is_segwit()`
>
> would you assume it returns `true` or `false` for a p2tr transaction?
>
>
> Currently we (rust-bitcoin) are being liberal with the use of `v0` but
> its a pretty ugly. Is there an official, or widely used, name for segwit v0?
>

As others have said, I think `is_segwit` should match all segwit
versions. Pavol also sorta answered your "widely used name" question
though he didn't draw attention to it -- segwit v0 outputs are called
"p2wsh" or "p2wpkh".

But I don't know any term that covers "p2wsh or p2wpkh but not p2tr".
Other than "segwit_v0", which we are currently using, and which I agree
is a bit of a mouthful.


--
Andrew Poelstra
Director of Research, Blockstream
Email: apoelstra at wpsoftware.net
Web: https://www.wpsoftware.net/andrew

The sun is always shining in space
-Justin Lewis-Webster

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20230811/edc59c34/attachment.sig>;
Author Public Key
npub1ae27kq6z802dkqw4ey4dgdx493szm8dpmcm76d7vt0ma9gf6fj4svz5t04