Skip to content

getblock Command Guide

Enrico Rubboli edited this page Sep 4, 2023 · 1 revision

The getblock command retrieves a block from the Mintlayer blockchain in its hexadecimal representation based on its hash.

Usage

To get a block in its hexadecimal format by its hash, use the following command:

getblock <HASH>

Arguments

  • <HASH>: The hash of the block you want to retrieve.

Output

When you run the getblock command with a specific hash, you'll receive the block's hexadecimal representation. This hexadecimal string encodes all the information about the block, including its transactions, timestamps, and other relevant details.

For example:

getblock 6f511096da79fb2da17f71a2193172d68e481e463c80722f1aa5d2e1250e96d8

This will return the block with the specified hash in its hexadecimal format.

Note: The output format of the getblock command might change in the future to return a JSON representation instead of hexadecimal.

Options

  • -h, --help: Displays the help message for the getblock command.
Clone this wiki locally