Parameters
chainId
string
default:"solana-devnet"
required
Unique identifier for a blockchain network.
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"getProgramAccounts"
required
JSON-RPC method name.
Parameters for method getProgramAccounts: [programId, config]Positional parameters for getProgramAccounts:params[0]: Pubkey of the program (base-58 encoded).params[1]: Optional configuration object.
Returns
Array of account info objects. If withContext=true, response will be wrapped in RpcResponse object.
Program account object.
Account Pubkey (base-58 encoded).
Account data object.
Lamports assigned to this account.
Pubkey of the program this account has been assigned to.
Tuple of [encoded data string, encoding type].
Tuple of [encoded data string, encoding type].
JSON object representing program-specific state (if jsonParsed).
True if the account contains a program (strictly read-only).
Epoch at which this account will next owe rent.
Data size of the account (in bytes).
curl --request POST \
--url https://api.uniblock.dev/uni/v1/json-rpc?chainId=solana-devnet \
--header 'content-type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "getProgramAccounts",
"params": [
"4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
{
"filters": [
{
"dataSize": 17
},
{
"memcmp": {
"offset": 4,
"bytes": "3Mc6vR"
}
}
]
}
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"pubkey": "CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY",
"account": {
"data": "2R9jLfiAQ9bgdcw6h8s44439",
"executable": false,
"lamports": 15298080,
"owner": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
"rentEpoch": 28,
"space": 42
}
}
]
}