sendMorpheusTxWithPassphrase method

  1. @Deprecated('Not red carpet methods are not used anymore. Use sendMorpheusTx')
Future<String> sendMorpheusTxWithPassphrase(
  1. MorpheusAsset morpheusAsset,
  2. String passphrase, {
  3. int? nonce,
})

Implementation

@Deprecated('Not red carpet methods are not used anymore. Use sendMorpheusTx')
Future<String> sendMorpheusTxWithPassphrase(
  MorpheusAsset morpheusAsset,
  String passphrase, {
  int? nonce,
}) async {
  final secpPrivKey = SecpPrivateKey.fromArkPassphrase(passphrase);
  final senderPubKey = secpPrivKey.publicKey();
  nonce ??= (await getWalletNonce(senderPubKey.toString())) + 1;

  final morpheusTx = MorpheusTxBuilder.build(
    _networkConfig.network,
    morpheusAsset,
    senderPubKey,
    nonce,
  );

  final signedTx = secpPrivKey.signHydraTransaction(morpheusTx);
  return await sendTx(signedTx.toString());
}