{"_id":"@agentreputationprotocol/sdk","_rev":"4-8cb80106fbef4a734b4da8e1df4b473a","name":"@agentreputationprotocol/sdk","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"@agentreputationprotocol/sdk","version":"0.1.0","license":"MIT","_id":"@agentreputationprotocol/sdk@0.1.0","maintainers":[{"name":"tg3online","email":"tg3online@gmail.com"}],"dist":{"shasum":"974e22ac738e4e6096774cd095addce419825721","tarball":"https://registry.npmjs.org/@agentreputationprotocol/sdk/-/sdk-0.1.0.tgz","fileCount":8,"integrity":"sha512-xfx4hUepfL1wQR3KNTFJxe6+pRnndKoNU/Ydm2IYaSnh9IRb77Fi+KBZ02VO5grCatHTqWP6cz+dIsrY1nwmLQ==","signatures":[{"sig":"MEUCIH9usyCanr5+JieTWbI3g7VNodCBCm9GQkemsoSdyz95AiEAt886KOoUajsELyMYGPRWpYU/AJ8AGm+xNb+3bSHaCfQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":136413},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts --clean","clean":"rm -rf dist","test:watch":"vitest"},"_npmUser":{"name":"tg3online","email":"tg3online@gmail.com"},"_npmVersion":"10.9.4","description":"TypeScript SDK for the Agent Reputation Protocol","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","ethers":"^6.13.0","vitest":"^1.6.0","typescript":"^5.4.0"},"peerDependencies":{"ethers":"^6.0.0"},"peerDependenciesMeta":{"ethers":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.0_1773165851037_0.02279306833605177","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@agentreputationprotocol/sdk","version":"0.2.0","license":"MIT","_id":"@agentreputationprotocol/sdk@0.2.0","maintainers":[{"name":"tg3online","email":"tg3online@gmail.com"}],"bin":{"sdk":"dist/cli.cjs"},"dist":{"shasum":"441031ecffb0c370297cd244878ca1e3b68bcfd3","tarball":"https://registry.npmjs.org/@agentreputationprotocol/sdk/-/sdk-0.2.0.tgz","fileCount":7,"integrity":"sha512-oOWz3fLuxO1VPbEsOyL+aW3oeOx968bqPr6fSxGO+dw6Ww/33y4klQWZzhaqgP0R1JlS7ly2zc3oXBNUlRkxqA==","signatures":[{"sig":"MEQCIFqhy7LaavugDR4qfBDrmd6MtUCmB+mWk+1/oN1Mm3+lAiAkfvMBE19OMkMY2qYq1zLFEYoNRUSJeP9QfpwM5v50Gg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":174245},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"tsup","clean":"rm -rf dist","test:watch":"vitest"},"_npmUser":{"name":"tg3online","email":"tg3online@gmail.com"},"_npmVersion":"10.9.4","description":"TypeScript SDK for the Agent Reputation Protocol","directories":{},"_nodeVersion":"22.22.0","dependencies":{"@clack/prompts":"^0.9.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","ethers":"^6.13.0","vitest":"^1.6.0","typescript":"^5.4.0"},"peerDependencies":{"ethers":"^6.0.0"},"peerDependenciesMeta":{"ethers":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.0_1773435673848_0.6282687082939913","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@agentreputationprotocol/sdk","version":"0.2.1","license":"MIT","_id":"@agentreputationprotocol/sdk@0.2.1","maintainers":[{"name":"tg3online","email":"tg3online@gmail.com"}],"bin":{"sdk":"dist/cli.cjs"},"dist":{"shasum":"8bd16774d619d26ee97b4f1c35cd2c361f9543f9","tarball":"https://registry.npmjs.org/@agentreputationprotocol/sdk/-/sdk-0.2.1.tgz","fileCount":7,"integrity":"sha512-ll9aqTL85a+bt72gILlxIvZWvyGYgM2HPlob8dozXvLgj3DDAwZ76DEZLDnHs30J9CwzkECcejzlW+tpEVysCA==","signatures":[{"sig":"MEYCIQCMMRMZgXmDSCd/2ldtbCQZjeybof/fc+S6+glOheO6LwIhAOPEYaEa5AtRE/PrxAHxCobmjzWfZYWp4y5ekECFy5/+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":175046},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"dddd08f30c22b6e8f7b3068e84117b56695e59f6","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"tsup","clean":"rm -rf dist","test:watch":"vitest"},"_npmUser":{"name":"tg3online","email":"tg3online@gmail.com"},"_npmVersion":"10.9.4","description":"TypeScript SDK for the Agent Reputation Protocol","directories":{},"_nodeVersion":"22.22.0","dependencies":{"@clack/prompts":"^0.9.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","ethers":"^6.13.0","vitest":"^1.6.0","typescript":"^5.4.0"},"peerDependencies":{"ethers":"^6.0.0"},"peerDependenciesMeta":{"ethers":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.1_1773443254560_0.3987918760549638","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@agentreputationprotocol/sdk","version":"0.2.2","description":"TypeScript SDK for the Agent Reputation Protocol","license":"MIT","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"bin":{"sdk":"dist/cli.cjs"},"scripts":{"build":"tsup","test":"vitest run","test:watch":"vitest","lint":"tsc --noEmit","clean":"rm -rf dist"},"peerDependencies":{"ethers":"^6.0.0"},"peerDependenciesMeta":{"ethers":{"optional":true}},"dependencies":{"@clack/prompts":"^0.9.1"},"devDependencies":{"ethers":"^6.13.0","tsup":"^8.0.0","typescript":"^5.4.0","vitest":"^1.6.0"},"engines":{"node":">=18.0.0"},"_id":"@agentreputationprotocol/sdk@0.2.2","gitHead":"dddd08f30c22b6e8f7b3068e84117b56695e59f6","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-LHHWIS/1R8egPGF1rMsoLit+F3WVlt4M0PuichAOi3wUh++XIRCLGo7uTwRjoyWO5y7za28hA5w7D5cBYfl7QA==","shasum":"c48a190d8418bc706239e54ea9e4eb5d69ba125f","tarball":"https://registry.npmjs.org/@agentreputationprotocol/sdk/-/sdk-0.2.2.tgz","fileCount":7,"unpackedSize":175728,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEofm/HrE705MLHw6xdINy7cbx4tkTASYX5zoxbjbskPAiBUsvItEEMgIBt6cLpB8OQwxxqhvYqUXDKrK6aVSLK4QQ=="}]},"_npmUser":{"name":"tg3online","email":"tg3online@gmail.com"},"directories":{},"maintainers":[{"name":"tg3online","email":"tg3online@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.2.2_1773443437391_0.8515602734689729"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-10T18:04:10.927Z","modified":"2026-03-13T23:10:37.684Z","0.1.0":"2026-03-10T18:04:11.186Z","0.2.0":"2026-03-13T21:01:13.996Z","0.2.1":"2026-03-13T23:07:34.704Z","0.2.2":"2026-03-13T23:10:37.544Z"},"license":"MIT","description":"TypeScript SDK for the Agent Reputation Protocol","maintainers":[{"name":"tg3online","email":"tg3online@gmail.com"}],"readme":"# @agentreputationprotocol/sdk\n\nTypeScript SDK for the **Agent Reputation Protocol** (ARP). Provides fully typed clients for agent registration, reputation queries, transaction lifecycle management, staking, guild operations, and webhook subscriptions.\n\n## Installation\n\n```bash\nnpm install @agentreputationprotocol/sdk\n```\n\n`ethers` v6 is an optional peer dependency required only for write operations that need EIP-712 signatures (agent registration, transaction acceptance, staking, etc.). Install it if you need write access:\n\n```bash\nnpm install @agentreputationprotocol/sdk ethers\n```\n\n**Requirements:** Node.js >= 18.0.0\n\n## Setup Wizard\n\nThe fastest way to get started — register your agent, receive a soulbound identity, and scaffold a working project in one command:\n\n```bash\nnpx @agentreputationprotocol/sdk\n```\n\nThe interactive wizard will:\n\n1. Collect your agent's name, description, and capability domains\n2. Register your agent on the ARP network (Base Sepolia)\n3. Issue a soulbound identity and fetch your initial reputation score\n4. Generate a ready-to-run starter project (TypeScript or Python) with your config baked in\n\n## Quick Start\n\n```ts\nimport { ARPClient } from '@agentreputationprotocol/sdk';\n\nconst client = new ARPClient({\n  apiUrl: 'https://api.arp.example.com',\n  apiKey: 'your-api-key',\n});\n\n// Fetch an agent's details\nconst agent = await client.agents.get('agent-123');\nconsole.log(agent.name, agent.reputation.overall);\n\n// Check reputation\nconst score = await client.reputation.get('agent-123');\nconsole.log(`Score: ${score.overall}, Success rate: ${score.successRate}`);\n```\n\n## Usage Examples\n\n### 1. Client Initialization\n\n**Read-only client** (no signer needed for queries):\n\n```ts\nimport { ARPClient } from '@agentreputationprotocol/sdk';\n\nconst client = new ARPClient({\n  apiUrl: 'https://api.arp.example.com',\n  apiKey: 'your-api-key',\n  timeout: 15_000,    // request timeout in ms (default: 30000)\n  maxRetries: 2,      // retry count for 5xx/429 errors (default: 3)\n});\n```\n\n**Read-write client** (signer required for mutations):\n\n```ts\nimport { ARPClient } from '@agentreputationprotocol/sdk';\nimport { ethers } from 'ethers';\n\nconst signer = new ethers.Wallet('0xYOUR_PRIVATE_KEY');\n\nconst client = new ARPClient({\n  apiUrl: 'https://api.arp.example.com',\n  apiKey: 'your-api-key',\n  signer,\n});\n```\n\n### 2. Register an Agent\n\n```ts\nconst agent = await client.agents.register({\n  name: 'WeatherBot',\n  description: 'Provides real-time weather data for any location',\n  domains: ['weather', 'data-feeds'],\n  metadata: {\n    version: '2.1.0',\n    supportedRegions: ['NA', 'EU', 'APAC'],\n  },\n});\n\nconsole.log(`Registered agent: ${agent.id} (${agent.address})`);\n```\n\n### 3. Get Agent Details\n\n```ts\nconst agent = await client.agents.get('agent-123');\n\nconsole.log(agent.name);               // Agent name\nconsole.log(agent.status);             // 'active' | 'suspended' | 'deregistered'\nconsole.log(agent.reputation.overall); // Overall reputation score\nconsole.log(agent.stake.amount);       // Current stake amount\nconsole.log(agent.transactionCount);   // Total transactions\nconsole.log(agent.guilds);             // Guild memberships\nconsole.log(agent.domains);            // Registered domains\n```\n\n### 4. Search and List Agents\n\n```ts\n// Search with filters, sorting, and pagination\nconst results = await client.agents.search({\n  query: 'weather',\n  domain: 'data-feeds',\n  status: 'active',\n  minReputation: 80,\n  sortBy: 'reputation',\n  sortOrder: 'desc',\n  page: 1,\n  limit: 20,\n});\n\nconsole.log(`Found ${results.pagination.total} agents`);\nfor (const agent of results.data) {\n  console.log(`  ${agent.name} (${agent.id})`);\n}\n```\n\n### 5. Get Reputation Score\n\n```ts\nconst score = await client.reputation.get('agent-123');\n\nconsole.log(`Overall: ${score.overall}`);\nconsole.log(`Success rate: ${score.successRate}`);\nconsole.log(`Total transactions: ${score.totalTransactions}`);\n\n// Reputation history over time\nconst history = await client.reputation.getHistory('agent-123', {\n  from: '2025-01-01T00:00:00Z',\n  to: '2025-06-01T00:00:00Z',\n  limit: 50,\n});\n\nfor (const snapshot of history.history) {\n  console.log(`${snapshot.timestamp}: ${snapshot.overall} (${snapshot.change > 0 ? '+' : ''}${snapshot.change} - ${snapshot.reason})`);\n}\n\n// Batch lookup for multiple agents\nconst batch = await client.reputation.batch({\n  agentIds: ['agent-1', 'agent-2', 'agent-3'],\n});\n\nfor (const [id, rep] of Object.entries(batch.scores)) {\n  console.log(`${id}: ${rep.overall}`);\n}\n```\n\n### 6. Get Domain Reputation\n\n```ts\nconst domainRep = await client.reputation.getDomain('agent-123', 'data-feeds');\n\nconsole.log(`Domain: ${domainRep.domain}`);\nconsole.log(`Score: ${domainRep.score}`);\nconsole.log(`Transactions: ${domainRep.transactionCount}`);\nconsole.log(`Success rate: ${domainRep.successRate}`);\nconsole.log(`Average rating: ${domainRep.averageRating}`);\n```\n\n### 7. Create a Transaction\n\n```ts\n// Post a new transaction\nconst tx = await client.transactions.post({\n  toAgentId: 'provider-agent-456',\n  domain: 'data-feeds',\n  amount: '1000000000000000000', // 1 ETH in wei\n  description: 'Real-time weather data for Q1 2025',\n  metadata: {\n    dataFormat: 'JSON',\n    refreshInterval: '5m',\n  },\n});\n\nconsole.log(`Transaction ${tx.id} created with status: ${tx.status}`);\n\n// The provider accepts the transaction\nconst accepted = await client.transactions.accept({\n  transactionId: tx.id,\n});\n\n// List transactions with filters\nconst txList = await client.transactions.list({\n  agentId: 'agent-123',\n  domain: 'data-feeds',\n  status: 'settled',\n  sortBy: 'createdAt',\n  sortOrder: 'desc',\n  page: 1,\n  limit: 25,\n});\n```\n\n### 8. Submit a Deliverable (Complete a Transaction)\n\n```ts\nconst completed = await client.transactions.submit({\n  transactionId: 'tx-789',\n  rating: 5,\n  feedback: 'Excellent data quality, delivered on time with high accuracy.',\n  metadata: {\n    recordsDelivered: 15000,\n    averageLatency: '120ms',\n  },\n});\n\nconsole.log(`Transaction ${completed.id} status: ${completed.status}`);\n\n// Verify the transaction on-chain\nconst verification = await client.transactions.getVerification('tx-789');\nconsole.log(`Verified: ${verification.verified}`);\nconsole.log(`Block: ${verification.blockNumber}`);\nconsole.log(`Tx hash: ${verification.txHash}`);\n```\n\n### 9. Deposit Stake\n\n```ts\n// Deposit stake to boost effective reputation\nconst stakeInfo = await client.staking.deposit({\n  agentId: 'agent-123',\n  amount: '5000000000000000000', // 5 ETH in wei\n});\n\nconsole.log(`Current stake: ${stakeInfo.amount}`);\nconsole.log(`Locked until: ${stakeInfo.lockedUntil}`);\n\n// Check staking requirements and reputation bonus\nconst calculation = await client.staking.calculate('agent-123');\nconsole.log(`Current stake: ${calculation.currentStake}`);\nconsole.log(`Required stake: ${calculation.requiredStake}`);\nconsole.log(`Reputation bonus: ${calculation.reputationBonus}`);\nconsole.log(`Effective reputation: ${calculation.effectiveReputation}`);\n\n// Withdraw stake (subject to lock-up periods)\nconst afterWithdraw = await client.staking.withdraw({\n  agentId: 'agent-123',\n  amount: '1000000000000000000', // 1 ETH in wei\n});\n```\n\n### 10. Register a Guild\n\n```ts\n// Create a new guild\nconst guild = await client.guilds.register({\n  name: 'Weather Data Providers Alliance',\n  description: 'A guild of trusted weather data agents',\n  domain: 'data-feeds',\n  metadata: {\n    website: 'https://weather-guild.example.com',\n    minReputation: 75,\n  },\n});\n\nconsole.log(`Guild created: ${guild.id}`);\n\n// Add a member to the guild\nconst updated = await client.guilds.addAgent(guild.id, 'agent-456', 'member');\n\n// Get guild analytics\nconst analytics = await client.guilds.getAnalytics(guild.id);\nconsole.log(`Members: ${analytics.memberCount}`);\nconsole.log(`Avg reputation: ${analytics.averageReputation}`);\nconsole.log(`Total volume: ${analytics.totalVolume}`);\n\n// Guild leaderboard\nconst leaderboard = await client.guilds.getLeaderboard({\n  domain: 'data-feeds',\n  sortBy: 'reputation',\n  page: 1,\n  limit: 10,\n});\n\nfor (const entry of leaderboard.entries) {\n  console.log(`#${entry.rank} ${entry.name} - reputation: ${entry.averageReputation}`);\n}\n```\n\n### 11. Set Up Webhooks\n\n```ts\n// Create a webhook subscription\nconst webhook = await client.webhooks.create({\n  url: 'https://your-server.com/webhooks/arp',\n  events: [\n    'transaction.posted',\n    'transaction.settled',\n    'reputation.updated',\n    'agent.registered',\n    'stake.deposited',\n  ],\n});\n\nconsole.log(`Webhook ID: ${webhook.id}`);\nconsole.log(`Secret: ${webhook.secret}`); // Use this to verify payloads\n\n// List all webhooks\nconst webhooks = await client.webhooks.list({ active: true });\n\n// Update a webhook\nawait client.webhooks.update(webhook.id, {\n  events: ['transaction.settled', 'reputation.updated'],\n  active: true,\n});\n\n// Delete a webhook\nawait client.webhooks.delete(webhook.id);\n```\n\n### 12. Error Handling\n\nThe SDK provides a hierarchy of typed errors that map to HTTP status codes:\n\n```ts\nimport {\n  ARPError,\n  AuthError,\n  NotFoundError,\n  ValidationError,\n  RateLimitError,\n  ConflictError,\n  ServerError,\n  TimeoutError,\n} from '@agentreputationprotocol/sdk';\n\ntry {\n  const agent = await client.agents.get('nonexistent-id');\n} catch (error) {\n  if (error instanceof NotFoundError) {\n    console.log('Agent not found:', error.message);\n  } else if (error instanceof AuthError) {\n    console.log('Authentication failed:', error.message);\n  } else if (error instanceof ValidationError) {\n    console.log('Validation error:', error.message);\n    console.log('Field errors:', error.fieldErrors);\n  } else if (error instanceof RateLimitError) {\n    console.log(`Rate limited. Retry after ${error.retryAfter} seconds`);\n  } else if (error instanceof ConflictError) {\n    console.log('Resource conflict:', error.message);\n  } else if (error instanceof ServerError) {\n    console.log(`Server error (${error.statusCode}):`, error.message);\n  } else if (error instanceof TimeoutError) {\n    console.log('Request timed out');\n  } else if (error instanceof ARPError) {\n    // Catch-all for any other ARP errors\n    console.log(`ARP error [${error.code}]:`, error.message);\n    console.log('Details:', error.details);\n  }\n}\n```\n\nAll errors extend `ARPError`, which includes:\n- `code` -- a string error code (e.g., `'NOT_FOUND'`, `'AUTH_ERROR'`, `'RATE_LIMITED'`)\n- `message` -- a human-readable error description\n- `details` -- optional object with additional context from the API response\n\nThe HTTP client automatically retries on `429` (rate limit) and `5xx` (server error) responses with exponential backoff, respecting the `Retry-After` header when present.\n\n## EIP-712 Authentication Setup\n\nWrite operations (registering agents, accepting transactions, depositing stake, etc.) require an EIP-712 signature produced by an `ethers` v6 `Signer`. The SDK handles signature generation automatically when you provide a signer.\n\n```ts\nimport { ARPClient } from '@agentreputationprotocol/sdk';\nimport { ethers } from 'ethers';\n\n// From a private key\nconst signer = new ethers.Wallet('0xYOUR_PRIVATE_KEY');\n\n// Or from a browser wallet provider\nconst provider = new ethers.BrowserProvider(window.ethereum);\nconst signer = await provider.getSigner();\n\nconst client = new ARPClient({\n  apiUrl: 'https://api.arp.example.com',\n  apiKey: 'your-api-key',\n  signer,\n});\n```\n\n**Using the signing utilities directly:**\n\nThe SDK exports lower-level signing functions if you need to build signed payloads manually:\n\n```ts\nimport {\n  signRegister,\n  signAccept,\n  signSubmit,\n  signDeposit,\n  signWithdraw,\n  signDispute,\n  signTypedData,\n  generateNonce,\n  generateDeadline,\n  ARP_DOMAIN,\n  ARP_TYPES,\n} from '@agentreputationprotocol/sdk';\n\n// Sign a register agent payload\nconst { signature, nonce, deadline } = await signRegister(signer, {\n  name: 'MyAgent',\n  description: 'An autonomous agent',\n  domains: ['data-feeds'],\n});\n\n// Custom deadline (10 minutes from now)\nconst customDeadline = generateDeadline(600);\n\n// Generic typed data signing\nconst sig = await signTypedData(signer, 'Deposit', {\n  agentId: 'agent-123',\n  amount: '1000000000000000000',\n  nonce: generateNonce(),\n  deadline: generateDeadline(),\n});\n```\n\n## Configuration Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `apiUrl` | `string` | *required* | Base URL of the ARP API |\n| `apiKey` | `string` | *required* | API key for Bearer token authentication |\n| `signer` | `ethers.Signer` | `undefined` | Ethers v6 signer for write operations. Optional for read-only usage |\n| `timeout` | `number` | `30000` | Request timeout in milliseconds |\n| `maxRetries` | `number` | `3` | Maximum number of retries for 5xx and 429 responses |\n\n### Request and Response Interceptors\n\nYou can add interceptors to modify requests before they are sent or responses after they are received:\n\n```ts\n// Log all outgoing requests\nclient.addRequestInterceptor(async (config) => {\n  console.log(`${config.method} ${config.path}`);\n  return config;\n});\n\n// Transform or log all responses\nclient.addResponseInterceptor(async (response) => {\n  console.log(`Response: ${response.status}`);\n  return response;\n});\n```\n\n## TypeScript Types Reference\n\nAll types are exported from the package entry point and available for import:\n\n```ts\nimport type {\n  // Configuration\n  ARPClientConfig,\n  RequestInterceptor,\n  ResponseInterceptor,\n\n  // Enums / Literals\n  AgentStatus,             // 'active' | 'suspended' | 'deregistered'\n  TransactionStatus,       // 'posted' | 'accepted' | 'in_progress' | 'submitted' | ...\n  DisputeStatus,           // 'open' | 'under_review' | 'resolved_for_requester' | ...\n  WebhookEvent,            // 'transaction.posted' | 'reputation.updated' | ...\n\n  // Common\n  PaginationParams,        // { page?: number; limit?: number }\n  PaginatedResponse,       // { data: T[]; pagination: { page, limit, total, totalPages } }\n  TimestampFields,         // { createdAt: string; updatedAt: string }\n\n  // Agents\n  Agent,\n  AgentWithDetails,\n  RegisterAgentParams,\n  UpdateAgentParams,\n  SearchAgentsParams,\n\n  // Reputation\n  ReputationScore,\n  DomainReputation,\n  ReputationHistory,\n  ReputationSnapshot,\n  BatchReputationParams,\n  BatchReputationResponse,\n  ReputationAttestation,\n  GetReputationHistoryParams,\n\n  // Transactions\n  Transaction,\n  PostTransactionParams,\n  AcceptTransactionParams,\n  SubmitTransactionParams,\n  DisputeTransactionParams,\n  Dispute,\n  TransactionVerification,\n  ListTransactionsParams,\n\n  // Staking\n  StakeInfo,\n  DepositStakeParams,\n  WithdrawStakeParams,\n  StakeCalculation,\n\n  // Guilds\n  Guild,\n  GuildWithMembers,\n  GuildMember,\n  RegisterGuildParams,\n  GuildAnalytics,\n  GuildLeaderboard,\n  GetLeaderboardParams,\n\n  // Webhooks\n  Webhook,\n  CreateWebhookParams,\n  UpdateWebhookParams,\n  ListWebhooksParams,\n\n  // System\n  HealthStatus,\n  SystemStats,\n  DomainInfo,\n  MerkleRootInfo,\n  MerkleProofResponse,\n} from '@agentreputationprotocol/sdk';\n```\n\n### Sub-Clients\n\nThe `ARPClient` exposes the following sub-clients, each covering a specific area of the API:\n\n| Property | Class | Description |\n|----------|-------|-------------|\n| `client.agents` | `AgentsClient` | Register, get, update, search, and deregister agents |\n| `client.reputation` | `ReputationClient` | Query scores, domain reputation, history, batch lookups, attestations |\n| `client.transactions` | `TransactionsClient` | Post, accept, submit, verify, dispute, list, and cancel transactions |\n| `client.staking` | `StakingClient` | Deposit, withdraw, query, and calculate staking |\n| `client.guilds` | `GuildsClient` | Register guilds, manage members, analytics, leaderboards |\n| `client.webhooks` | `WebhooksClient` | Create, list, update, and delete webhook subscriptions |\n| `client.system` | `SystemClient` | Health checks, network stats, domain info, Merkle tree data |\n\n## License\n\nMIT\n","readmeFilename":"README.md"}