getKeyshareKeyId

open suspend fun getKeyshareKeyId(keyshare: ByteArray): Result<ByteArray>

Retrieves the unique identifier for a keyshare.

The keyId is a deterministic hash derived from the keyshare's public key. It can be used to identify and manage keyshares in storage.

Example:

val keyshareResult = session.keygen()
val keyshare = keyshareResult.getOrThrow()

val keyIdResult = SilentShard.ECDSA.getKeyshareKeyId(keyshare)
val keyId = keyIdResult.getOrThrow().toHexString()
println("KeyId: $keyId")

Return

Result containing the keyId as ByteArray, or failure with exception

Parameters

keyshare

The keyshare bytes obtained from keygen or other operations