Secp256k1Keypair class

An Secp256k1 Keypair used for signing transactions.

Mixed in types

Constructors

Secp256k1Keypair([Secp256KeypairData? keypair])
Create a new keypair instance. Generate random keypair if no Secp256k1Keypair is provided.

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

getKeyScheme() SignatureScheme
Get the key scheme of the keypair Secp256k1
override
getKeySchemeFalg() int
getPublicKey() PublicKey
The public key for this keypair
override
getSecretKey() Uint8List
The secret key for this keypair
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
publicKeyBytes([bool isCompressed = true]) Uint8List
sign(Uint8List bytes) Uint8List
inherited
signData(Uint8List data) Uint8List
Return the signature for the data
override
signPersonalMessage(Uint8List bytes) SignatureWithBytes
inherited
signTransactionBlock(Uint8List bytes) SignatureWithBytes
inherited
signWithIntent(Uint8List bytes, IntentScope intent) SignatureWithBytes
inherited
toString() String
A string representation of this object.
inherited
verify(Uint8List data, Uint8List signature, Uint8List publicKey) bool
Verify signature
override
verifyPersonalMessage(Uint8List message, String signature) bool
Verifies that the signature is valid for for the provided PersonalMessage
inherited
verifySerialized(Uint8List message, String signature, Uint8List publicKey) bool
Verify serialized signature
override
verifyTransactionBlock(Uint8List transactionBlock, String signature) bool
inherited
verifyWithIntent(Uint8List bytes, String signature, IntentScope intent) bool
inherited

Operators

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

Static Properties

secp256k1 Secp256
final

Static Methods

deriveKeypair(String path, String mnemonics) Secp256k1Keypair
Derive Secp256k1 keypair from mnemonics and path. The mnemonics must be normalized and validated against the english wordlist.
fromMnemonics(String mnemonics, {int accountIndex = 0, int addressIndex = 0, int changeIndex = 0}) Secp256k1Keypair
Generate a keypair from mnemonics string.
fromSecretKey(Uint8List secretKey, {bool? skipValidation}) Secp256k1Keypair
Create a keypair from a raw secret key byte array.
fromSeed(Uint8List seed) Secp256k1Keypair
Generate a keypair from a 32 byte seed.