createEcdsaSession function

Future<EcdsaSession> createEcdsaSession({
  1. required CloudClient cloudClient,
  2. required String cloudVerifyingKeyHex,
  3. required StorageClientInterface<StorageKeyshare> storageClient,
  4. DklsMessageSignerBase? signer,
  5. Protocol protocol = Protocol.duo,
})

Implementation

Future<EcdsaSession> createEcdsaSession({
  required CloudClient cloudClient,
  required String cloudVerifyingKeyHex,
  required StorageClientInterface storageClient,
  dkls.DklsMessageSignerBase? signer,
  Protocol protocol = Protocol.duo,
}) async {
  final signingKey = signer != null
      ? await dkls.DklsSigningKey.create(signer)
      : await dkls.DklsSigningKey.createInMemory();

  final ecdsaSessionConfig = EcdsaSessionConfig(
      cloudClient: cloudClient,
      cloudVerifyingKeyHex: cloudVerifyingKeyHex,
      storageClient: storageClient,
      signingKey: signingKey,
      protocol: protocol);
  return EcdsaSession(ecdsaSessionConfig);
}