# Block

Block Api

## Get the latest block (v2)

> Get the header of the most recently finalized block.

```json
{"openapi":"3.1.0","info":{"title":"Supra RPC Node","version":"cde8c9d5e24a97e8c59c1656551edb25e0d59000"},"tags":[{"name":"Block","description":"Block Api"}],"servers":[{"url":"https://rpc-mainnet.supra.com","description":"RPC For Supra Scan and Faucet"},{"url":"https://rpc-mainnet1.supra.com","description":"RPC For nodeops group1"},{"url":"https://rpc-mainnet2.supra.com","description":"RPC For nodeops group2"},{"url":"https://rpc-mainnet3.supra.com","description":"RPC For nodeops group3"},{"url":"https://rpc-mainnet4.supra.com","description":"RPC For nodeops group4"},{"url":"https://rpc-mainnet5.supra.com","description":"RPC For nodeops group5"},{"url":"https://rpc-wallet-mainnet.supra.com","description":"RPC For Supra Wallet Mainnet"},{"url":"https://rpc-suprascan-mainnet.supra.com","description":"RPC For SupraScan Mainnet"},{"url":"http://localhost:27000","description":"LocalNet"}],"paths":{"/rpc/v2/block":{"get":{"tags":["Block"],"summary":"Get the latest block (v2)","description":"Get the header of the most recently finalized block.","operationId":"latest_block_v2","responses":{"200":{"description":"Returns the header of the most recently finalized block.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockHeaderInfo"}}}}},"deprecated":true}}},"components":{"schemas":{"BlockHeaderInfo":{"type":"object","description":"Metadata about a Supra block.","required":["author","hash","height","parent","timestamp","view"],"properties":{"author":{"$ref":"#/components/schemas/Identity"},"hash":{"$ref":"#/components/schemas/Hash"},"height":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Number of blocks before this block in the chain (including the genesis block)."},"parent":{"$ref":"#/components/schemas/Hash"},"timestamp":{"$ref":"#/components/schemas/SmrTimestamp"},"view":{"$ref":"#/components/schemas/View"}}},"Identity":{"type":"string","description":"Hex encoded identity."},"Hash":{"type":"string","description":"Hex encoded hash"},"SmrTimestamp":{"type":"object","required":["timestamp"],"properties":{"timestamp":{"type":"integer","format":"u-int64","description":"The timestamp as measured in the number of microseconds since the unix epoch.","minimum":0}}},"View":{"type":"object","required":["epoch_id","round"],"properties":{"epoch_id":{"$ref":"#/components/schemas/EpochId","description":"Identifier of the consensus epoch."},"round":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Identifier of the consensus round."}}},"EpochId":{"type":"object","required":["chain_id","epoch"],"properties":{"chain_id":{"oneOf":[{"type":"integer","format":"u-int8","minimum":0}],"description":"Unique identifier for this instance of the SMR."},"epoch":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Identifier of the epoch within the context of `chain_id`."}}}}}}
```

## Get block by height (v2)

> Get information about the block that has been finalized at the given height.

```json
{"openapi":"3.1.0","info":{"title":"Supra RPC Node","version":"cde8c9d5e24a97e8c59c1656551edb25e0d59000"},"tags":[{"name":"Block","description":"Block Api"}],"servers":[{"url":"https://rpc-mainnet.supra.com","description":"RPC For Supra Scan and Faucet"},{"url":"https://rpc-mainnet1.supra.com","description":"RPC For nodeops group1"},{"url":"https://rpc-mainnet2.supra.com","description":"RPC For nodeops group2"},{"url":"https://rpc-mainnet3.supra.com","description":"RPC For nodeops group3"},{"url":"https://rpc-mainnet4.supra.com","description":"RPC For nodeops group4"},{"url":"https://rpc-mainnet5.supra.com","description":"RPC For nodeops group5"},{"url":"https://rpc-wallet-mainnet.supra.com","description":"RPC For Supra Wallet Mainnet"},{"url":"https://rpc-suprascan-mainnet.supra.com","description":"RPC For SupraScan Mainnet"},{"url":"http://localhost:27000","description":"LocalNet"}],"paths":{"/rpc/v2/block/height/{height}":{"get":{"tags":["Block"],"summary":"Get block by height (v2)","description":"Get information about the block that has been finalized at the given height.","operationId":"block_by_height_v2","parameters":[{"name":"height","in":"path","description":"Block height","required":true,"schema":{"type":"integer","format":"u-int64","minimum":0}},{"name":"with_finalized_transactions","in":"query","description":"If true, returns all transactions that were finalized by this block in the order that they\nwere executed.","required":true,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Information about the block that has been finalized at the given height.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Block"}}}},"404":{"description":"Requested data is not available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrResp"}}}},"410":{"description":"Requested data has been pruned and is no longer available.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrResp"}}}}},"deprecated":true}}},"components":{"schemas":{"Block":{"type":"object","description":"The API representation of a Supra block.","required":["header"],"properties":{"header":{"$ref":"#/components/schemas/BlockHeaderInfo","description":"Metadata about the block."},"transactions":{"type":["array","null"],"items":{"$ref":"#/components/schemas/TransactionInfoV2"},"description":"The API representations of all transactions contained in the block, in the order that\nthey were executed."}}},"BlockHeaderInfo":{"type":"object","description":"Metadata about a Supra block.","required":["author","hash","height","parent","timestamp","view"],"properties":{"author":{"$ref":"#/components/schemas/Identity"},"hash":{"$ref":"#/components/schemas/Hash"},"height":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Number of blocks before this block in the chain (including the genesis block)."},"parent":{"$ref":"#/components/schemas/Hash"},"timestamp":{"$ref":"#/components/schemas/SmrTimestamp"},"view":{"$ref":"#/components/schemas/View"}}},"Identity":{"type":"string","description":"Hex encoded identity."},"Hash":{"type":"string","description":"Hex encoded hash"},"SmrTimestamp":{"type":"object","required":["timestamp"],"properties":{"timestamp":{"type":"integer","format":"u-int64","description":"The timestamp as measured in the number of microseconds since the unix epoch.","minimum":0}}},"View":{"type":"object","required":["epoch_id","round"],"properties":{"epoch_id":{"$ref":"#/components/schemas/EpochId","description":"Identifier of the consensus epoch."},"round":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Identifier of the consensus round."}}},"EpochId":{"type":"object","required":["chain_id","epoch"],"properties":{"chain_id":{"oneOf":[{"type":"integer","format":"u-int8","minimum":0}],"description":"Unique identifier for this instance of the SMR."},"epoch":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Identifier of the epoch within the context of `chain_id`."}}},"TransactionInfoV2":{"type":"object","description":"Information about a Supra transaction.","required":["authenticator","hash","header","payload","status"],"properties":{"authenticator":{"type":"object","description":"The cryptographic material that was submitted with the transaction, according to its type."},"block_header":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BlockHeaderInfo","description":"Metadata about the block containing the transaction, if any. This field should\nnot be set if this [TransactionInfoV2] is yet to be included in a [Block]."}]},"hash":{"$ref":"#/components/schemas/Hash"},"header":{"$ref":"#/components/schemas/SmrTransactionHeader"},"payload":{"type":"object","description":"The deserialized payload of the transaction according to its type."},"output":{"oneOf":[{"$ref":"#/components/schemas/TransactionOutput"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/TxExecutionStatus"}}},"SmrTransactionHeader":{"type":"object","required":["chain_id","expiration_timestamp","sender","sequence_number","gas_unit_price","max_gas_amount"],"properties":{"chain_id":{"type":"integer","format":"u-int64","description":"The unique identifier for the instance of the Supra chain that this transaction should\nbe executed upon.","minimum":0},"expiration_timestamp":{"$ref":"#/components/schemas/SmrTimestamp","description":"The time at which this transaction should be discarded if it has not been executed."},"sender":{"$ref":"#/components/schemas/AccountAddress","description":"The standardized representation of the sender's account address in the target VM."},"sequence_number":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"The sequence number of the sender's account in the target VM."},"gas_unit_price":{"type":"integer","description":"The amount of Supra that the sender is willing to pay per unit of gas.","minimum":0},"max_gas_amount":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"The maximum amount of gas that the sender is willing to spend."}}},"AccountAddress":{"type":"string","description":"Hex encoded account address."},"TransactionOutput":{"oneOf":[{"type":"object","required":["Dkg"],"properties":{"Dkg":{"$ref":"#/components/schemas/TxExecutionStatus"}}},{"type":"string","enum":["Empty"]},{"type":"object","required":["Move"],"properties":{"Move":{"$ref":"#/components/schemas/MoveTransactionOutput"}}},{"type":"object","required":["Oracle"],"properties":{"Oracle":{"$ref":"#/components/schemas/TxExecutionStatus"}}},{"type":"object","required":["Evm"],"properties":{"Evm":{"$ref":"#/components/schemas/EvmTransactionOutput"}}}],"description":"[crate::v1::TransactionOutput] with all fields in human-readable format."},"TxExecutionStatus":{"type":"string","enum":["Success","Fail","Invalid","PendingAfterExecution","Pending"]},"MoveTransactionOutput":{"type":"object","description":"The execution output of a Move transaction.","required":["gas_used","events","vm_status"],"properties":{"gas_used":{"type":"integer","format":"u-int64","description":"The gas used by the transaction.","minimum":0},"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"vm_status":{"type":"string","description":"A message summarizing the execution result produced by the MoveVM."}}},"Event":{"type":"object","description":"On-chain event.","required":["guid","sequence_number","type","data"],"properties":{"guid":{"type":"string","description":"The globally unique identifier of this event stream."},"sequence_number":{"type":"integer","format":"u-int64","minimum":0},"type":{"type":"string","description":"The `MoveType` of the event"},"data":{"description":"The JSON representation of the event"}}},"EvmTransactionOutput":{"oneOf":[{"type":"object","description":"Returned successfully","required":["Success"],"properties":{"Success":{"type":"object","description":"Returned successfully","required":["reason","gas_used","gas_refunded","logs","output"],"properties":{"reason":{},"gas_used":{"type":"integer","format":"u-int64","minimum":0},"gas_refunded":{"type":"integer","format":"u-int64","minimum":0},"logs":{},"output":{},"transfers":{"type":"array","items":{"$ref":"#/components/schemas/EvmTransferOperation"},"description":"A list of transfer operations during the transaction execution."}}}}},{"type":"object","description":"Reverted by `REVERT` opcode that doesn't spend all gas.","required":["Revert"],"properties":{"Revert":{"type":"object","description":"Reverted by `REVERT` opcode that doesn't spend all gas.","required":["gas_used","output"],"properties":{"gas_used":{"type":"integer","format":"u-int64","minimum":0},"output":{"type":"string"}}}}},{"type":"object","description":"Reverted for various reasons and spend all gas.","required":["Halt"],"properties":{"Halt":{"type":"object","description":"Reverted for various reasons and spend all gas.","required":["reason","gas_used"],"properties":{"reason":{},"gas_used":{"type":"integer","format":"u-int64","description":"Halting will spend all the gas, and will be equal to gas_limit.","minimum":0}}}}},{"type":"object","description":"Error occurred during execution.","required":["Error"],"properties":{"Error":{"type":"object","description":"Error occurred during execution.","required":["message"],"properties":{"message":{"type":"string"}}}}}],"description":"API representation of the execution output of an Evm transaction."},"EvmTransferOperation":{"type":"object","description":"This is a convenience structure wrapping [`TransferOperation`] to implement (de)serialization logic.","required":["kind","from","to","value"],"properties":{"kind":{"$ref":"#/components/schemas/EvmTransferKind","description":"Source of the transfer call."},"from":{"type":"string","description":"Sender of the transfer."},"to":{"type":"string","description":"Receiver of the transfer."},"value":{"type":"string","description":"Value of the transfer."}}},"EvmTransferKind":{"type":"string","enum":["call","create","create2","selfdestruct"]},"ErrResp":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}
```

## Get block by hash (v2)

> Get the header of the block with the given hash.

```json
{"openapi":"3.1.0","info":{"title":"Supra RPC Node","version":"cde8c9d5e24a97e8c59c1656551edb25e0d59000"},"tags":[{"name":"Block","description":"Block Api"}],"servers":[{"url":"https://rpc-mainnet.supra.com","description":"RPC For Supra Scan and Faucet"},{"url":"https://rpc-mainnet1.supra.com","description":"RPC For nodeops group1"},{"url":"https://rpc-mainnet2.supra.com","description":"RPC For nodeops group2"},{"url":"https://rpc-mainnet3.supra.com","description":"RPC For nodeops group3"},{"url":"https://rpc-mainnet4.supra.com","description":"RPC For nodeops group4"},{"url":"https://rpc-mainnet5.supra.com","description":"RPC For nodeops group5"},{"url":"https://rpc-wallet-mainnet.supra.com","description":"RPC For Supra Wallet Mainnet"},{"url":"https://rpc-suprascan-mainnet.supra.com","description":"RPC For SupraScan Mainnet"},{"url":"http://localhost:27000","description":"LocalNet"}],"paths":{"/rpc/v2/block/{block_hash}":{"get":{"tags":["Block"],"summary":"Get block by hash (v2)","description":"Get the header of the block with the given hash.","operationId":"block_header_info_v2","parameters":[{"name":"block_hash","in":"path","description":"Hex encoded block hash","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The header of the block with the given hash.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockHeaderInfo"}}}}},"deprecated":true}}},"components":{"schemas":{"BlockHeaderInfo":{"type":"object","description":"Metadata about a Supra block.","required":["author","hash","height","parent","timestamp","view"],"properties":{"author":{"$ref":"#/components/schemas/Identity"},"hash":{"$ref":"#/components/schemas/Hash"},"height":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Number of blocks before this block in the chain (including the genesis block)."},"parent":{"$ref":"#/components/schemas/Hash"},"timestamp":{"$ref":"#/components/schemas/SmrTimestamp"},"view":{"$ref":"#/components/schemas/View"}}},"Identity":{"type":"string","description":"Hex encoded identity."},"Hash":{"type":"string","description":"Hex encoded hash"},"SmrTimestamp":{"type":"object","required":["timestamp"],"properties":{"timestamp":{"type":"integer","format":"u-int64","description":"The timestamp as measured in the number of microseconds since the unix epoch.","minimum":0}}},"View":{"type":"object","required":["epoch_id","round"],"properties":{"epoch_id":{"$ref":"#/components/schemas/EpochId","description":"Identifier of the consensus epoch."},"round":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Identifier of the consensus round."}}},"EpochId":{"type":"object","required":["chain_id","epoch"],"properties":{"chain_id":{"oneOf":[{"type":"integer","format":"u-int8","minimum":0}],"description":"Unique identifier for this instance of the SMR."},"epoch":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Identifier of the epoch within the context of `chain_id`."}}}}}}
```

## Get latest block (v3)

> Get the meta information of the most recently finalized and executed block.

```json
{"openapi":"3.1.0","info":{"title":"Supra RPC Node","version":"cde8c9d5e24a97e8c59c1656551edb25e0d59000"},"tags":[{"name":"Block","description":"Block Api"}],"servers":[{"url":"https://rpc-mainnet.supra.com","description":"RPC For Supra Scan and Faucet"},{"url":"https://rpc-mainnet1.supra.com","description":"RPC For nodeops group1"},{"url":"https://rpc-mainnet2.supra.com","description":"RPC For nodeops group2"},{"url":"https://rpc-mainnet3.supra.com","description":"RPC For nodeops group3"},{"url":"https://rpc-mainnet4.supra.com","description":"RPC For nodeops group4"},{"url":"https://rpc-mainnet5.supra.com","description":"RPC For nodeops group5"},{"url":"https://rpc-wallet-mainnet.supra.com","description":"RPC For Supra Wallet Mainnet"},{"url":"https://rpc-suprascan-mainnet.supra.com","description":"RPC For SupraScan Mainnet"},{"url":"http://localhost:27000","description":"LocalNet"}],"paths":{"/rpc/v3/block":{"get":{"tags":["Block"],"summary":"Get latest block (v3)","description":"Get the meta information of the most recently finalized and executed block.","operationId":"latest_block_v3","responses":{"200":{"description":"Returns the header of the most recently finalized block.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutedBlockInfo"}}}}}}}},"components":{"schemas":{"ExecutedBlockInfo":{"type":"object","description":"Block metadata and existing statistics collected on executed block output.","required":["header"],"properties":{"header":{"$ref":"#/components/schemas/BlockHeaderInfo","description":"Metadata about the block."},"execution_statistics":{"oneOf":[{"type":"object","description":"Executed block statistics collected based on execution results.","properties":{"automated_txn_count":{"type":["integer","null"],"format":"u-int64","description":"Number of the automated transactions executed/finalized in scope of the block.","minimum":0},"automated_txn_gas_unit_price":{"type":["integer","null"],"format":"u-int64","description":"Gas unit price defined by the chain for all automated transactions.","minimum":0},"block_gas_unit_price_min":{"type":["integer","null"],"description":"Minimum gas unit price of the transactions included in the block.","minimum":0},"block_gas_unit_price_max":{"type":["integer","null"],"description":"Maximum gas unit price of the transactions included in the block.","minimum":0},"block_total_user_gas_used":{"type":["integer","null"],"format":"u-int64","description":"Total used gas by user submitted transactions in the block.","minimum":0},"block_total_automated_gas_used":{"type":["integer","null"],"format":"u-int64","description":"Total used gas by automated transactions executed in scope of the block.","minimum":0},"user_txn_count":{"type":["integer","null"],"format":"u-int64","description":"Number of the user submitted transactions executed/finalized in scope of the block.","minimum":0},"automation_record_count":{"type":["integer","null"],"format":"u-int64","description":"Number of the automation registry records executed/finalized in scope of the block.","minimum":0}}},{"type":"null"}]}}},"BlockHeaderInfo":{"type":"object","description":"Metadata about a Supra block.","required":["author","hash","height","parent","timestamp","view"],"properties":{"author":{"$ref":"#/components/schemas/Identity"},"hash":{"$ref":"#/components/schemas/Hash"},"height":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Number of blocks before this block in the chain (including the genesis block)."},"parent":{"$ref":"#/components/schemas/Hash"},"timestamp":{"$ref":"#/components/schemas/SmrTimestamp"},"view":{"$ref":"#/components/schemas/View"}}},"Identity":{"type":"string","description":"Hex encoded identity."},"Hash":{"type":"string","description":"Hex encoded hash"},"SmrTimestamp":{"type":"object","required":["timestamp"],"properties":{"timestamp":{"type":"integer","format":"u-int64","description":"The timestamp as measured in the number of microseconds since the unix epoch.","minimum":0}}},"View":{"type":"object","required":["epoch_id","round"],"properties":{"epoch_id":{"$ref":"#/components/schemas/EpochId","description":"Identifier of the consensus epoch."},"round":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Identifier of the consensus round."}}},"EpochId":{"type":"object","required":["chain_id","epoch"],"properties":{"chain_id":{"oneOf":[{"type":"integer","format":"u-int8","minimum":0}],"description":"Unique identifier for this instance of the SMR."},"epoch":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Identifier of the epoch within the context of `chain_id`."}}}}}}
```

## Get block by height (v3)

> Get information about the block that has been finalized at the given height.

```json
{"openapi":"3.1.0","info":{"title":"Supra RPC Node","version":"cde8c9d5e24a97e8c59c1656551edb25e0d59000"},"tags":[{"name":"Block","description":"Block Api"}],"servers":[{"url":"https://rpc-mainnet.supra.com","description":"RPC For Supra Scan and Faucet"},{"url":"https://rpc-mainnet1.supra.com","description":"RPC For nodeops group1"},{"url":"https://rpc-mainnet2.supra.com","description":"RPC For nodeops group2"},{"url":"https://rpc-mainnet3.supra.com","description":"RPC For nodeops group3"},{"url":"https://rpc-mainnet4.supra.com","description":"RPC For nodeops group4"},{"url":"https://rpc-mainnet5.supra.com","description":"RPC For nodeops group5"},{"url":"https://rpc-wallet-mainnet.supra.com","description":"RPC For Supra Wallet Mainnet"},{"url":"https://rpc-suprascan-mainnet.supra.com","description":"RPC For SupraScan Mainnet"},{"url":"http://localhost:27000","description":"LocalNet"}],"paths":{"/rpc/v3/block/height/{height}":{"get":{"tags":["Block"],"summary":"Get block by height (v3)","description":"Get information about the block that has been finalized at the given height.","operationId":"block_by_height_v3","parameters":[{"name":"height","in":"path","description":"Block height","required":true,"schema":{"type":"integer","format":"u-int64","minimum":0}},{"name":"with_finalized_transactions","in":"query","description":"If true, returns all transactions that were finalized by this block in the order that they\nwere executed.","required":false,"schema":{"type":"boolean"}},{"name":"type","in":"query","description":"Transaction type to query. If missing any/all type of transactions will be looked for.","required":false,"schema":{"type":"string","description":"Type of the transaction to be queried.","enum":["auto","user","meta","record"]}}],"responses":{"200":{"description":"Information about the block that has been finalized at the given height.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockV3"}}}},"404":{"description":"Requested data is not available.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrResp"}}}},"410":{"description":"Requested data has been pruned and is no longer available.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrResp"}}}}}}}},"components":{"schemas":{"BlockV3":{"type":"object","description":"The API representation of a Supra block.","required":["header"],"properties":{"header":{"$ref":"#/components/schemas/BlockHeaderInfo","description":"Metadata about the block."},"execution_statistics":{"oneOf":[{"type":"object","description":"Executed block statistics collected based on execution results.","properties":{"automated_txn_count":{"type":["integer","null"],"format":"u-int64","description":"Number of the automated transactions executed/finalized in scope of the block.","minimum":0},"automated_txn_gas_unit_price":{"type":["integer","null"],"format":"u-int64","description":"Gas unit price defined by the chain for all automated transactions.","minimum":0},"block_gas_unit_price_min":{"type":["integer","null"],"description":"Minimum gas unit price of the transactions included in the block.","minimum":0},"block_gas_unit_price_max":{"type":["integer","null"],"description":"Maximum gas unit price of the transactions included in the block.","minimum":0},"block_total_user_gas_used":{"type":["integer","null"],"format":"u-int64","description":"Total used gas by user submitted transactions in the block.","minimum":0},"block_total_automated_gas_used":{"type":["integer","null"],"format":"u-int64","description":"Total used gas by automated transactions executed in scope of the block.","minimum":0},"user_txn_count":{"type":["integer","null"],"format":"u-int64","description":"Number of the user submitted transactions executed/finalized in scope of the block.","minimum":0},"automation_record_count":{"type":["integer","null"],"format":"u-int64","description":"Number of the automation registry records executed/finalized in scope of the block.","minimum":0}}},{"type":"null"}]},"transactions":{"oneOf":[{"type":"array","items":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/TransactionInfoV2"},{"type":"object","required":["txn_type"],"properties":{"txn_type":{"type":"string","enum":["user"]}}}]},{"allOf":[{"$ref":"#/components/schemas/TransactionInfoV2"},{"type":"object","required":["txn_type"],"properties":{"txn_type":{"type":"string","enum":["automated"]}}}]},{"allOf":[{"$ref":"#/components/schemas/BlockMetadataInfo"},{"type":"object","required":["txn_type"],"properties":{"txn_type":{"type":"string","enum":["block_metadata"]}}}]},{"allOf":[{"$ref":"#/components/schemas/AutomationRecordInfo"},{"type":"object","required":["txn_type"],"properties":{"txn_type":{"type":"string","enum":["automation_record"]}}}]}]}},{"type":"null"}]}}},"BlockHeaderInfo":{"type":"object","description":"Metadata about a Supra block.","required":["author","hash","height","parent","timestamp","view"],"properties":{"author":{"$ref":"#/components/schemas/Identity"},"hash":{"$ref":"#/components/schemas/Hash"},"height":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Number of blocks before this block in the chain (including the genesis block)."},"parent":{"$ref":"#/components/schemas/Hash"},"timestamp":{"$ref":"#/components/schemas/SmrTimestamp"},"view":{"$ref":"#/components/schemas/View"}}},"Identity":{"type":"string","description":"Hex encoded identity."},"Hash":{"type":"string","description":"Hex encoded hash"},"SmrTimestamp":{"type":"object","required":["timestamp"],"properties":{"timestamp":{"type":"integer","format":"u-int64","description":"The timestamp as measured in the number of microseconds since the unix epoch.","minimum":0}}},"View":{"type":"object","required":["epoch_id","round"],"properties":{"epoch_id":{"$ref":"#/components/schemas/EpochId","description":"Identifier of the consensus epoch."},"round":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Identifier of the consensus round."}}},"EpochId":{"type":"object","required":["chain_id","epoch"],"properties":{"chain_id":{"oneOf":[{"type":"integer","format":"u-int8","minimum":0}],"description":"Unique identifier for this instance of the SMR."},"epoch":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Identifier of the epoch within the context of `chain_id`."}}},"TransactionInfoV2":{"type":"object","description":"Information about a Supra transaction.","required":["authenticator","hash","header","payload","status"],"properties":{"authenticator":{"type":"object","description":"The cryptographic material that was submitted with the transaction, according to its type."},"block_header":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BlockHeaderInfo","description":"Metadata about the block containing the transaction, if any. This field should\nnot be set if this [TransactionInfoV2] is yet to be included in a [Block]."}]},"hash":{"$ref":"#/components/schemas/Hash"},"header":{"$ref":"#/components/schemas/SmrTransactionHeader"},"payload":{"type":"object","description":"The deserialized payload of the transaction according to its type."},"output":{"oneOf":[{"$ref":"#/components/schemas/TransactionOutput"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/TxExecutionStatus"}}},"SmrTransactionHeader":{"type":"object","required":["chain_id","expiration_timestamp","sender","sequence_number","gas_unit_price","max_gas_amount"],"properties":{"chain_id":{"type":"integer","format":"u-int64","description":"The unique identifier for the instance of the Supra chain that this transaction should\nbe executed upon.","minimum":0},"expiration_timestamp":{"$ref":"#/components/schemas/SmrTimestamp","description":"The time at which this transaction should be discarded if it has not been executed."},"sender":{"$ref":"#/components/schemas/AccountAddress","description":"The standardized representation of the sender's account address in the target VM."},"sequence_number":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"The sequence number of the sender's account in the target VM."},"gas_unit_price":{"type":"integer","description":"The amount of Supra that the sender is willing to pay per unit of gas.","minimum":0},"max_gas_amount":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"The maximum amount of gas that the sender is willing to spend."}}},"AccountAddress":{"type":"string","description":"Hex encoded account address."},"TransactionOutput":{"oneOf":[{"type":"object","required":["Dkg"],"properties":{"Dkg":{"$ref":"#/components/schemas/TxExecutionStatus"}}},{"type":"string","enum":["Empty"]},{"type":"object","required":["Move"],"properties":{"Move":{"$ref":"#/components/schemas/MoveTransactionOutput"}}},{"type":"object","required":["Oracle"],"properties":{"Oracle":{"$ref":"#/components/schemas/TxExecutionStatus"}}},{"type":"object","required":["Evm"],"properties":{"Evm":{"$ref":"#/components/schemas/EvmTransactionOutput"}}}],"description":"[crate::v1::TransactionOutput] with all fields in human-readable format."},"TxExecutionStatus":{"type":"string","enum":["Success","Fail","Invalid","PendingAfterExecution","Pending"]},"MoveTransactionOutput":{"type":"object","description":"The execution output of a Move transaction.","required":["gas_used","events","vm_status"],"properties":{"gas_used":{"type":"integer","format":"u-int64","description":"The gas used by the transaction.","minimum":0},"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"vm_status":{"type":"string","description":"A message summarizing the execution result produced by the MoveVM."}}},"Event":{"type":"object","description":"On-chain event.","required":["guid","sequence_number","type","data"],"properties":{"guid":{"type":"string","description":"The globally unique identifier of this event stream."},"sequence_number":{"type":"integer","format":"u-int64","minimum":0},"type":{"type":"string","description":"The `MoveType` of the event"},"data":{"description":"The JSON representation of the event"}}},"EvmTransactionOutput":{"oneOf":[{"type":"object","description":"Returned successfully","required":["Success"],"properties":{"Success":{"type":"object","description":"Returned successfully","required":["reason","gas_used","gas_refunded","logs","output"],"properties":{"reason":{},"gas_used":{"type":"integer","format":"u-int64","minimum":0},"gas_refunded":{"type":"integer","format":"u-int64","minimum":0},"logs":{},"output":{},"transfers":{"type":"array","items":{"$ref":"#/components/schemas/EvmTransferOperation"},"description":"A list of transfer operations during the transaction execution."}}}}},{"type":"object","description":"Reverted by `REVERT` opcode that doesn't spend all gas.","required":["Revert"],"properties":{"Revert":{"type":"object","description":"Reverted by `REVERT` opcode that doesn't spend all gas.","required":["gas_used","output"],"properties":{"gas_used":{"type":"integer","format":"u-int64","minimum":0},"output":{"type":"string"}}}}},{"type":"object","description":"Reverted for various reasons and spend all gas.","required":["Halt"],"properties":{"Halt":{"type":"object","description":"Reverted for various reasons and spend all gas.","required":["reason","gas_used"],"properties":{"reason":{},"gas_used":{"type":"integer","format":"u-int64","description":"Halting will spend all the gas, and will be equal to gas_limit.","minimum":0}}}}},{"type":"object","description":"Error occurred during execution.","required":["Error"],"properties":{"Error":{"type":"object","description":"Error occurred during execution.","required":["message"],"properties":{"message":{"type":"string"}}}}}],"description":"API representation of the execution output of an Evm transaction."},"EvmTransferOperation":{"type":"object","description":"This is a convenience structure wrapping [`TransferOperation`] to implement (de)serialization logic.","required":["kind","from","to","value"],"properties":{"kind":{"$ref":"#/components/schemas/EvmTransferKind","description":"Source of the transfer call."},"from":{"type":"string","description":"Sender of the transfer."},"to":{"type":"string","description":"Receiver of the transfer."},"value":{"type":"string","description":"Value of the transfer."}}},"EvmTransferKind":{"type":"string","enum":["call","create","create2","selfdestruct"]},"BlockMetadataInfo":{"type":"object","description":"Details of block metadata transaction execution","required":["hash","output","status"],"properties":{"hash":{"$ref":"#/components/schemas/Hash"},"block_header":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BlockHeaderInfo","description":"Metadata about the block containing the transaction, if any.\nThis field will not be set for transactions that are returned as a part of a block."}]},"output":{"$ref":"#/components/schemas/TransactionOutput"},"status":{"$ref":"#/components/schemas/TxExecutionStatus"}}},"ErrResp":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}
```

## Get block by hash (v3)

> Get the header and execution output statistics of the block with the given hash.

```json
{"openapi":"3.1.0","info":{"title":"Supra RPC Node","version":"cde8c9d5e24a97e8c59c1656551edb25e0d59000"},"tags":[{"name":"Block","description":"Block Api"}],"servers":[{"url":"https://rpc-mainnet.supra.com","description":"RPC For Supra Scan and Faucet"},{"url":"https://rpc-mainnet1.supra.com","description":"RPC For nodeops group1"},{"url":"https://rpc-mainnet2.supra.com","description":"RPC For nodeops group2"},{"url":"https://rpc-mainnet3.supra.com","description":"RPC For nodeops group3"},{"url":"https://rpc-mainnet4.supra.com","description":"RPC For nodeops group4"},{"url":"https://rpc-mainnet5.supra.com","description":"RPC For nodeops group5"},{"url":"https://rpc-wallet-mainnet.supra.com","description":"RPC For Supra Wallet Mainnet"},{"url":"https://rpc-suprascan-mainnet.supra.com","description":"RPC For SupraScan Mainnet"},{"url":"http://localhost:27000","description":"LocalNet"}],"paths":{"/rpc/v3/block/{block_hash}":{"get":{"tags":["Block"],"summary":"Get block by hash (v3)","description":"Get the header and execution output statistics of the block with the given hash.","operationId":"block_info_by_hash_v3","parameters":[{"name":"block_hash","in":"path","description":"Hex encoded block hash","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The header of the block with the given hash.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutedBlockInfo"}}}}}}}},"components":{"schemas":{"ExecutedBlockInfo":{"type":"object","description":"Block metadata and existing statistics collected on executed block output.","required":["header"],"properties":{"header":{"$ref":"#/components/schemas/BlockHeaderInfo","description":"Metadata about the block."},"execution_statistics":{"oneOf":[{"type":"object","description":"Executed block statistics collected based on execution results.","properties":{"automated_txn_count":{"type":["integer","null"],"format":"u-int64","description":"Number of the automated transactions executed/finalized in scope of the block.","minimum":0},"automated_txn_gas_unit_price":{"type":["integer","null"],"format":"u-int64","description":"Gas unit price defined by the chain for all automated transactions.","minimum":0},"block_gas_unit_price_min":{"type":["integer","null"],"description":"Minimum gas unit price of the transactions included in the block.","minimum":0},"block_gas_unit_price_max":{"type":["integer","null"],"description":"Maximum gas unit price of the transactions included in the block.","minimum":0},"block_total_user_gas_used":{"type":["integer","null"],"format":"u-int64","description":"Total used gas by user submitted transactions in the block.","minimum":0},"block_total_automated_gas_used":{"type":["integer","null"],"format":"u-int64","description":"Total used gas by automated transactions executed in scope of the block.","minimum":0},"user_txn_count":{"type":["integer","null"],"format":"u-int64","description":"Number of the user submitted transactions executed/finalized in scope of the block.","minimum":0},"automation_record_count":{"type":["integer","null"],"format":"u-int64","description":"Number of the automation registry records executed/finalized in scope of the block.","minimum":0}}},{"type":"null"}]}}},"BlockHeaderInfo":{"type":"object","description":"Metadata about a Supra block.","required":["author","hash","height","parent","timestamp","view"],"properties":{"author":{"$ref":"#/components/schemas/Identity"},"hash":{"$ref":"#/components/schemas/Hash"},"height":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Number of blocks before this block in the chain (including the genesis block)."},"parent":{"$ref":"#/components/schemas/Hash"},"timestamp":{"$ref":"#/components/schemas/SmrTimestamp"},"view":{"$ref":"#/components/schemas/View"}}},"Identity":{"type":"string","description":"Hex encoded identity."},"Hash":{"type":"string","description":"Hex encoded hash"},"SmrTimestamp":{"type":"object","required":["timestamp"],"properties":{"timestamp":{"type":"integer","format":"u-int64","description":"The timestamp as measured in the number of microseconds since the unix epoch.","minimum":0}}},"View":{"type":"object","required":["epoch_id","round"],"properties":{"epoch_id":{"$ref":"#/components/schemas/EpochId","description":"Identifier of the consensus epoch."},"round":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Identifier of the consensus round."}}},"EpochId":{"type":"object","required":["chain_id","epoch"],"properties":{"chain_id":{"oneOf":[{"type":"integer","format":"u-int8","minimum":0}],"description":"Unique identifier for this instance of the SMR."},"epoch":{"oneOf":[{"type":"integer","format":"u-int64","minimum":0}],"description":"Identifier of the epoch within the context of `chain_id`."}}}}}}
```

## Get transactions by block hash (v3)

> Get a list containing the hashes of the transactions that were finalized in the block with\
> the given hash in the order that they were executed.

```json
{"openapi":"3.1.0","info":{"title":"Supra RPC Node","version":"cde8c9d5e24a97e8c59c1656551edb25e0d59000"},"tags":[{"name":"Block","description":"Block Api"}],"servers":[{"url":"https://rpc-mainnet.supra.com","description":"RPC For Supra Scan and Faucet"},{"url":"https://rpc-mainnet1.supra.com","description":"RPC For nodeops group1"},{"url":"https://rpc-mainnet2.supra.com","description":"RPC For nodeops group2"},{"url":"https://rpc-mainnet3.supra.com","description":"RPC For nodeops group3"},{"url":"https://rpc-mainnet4.supra.com","description":"RPC For nodeops group4"},{"url":"https://rpc-mainnet5.supra.com","description":"RPC For nodeops group5"},{"url":"https://rpc-wallet-mainnet.supra.com","description":"RPC For Supra Wallet Mainnet"},{"url":"https://rpc-suprascan-mainnet.supra.com","description":"RPC For SupraScan Mainnet"},{"url":"http://localhost:27000","description":"LocalNet"}],"paths":{"/rpc/v3/block/{block_hash}/transactions":{"get":{"tags":["Block"],"summary":"Get transactions by block hash (v3)","description":"Get a list containing the hashes of the transactions that were finalized in the block with\nthe given hash in the order that they were executed.","operationId":"txs_by_block_v3","parameters":[{"name":"type","in":"query","description":"Transaction type to query. If missing any/all type of transactions will be looked for.","required":false,"schema":{"type":"string","description":"Type of the transaction to be queried.","enum":["auto","user","meta","record"]}},{"name":"block_hash","in":"path","description":"Hex encoded block hash","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of the hashes of the transactions contained in the block.","headers":{},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Hash"}}}}}}}}},"components":{"schemas":{"Hash":{"type":"string","description":"Hex encoded hash"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://supraoracles.gitbook.io/supra/network/move/rest-api/mainnet/block.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
