transfer method
Future<String>
transfer({
- required String networkUrl,
- required String privateKey,
- required String destinationB256Address,
- required int fractionalAmount,
- required String assetId,
- required int gasPrice,
- required int gasLimit,
- required int maturity,
override
Implementation
@override
Future<String> transfer({
required String networkUrl,
required String privateKey,
required String destinationB256Address,
required int fractionalAmount,
required String assetId,
required int gasPrice,
required int gasLimit,
required int maturity,
}) async {
final provider = await Provider.connect(bridge: _bridge, url: networkUrl);
final w = await WalletUnlocked.newFromPrivateKey(
bridge: _bridge,
provider: provider,
privateKey: privateKey,
);
final response = await w.transfer(
to: await Bech32Address.fromB256String(
bridge: _bridge,
s: destinationB256Address,
),
amount: fractionalAmount,
asset: assetId,
txParameters: TxParameters(
gasPrice: gasPrice,
gasLimit: gasLimit,
maturity: maturity,
),
);
return response.txId;
}