PrivateKey class abstract

Represents a private key used for signing messages and deriving the associated public key.

The static members provide the AIP-80 helpers shared by all private key implementations.

Implementers

Constructors

PrivateKey()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
publicKey() → PublicKey
Derive the public key associated with the private key.
sign(HexInput message) → Signature
Sign the given message with the private key to create a signature.
toString() → String
A string representation of this object.
inherited
toUint8Array() → Uint8List
Get the private key in bytes.

Operators

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

Static Methods

formatPrivateKey(HexInput privateKey, PrivateKeyVariants type) → String
Format a HexInput to an AIP-80 compliant string.
parseHexInput(HexInput value, PrivateKeyVariants type, [bool? strict]) → Hex
Parse a HexInput that may be a hex string, bytes, or an AIP-80 compliant string to a Hex instance.

Constants

aip80Prefixes → const Map<PrivateKeyVariants, String>
The AIP-80 compliant prefixes for each private key type. Append this to a private key's hex representation to get an AIP-80 compliant string.