hardDerivation

suspend fun hardDerivation(keyId: String, derivationPath: String): Result<String>

Derives a new, independent child keyshare from an existing parent keyshare along a hardened BIP32 path. ECDSA only — EdDSA returns a failure.

Unlike soft public-key derivation (which only computes a child public key locally), hardened derivation runs a full three-party MPC protocol and produces a brand-new keyshare with its own keyId and public key. The child keyshare is persisted to the owned StorageClient and reconciled automatically, exactly like keygen.

Example

val parentKeyId = session.keygen().getOrThrow()
val childKeyId = session.hardDerivation(parentKeyId, "m/44'/60'/0'/0/0").getOrThrow()
// childKeyId references an independent, signable keyshare in storage
val signature = session.sign(childKeyId, txHash, "m").getOrThrow()

Return

Result containing the hex-encoded keyId of the new child keyshare. The keyshare itself is persisted to the StorageClient.

Parameters

keyId

Hex-encoded keyId of the parent keyshare. The SDK looks up the current keyshare via the owned StorageClient.

derivationPath

Hardened BIP32 path, e.g. "m/44'/60'/0'/0/0".