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

