TransactionPlannerConfig

type TransactionPlannerConfig = object;

Configuration object for creating a new transaction planner.

See

createTransactionPlanner

Properties

createTransactionMessage

createTransactionMessage: CreateTransactionMessage;

Called whenever a new transaction message is needed.


maxInstructionsPerTransaction?

optional maxInstructionsPerTransaction?: number;

Maximum number of instructions allowed in each planned transaction.

This includes any instructions already present in messages returned by createTransactionMessage and any instructions added by onTransactionMessageUpdated.

Must be a positive integer no greater than 64 — the number of top-level instructions the transaction format can encode. Larger values throw SOLANA_ERROR__INSTRUCTION_PLANS__INVALID_MAX_INSTRUCTIONS_PER_TRANSACTION. Defaults to 16.


onTransactionMessageUpdated?

optional onTransactionMessageUpdated?: OnTransactionMessageUpdated;

Called whenever a transaction message is updated — e.g. new instructions were added. This function must return the updated transaction message back — even if no changes were made.

On this page