Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HELP] Deserializing AccountData data field into address lookup tables #153

Open
atulsriv opened this issue Feb 14, 2024 · 0 comments
Open

Comments

@atulsriv
Copy link

I am trying to construct a solana transaction based on jupiter's swap-instructions endpoint (https://station.jup.ag/docs/apis/swap-api).

Essentially, they return a list of addresses that can be used to create address lookup tables. I am a bit confused/in the middle of figuring out how to do this. In their typescript example, they call GetAccountInfo and then deserialize the Data field into something of AddressLookupTable type (see the deserialize function here: https://solana-labs.github.io/solana-web3.js/classes/AddressLookupTableAccount.html).

Any advice on how to do this in golang?

type AccountInfo struct {
	Lamports   uint64
	Owner      common.PublicKey
	Executable bool
	RentEpoch  uint64
	Data       []byte
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant