getXmrSeed method

Future<String?> getXmrSeed()

Retrieves the XMR seed of the wallet.

This method sends a GetXmrSeedRequest to retrieve the seed of the wallet, which can be used for wallet recovery.

Example:

final seed = await walletsService.getXmrSeed();
print('Wallet Seed: $seed');

Returns:

  • A Future containing the seed as a String.
  • null if an error occurs.

Implementation

Future<String?> getXmrSeed() async {
  if (!havenoChannel.isConnected) {
    throw DaemonNotConnectedException();
  }
  try {
    final getXmrSeedReply =
        await havenoChannel.walletsClient!.getXmrSeed(GetXmrSeedRequest());
    return getXmrSeedReply.seed;
  } on GrpcError catch (e) {
    handleGrpcError(e);
  }
  return null;
}