compressTransactionMessageUsingAddressLookupTables
compressTransactionMessageUsingAddressLookupTables<
TTransactionMessage
>(transactionMessage
,addressesByLookupTableAddress
):TTransactionMessage
|WidenTransactionMessageInstructions
<TTransactionMessage
>
Given a transaction message and a mapping of lookup tables to the addresses stored in them, this function will return a new transaction message with the same instructions but with all non-signer accounts that are found in the given lookup tables represented by an AccountLookupMeta instead of an AccountMeta.
This means that these accounts will take up less space in the compiled transaction message. This size reduction is most significant when the transaction includes many accounts from the same lookup table.
Type Parameters
Type Parameter | Default type |
---|---|
TTransactionMessage extends Readonly <{ instructions : readonly Instruction <string , readonly (AccountLookupMeta <string , string > | AccountMeta <string >)[]>[]; version : 0 ; }> | Readonly <{ instructions : readonly Instruction <string , readonly (AccountLookupMeta <string , string > | AccountMeta <string >)[]>[]; version : 0 ; }> |
Parameters
Parameter | Type |
---|---|
transactionMessage | TTransactionMessage |
addressesByLookupTableAddress | AddressesByLookupTableAddress |
Returns
TTransactionMessage
| WidenTransactionMessageInstructions
<TTransactionMessage
>