Block

Block Api

Deprecated

Get latest block (v1)

get

Get the header of the most recently finalized block.

Responses
200
Returns the header of the most recently finalized block.
application/json
Responseone of
nullOptional
or
get
GET /rpc/v1/block HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

Returns the header of the most recently finalized block.

No content

Deprecated

Get block by height (v1)

get

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

Path parameters
heightinteger · u-int64Required

Block height

Query parameters
with_finalized_transactionsbooleanRequired

If true, returns all transactions that were finalized by this block in the order that they were executed.

Responses
200
Information about the block that has been finalized at the given height.
application/json
Responseone of
nullOptional
or
get
GET /rpc/v1/block/height/{height} HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

Information about the block that has been finalized at the given height.

No content

Deprecated

Get block by hash (v1)

get

Get the header of the block with the given hash.

Path parameters
block_hashstringRequired

Hash of block to retrieve

Responses
200
The header of the block with the given hash.
application/json
Responseone of
nullOptional
or
get
GET /rpc/v1/block/{block_hash} HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

The header of the block with the given hash.

No content

Get transactions by block hash (v1)

get

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.

Path parameters
block_hashstringRequired

Hex encoded block hash

Responses
200
List of the hashes of the transactions contained in the block.
application/json
Responsestring[]

Hex encoded hash

get
GET /rpc/v1/block/{block_hash}/transactions HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

List of the hashes of the transactions contained in the block.

[
  "text"
]

Get latest block (v2)

get

Get the header of the most recently finalized block.

Responses
200
Returns the header of the most recently finalized block.
application/json
get
GET /rpc/v2/block HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

Returns the header of the most recently finalized block.

{
  "author": "text",
  "hash": "text",
  "height": 1,
  "parent": "text",
  "timestamp": {
    "timestamp": 1
  },
  "view": {
    "epoch_id": {
      "chain_id": 1,
      "epoch": 1
    },
    "round": 1
  }
}

Get block by height (v2)

get

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

Path parameters
heightinteger · u-int64Required

Block height

Query parameters
with_finalized_transactionsbooleanRequired

If true, returns all transactions that were finalized by this block in the order that they were executed.

Responses
200
Information about the block that has been finalized at the given height.
application/json
get
GET /rpc/v2/block/height/{height} HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

Information about the block that has been finalized at the given height.

{
  "header": {
    "author": "text",
    "hash": "text",
    "height": 1,
    "parent": "text",
    "timestamp": {
      "timestamp": 1
    },
    "view": {
      "epoch_id": {
        "chain_id": 1,
        "epoch": 1
      },
      "round": 1
    }
  },
  "transactions": [
    {
      "authenticator": {},
      "block_header": null,
      "hash": "text",
      "header": {
        "chain_id": 1,
        "expiration_timestamp": {
          "timestamp": 1
        },
        "sender": "text",
        "sequence_number": 1,
        "gas_unit_price": 1,
        "max_gas_amount": 1
      },
      "payload": {},
      "output": {
        "Dkg": "Success"
      },
      "status": "Success"
    }
  ]
}

Get block by hash (v2)

get

Get the header of the block with the given hash.

Path parameters
block_hashstringRequired

Hex encoded block hash

Responses
200
The header of the block with the given hash.
application/json
get
GET /rpc/v2/block/{block_hash} HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

The header of the block with the given hash.

{
  "author": "text",
  "hash": "text",
  "height": 1,
  "parent": "text",
  "timestamp": {
    "timestamp": 1
  },
  "view": {
    "epoch_id": {
      "chain_id": 1,
      "epoch": 1
    },
    "round": 1
  }
}

Get latest block (v3)

get

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

Responses
200
Returns the header of the most recently finalized block.
application/json
get
GET /rpc/v3/block HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

Returns the header of the most recently finalized block.

{
  "header": {
    "author": "text",
    "hash": "text",
    "height": 1,
    "parent": "text",
    "timestamp": {
      "timestamp": 1
    },
    "view": {
      "epoch_id": {
        "chain_id": 1,
        "epoch": 1
      },
      "round": 1
    }
  },
  "execution_statistics": {
    "automated_txn_count": null,
    "automated_txn_gas_unit_price": null,
    "block_gas_unit_price_min": null,
    "block_gas_unit_price_max": null,
    "block_total_user_gas_used": null,
    "block_total_automated_gas_used": null,
    "user_txn_count": null
  }
}

Get block by height (v3)

get

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

Path parameters
heightinteger · u-int64Required

Block height

Query parameters
with_finalized_transactionsbooleanOptional

If true, returns all transactions that were finalized by this block in the order that they were executed.

typestring · enumOptional

Type of the transaction to be queried.

Possible values:
Responses
200
Information about the block that has been finalized at the given height.
application/json
get
GET /rpc/v3/block/height/{height} HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

Information about the block that has been finalized at the given height.

{
  "header": {
    "author": "text",
    "hash": "text",
    "height": 1,
    "parent": "text",
    "timestamp": {
      "timestamp": 1
    },
    "view": {
      "epoch_id": {
        "chain_id": 1,
        "epoch": 1
      },
      "round": 1
    }
  },
  "execution_statistics": {
    "automated_txn_count": null,
    "automated_txn_gas_unit_price": null,
    "block_gas_unit_price_min": null,
    "block_gas_unit_price_max": null,
    "block_total_user_gas_used": null,
    "block_total_automated_gas_used": null,
    "user_txn_count": null
  },
  "transactions": [
    {
      "authenticator": {},
      "block_header": null,
      "hash": "text",
      "header": {
        "chain_id": 1,
        "expiration_timestamp": {
          "timestamp": 1
        },
        "sender": "text",
        "sequence_number": 1,
        "gas_unit_price": 1,
        "max_gas_amount": 1
      },
      "payload": {},
      "output": {
        "Dkg": "Success"
      },
      "status": "Success",
      "txn_type": "user"
    }
  ]
}

Get block by hash (v3)

get

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

Path parameters
block_hashstringRequired

Hex encoded block hash

Responses
200
The header of the block with the given hash.
application/json
get
GET /rpc/v3/block/{block_hash} HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

The header of the block with the given hash.

{
  "header": {
    "author": "text",
    "hash": "text",
    "height": 1,
    "parent": "text",
    "timestamp": {
      "timestamp": 1
    },
    "view": {
      "epoch_id": {
        "chain_id": 1,
        "epoch": 1
      },
      "round": 1
    }
  },
  "execution_statistics": {
    "automated_txn_count": null,
    "automated_txn_gas_unit_price": null,
    "block_gas_unit_price_min": null,
    "block_gas_unit_price_max": null,
    "block_total_user_gas_used": null,
    "block_total_automated_gas_used": null,
    "user_txn_count": null
  }
}

Get transactions by block hash (v3)

get

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.

Path parameters
block_hashstringRequired

Hex encoded block hash

Query parameters
typestring · enumOptional

Type of the transaction to be queried.

Possible values:
Responses
200
List of the hashes of the transactions contained in the block.
application/json
Responsestring[]

Hex encoded hash

get
GET /rpc/v3/block/{block_hash}/transactions HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

List of the hashes of the transactions contained in the block.

[
  "text"
]