Join our
Discord!
LogoLogo
SupraScan ExplorerStarKey WalletDiscord
MoveVM
  • Network
  • Oracles
  • Automation
  • SupraNova
  • AI Agents
MoveVM
  • Overview
  • Getting Started
    • Introduction to Docker
    • Setup Supra CLI
    • Create a Supra Account
    • Create a Move Package
      • Write a Module
      • Compile and Publish
      • Interact with a Package
    • Create a dApp with StarKey
  • Network Information
  • Token Standards
  • Learn Move 101
    • Getting Started with Move
    • Unsigned Integers in Move
    • Math Operations in Move
    • Using Vectors in Move
    • Reading Resource Data with borrow_global
    • Passing Data in Move: Value vs. Reference
    • Adding Elements with vector::push_back
    • Emitting Events with event::emit
  • Move Book
    • Getting Started
      • Modules and Scripts
      • Move Tutorial
    • Primitive Types
      • Integers
      • Bool
      • Address
      • Vector
      • Signer
      • References
      • Tuples and Unit
    • Basic Concepts
      • Local Variables and Scope
      • Equality
      • Abort and Assert
      • Conditionals
      • While, For, and Loop
      • Functions
      • Structs and Resources
      • Constants
      • Generics
      • Type Abilities
      • Uses and Aliases
      • Friends
      • Packages
      • Package Upgrades
      • Unit Tests
    • Global Storage
      • Structure
      • Operators
    • Reference
      • Standard Library
      • Coding Conventions
  • Aptos to Supra Cheatsheet
  • Ethereum to Supra Move Cheatsheet
  • TypeScript SDK
    • Guides
      • Create Supra Accounts
      • Publish a Package
    • Documentation
    • Repository
  • Rest API
    • Mainnet
      • Accounts
      • Faucet
      • Transactions
      • Block
      • Consensus
      • Events
      • View
      • Tables
    • Testnet
      • Accounts
      • Faucet
      • Transactions
      • Block
      • View
      • Events
      • Tables
  • Supra Multisig Guide
  • Binary Canonical Serialization (BCS) Standard Guide
  • Developer Resources
    • Supra Dapp Templates
    • Supra Move VS Code Extension
  • Native Oracles
    • Data Feeds (Push)
    • dVRF (Randomness)
    • Automation
    • SupraNova Bridge
Powered by GitBook

Links

  • Whitepapers
  • Bug Bounty
  • Security Audits

‎

  • Supra Dev Hub
  • Supra Labs Github
  • Entropy Foundation Github
On this page
  1. Rest API
  2. Mainnet

Block

PreviousTransactionsNextConsensus

Block Api

Get the header of the most recently finalized block.

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

Returns the header of the most recently finalized block.

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

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

get
Path parameters
heightinteger · uint64Required

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
Responseall of | nullable
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.

{
  "header": {
    "author": "binary",
    "hash": "binary",
    "height": 1,
    "parent": "binary",
    "timestamp": {
      "timestamp": 1
    },
    "view": {
      "epoch_id": {
        "chain_id": 1,
        "epoch": 1
      },
      "round": 1
    }
  },
  "transactions": [
    {
      "authenticator": {},
      "block_header": {
        "hash": "binary",
        "height": 1,
        "timestamp": {
          "timestamp": 1
        }
      },
      "hash": "binary",
      "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 the header of the block with the given hash.

get
Path parameters
block_hashstringRequired

Hex encoded block hash

Responses
200
The header of the block with the given hash.
application/json
Responseall of | nullable
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.

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

Get a list containing the hashes of the transactions that were finalized in the block with

get

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 · binary[]

Represents a hash digest (32 bytes).

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.

[
  "binary"
]
  • GETGet the header of the most recently finalized block.
  • GETGet information about the block that has been finalized at the given height.
  • GETGet the header of the block with the given hash.
  • GETGet a list containing the hashes of the transactions that were finalized in the block with