Blockdaemon · Capability

Blockdaemon Data API — Blocks and Transactions

Block and transaction lookups across all chains supported by the Blockdaemon Data API (Ubiquity). Self-contained Naftiko capability covering one Blockdaemon business surface.

Run with Naftiko BlockdaemonDataBlocksTransactions

What You Can Do

GET
Getblockbynumber — Get a block by number or hash.
/v1/{protocol}/{network}/block/{number_or_hash}

MCP Tools

blockdaemon-get-block-by-number

Get a block and all its transactions by number or hash.

read-only idempotent
blockdaemon-get-current-block-number

Get the current block number/height of the protocol.

read-only idempotent
blockdaemon-get-tx-by-hash

Returns a transaction by hash.

read-only idempotent

Capability Spec

data-blocks-transactions.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Blockdaemon Data API — Blocks and Transactions
  description: Block and transaction lookups across all chains supported by the Blockdaemon Data API (Ubiquity).
    Self-contained Naftiko capability covering one Blockdaemon business surface.
  tags:
  - Blockdaemon
  - Data
  - Blocks
  - Transactions
  created: '2026-05-25'
  modified: '2026-05-25'
binds:
- namespace: env
  keys:
    BLOCKDAEMON_API_KEY: BLOCKDAEMON_API_KEY
capability:
  consumes:
  - type: http
    namespace: data-blocks-transactions
    baseUri: https://svc.blockdaemon.com
    description: Blockdaemon Data API — Blocks and Transactions consumes block, transaction, and confirmation
      endpoints under the unified Ubiquity surface.
    resources:
    - name: block-by-number
      path: /v1/{protocol}/{network}/block/{number_or_hash}
      operations:
      - name: getblockbynumber
        method: GET
        description: Get a block and all its transactions by number or hash.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: protocol
          in: path
          type: string
          required: true
        - name: network
          in: path
          type: string
          required: true
        - name: number_or_hash
          in: path
          type: string
          required: true
    - name: current-block-number
      path: /v1/{protocol}/{network}/block_number
      operations:
      - name: getcurrentblocknumber
        method: GET
        description: Returns the current block number/height of the protocol.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: protocol
          in: path
          type: string
          required: true
        - name: network
          in: path
          type: string
          required: true
    - name: tx-by-hash
      path: /v1/{protocol}/{network}/tx/{hash}
      operations:
      - name: gettxbyhash
        method: GET
        description: Returns a transaction by a user-defined transaction hash.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: protocol
          in: path
          type: string
          required: true
        - name: network
          in: path
          type: string
          required: true
        - name: hash
          in: path
          type: string
          required: true
    - name: tx-confirmations
      path: /v1/{protocol}/{network}/tx/{hash}/confirmations
      operations:
      - name: gettxconfirmations
        method: GET
        description: Returns the number of confirmations for a transaction.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: protocol
          in: path
          type: string
          required: true
        - name: network
          in: path
          type: string
          required: true
        - name: hash
          in: path
          type: string
          required: true
    authentication:
      type: apikey
      key: X-API-Key
      value: '{{env.BLOCKDAEMON_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: data-blocks-transactions-rest
    port: 8080
    description: REST adapter for Blockdaemon Data API — Blocks and Transactions.
    resources:
    - path: /v1/{protocol}/{network}/block/{number_or_hash}
      name: block-by-number
      description: REST surface for block lookups.
      operations:
      - method: GET
        name: getblockbynumber
        description: Get a block by number or hash.
        call: data-blocks-transactions.getblockbynumber
        with:
          protocol: rest.path.protocol
          network: rest.path.network
          number_or_hash: rest.path.number_or_hash
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: data-blocks-transactions-mcp
    port: 9090
    transport: http
    description: MCP adapter for Blockdaemon Data API blocks and transactions.
    tools:
    - name: blockdaemon-get-block-by-number
      description: Get a block and all its transactions by number or hash.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: data-blocks-transactions.getblockbynumber
      with:
        protocol: tools.protocol
        network: tools.network
        number_or_hash: tools.number_or_hash
      outputParameters:
      - type: object
        mapping: $.
    - name: blockdaemon-get-current-block-number
      description: Get the current block number/height of the protocol.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: data-blocks-transactions.getcurrentblocknumber
      with:
        protocol: tools.protocol
        network: tools.network
      outputParameters:
      - type: object
        mapping: $.
    - name: blockdaemon-get-tx-by-hash
      description: Returns a transaction by hash.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: data-blocks-transactions.gettxbyhash
      with:
        protocol: tools.protocol
        network: tools.network
        hash: tools.hash
      outputParameters:
      - type: object
        mapping: $.