Created
September 9, 2021 13:36
-
-
Save levicook/cb7245be2eb9ed4f7010a37483380be8 to your computer and use it in GitHub Desktop.
token accounts for a specific mint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl http://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d ' | |
{ | |
"jsonrpc": "2.0", | |
"id": 1, | |
"method": "getProgramAccounts", | |
"params": [ | |
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", | |
{ | |
"encoding": "jsonParsed", | |
"filters": [ | |
{ | |
"dataSize": 165 | |
}, | |
{ | |
"memcmp": { | |
"offset": 0, | |
"bytes": "6QtTzANFq51mu57vyVQZmz6TL1qcQdZGdQcvHrX94b1c" | |
} | |
} | |
] | |
} | |
] | |
} | |
' --silent | jq . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"jsonrpc": "2.0", | |
"result": [ | |
{ | |
"account": { | |
"data": { | |
"parsed": { | |
"info": { | |
"isNative": false, | |
"mint": "6QtTzANFq51mu57vyVQZmz6TL1qcQdZGdQcvHrX94b1c", | |
"owner": "JUskoxS2PTiaBpxfGaAPgf3cUNhdeYFGMKdL6mZKKfR", | |
"state": "initialized", | |
"tokenAmount": { | |
"amount": "1", | |
"decimals": 0, | |
"uiAmount": 1, | |
"uiAmountString": "1" | |
} | |
}, | |
"type": "account" | |
}, | |
"program": "spl-token", | |
"space": 165 | |
}, | |
"executable": false, | |
"lamports": 2039280, | |
"owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", | |
"rentEpoch": 220 | |
}, | |
"pubkey": "FuZ1SaXdEX4WGDA2qpva1rtfkgQ6hmxir9e3PR8XGdZE" | |
} | |
], | |
"id": 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment