deriveChildPublicKey
abstract suspend fun deriveChildPublicKey(keyshare: ByteArray, derivationPath: String): Result<ByteArray>
Derives a child public key using BIP32 hierarchical deterministic derivation.
Enables deriving multiple addresses from a single keyshare without additional network communication. Follows BIP32/BIP44 standards for HD wallet derivation.
Common derivation paths:
Bitcoin: "m/44'/0'/0'/0/0"
Ethereum: "m/44'/60'/0'/0/0"
Default: "m"
Example:
val keyshare = session.keygen().getOrThrow()
// Derive first Ethereum address
val childKey1 = SilentShard.ECDSA.deriveChildPublicKey(
keyshare,
"m/44'/60'/0'/0/0"
).getOrThrow()
// Derive second Ethereum address
val childKey2 = SilentShard.ECDSA.deriveChildPublicKey(
keyshare,
"m/44'/60'/0'/0/1"
).getOrThrow()Content copied to clipboard
Return
Result containing the derived child public key, or failure with exception
Parameters
keyshare
The keyshare bytes obtained from keygen or other operations
derivationPath
BIP32 derivation path (e.g., "m/44'/60'/0'/0/0")