getProgramAccounts
Concise Labs provides a faster and reliable alternative to Solana’s getProgramAccounts method with both raw and decoded program account data.
Our getProgramAccounts provides one extra layer of abstraction by allowing easy to add filters on top of the query.
Head over to Concise Labs Projects and apply with your IDL to recieve GraphQL endpoints for your data.
Sample Query
curl -X POST \
-H "Content-Type: application/json" \
-H "x-hasura-admin-secret: <YOUR_ADMIN_SECRET>" \
-d '{"query": "query {<PROJECT_DB_NAME>_all {account_decoded_data, account_raw_data, account_type, executable, is_bf, lamports, owner, rent_epoch, slot, updated_on, write_version}}"}' \
<GRAPHQL_API_URL>
curl -X POST \
-H "Content-Type: application/json" \
-H "x-hasura-admin-secret: <YOUR_ADMIN_SECRET>"" \
-d '{"query": "query {daoship_0_1_0_decoded_all {account_decoded_data, account_raw_data, account_type, executable, is_bf, lamports, owner, rent_epoch, slot, updated_on, write_version}}"}' \
https://witty-polecat-18.hasura.app/v1/graphql
Example Response
{"data":
{"daoship_0_1_0_decoded_all":
[
{"account_decoded_data":
{"project":"2YpPAWhPmtzLZmb6SsWzYLpCi8XnbTxsrEqgYvCST1o5","dao":"6u7CRq58kPMLAEsHmVzep3HnTvzGqd3kNWzYgdvtwLdv","id":"03","bountyVaultMint":"Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr","bountyVaultAccount":"n1DiUbVpfS2jeMUq1965SecPgfzfvzG28eb72Zb1zEZ","amount":"3b9aca00","postTs":"63a434bb","applications":"00","approved":"00","bountyDescription":"test bounty","isCompleted":false,"bountyWinner":"11111111111111111111111111111111","bump":253},
"account_raw_data":"\\xed1069c61345f2ea17024464b7e60a783242cd73bcecdcaf09084b5c59f6018166824a847f869ab057a3a4ca7963c374ffbaf87b67347bbd20c3f289a9cfa4d3a6c1a8a944072a490300000000000000e92839550965ffd4d64acaaf46d45df7318e5b4f57c90c487d60625d829b837b0b876260b018b2d300e98a3b8695cb02a3080c8f0d901c3cb789488b54503d7600ca9a3b00000000bb34a46300000000000000000000000000000000000000000b0000007465737420626f756e7479000000000000000000000000000000000000000000000000000000000000000000fd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"account_type":"bounty",
"executable":false,"is_bf":true,
"lamports":3744480,
"owner":"CcDpgqXEcc268hstohTJW7KzswM2LkGsw9MV7aiANaR7",
"rent_epoch":0,
"slot":0,
"updated_on":"2023-01-25T10:22:58.648",
"write_version":0
}
]
}
}