solana-go-sdk icon indicating copy to clipboard operation
solana-go-sdk copied to clipboard

Consider exposing all "resolved" addresses on `Transaction`

Open omarkilani opened this issue 2 years ago • 1 comments

Should solana-go-sdk expose something like this on the Client interface?

https://github.com/solana-labs/solana/pull/27552/files

The way this seems to work is (in order of "resolved" accounts array):

  1. Message (static) accounts have source = Transaction.
  2. ALT writable accounts with source = LookupTable.
  3. ALT readonly accounts with source = LookupTable.

I'm not sure where in the struct hierarchy this belongs as LoadedAddresses are in Meta, while Accounts is on Transaction.Message), so possibly at the Transaction level?

omarkilani avatar Dec 15 '22 19:12 omarkilani

We should have this but I would like to keep type.Transaction more primitive atm. Maybe I will declare a new struct ParsedTransaction to implement this. Let me think about it.

yihau avatar Dec 16 '22 04:12 yihau