sendMorpheusTx method
Future<String>
sendMorpheusTx(
- String senderAddress,
- MorpheusAsset morpheusAsset,
- HydraPrivate hydraPrivate, {
- int? nonce,
Implementation
Future<String> sendMorpheusTx(
String senderAddress,
MorpheusAsset morpheusAsset,
HydraPrivate hydraPrivate, {
int? nonce,
}) async {
final senderBip44PubKey = hydraPrivate.public.keyByAddress(senderAddress);
nonce ??= (await getWalletNonce(senderAddress)) + 1;
final morpheusTx = MorpheusTxBuilder.build(
_networkConfig.network,
morpheusAsset,
senderBip44PubKey.publicKey(),
nonce,
);
final signedTx =
hydraPrivate.signHydraTransaction(senderAddress, morpheusTx);
return await sendTx(signedTx.toString());
}