ECPrivate class
Represents an ECDSA private key.
Constructors
- ECPrivate(Bip32PrivateKey prive)
-
const
-
ECPrivate.fromBytes(List<
int> prive) -
creates an object from raw 32 bytes
factory
- ECPrivate.fromHex(String keyHex)
-
creates an object from hex
factory
-
ECPrivate.fromWif(String wif, {List<
int> ? netVersion}) -
creates an object from a WIF of WIFC format (string)
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- prive → Bip32PrivateKey
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getPublic(
) → ECPublic - returns the corresponding ECPublic object
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
signBip137(
List< int> message, {String messagePrefix = BitcoinSignerUtils.signMessagePrefix, BIP137Mode mode = BIP137Mode.p2pkhUncompressed, List<int> extraEntropy = const []}) → String - Signs a message using BIP-137 format for standardized Bitcoin message signing.
-
signBip340(
List< int> txDigest, {int sighash = BitcoinOpCodeConst.sighashDefault, TaprootTree? treeScript, List<int> ? merkleRoot, List<int> ? tapTweakHash, List<int> ? aux, bool tweak = true}) → String - Signs a Taproot transaction digest and returns the signature.
-
signECDSA(
List< int> txDigest, {int? sighash = BitcoinOpCodeConst.sighashAll, List<int> extraEntropy = const []}) → String - Signs the given transaction digest using ECDSA (DER-encoded).
-
signMessage(
List< int> message, {String messagePrefix = BitcoinSignerUtils.signMessagePrefix, List<int> extraEntropy = const []}) → String - Signs a message using Bitcoin's message signing format.
-
signSchnorr(
List< int> txDigest, {int sighash = BitcoinOpCodeConst.sighashDefault, List<int> extraEntropy = const []}) → String - Signs the given transaction digest using Schnorr signature (old style).
-
toBytes(
) → List< int> - returns the key's raw bytes
-
toHex(
) → String - returns the key's as hex
-
toString(
) → String -
A string representation of this object.
inherited
-
toWif(
{PubKeyModes pubKeyMode = PubKeyModes.compressed, BitcoinNetwork network = BitcoinNetwork.mainnet}) → String - returns as WIFC (compressed) or WIF format (string)
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited