[experimental] Consider making address
of IAccountLookupMeta
optional
#2744
Labels
enhancement
New feature or request
address
of IAccountLookupMeta
optional
#2744
Background
Consider this type:
solana-web3.js/packages/instructions/src/accounts.ts
Lines 21 to 26 in a97c34b
One could argue that
address
doesn't need to be there. When you go to compile the message, the address gets dropped in favour of its index in the LUT.The reason that
address
is there is so that the compiler can do some extra tricks:Problem
The problem is that the presence of this property implies that in order to
decompileMessage()
a message with LUTs, you need to know the addresses so that the decompiler can rehydrate theTransactionMessage
.There are some use cases for which knowing the addresses is not important though. You might want to decompile a transaction to look at something other than the account addresses. You might also just like to add an instruction and recompile it. Knowing the LUT addresses is not a prerequisite for this; you can recompile the message just fine without knowing them.
Summary
This issue considers the possibility of relaxing this type by making
address
optional. Alternatively we could add a type to this union likeIAccountIndeterminateLookupMeta
that has the indexes but not the `address.The text was updated successfully, but these errors were encountered: