pub async fn run<R, S>(
setup: S,
seed: Seed,
relay: R,
s_i_0: Scalar,
public_key: ProjectivePoint,
root_chain_code: [u8; 32],
) -> Result<Keyshare, KeygenError>where
S: KeygenSetupMessage,
R: Relay,
Expand description
Migrates key shares from other ECDSA threshold protocols to DKLS23 format.
This function performs the migration of existing key shares to the DKLS23 protocol. It uses the same underlying logic as the key refresh process but with a hardcoded initial secret share value. The migration preserves the original public key and chain code while updating the internal representation to the new protocol format.
§Type Parameters
R
- A type implementing theRelay
trait for message communicationS
- A type implementing theKeygenSetupMessage
trait for protocol setup
§Arguments
setup
- The protocol setup configurationseed
- The random seed for key generationrelay
- The message relay for communication between partiess_i_0
- The initial additive secret share value from the existing protocolpublic_key
- The public key to be preserved during migrationroot_chain_code
- The root chain code to be preserved during migration
§Returns
Ok(Keyshare)
- The migrated key share in DKLS23 formatErr(KeygenError)
- If the migration process fails
§Errors
This function may return the following errors:
KeygenError::AbortProtocol
- If the protocol is aborted by a participantKeygenError::SendMessage
- If there’s an error sending messages- Other
KeygenError
variants for various protocol failures