Function buildAndSignOptimalTransaction

  • Builds a compute-optimized transaction from a set of instructions, fee payer, connection, and lookup tables

    Parameters

    • connection: Connection

      The connection to use for getting the rbh and passed in to the priority config functions

    • instructions: InstructionReturn | InstructionReturn[]

      The main instructions to include in the transaction.

    • feePayer: AsyncSigner<unknown>

      The fee payer for the transaction.

    • priorityConfig: PriorityConfig

      Configuration for if and how the Compute budget instructions will be added to the transaction.

    • lookupTables: AddressLookupTableAccount[] = []

      Optional list of lookup tables to try to build transaction with.

    Returns Promise<TransactionReturn>

    A promise that resolves to a Transaction with rbh and commitment.

Generated using TypeDoc