[#WitnessV1Taproot] = WitnessV1Taproot :mrdocs: A version‐1 taproot destination for a P2TR address. == Synopsis Declared in `<addresstype.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct WitnessV1Taproot : xref:XOnlyPubKey.adoc[XOnlyPubKey] ---- == Base Classes [cols="1,4"] |=== | Name| Description | `xref:XOnlyPubKey.adoc[XOnlyPubKey]` | A BIP340‐style x‐only public key, storing only the 32‐byte x coordinate. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:WitnessV1Taproot/2constructor-0d.adoc[`WitnessV1Taproot`] [.small]#[constructor]# | Constructors | xref:XOnlyPubKey/operator_assign.adoc[`operator=`] | Copy‐assign an x‐only pubkey from another. | xref:XOnlyPubKey/CheckTapTweak.adoc[`CheckTapTweak`] | Verify that this is a Taproot tweaked output point, against a specified internal key, Merkle root, and parity. | xref:XOnlyPubKey/ComputeTapTweakHash.adoc[`ComputeTapTweakHash`] | Compute the Taproot tweak as specified in BIP341, with *this as internal key: ‐ if merkle_root == nullptr: H_TapTweak(xonly_pubkey) ‐ otherwise: H_TapTweak(xonly_pubkey || *merkle_root) | xref:XOnlyPubKey/CreateTapTweak.adoc[`CreateTapTweak`] | Construct a Taproot tweaked output point with this point as internal key. | xref:XOnlyPubKey/GetCPubKeys.adoc[`GetCPubKeys`] | Returns this XOnlyPubKey with 0x02 and 0x03 prefixes | xref:XOnlyPubKey/GetEvenCorrespondingCPubKey.adoc[`GetEvenCorrespondingCPubKey`] | Get the full public key with an even y coordinate (0x02 prefix) for this x‐only pubkey. | xref:XOnlyPubKey/GetKeyIDs.adoc[`GetKeyIDs`] | Returns a list of CKeyIDs for the CPubKeys that could have been used to create this XOnlyPubKey. As the CKeyID is the Hash160(full pubkey), the produced CKeyIDs are for the versions of this XOnlyPubKey with 0x02 and 0x03 prefixes. This is needed for key lookups since keys are indexed by CKeyID. | xref:XOnlyPubKey/IsFullyValid.adoc[`IsFullyValid`] | Determine if this pubkey is fully valid. This is true for approximately 50% of all possible 32‐byte arrays. If false, VerifySchnorr, CheckTapTweak and CreateTapTweak will always fail. | xref:XOnlyPubKey/IsNull.adoc[`IsNull`] | Test whether this is the 0 key (the result of default construction). This implies !IsFullyValid(). | xref:WitnessV1Taproot/Serialize.adoc[`Serialize`] | Serialize the 32‐byte x‐only key data without a length prefix since it is fixed length. | xref:WitnessV1Taproot/Unserialize.adoc[`Unserialize`] | Serialize the 32‐byte x‐only key data without a length prefix since it is fixed length. | xref:XOnlyPubKey/VerifySchnorr.adoc[`VerifySchnorr`] | Verify a Schnorr signature against this public key. | xref:XOnlyPubKey/begin-06.adoc[`begin`] | `begin` overloads | xref:XOnlyPubKey/data-00.adoc[`data`] | `data` overloads | xref:XOnlyPubKey/end-00.adoc[`end`] | `end` overloads | xref:XOnlyPubKey/operator_subs.adoc[`operator[]`] | Access the byte at the given position. | xref:XOnlyPubKey/operator_eq.adoc[`operator==`] | Compare two x‐only pubkeys for equality. | xref:XOnlyPubKey/operator_lt.adoc[`operator<`] | Order two x‐only pubkeys by their key data. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:WitnessV1Taproot/Ser.adoc[`Ser`] | Serialize the 32‐byte x‐only key data without a length prefix since it is fixed length. | xref:WitnessV1Taproot/SerializationOps.adoc[`SerializationOps`] | Serialize the 32‐byte x‐only key data without a length prefix since it is fixed length. | xref:WitnessV1Taproot/Unser.adoc[`Unser`] | Serialize the 32‐byte x‐only key data without a length prefix since it is fixed length. | xref:XOnlyPubKey/size.adoc[`size`] | Number of bytes in an x‐only public key. |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:XOnlyPubKey/NUMS_H.adoc[`NUMS_H`] | Nothing Up My Sleeve point H Used as an internal key for provably disabling the key path spend see BIP341 for more details |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#