Hiro · Capability

Stacks 3.0+ RPC API — Transactions

Stacks 3.0+ RPC API — Transactions. 4 operations. Lead operation: Query mempool for missing transactions. Self-contained Naftiko capability covering one Hiro business surface.

Run with Naftiko HiroTransactions

What You Can Do

POST
Querymempool — Query mempool for missing transactions
/v1/v2/mempool/query
POST
Broadcasttransaction — Broadcast raw transaction
/v1/v2/transactions
GET
Getunconfirmedtransactionbyid — Get unconfirmed transaction
/v1/v2/transactions/unconfirmed/{txid}
GET
Gettransactionbyid — Retrieve transaction details by TXID
/v1/v3/transaction/{txid}

MCP Tools

query-mempool-missing-transactions

Query mempool for missing transactions

read-only
broadcast-raw-transaction

Broadcast raw transaction

get-unconfirmed-transaction

Get unconfirmed transaction

read-only idempotent
retrieve-transaction-details-txid

Retrieve transaction details by TXID

read-only idempotent

Capability Spec

stacks-node-rpc-transactions.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Stacks 3.0+ RPC API — Transactions
  description: 'Stacks 3.0+ RPC API — Transactions. 4 operations. Lead operation: Query mempool for missing transactions.
    Self-contained Naftiko capability covering one Hiro business surface.'
  tags:
  - Hiro
  - Transactions
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    HIRO_API_KEY: HIRO_API_KEY
capability:
  consumes:
  - type: http
    namespace: stacks-node-rpc-transactions
    baseUri: http://localhost:20443
    description: Stacks 3.0+ RPC API — Transactions business capability. Self-contained, no shared references.
    resources:
    - name: v2-mempool-query
      path: /v2/mempool/query
      operations:
      - name: querymempool
        method: POST
        description: Query mempool for missing transactions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: page_id
          in: query
          type: string
          description: Transaction ID to start pagination from
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v2-transactions
      path: /v2/transactions
      operations:
      - name: broadcasttransaction
        method: POST
        description: Broadcast raw transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v2-transactions-unconfirmed-txid
      path: /v2/transactions/unconfirmed/{txid}
      operations:
      - name: getunconfirmedtransactionbyid
        method: GET
        description: Get unconfirmed transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: txid
          in: path
          type: string
          description: Transaction ID (64 hexadecimal characters)
          required: true
    - name: v3-transaction-txid
      path: /v3/transaction/{txid}
      operations:
      - name: gettransactionbyid
        method: GET
        description: Retrieve transaction details by TXID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: txid
          in: path
          type: string
          description: Transaction ID (64 hexadecimal characters)
          required: true
    authentication:
      type: apikey
      key: authorization
      value: '{{env.HIRO_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: stacks-node-rpc-transactions-rest
    port: 8080
    description: REST adapter for Stacks 3.0+ RPC API — Transactions. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v2/mempool/query
      name: v2-mempool-query
      description: REST surface for v2-mempool-query.
      operations:
      - method: POST
        name: querymempool
        description: Query mempool for missing transactions
        call: stacks-node-rpc-transactions.querymempool
        with:
          page_id: rest.page_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v2/transactions
      name: v2-transactions
      description: REST surface for v2-transactions.
      operations:
      - method: POST
        name: broadcasttransaction
        description: Broadcast raw transaction
        call: stacks-node-rpc-transactions.broadcasttransaction
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v2/transactions/unconfirmed/{txid}
      name: v2-transactions-unconfirmed-txid
      description: REST surface for v2-transactions-unconfirmed-txid.
      operations:
      - method: GET
        name: getunconfirmedtransactionbyid
        description: Get unconfirmed transaction
        call: stacks-node-rpc-transactions.getunconfirmedtransactionbyid
        with:
          txid: rest.txid
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/transaction/{txid}
      name: v3-transaction-txid
      description: REST surface for v3-transaction-txid.
      operations:
      - method: GET
        name: gettransactionbyid
        description: Retrieve transaction details by TXID
        call: stacks-node-rpc-transactions.gettransactionbyid
        with:
          txid: rest.txid
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: stacks-node-rpc-transactions-mcp
    port: 9090
    transport: http
    description: MCP adapter for Stacks 3.0+ RPC API — Transactions. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: query-mempool-missing-transactions
      description: Query mempool for missing transactions
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: stacks-node-rpc-transactions.querymempool
      with:
        page_id: tools.page_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: broadcast-raw-transaction
      description: Broadcast raw transaction
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: stacks-node-rpc-transactions.broadcasttransaction
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-unconfirmed-transaction
      description: Get unconfirmed transaction
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stacks-node-rpc-transactions.getunconfirmedtransactionbyid
      with:
        txid: tools.txid
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-transaction-details-txid
      description: Retrieve transaction details by TXID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stacks-node-rpc-transactions.gettransactionbyid
      with:
        txid: tools.txid
      outputParameters:
      - type: object
        mapping: $.