getKeysharePublicKey

abstract suspend fun getKeysharePublicKey(keyshare: ByteArray): Result<ByteArray>

Extracts the public key from a keyshare.

The public key can be used to derive blockchain addresses and verify signatures. This is a local operation that doesn't require network communication.

Example:

val keyshare = session.keygen().getOrThrow()
val publicKey = SilentShard.ECDSA.getKeysharePublicKey(keyshare).getOrThrow()

// For Ethereum, derive address from public key
val address = deriveEthereumAddress(publicKey)

Return

Result containing the public key as ByteArray, or failure with exception

Parameters

keyshare

The keyshare bytes obtained from keygen or other operations