OpenAPI Specification
openapi: 3.0.1
info:
title: Meterest Accounts Blocks API
description: 'RESTful API to access Meter.io
[Project Home](https://github.com/meterio)
'
license:
name: LGPL 3.0
url: https://www.gnu.org/licenses/lgpl-3.0.en.html
version: 1.2.2
servers:
- url: /
description: local meter node
tags:
- name: Blocks
description: Access to blocks
paths:
/blocks/{revision}:
parameters:
- $ref: '#/components/parameters/RevisionInPath'
get:
tags:
- Blocks
summary: Retrieve block
description: 'by ID or number, or ''best'' for latest block.
'
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Block'
- type: object
properties:
isTrunk:
type: boolean
description: whether the block is on th trunk
components:
schemas:
Block:
properties:
number:
type: integer
format: uint32
description: block number (height)
example: 325324
id:
type: string
format: bytes32
description: block identifier
example: '0x0004f6cc88bb4626a92907718e82f255b8fa511453a78e8797eb8cea3393b215'
size:
type: integer
format: uint32
description: RLP encoded block size in bytes
example: 373
parentID:
type: string
format: bytes32
description: parent block ID
example: '0x0004f6cb730dbd90fed09d165bfdf33cc0eed47ec068938f6ee7b7c12a4ea98d'
timestamp:
type: integer
format: uint64
description: block unix timestamp
example: 1533267900
gasLimit:
type: integer
format: uint64
description: block gas limit (max allowed accumulative gas usage of transactions)
example: 11253579
beneficiary:
type: string
format: bytes32
description: address of account to receive block reward
example: '0xb4094c25f86d628fdd571afc4077f0d0196afb48'
gasUsed:
type: integer
format: uint64
description: accumulative gas usage of transactions
example: 21000
totalScore:
type: integer
format: uint64
description: sum of all ancestral blocks' score
example: 1029988
txsRoot:
type: string
format: bytes32
description: root hash of transactions in the block
example: '0x89dfd9fcd10c9e53d68592cf8b540b280b72d381b868523223992f3e09a806bb'
stateRoot:
type: string
format: bytes32
description: root hash of accounts state
example: '0x86bcc6d214bc9d8d0dedba1012a63c8317d19ce97f60c8a2ef5c59bbd40d4261'
receiptsRoot:
type: string
format: bytes32
description: root hash of transaction receipts
example: '0x15787e2533c470e8a688e6cd17a1ee12d8457778d5f82d2c109e2d6226d8e54e'
signer:
type: string
format: bytes20
description: the one who signed this block
example: '0xab7b27fc9e7d29f9f2e5bd361747a5515d0cc2d1'
transactions:
type: array
description: transactions IDs
items:
type: string
format: bytes32
description: transaction ID
example: '0x284bba50ef777889ff1a367ed0b38d5e5626714477c40de38d71cedd6f9fa477'
parameters:
RevisionInPath:
name: revision
in: path
description: 'block ID or number, or ''best'' stands for latest block
'
required: true
schema:
type: string
example: best