blocto / solana-go-sdk

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

Is there an implementation for closing an account? #99

Closed femtoeu closed 1 year ago

femtoeu commented 1 year ago

Hello. I'm trying to close all token accounts. I see only system.CreateAccountParam there no param for closing. Is it unsupported?

yihau commented 1 year ago

you could use https://github.com/portto/solana-go-sdk/blob/main/program/token/instruction.go#L385 this instruction to close a token account.