curl --request POST \
--url https://devnet.helius-rpc.com/getCompressedAccount \
--header 'Content-Type: application/json' \
--data '
{
"id": "test-account",
"jsonrpc": "2.0",
"method": "getCompressedAccount",
"params": {
"address": null,
"hash": "11111111111111111111111111111111"
}
}
'{
"id": "test-account",
"jsonrpc": "2.0",
"error": {
"code": 123,
"message": "<string>"
},
"result": {
"context": {
"slot": 100
},
"value": {
"hash": "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP",
"lamports": 100,
"leafIndex": 100,
"owner": "111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj",
"slotCreated": 100,
"tree": "111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj",
"address": "111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj",
"data": {
"data": "SGVsbG8sIFdvcmxkIQ==",
"dataHash": "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP",
"discriminator": 100
},
"seq": 100
}
}
}Retrieve compressed account information by address or hash. RPC method guide with use cases, tips and examples.
curl --request POST \
--url https://devnet.helius-rpc.com/getCompressedAccount \
--header 'Content-Type: application/json' \
--data '
{
"id": "test-account",
"jsonrpc": "2.0",
"method": "getCompressedAccount",
"params": {
"address": null,
"hash": "11111111111111111111111111111111"
}
}
'{
"id": "test-account",
"jsonrpc": "2.0",
"error": {
"code": 123,
"message": "<string>"
},
"result": {
"context": {
"slot": 100
},
"value": {
"hash": "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP",
"lamports": 100,
"leafIndex": 100,
"owner": "111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj",
"slotCreated": 100,
"tree": "111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj",
"address": "111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj",
"data": {
"data": "SGVsbG8sIFdvcmxkIQ==",
"dataHash": "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP",
"discriminator": 100
},
"seq": 100
}
}
}An ID to identify the request.
test-account The version of the JSON-RPC protocol.
2.0 The name of the method to invoke.
getCompressedAccount Request for compressed account data
Show child attributes
{
"address": null,
"hash": "11111111111111111111111111111111"
}An ID to identify the response.
test-account The version of the JSON-RPC protocol.
2.0 Show child attributes
Show child attributes
A 32-byte hash represented as a base58 string.
"11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP"
100
100
A Solana public key represented as a base58 string.
"111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj"
100
A Solana public key represented as a base58 string.
"111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj"
A Solana public key represented as a base58 string.
"111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj"
Show child attributes
A base 64 encoded string.
"SGVsbG8sIFdvcmxkIQ=="
A 32-byte hash represented as a base58 string.
"11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP"
100
100
Was this page helpful?