Closed yangyile1990 closed 1 year ago
why why why?
curl https://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenAccountsByOwner",
"params": [
"BmFdpraQhkiDQE6SnfG5omcA1VwzqfXrwtNYBwWTymy6",
{
"mint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
},
{
"encoding": "jsonParsed"
}
]
}
'
The reason we use a slice here is that a wallet can own not only one token account for a mint. It means if you have a wallet A, the A may have token accounts B, C and D and all of them are USDT token accounts.
I sent you an example in #140. could you please have a look at it?
I sent you an example in #140. could you please have a look at it?
thank you.
code:
I don't know why it return a slice. slice[0] is the data, what about slice[1] slice[2] ? no info in doc. no info in comment. please help me.