# CTCC™ (Cinqueport Token Control Check) — Full Reference Specification ## 1. Executive & Organizational Context - **Product**: Cinqueport Token Control Check (CTCC™) - **Practice**: Cinque Port (`cinqueport.net`), the specialist international trade, customs due-diligence, and transaction-verification division of **Pavilion (Stockport) Ltd** (`pspt.ltd`). - **Legal Entity**: Pavilion (Stockport) Ltd, Company Registered in England & Wales No. 14997067. - **Corporate Operating Principle**: Separate claims from observable facts, preserve audit provenance, and reject invented certainty. - **Service Invariant**: CTCC™ returns structured observations only. It does not provide "safe", "scam", or "tradeable" verdicts, investment advice, or legal/regulatory approvals. Calling AI agents and trading bots apply their own policy. --- ## 2. Protocol & Settlement Architecture (x402 v2) CTCC™ is an autonomous machine-to-machine inspection service monetized via the open **x402 v2 protocol** on Base Mainnet. - **Target Chain**: Base Mainnet (CAIP-2: `eip155:8453`) - **Protected Endpoint**: `POST https://cinqueport.net/check` - **Challenge Endpoint**: `GET https://cinqueport.net/check` (Returns HTTP 402 with `PAYMENT-REQUIRED`) - **Inspection Fee**: $0.01 USDC (10,000 atomic units, USDC has 6 decimal places) - **Settlement Asset Contract**: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` (Canonical USDC on Base) - **Recipient Address (`payTo`)**: `0x14d4035290a31B81E99e2DEE26ef0a10e5Aa4d75` - **Supported Facilitators**: - `https://x402.primer.systems` - `https://facilitator.payai.network` - `https://api.cdp.coinbase.com/platform/v2/x402` - **Settlement Flow**: 1. Client sends request to `POST https://cinqueport.net/check`. 2. If unauthenticated, server returns `HTTP 402 Payment Required` with `PAYMENT-REQUIRED: ` header and requirements body containing the `@x402/extensions/bazaar` discovery schema. 3. Client signs the EIP-712 payment authorization for 10,000 atomic USDC units. 4. Client resends the request with `PAYMENT-SIGNATURE: ` header. 5. CTCC verifies and settles with the facilitator, returning `HTTP 200 OK` with `PAYMENT-RESPONSE: ` header. --- ## 3. Endpoints & Discovery Catalog | Resource Path | Method | Auth | Description | |---|---|---|---| | `https://cinqueport.net/check` | `POST` | x402 v2 | Executes deterministic smart-contract authority inspection ($0.01 USDC). | | `https://cinqueport.net/check` | `GET` | None | Returns HTTP 402 challenge with requirements header and Bazaar discovery metadata. | | `https://cinqueport.net/health` | `GET` | None | Service operational status, network parameters, and payment recipient address. | | `https://cinqueport.net/ctcc.json` | `GET` | None | Machine-readable capabilities, boundary constraints, and policy specifications. | | `https://cinqueport.net/openapi.json` | `GET` | None | Complete OpenAPI 3.1.0 specification with concrete request/response examples. | | `https://cinqueport.net/.well-known/agent.json` | `GET` | None | Agent-to-Agent (A2A) v1.0 Agent Card for autonomous multi-agent discovery. | | `https://cinqueport.net/.well-known/x402.json` | `GET` | None | x402 Protocol v2 manifest and Coinbase Bazaar catalog index entry. | | `https://cinqueport.net/llms.txt` | `GET` | None | High-density LLM tool-routing briefing and code snippets. | | `https://cinqueport.net/llms-full.txt` | `GET` | None | Full reference specification and SDK integration guide (this document). | --- ## 4. Input & Output JSON Schemas ### Request Payload (`POST /check`) ```json { "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" } ``` *Note: `contract_address` is also accepted as an alias for `address`.* ### Successful Response (`HTTP 200 OK`) ```json { "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "network": "Base Mainnet", "chain_id": "eip155:8453", "checked_at": "2026-11-25T23:00:00Z", "observations": { "contract_exists": true, "bytecode_bytes": 2824, "erc20": { "signals_detected": true, "name": "USD Coin", "symbol": "USDC", "decimals": 6, "total_supply": "3421980312000000" }, "control_authorities": { "owner_present": true, "owner_address": "0x2B4C14051Ac0C8EB1d3FeD192934D21C941D6A12", "proxy_admin_address": "0x2B4C14051Ac0C8EB1d3FeD192934D21C941D6A12" }, "pause_state": { "pausable_detected": true, "is_paused": false }, "proxy_indicators": { "is_eip1967_proxy": true, "implementation_address": "0x2e3A2fb84a0Da39499C80113926F12C3250b7308", "beacon_address": null } }, "disclaimer": "CTCC returns structured facts only. No safe/scam or tradeability verdict is provided. The calling agent applies its own policy." } ``` ### Observation Fields Defined 1. `contract_exists` (boolean): Whether `eth_getCode` at the specified address returned non-empty bytecode. 2. `bytecode_bytes` (integer): Length in bytes of the deployed runtime bytecode. 3. `erc20.signals_detected` (boolean): True if contract responds to ERC-20 `symbol()` or `decimals()` selectors. 4. `erc20.name` (string | null): Decoded UTF-8 string from `name()` selector (`0x06fdde03`). 5. `erc20.symbol` (string | null): Decoded UTF-8 string from `symbol()` selector (`0x95d89b41`). 6. `erc20.decimals` (integer | null): Decoded uint8 from `decimals()` selector (`0x313ce567`). 7. `erc20.total_supply` (string | null): Decoded uint256 as string from `totalSupply()` selector (`0x18160ddd`). 8. `control_authorities.owner_present` (boolean): True if `owner()` selector (`0x8da5cb5b`) returns a non-zero address. 9. `control_authorities.owner_address` (string | null): Active owner/admin address. 10. `control_authorities.proxy_admin_address` (string | null): Address in EIP-1967 admin storage slot (`0xb5312768...`). 11. `pause_state.pausable_detected` (boolean): True if contract responds to `paused()` selector (`0x5c975abb`). 12. `pause_state.is_paused` (boolean): Current boolean state returned by `paused()`. 13. `proxy_indicators.is_eip1967_proxy` (boolean): True if non-zero address exists in EIP-1967 implementation or beacon slot. 14. `proxy_indicators.implementation_address` (string | null): Target logic implementation address (`0x360894a1...`). 15. `proxy_indicators.beacon_address` (string | null): Beacon proxy address (`0xa3f0ad74...`). --- ## 5. Developer SDK Quickstarts ### TypeScript / JavaScript (`@cinqueport/ctcc-x402` or `@x402/fetch`) ```typescript import { wrapFetchWithPayment } from "@x402/fetch"; import { ethers } from "ethers"; const privateKey = process.env.EVM_PRIVATE_KEY!; const wallet = new ethers.Wallet(privateKey); const fetchWith402 = wrapFetchWithPayment(fetch, wallet); async function checkToken(contractAddress: string) { const response = await fetchWith402("https://cinqueport.net/check", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ address: contractAddress }) }); if (!response.ok) { throw new Error(`CTCC query failed: HTTP ${response.status}`); } const data = await response.json(); console.log(`Inspected ${data.address}:`); console.log(`- Bytecode size: ${data.observations.bytecode_bytes} bytes`); console.log(`- Owner: ${data.observations.control_authorities.owner_address || "None"}`); console.log(`- Paused: ${data.observations.pause_state.is_paused}`); return data; } ``` ### Python (`ctcc-x402` or `x402`) ```python import os import requests from x402 import x402Client private_key = os.environ["EVM_PRIVATE_KEY"] client = x402Client(private_key=private_key) def inspect_token(contract_address: str) -> dict: res = client.post( "https://cinqueport.net/check", json={"address": contract_address} ) res.raise_for_status() data = res.json() print(f"Contract: {data['address']}") print(f"ERC-20 Symbol: {data['observations']['erc20'].get('symbol')}") print(f"Proxy Implementation: {data['observations']['proxy_indicators'].get('implementation_address')}") return data ``` --- ## 6. Model Context Protocol (MCP) Setup Everyday users running Claude Desktop, Cursor, Cline, or Windsurf can connect CTCC in seconds. ### Claude Desktop Configuration (`claude_desktop_config.json`) ```json { "mcpServers": { "ctcc": { "command": "npx", "args": ["-y", "ctcc-mcp"] } } } ``` ### Cursor / Cline Integration In Cursor Settings $\rightarrow$ Features $\rightarrow$ MCP $\rightarrow$ Add New MCP Server: - **Name**: `ctcc` - **Type**: `command` - **Command**: `npx -y ctcc-mcp` --- ## 7. Error Codes & Diagnostic Handling - `400 Bad Request`: Invalid Ethereum address format (must be `0x` followed by 40 hex characters). - `402 Payment Required`: x402 challenge returned. Read `PAYMENT-REQUIRED` header for settlement parameters. - `405 Method Not Allowed`: Request was not `POST` or `GET`. - `502 Bad Gateway`: Base Mainnet RPC node failed to respond or returned an execution error. --- ## 8. Governance & Contact - **Division Website**: https://cinqueport.net/ - **Parent Practice**: https://pspt.ltd/ - **Direct Enquiries**: `hello@cinqueport.net` / `hello@pspt.ltd`