Generates a transaction based on the provided arguments
Note: we can start with one function to support all different payload/transaction types, and if to complex to use, we could have function for each type
An instance of a RawTransaction, plus optional secondary/fee payer addresses
{
rawTransaction: RawTransaction,
secondarySignerAddresses? : Array<AccountAddress>,
feePayerAddress?: AccountAddress
}
We are defining function signatures, each with its specific input and output. These are the possible function signature for our
generateTransaction
function. When we call ourgenerateTransaction
function with the relevant type properties, Typescript can infer the return type based on the appropriate function overload.