curl --request POST \
--url https://devnet-as.magicblock.app/ \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBlock",
"params": [
378967388,
{
"commitment": "finalized",
"encoding": "json",
"transactionDetails": "full",
"maxSupportedTransactionVersion": 0,
"rewards": false
}
]
}'
{
"jsonrpc": "2.0",
"id": 123,
"result": {
"blockhash": "<string>",
"previousBlockhash": "<string>",
"parentSlot": 123,
"blockHeight": 123,
"blockTime": 123,
"transactions": "<array>",
"rewards": "<array>"
}
}메서드
getBlock
Returns identity and transaction information about a confirmed block in the ledger.
POST
/
curl --request POST \
--url https://devnet-as.magicblock.app/ \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBlock",
"params": [
378967388,
{
"commitment": "finalized",
"encoding": "json",
"transactionDetails": "full",
"maxSupportedTransactionVersion": 0,
"rewards": false
}
]
}'
{
"jsonrpc": "2.0",
"id": 123,
"result": {
"blockhash": "<string>",
"previousBlockhash": "<string>",
"parentSlot": 123,
"blockHeight": 123,
"blockTime": 123,
"transactions": "<array>",
"rewards": "<array>"
}
}curl --request POST \
--url https://devnet-as.magicblock.app/ \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBlock",
"params": [
378967388,
{
"commitment": "finalized",
"encoding": "json",
"transactionDetails": "full",
"maxSupportedTransactionVersion": 0,
"rewards": false
}
]
}'
본문
application/json
사용 가능한 옵션:
getBlock 사용 가능한 옵션:
2.0 Slot number (u64).
Required array length:
1 elementCommitment level (passed in params config object).
Encoding format for account data.
Level of transaction detail to return.
Max transaction version to return in responses.
Whether to populate the rewards array.

