sendTransferTxWithPassphrase method
- @Deprecated('Not red carpet methods are not used anymore. Use sendTransferTx')
Future<String>
sendTransferTxWithPassphrase(
- String passphrase,
- String targetAddress,
- int amountInFlake, {
- int? nonce,
})
Implementation
@Deprecated('Not red carpet methods are not used anymore. Use sendTransferTx')
Future<String> sendTransferTxWithPassphrase(
String passphrase,
String targetAddress,
int amountInFlake, {
int? nonce,
}) async {
final secpPrivKey = SecpPrivateKey.fromArkPassphrase(passphrase);
final senderPubKey = secpPrivKey.publicKey();
nonce ??= (await getWalletNonce(senderPubKey.toString())) + 1;
final builder = HydraTxBuilder(_networkConfig.network);
final transferTx = builder.transfer(
senderPubKey,
targetAddress,
amountInFlake,
nonce,
);
final signedTx = secpPrivKey.signHydraTransaction(transferTx);
final resp = await sendTx(signedTx.toString());
return resp;
}