prependTransactionMessageInstruction
Given an instruction, this method will return a new transaction message with that instruction having been added to the beginning of the list of existing instructions.
Type Parameters
| Type Parameter |
|---|
TTransactionMessage extends Readonly<{ instructions: readonly Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]>[]; version: TransactionVersion; }> |
TInstruction extends Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]> |
Parameters
| Parameter | Type |
|---|---|
instruction | TInstruction |
transactionMessage | TTransactionMessage |
Returns
PrependTransactionMessageInstructions<TTransactionMessage, [TInstruction]>
See
prependTransactionInstructions if you need to prepend multiple instructions to a transaction message.