Custom Transactions
There may be scenarios where you need to build out transactions that involve multiple program types and assets; this can be done by instantiating a ScriptTransactionRequest
. This class allows you to a append multiple program types and assets to a single transaction.
Consider the following script that transfers multiple assets to a contract:
This script can be executed by creating a ScriptTransactionRequest
, appending the resource and contract inputs/outputs and then sending the transaction, as follows: