NUMSPublicKey class

A "nothing up my sleeve" ECPublicKey that is created from a point with no known private key and tweaked with a scalar value named rTweak. The key is reproduceable from this scalar using fromRTweak(). Any of these keys have no known associted private key. Sharing the rTweak allows others to verify this. These keys can be used as Taproot internal keys where no key-path spending is desired.

Inheritance

Constructors

NUMSPublicKey.fromRTweak(Uint8List rTweak)
Constructs a NUMS key from a given rTweak. Throws ArgumentError if rTweak cannot produce a valid public key.
factory
NUMSPublicKey.generate()
Generates a new NUMS key with a random rTweak.
factory

Properties

compressed bool
no setterinherited
data Uint8List
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hex String
no setterinherited
rTweak Uint8List
The scalar tweak for this key which may be shared for verification.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
x Uint8List
Obtains the X coordinate of the public key which is used for Schnorr signatures. Schnorr signatures force an even Y coordinate. Public and private keys are converted to use even Y coordinates as necessary allowing any existing keys to work.
no setterinherited
xonly ECPublicKey
Obtains a new key that uses the same X coordinate but uses an even Y coordinate.
no setterinherited
yIsEven bool
True if the Y-coordinate is even as required for Schnorr signatures. If the Y-coorindate is not even, then the odd equivilent can be obtained via xonly.
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
tweak(Uint8List scalar) ECPublicKey?
Tweaks the public key with a scalar multiplied by the generator point. In the instance a new key cannot be created (practically impossible for random 32-bit scalars), then null will be returned.
inherited

Operators

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

Static Properties

numsPoint ECPublicKey
To prove that this point does not have an associated private key, the x-coordinate is the sha256 hash of the uncompressed secp256k1 generator point bytes. This can be reproduced and verified using the script bin/generate_nums_point.dart.
final