P2TRUtils class

Utility class for working with P2TR (Pay-to-Taproot) addresses and operations.

Constructors

P2TRUtils()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

calculateTweek(Secp256k1Point pubPoint, {List? script}) → List<int>
hashTapTweak(Secp256k1Point pubPoint) → List<int>
Computes the TapTweak hash for pubPoint.
liftX(List<int> xBytes) → Secp256k1Point
Recovers the secp256k1 point with even Y for 32-byte big-endian x-coordinate xBytes (as used by BIP-340/Taproot). Throws AddressConverterException if xBytes is not a valid curve x-coordinate (wrong length, out of range, or non-residue).
taggedHash(dynamic tag, List<int> dataBytes) → List<int>
BIP-340 tagged hash: SHA256(SHA256(tag) || SHA256(tag) || dataBytes). tag may be a String (hashed first) or already-hashed bytes.
tweakPublicKey(Secp256k1Point pubPoint, {List? script}) → Secp256k1Point