importPrivateKeyImporter

suspend fun importPrivateKeyImporter(roomUuid: RoomUUID, threshold: Int, privateKey: PrivateKey, keygenInitKeypair: KeygenPrivateKey, keygenIds: Array<KeygenID>): Pair<BIP340PublicKey, BIP340SecretShare>

Imports a BIP340 private key (importer).

WARNING: Private key import is an advanced feature. Shares generated from imported private keys have the risk of the private key being compromised if it's not properly deleted after the import operation.

This is the method that the importing party (the one in possession of the private key) should use to distribute shares of the private key to a threshold-of-numParties quorum.

Return

KeyGen object containing the public key and secret share for the imported keypair

Parameters

roomUuid

The UUID of the import room

threshold

The threshold of the new quorum (value in range 1..65535)

privateKey

The private key to be imported (a hex string of length 64)

keygenInitKeypair

Contains the keygenSecret for the importing party

keygenIds

The keygenIds of all parties that will be part of the new quorum