pay method
Pay a given pubkey. This automatically recognizes whether it is an HD wallet or a Cesium wallet. Return 'success' string if the transaction has been successfuly proced, or the specified error
Implementation
Future<String> pay(
{required String recipient,
required double amount,
String? dewif,
String? password,
String? mnemonic,
String? cesiumId,
String? cesiumPwd,
Uint8List? cesiumSeed,
String lang = 'english',
int? derivation,
String comment = '',
bool ud = false,
bool useMempool = false,
bool raiseException = false}) async {
Transaction transaction;
if (ud) {
final currentUd = await getCurrentUd();
amount = amount * currentUd;
}
transaction = Transaction(
recipient: recipient,
amount: (amount.toPrecision(2) * 100).toInt(),
dewif: dewif,
password: password,
mnemonic: mnemonic,
cesiumId: cesiumId,
cesiumPwd: cesiumPwd,
cesiumSeed: cesiumSeed,
derivation: derivation ?? -1,
comment: comment,
useMempool: useMempool,
lang: lang,
client: _client);
// Execute transaction
return await transaction.process(raiseException);
}