gill
gill/Functions

prepareTransaction

function prepareTransaction<TMessage>(config): Promise<TMessage & Readonly<{
}> & TransactionMessageWithBlockhashLifetime>;

Prepare a Transaction to be signed and sent to the network. Including:

  • setting a compute unit limit (if not already set)
  • fetching the latest blockhash (if not already set)
  • (optional) simulating and resetting the compute unit limit
  • (optional) resetting latest blockhash to the most recent

Type Parameters

Type Parameter
TMessage extends PrepareCompilableTransactionMessage

Parameters

ParameterType
configPrepareTransactionConfig<TMessage>

Returns

Promise<TMessage & Readonly<{ }> & TransactionMessageWithBlockhashLifetime>

On this page