#601

Global Rank · of 601 Skills

lookup-block-info AI Agent Skill

View Source: b-open-io/bsv-skills

Safe

Installation

npx skills add b-open-io/bsv-skills --skill lookup-block-info

19

Installs

Lookup Block Info

Retrieve detailed block information from the BSV blockchain.

API

Uses WhatsOnChain for complete block data (size, txcount, difficulty, previousblockhash). JungleBus /v1/block_header/get/{hash} only provides header fields - use that directly if you only need hash, height, time, merkleroot.

When to Use

  • Get block data by height
  • Get block data by hash
  • View block statistics (size, tx count, etc.)

Usage

# Lookup by height
bun run skills/lookup-block-info/scripts/lookup.ts --height 800000

# Lookup by hash
bun run skills/lookup-block-info/scripts/lookup.ts --hash 00000000000000000320e...

# JSON output
bun run skills/lookup-block-info/scripts/lookup.ts --height 800000 --json

# Show help
bun run skills/lookup-block-info/scripts/lookup.ts --help

Output

Default Format

Block #1
Hash: 00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048
Time: 2009-01-09 02:54:25 UTC
Size: 215 bytes
Transactions: 1
Merkle Root: 0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098
Previous: 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
Difficulty: 1

JSON Format (--json)

{
  "height": 1,
  "hash": "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048",
  "time": 1231469665,
  "size": 215,
  "txCount": 1,
  "merkleRoot": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098",
  "previousHash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
  "difficulty": 1
}

Error Handling

  • Invalid height (negative): "Error: Height must be non-negative integer", exit 1
  • Invalid hash format: "Error: Hash must be 64 hex characters", exit 1
  • Block not found: "Error: Block not found", exit 1
  • Network/API error: "Error: API request failed: ", exit 1

Status

Complete - All tests pass

Installs

Installs 19
Global Rank #601 of 601

Security Audit

ath Safe
socket Safe
Alerts: 0 Score: 90
snyk Low
EU EU-Hosted Inference API

Power your AI Agents with the best open-source models.

Drop-in OpenAI-compatible API. No data leaves Europe.

Explore Inference API

GLM

GLM 5

$1.00 / $3.20

per M tokens

Kimi

Kimi K2.5

$0.60 / $2.80

per M tokens

MiniMax

MiniMax M2.5

$0.30 / $1.20

per M tokens

Qwen

Qwen3.5 122B

$0.40 / $3.00

per M tokens

How to use this skill

1

Install lookup-block-info by running npx skills add b-open-io/bsv-skills --skill lookup-block-info in your project directory. Run the install command above in your project directory. The skill file will be downloaded from GitHub and placed in your project.

2

No configuration needed. Your AI agent (Claude Code, Cursor, Windsurf, etc.) automatically detects installed skills and uses them as context when generating code.

3

The skill enhances your agent's understanding of lookup-block-info, helping it follow established patterns, avoid common mistakes, and produce production-ready output.

What you get

Skills are plain-text instruction files — not executable code. They encode expert knowledge about frameworks, languages, or tools that your AI agent reads to improve its output. This means zero runtime overhead, no dependency conflicts, and full transparency: you can read and review every instruction before installing.

Compatibility

This skill works with any AI coding agent that supports the skills.sh format, including Claude Code (Anthropic), Cursor, Windsurf, Cline, Aider, and other tools that read project-level context files. Skills are framework-agnostic at the transport level — the content inside determines which language or framework it applies to.

Data sourced from the skills.sh registry and GitHub. Install counts and security audits are updated regularly.

EU Made in Europe

Chat with 100+ AI Models in one App.

Use Claude, ChatGPT, Gemini alongside with EU-Hosted Models like Deepseek, GLM-5, Kimi K2.5 and many more.

Get the App:

Customer Support