Hiro · Capability

Stacks 3.0+ RPC API — Fees

Stacks 3.0+ RPC API — Fees. 2 operations. Lead operation: Get approximate fees for the given transaction. Self-contained Naftiko capability covering one Hiro business surface.

Run with Naftiko HiroFees

What You Can Do

POST
Getfeetransaction — Get approximate fees for the given transaction
/v1/v2/fees/transaction
GET
Getfeetransfer — Get estimated fee
/v1/v2/fees/transfer

MCP Tools

get-approximate-fees-given-transaction

Get approximate fees for the given transaction

read-only
get-estimated-fee

Get estimated fee

read-only idempotent

Capability Spec

stacks-node-rpc-fees.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Stacks 3.0+ RPC API — Fees
  description: 'Stacks 3.0+ RPC API — Fees. 2 operations. Lead operation: Get approximate fees for the given transaction.
    Self-contained Naftiko capability covering one Hiro business surface.'
  tags:
  - Hiro
  - Fees
  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-fees
    baseUri: http://localhost:20443
    description: Stacks 3.0+ RPC API — Fees business capability. Self-contained, no shared references.
    resources:
    - name: v2-fees-transaction
      path: /v2/fees/transaction
      operations:
      - name: getfeetransaction
        method: POST
        description: Get approximate fees for the given transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v2-fees-transfer
      path: /v2/fees/transfer
      operations:
      - name: getfeetransfer
        method: GET
        description: Get estimated fee
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: apikey
      key: authorization
      value: '{{env.HIRO_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: stacks-node-rpc-fees-rest
    port: 8080
    description: REST adapter for Stacks 3.0+ RPC API — Fees. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v2/fees/transaction
      name: v2-fees-transaction
      description: REST surface for v2-fees-transaction.
      operations:
      - method: POST
        name: getfeetransaction
        description: Get approximate fees for the given transaction
        call: stacks-node-rpc-fees.getfeetransaction
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v2/fees/transfer
      name: v2-fees-transfer
      description: REST surface for v2-fees-transfer.
      operations:
      - method: GET
        name: getfeetransfer
        description: Get estimated fee
        call: stacks-node-rpc-fees.getfeetransfer
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: stacks-node-rpc-fees-mcp
    port: 9090
    transport: http
    description: MCP adapter for Stacks 3.0+ RPC API — Fees. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-approximate-fees-given-transaction
      description: Get approximate fees for the given transaction
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: stacks-node-rpc-fees.getfeetransaction
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-estimated-fee
      description: Get estimated fee
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stacks-node-rpc-fees.getfeetransfer
      outputParameters:
      - type: object
        mapping: $.