childKey method
Derives a child key from the current key, based on the provided index.
This method derives a child key from the current key, either privately or publicly, depending on the input and key type. If the current key is private, it can derive both private and public child keys. If the current key is public, it can only derive public child keys. For Bip32Slip10Ed25519Derivator derivator, it can only derive private child keys.
index
: The index used to derive the child key.
If the current key is private:
- For non-hardened derivation, this method can derive both private and public child keys.
Returns a new key instance representing the derived child key. If public derivation is not supported or if there's an issue with the derivation process, an error is thrown.
Implementation
@override
Bip32Slip10Ed25519Blake2b childKey(Bip32KeyIndex index) {
return super.childKey(index) as Bip32Slip10Ed25519Blake2b;
}