XRPPrivateKey class
Constructors
-
XRPPrivateKey.fromBytes(List<
int> keyBytes, {XRPKeyAlgorithm? algorithm}) -
Factory constructor for creating an XRP private key from a byte representation.
factory
- XRPPrivateKey.fromEntropy(String entropy, {XRPKeyAlgorithm algorithm = XRPKeyAlgorithm.ed25519})
-
Factory constructor for creating an XRP private key from entropy.
factory
- XRPPrivateKey.fromHex(String privateKey, {XRPKeyAlgorithm? algorithm})
-
Factory constructor for creating an XRP private key from a hexadecimal representation.
factory
- XRPPrivateKey.fromSeed(String seed)
-
Factory constructor for creating an XRP private key from a seed.
factory
- XRPPrivateKey.random({XRPKeyAlgorithm algorithm = XRPKeyAlgorithm.ed25519, GenerateRandom? randomGenerator})
-
Factory constructor for generating a random XRP private key.
algorithm
specifies the cryptographic algorithm, with ED25519 being the default.factory
Properties
- algorithm → XRPKeyAlgorithm
-
The XRP key algorithm associated with the private key.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getPublic(
) → XRPPublicKey - Gets the public key associated with this private key.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sign(
String message) → XRPLSignature -
Signs the given
message
using the private key and returns the signature as a hexadecimal string. -
toBytes(
) → List< int> - Returns the private key as a bytes.
-
toHex(
) → String - Returns the private key as a hexadecimal string with the appropriate prefix based on the algorithm.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
findAlgorithm(
List< int> keyBytes) → XRPKeyAlgorithm - Finds the XRP key algorithm based on the given key bytes.