Join our
Discord!
LogoLogo
SupraScan ExplorerStarKey WalletDiscord
MoveVM
  • Network
  • Oracles
  • Automation
  • SupraNova
  • Guides
MoveVM
  • Overview
  • Getting Started
    • Install Supra CLI with Docker
    • Create a Supra Account
    • Create a Move Package
      • Initialize a 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
  • TypeScript SDK
    • Guides
      • Create Supra Accounts
      • Publish a Package
    • Documentation
    • Repository
  • Rest API
    • Mainnet
      • Accounts
      • Faucet
      • Transactions
      • Block
      • View
      • Consensus
      • Events
      • Tables
    • Testnet
      • Accounts
      • Faucet
      • Transactions
      • Block
      • View
      • Events
      • Tables
  • Developer Resources
    • Supra Dapp Templates
    • Supra Move VS Code Extension
  • Links
    • Supra DevHub
    • SupraScan Block Explorer
    • StarKey Wallet
    • Live Data Feeds
    • Whitepapers
    • Security Audits
    • Supra's Official GitHub
Powered by GitBook
On this page
  1. Rest API
  2. Mainnet

Consensus

PreviousViewNextEvents

Consensus Api

Get a block at the requested height possibly together with all the batches of the transactions

get

that were finalized in the block in the order that they were executed.

Path parameters
heightinteger ยท uint64Required

Block height

Query parameters
with_batchesbooleanRequired

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

Responses
200
Consensus block with certificates and possibly block batches finalized in this block.
application/json
Responseall of | nullable
get
GET /rpc/v1/consensus/block/height/{height} HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

Consensus block with certificates and possibly block batches finalized in this block.

{
  "block": {
    "block": {
      "digest": "binary",
      "header": {
        "author": "binary",
        "height": 1,
        "parent": "binary",
        "timestamp": {
          "timestamp": 1
        },
        "view": {
          "epoch_id": {
            "chain_id": 1,
            "epoch": 1
          },
          "round": 1
        }
      },
      "payload": {}
    },
    "qc": {
      "certificate": {
        "certifying_committee": "binary",
        "data": {},
        "kind": "Validity",
        "signature": {},
        "voters": [
          true
        ]
      }
    }
  },
  "batches": {}
}