Taproot class

This class encapsulates the construction of Taproot tweaked keys given an internal key and MAST consisting of Tapscript leaves constructed with TapBranch and TapLeaf objects.

Constructors

Taproot.new({required ECPublicKey internalKey, TapNode? mast})
Takes the internalKey to construct the tweaked key. The internal key will be forced to use an even Y coordinate and may not equal the passed internalKey. The mast represents a "Merkelized Abstract Syntax Tree" which is a tree of scripts that can be spent. This can be constructed via TapBranch and TapLeaf objects.

Properties

hashCode int
The hash code for this object.
no setterinherited
internalKey ECPublicKey
final
leaves List<TapLeaf>
A list of TapLeaf objects in the order that they appear in the MAST tree
final
mast TapNode?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tweakedKey ECPublicKey
Obtains the tweaked public key for use in a Taproot program
no setter
tweakScalar Uint8List
The scalar to tweak the internal key
no setter

Methods

controlBlockForLeaf(TapLeaf leaf) Uint8List
Given the exact leaf object provided to this Taproot object, this provides the control block data for inclusion in a script-path input.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
tweakPrivateKey(ECPrivateKey key) ECPrivateKey
Takes a private key and tweaks it for key-path spending

Operators

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

Static Properties

tweakHash Uint8List Function(Uint8List msg)
final