sendRawAssetTransfer method
Sends a raw asset transfer call to a node
The connected node must be able to calculate the result locally, which means that the call won't write any data to the blockchain. Doing that would require sending a transaction which can be sent via sendTransaction. As no data will be written, you can use the sender inside the transaction to specify any Topl address that would call the above method.
Implementation
Future<Map<String, dynamic>> sendRawAssetTransfer(
{required AssetTransaction assetTransaction}) async {
final tx = await _fillMissingDataRawAsset(transaction: assetTransaction);
return _makeRPCCall('topl_rawAssetTransfer', params: [tx.toJson()])
.then((value) => {
'rawTx': TransactionReceipt.fromJson(
value['rawTx'] as Map<String, dynamic>),
'messageToSign':
Base58Data.validated(value['messageToSign'] as String).value
});
}