naftiko: 1.0.0-alpha2 info: label: Token Trading — Swap description: 'Token Trading — Swap. 4 operations. Lead operation: Create swap calldata. Self-contained Naftiko capability covering one Uniswap business surface.' tags: - Uniswap - Swap created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: UNISWAP_API_KEY: UNISWAP_API_KEY capability: consumes: - type: http namespace: trading-swap baseUri: https://trade-api.gateway.uniswap.org/v1 description: Token Trading — Swap business capability. Self-contained, no shared references. resources: - name: swap path: /swap operations: - name: createswaptransaction method: POST description: Create swap calldata outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: swap_5792 path: /swap_5792 operations: - name: createswap5792transaction method: POST description: Create swap EIP 5792 calldata outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: swap_7702 path: /swap_7702 operations: - name: createswap7702transaction method: POST description: Create swap EIP 7702 calldata outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: swaps path: /swaps operations: - name: getswaps method: GET description: Get swaps status outputRawFormat: json outputParameters: - name: result type: object value: $. authentication: type: apikey key: x-api-key value: '{{env.UNISWAP_API_KEY}}' placement: header exposes: - type: rest namespace: trading-swap-rest port: 8080 description: REST adapter for Token Trading — Swap. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/swap name: swap description: REST surface for swap. operations: - method: POST name: createswaptransaction description: Create swap calldata call: trading-swap.createswaptransaction with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/swap-5792 name: swap-5792 description: REST surface for swap_5792. operations: - method: POST name: createswap5792transaction description: Create swap EIP 5792 calldata call: trading-swap.createswap5792transaction with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/swap-7702 name: swap-7702 description: REST surface for swap_7702. operations: - method: POST name: createswap7702transaction description: Create swap EIP 7702 calldata call: trading-swap.createswap7702transaction with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/swaps name: swaps description: REST surface for swaps. operations: - method: GET name: getswaps description: Get swaps status call: trading-swap.getswaps outputParameters: - type: object mapping: $. - type: mcp namespace: trading-swap-mcp port: 9090 transport: http description: MCP adapter for Token Trading — Swap. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: create-swap-calldata description: Create swap calldata hints: readOnly: false destructive: false idempotent: false call: trading-swap.createswaptransaction with: body: tools.body outputParameters: - type: object mapping: $. - name: create-swap-eip-5792-calldata description: Create swap EIP 5792 calldata hints: readOnly: false destructive: false idempotent: false call: trading-swap.createswap5792transaction with: body: tools.body outputParameters: - type: object mapping: $. - name: create-swap-eip-7702-calldata description: Create swap EIP 7702 calldata hints: readOnly: false destructive: false idempotent: false call: trading-swap.createswap7702transaction with: body: tools.body outputParameters: - type: object mapping: $. - name: get-swaps-status description: Get swaps status hints: readOnly: true destructive: false idempotent: true call: trading-swap.getswaps outputParameters: - type: object mapping: $.