HD wallet key pair backed by BIP32-Ed25519 extended key.
This key pair uses the Cardano-style extended format (96 bytes: 64-byte extended secret key + 32-byte chain code) from BIP32-Ed25519 derivation. Supports both hardened and non-hardened child key derivation for CIP-1852 compatibility.
Value parameters
- extendedKey
-
the BIP32-Ed25519 extended key containing private key components and chain code
- verificationKey
-
the Ed25519 public key derived from the private key
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Type members
Types
Value members
Concrete methods
The chain code for further derivation.
The chain code for further derivation.
Attributes
Derive a child key pair at the given index.
Derive a child key pair at the given index.
Value parameters
- index
-
the child index (hardened if >= 0x80000000, normal otherwise)
Attributes
- Returns
-
the derived child key pair
Derive a hardened child key pair.
Derive a hardened child key pair.
Hardened derivation uses the private key and produces keys that cannot be derived from the parent public key.
Value parameters
- index
-
the child index (will be hardened: index + 0x80000000)
Attributes
- Returns
-
the derived child key pair
Derive a non-hardened (normal) child key pair.
Derive a non-hardened (normal) child key pair.
Non-hardened derivation uses the public key. This is required for CIP-1852 paths where role and index are not hardened.
Value parameters
- index
-
the child index (must be < 0x80000000)
Attributes
- Returns
-
the derived child key pair
Compares the receiver object (this) with the argument object (that) for equivalence.
Compares the receiver object (this) with the argument object (that) for equivalence.
Any implementation of this method should be an equivalence relation:
- It is reflexive: for any instance
xof typeAny,x.equals(x)should returntrue. - It is symmetric: for any instances
xandyof typeAny,x.equals(y)should returntrueif and only ify.equals(x)returnstrue. - It is transitive: for any instances
x,y, andzof typeAnyifx.equals(y)returnstrueandy.equals(z)returnstrue, thenx.equals(z)should returntrue.
If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).
Value parameters
- that
-
the object to compare against this object for equality.
Attributes
- Returns
-
trueif the receiver object is equivalent to the argument;falseotherwise. - Definition Classes
-
Any
Calculates a hash code value for the object.
Calculates a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.
Attributes
- Returns
-
the hash code value for this object.
- Definition Classes
-
Any
Sign a message and return the signature.
Sign a message and return the signature.
Value parameters
- message
-
the message to sign
Attributes
- Returns
-
64-byte Ed25519 signature
- Definition Classes
Attributes
- Definition Classes
Verify a signature.
Verify a signature.
Value parameters
- message
-
the message that was signed
- signature
-
the signature to verify
Attributes
- Returns
-
true if the signature is valid
- Definition Classes
Deprecated and Inherited methods
Attributes
- Deprecated
-
[Since version 0.13.0]Use extendedSigningKey.bytes instead - Definition Classes
- Inherited from:
- ExtendedKeyPair
Attributes
- Deprecated
-
[Since version 0.13.0]Use verificationKey.bytes instead - Inherited from:
- KeyPair
Attributes
- Deprecated
-
[Since version 0.13.0]Use sign(ByteString) instead - Inherited from:
- KeyPair
Attributes
- Deprecated
-
[Since version 0.13.0]Use verificationKey and signing key directly - Inherited from:
- KeyPair
Concrete fields
The extended signing key (kL || kR = 64 bytes).
The extended signing key (kL || kR = 64 bytes).
This is the Cardano-style extended key format used for signing.
Attributes
The standard 32-byte signing key (kL only, without kR).
The standard 32-byte signing key (kL only, without kR).
Attributes
The verification (public) key - 32 bytes.
The verification (public) key - 32 bytes.