Comments (3)
https://blocto.github.io/solana-go-sdk/tour/get-token-account.html
from solana-go-sdk.
aha. I knew it.
toSub, erc := GetTxnInxAccount(txn, inx, 2)
if erc != nil {
return nil, erc
}
toAcc, err := s.client3.GetAccountInfoWithOpts(context.TODO(), toSub, &rpc3.GetAccountInfoOpts{
Encoding: solana.EncodingJSONParsed,
})
if err != nil {
return nil, cerror.NewError(cerror.CODE_THIRD_REQ_ERROR, "GetAccountInfo", toSub.String(), err.Error())
}
simJson, err := simplejson.NewJson(toAcc.Value.Data.GetRawJSON())
if err != nil {
return nil, cerror.NewError(cerror.CODE_NODE_RESP_ERROR, err.Error())
}
toOwner, err := simJson.Get("parsed").Get("info").Get("owner").String()
if err != nil {
return nil, cerror.NewError(cerror.CODE_UNKNOWN, err.Error())
}
but I still think it is a little too hard to use.
from solana-go-sdk.
cool! very useful.
from solana-go-sdk.
Related Issues (20)
- Cant understand how to give instructions for raydium swap HOT 2
- How to create stake account? HOT 2
- [HELP] Deserializing AccountData data field into address lookup tables
- UpdateMetadataAccount returning deprecated error HOT 2
- Any plan to support anchor? HOT 3
- Websocket API support
- How do I initiate a USDT SPL transfer transaction? HOT 4
- Add Priority Fee to Transaction HOT 1
- How do I initiate a USDT SPL transfer transaction? HOT 3
- An optimization suggestion about transaction serialization
- Add unitsConsumed field to RPC simulateTransaction response HOT 1
- GetSlotLeader HOT 2
- Add GetSlotLeaders HOT 1
- Add GetProgramAccounts method to the client folder
- Failing to deserialize token metadata HOT 3
- Error 32002 when creating associated token account HOT 4
- Docs incorrectly uses system.transfer for token transfers HOT 1
- How to deploy smart contract/program? HOT 1
- I cannot find how to confirm a transaction status on the client... HOT 1
- Add new Instructions to already existing transactions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solana-go-sdk.