getDecryptedPrivateKey function

Future<String> getDecryptedPrivateKey({
  1. required Wallet wallet,
  2. required User user,
  3. required String address,
})

Implementation

Future<String> getDecryptedPrivateKey({
  required Wallet wallet,
  required User user,
  required String address,
}) async {
  if (wallet.signer != null) {
    return decryptPGPKey(
      encryptedPGPPrivateKey: user.encryptedPrivateKey!,
      wallet: wallet,
    );
  } else {
    throw Exception('Provide signer');
  }
}