ECPublic class

Constructors

ECPublic.fromBytes(Uint8List public)
ECPublic.fromHex(String hex)
creates an object from a hex string in SEC format (classmethod)

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

calculateTweek({dynamic script}) BigInt
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toAddress({bool compressed = true}) P2pkhAddress
returns the corresponding P2pkhAddress object
toBytes({int? prefix = 0x04}) Uint8List
returns the unCompressed key's raw bytes
toCompressedBytes() Uint8List
returns the Compressed key's raw bytes
toHash160({bool compressed = true}) String
returns the hash160 hex string of the public key
toHex({bool compressed = true}) String
returns the key as hex string (in SEC format - compressed by default)
toP2pkAddress({bool compressed = true}) P2pkAddress
toP2pkhInP2sh({bool compressed = true}) P2shAddress
p2sh nested p2kh
toP2pkInP2sh({bool compressed = true}) P2shAddress
toP2wpkhInP2sh({bool compressed = true}) P2shAddress
p2sh nested segwit(p2wpkh)
toP2wshAddress({bool compressed = true}) P2wshAddress
return p2wshaddress with 1-1 multisig segwit script
toP2wshInP2sh({bool compressed = true}) P2shAddress
return p2sh(p2wsh) nested 1-1 multisig segwit address
toP2wshScript({bool compressed = true}) Script
return 1-1 multisig segwit script
toRedeemScript({bool compressed = true}) Script
toSegwitAddress({bool compressed = true}) P2wpkhAddress
returns the corresponding P2wpkhAddress object
toString() String
A string representation of this object.
inherited
toTaprootAddress({List? scripts}) P2trAddress
return p2tr address
toTapRotHex({List? script}) String
returns the x coordinate only as hex string after tweaking (needed for taproot)
toXOnlyHex() String
returns the x coordinate only as hex string before tweaking (needed for taproot)
verify(String message, Uint8List signature) bool
returns true if the message was signed with this public key's

Operators

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

Static Methods

getSignaturPublic(String message, Uint8List signatur) ECPublic?
get ECPublic of signatur