blocto / solana-go-sdk

Solana Golang SDK
https://blocto.github.io/solana-go-sdk/
MIT License
366 stars 95 forks source link

Consider exposing all "resolved" addresses on `Transaction` #117

Open omarkilani opened 1 year ago

omarkilani commented 1 year ago

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?

yihau commented 1 year ago

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.