Skip to main content

Synopsis

Subcommands

cowboy block by-height

Retrieve a block by its height. Behavior:
  1. Query the RPC endpoint for the block at the given height.
  2. Print block details (hash, height, timestamp, transaction count).
Flags: Example:

cowboy block by-hash

Retrieve a block by its hash. Behavior:
  1. Query the RPC endpoint for the block with the given hash.
  2. Print block details.
Flags: Example:

cowboy block latest

Retrieve the latest block. Behavior:
  1. Query the RPC endpoint for the latest block.
  2. Print block details.
Example:

Edge Cases

  • If the requested height doesn’t exist, print Block not found.
  • All subcommands are read-only and do not require a private key.