{"_id":"@atv-eth/x402-sdk","_rev":"5-f9f9dffe9c02d56e21a87c66955342f0","name":"@atv-eth/x402-sdk","dist-tags":{"latest":"1.1.4"},"versions":{"1.0.0":{"name":"@atv-eth/x402-sdk","version":"1.0.0","keywords":["x402","ens","ethereum","web3","identity","api","usdc","base","payments","atv"],"author":{"url":"Agent Trust Vector","name":"ATV","email":"atv@web3domains.com"},"license":"MIT","_id":"@atv-eth/x402-sdk@1.0.0","maintainers":[{"name":"atv-eth","email":"atv@web3domains.com"}],"homepage":"https://api.web3domains.com","bugs":{"url":"https://github.com/ATV-eth/x402-sdk/issues"},"dist":{"shasum":"0cf1c5a55e8291d98aabf4bf66c53365ab7150c9","tarball":"https://registry.npmjs.org/@atv-eth/x402-sdk/-/x402-sdk-1.0.0.tgz","fileCount":4,"integrity":"sha512-e8IuMNl/wUZCU2aVyo+GmS9+irZE5BsOwKbi9RVBSAN23StkWi7maQZV8ktkfTMFqCklkfA7YawYAn+ptvEpmg==","signatures":[{"sig":"MEUCIBsYnCAfwakb8OwfrJtT2G/6ntzxfkXpeh+nIdQvV1O6AiEAu+4EP/icP2/cdcQKt5RlMnDcNwJ+JV1tyccjYiaf/Dw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19973},"main":"index.mjs","type":"module","types":"index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs"}},"gitHead":"ffaf76f2930628148f47c0cf91c63ea736f5ebee","_npmUser":{"name":"atv-eth","email":"atv@web3domains.com"},"repository":{"url":"git+https://github.com/ATV-eth/x402-sdk.git","type":"git"},"_npmVersion":"10.9.4","description":"Official SDK for the ATV x402 Premium API - ENS, identity, social graphs, and wallet analytics with automatic USDC payments on Base","directories":{},"_nodeVersion":"22.22.0","dependencies":{"viem":"^2.0.0"},"_hasShrinkwrap":false,"peerDependencies":{"viem":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/x402-sdk_1.0.0_1770338662257_0.1422391565554757","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@atv-eth/x402-sdk","version":"1.1.0","keywords":["x402","ens","ethereum","web3","identity","api","usdc","base","payments","atv","siwe","sign-in-with-ethereum","erc-4361"],"author":{"url":"Agent Trust Vector","name":"ATV","email":"atv@web3domains.com"},"license":"MIT","_id":"@atv-eth/x402-sdk@1.1.0","maintainers":[{"name":"atv-eth","email":"atv@web3domains.com"}],"homepage":"https://api.web3domains.com","bugs":{"url":"https://github.com/ATV-eth/x402-sdk/issues"},"dist":{"shasum":"8f6a9345ee965936281a3fc55ee569a31270f722","tarball":"https://registry.npmjs.org/@atv-eth/x402-sdk/-/x402-sdk-1.1.0.tgz","fileCount":4,"integrity":"sha512-mAeJr8jEvFcS+gjkWTXhKSHQL9tq/gwiUIB5uDeimQS5OeIanyhY92ZM2wR9+6yWKzxWXDHi71KQ8ZQX4S6OtA==","signatures":[{"sig":"MEQCIDP/sVrFC8ZzOXW4Ydb+siY2cYb/ErSnRtW7L1HNXCaCAiBjoL9lI9t93/ff+TSlrbBSpAubdeiN+yfrDq+XxHxl7g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34337},"main":"index.mjs","type":"module","types":"index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs"}},"gitHead":"dab17fc293ce6c9a234162e6313799a5fa2819c3","_npmUser":{"name":"atv-eth","email":"atv@web3domains.com"},"repository":{"url":"git+https://github.com/ATV-eth/x402-sdk.git","type":"git"},"_npmVersion":"10.9.4","description":"Official SDK for the ATV x402 Premium API - ENS, identity, social graphs with SIWE authentication and automatic USDC payments on Base","directories":{},"_nodeVersion":"22.22.0","dependencies":{"viem":"^2.0.0"},"_hasShrinkwrap":false,"peerDependencies":{"viem":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/x402-sdk_1.1.0_1770411646335_0.742954066589028","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@atv-eth/x402-sdk","version":"1.1.1","keywords":["x402","ens","ethereum","web3","identity","api","usdc","base","payments","atv","siwe","sign-in-with-ethereum","erc-4361"],"author":{"url":"Agent Trust Vector","name":"ATV","email":"atv@web3domains.com"},"license":"MIT","_id":"@atv-eth/x402-sdk@1.1.1","maintainers":[{"name":"atv-eth","email":"atv@web3domains.com"}],"homepage":"https://api.web3domains.com","bugs":{"url":"https://github.com/ATV-eth/x402-sdk/issues"},"dist":{"shasum":"d45c4d7cd15769becdf043d9c993f41ea328abee","tarball":"https://registry.npmjs.org/@atv-eth/x402-sdk/-/x402-sdk-1.1.1.tgz","fileCount":4,"integrity":"sha512-aaTlP0cokUtdtVoIvanVueMBPVXwi9k2+PouF50pYkNcXlk/38+91ZiXtqrIIrVSy0Ug1ZxLomz7+5M5AbFVdg==","signatures":[{"sig":"MEUCIQDFUJpLiyFm8/Ko6a8s6P8NZtUnk8ZH0FdwjOhdBQ9G8gIgGs8yPCL5KzIdjPhsIMYi8U6j+jqw3bHteQmt0lrq3Ko=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31746},"main":"index.mjs","type":"module","types":"index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs"}},"gitHead":"dab17fc293ce6c9a234162e6313799a5fa2819c3","_npmUser":{"name":"atv-eth","email":"atv@web3domains.com"},"repository":{"url":"git+https://github.com/ATV-eth/x402-sdk.git","type":"git"},"_npmVersion":"10.9.4","description":"TypeScript SDK for ATV x402 Web3 Identity API - 1383 endpoints","directories":{},"_nodeVersion":"22.22.0","dependencies":{"viem":"^2.0.0"},"_hasShrinkwrap":false,"peerDependencies":{"viem":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/x402-sdk_1.1.1_1770493813677_0.07873061157850025","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@atv-eth/x402-sdk","version":"1.1.2","keywords":["x402","ens","ethereum","web3","identity","api","usdc","base","payments","atv","siwe","sign-in-with-ethereum","erc-4361"],"author":{"url":"Agent Trust Vector","name":"ATV","email":"atv@web3domains.com"},"license":"MIT","_id":"@atv-eth/x402-sdk@1.1.2","maintainers":[{"name":"atv-eth","email":"atv@web3domains.com"}],"homepage":"https://web3identity.com","bugs":{"url":"https://github.com/ATV-eth/x402-api/issues"},"dist":{"shasum":"0cd1362dee7df1f650f15989b3203e43cba836d6","tarball":"https://registry.npmjs.org/@atv-eth/x402-sdk/-/x402-sdk-1.1.2.tgz","fileCount":4,"integrity":"sha512-HBYrmIjgvwvT+vm82OYmYuc94Mhitg9LGLWYELiFXsmNvyJvGBhC2lUdf79ovnEaAf/dLGaP2ZKEi+Z8st06Vw==","signatures":[{"sig":"MEQCIDzYirKkLGZOwLgmblhlGUuUGFUyR3yve1mbl53dlFK0AiBD82i0bcf/kYnDph48rVtMIDEZ/Gjo7u4O9l0cljMydA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31740},"main":"index.mjs","type":"module","types":"index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs"}},"gitHead":"dab17fc293ce6c9a234162e6313799a5fa2819c3","_npmUser":{"name":"atv-eth","email":"atv@web3domains.com"},"repository":{"url":"git+https://github.com/ATV-eth/x402-api.git","type":"git"},"_npmVersion":"10.9.4","description":"TypeScript SDK for ATV x402 Web3 Identity API - 934 endpoints","directories":{},"_nodeVersion":"22.22.0","dependencies":{"viem":"^2.0.0"},"_hasShrinkwrap":false,"peerDependencies":{"viem":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/x402-sdk_1.1.2_1770526283338_0.3433172467440193","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"@atv-eth/x402-sdk","version":"1.1.4","description":"TypeScript SDK for ATV x402 Web3 Identity API - 934 endpoints","type":"module","main":"index.mjs","types":"index.d.ts","exports":{".":{"import":"./index.mjs","types":"./index.d.ts"}},"keywords":["x402","ens","ethereum","web3","identity","api","usdc","base","payments","atv","siwe","sign-in-with-ethereum","erc-4361"],"author":{"name":"ATV","email":"atv@web3domains.com","url":"Agent Trust Vector"},"license":"MIT","homepage":"https://api.web3identity.com","repository":{"type":"git","url":"git+https://github.com/ATV-eth/x402-api.git"},"bugs":{"url":"https://github.com/ATV-eth/x402-api/issues"},"engines":{"node":">=18"},"dependencies":{"viem":"^2.0.0"},"peerDependencies":{"viem":"^2.0.0"},"_id":"@atv-eth/x402-sdk@1.1.4","gitHead":"dab17fc293ce6c9a234162e6313799a5fa2819c3","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-fpVwjljtAy441tZaMTtwR1za+1AICR1EUQsUA7YjUmrSkxSXpH7W4a5j7pjPTQ3tKbHDsmtJOT/mDARa4Pglrg==","shasum":"747c15c1a5aaf4233f458b76ffff2b80b8a235f5","tarball":"https://registry.npmjs.org/@atv-eth/x402-sdk/-/x402-sdk-1.1.4.tgz","fileCount":4,"unpackedSize":31744,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAJVS9Tg/aUIzT3p/AVJDRedeGnpoENuPKi9AlX32vQnAiAgMdWTiiHXXpit+jVk3XEkUrSNXRk/OniYWpk7c3xWtg=="}]},"_npmUser":{"name":"atv-eth","email":"atv@web3domains.com"},"directories":{},"maintainers":[{"name":"atv-eth","email":"atv@web3domains.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/x402-sdk_1.1.4_1770527331012_0.1544031193667994"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-06T00:44:22.189Z","modified":"2026-02-08T05:08:51.569Z","1.0.0":"2026-02-06T00:44:22.399Z","1.1.0":"2026-02-06T21:00:46.508Z","1.1.1":"2026-02-07T19:50:13.827Z","1.1.2":"2026-02-08T04:51:23.464Z","1.1.4":"2026-02-08T05:08:51.157Z"},"bugs":{"url":"https://github.com/ATV-eth/x402-api/issues"},"author":{"name":"ATV","email":"atv@web3domains.com","url":"Agent Trust Vector"},"license":"MIT","homepage":"https://api.web3identity.com","keywords":["x402","ens","ethereum","web3","identity","api","usdc","base","payments","atv","siwe","sign-in-with-ethereum","erc-4361"],"repository":{"type":"git","url":"git+https://github.com/ATV-eth/x402-api.git"},"description":"TypeScript SDK for ATV x402 Web3 Identity API - 934 endpoints","maintainers":[{"name":"atv-eth","email":"atv@web3domains.com"}],"readme":"# @atv-eth/x402-sdk\n\nOfficial SDK for the ATV x402 Premium API — ENS, identity, social graphs with SIWE authentication and automatic USDC payments on Base.\n\n## Features\n\n- 🔐 **SIWE Authentication** — Sign-In with Ethereum for better rate limits\n- 💳 **Automatic x402 Payments** — Pay-per-request with USDC on Base\n- 🆔 **ENS & Identity** — Name resolution, profiles, avatars\n- 👥 **Social Graphs** — Followers, following, reputation (via EFP)\n- 📊 **Wallet Analytics** — Balances, tokens, NFTs, transactions\n- 🔒 **Security Checks** — GoPlus token and address analysis\n- 📝 **TypeScript** — Full type definitions included\n\n## Installation\n\n```bash\nnpm install @atv-eth/x402-sdk viem\n```\n\n## Quick Start\n\n### Basic Usage (Anonymous)\n\n```javascript\nimport { ATVClient } from '@atv-eth/x402-sdk';\n\nconst client = new ATVClient({\n  privateKey: process.env.WALLET_KEY,\n});\n\n// Pay-per-request (uses free tier first, then x402 payments)\nconst profile = await client.getProfile('vitalik.eth');\nconsole.log(profile);\n```\n\n### With SIWE Authentication (Recommended)\n\n```javascript\nimport { ATVClient } from '@atv-eth/x402-sdk';\n\nconst client = new ATVClient({\n  privateKey: process.env.WALLET_KEY,\n});\n\n// Sign in with Ethereum for better rate limits\nawait client.signIn();\n\n// Now requests use your authenticated session\nconst profile = await client.getProfile('vitalik.eth');\n\n// Access authenticated-only endpoints\nconst me = await client.me();\nconst usage = await client.myUsage();\n\n// Sign out when done\nawait client.signOut();\n```\n\n## Authentication\n\n### Anonymous Access\n- Free tier: 100 requests/day per IP\n- Rate limit: 30 requests/minute\n- After free tier: Pay-per-request via x402\n\n### SIWE Authenticated\n- Rate limit: 60 requests/minute\n- Better pricing (coming soon)\n- Access to `/api/me` endpoints\n- Usage tracking and history\n\n## API Reference\n\n### SIWE Authentication\n\n```javascript\n// Sign in (returns session data)\nconst session = await client.signIn();\n// { token, address, expiresAt, rateLimits }\n\n// Check if authenticated\nconsole.log(client.isAuthenticated); // true/false\n\n// Get session status\nconst status = await client.sessionStatus();\n\n// Get authenticated user profile\nconst me = await client.me();\n\n// Get usage stats\nconst usage = await client.myUsage();\n\n// Sign out\nawait client.signOut();\n```\n\n### Identity & ENS\n\n```javascript\n// Resolve ENS name\nconst { address } = await client.resolveENS('vitalik.eth');\n\n// Reverse resolve\nconst { name } = await client.reverseResolve('0x...');\n\n// Full profile\nconst profile = await client.getProfile('nick.eth');\n\n// Avatar URL\nconst { avatar } = await client.getAvatar('brantly.eth');\n\n// ENS valuation\nconst { value } = await client.getENSValue('web3.eth');\n\n// Expiration info\nconst { expires, daysRemaining } = await client.getExpiration('atv.eth');\n\n// Batch resolve\nconst results = await client.batchENS(['vitalik.eth', 'nick.eth']);\n\n// Portfolio (names owned by address)\nconst { names } = await client.getPortfolio('0x...');\n```\n\n### Social Graph\n\n```javascript\n// Stats\nconst stats = await client.getSocialStats('brantly.eth');\n// { followers, following, mutualCount }\n\n// Lists\nconst { followers } = await client.getFollowers('nick.eth', 50);\nconst { following } = await client.getFollowing('nick.eth', 50);\nconst { mutuals } = await client.getMutuals('vitalik.eth');\n\n// Reputation\nconst { score } = await client.getReputation('austingriffith.eth');\n```\n\n### Wallet Analytics\n\n```javascript\n// ETH balance\nconst balance = await client.getBalance('0x...');\n\n// Token balances\nconst tokens = await client.getTokens('0x...');\n\n// Transactions\nconst txs = await client.getTransactions('0x...');\n\n// NFTs\nconst nfts = await client.getNFTs('0x...');\n```\n\n### Security\n\n```javascript\n// Check token security\nconst tokenSecurity = await client.checkTokenSecurity('0x...');\n\n// Check address security\nconst addressSecurity = await client.checkAddressSecurity('0x...');\n```\n\n### Utilities\n\n```javascript\n// Gas prices\nconst gas = await client.getGas();\n\n// Contract ABI\nconst abi = await client.getABI('0x...');\n\n// Trending ENS\nconst trending = await client.getTrending();\n\n// Token prices\nconst prices = await client.getPrices(['ETH', 'USDC']);\n\n// Supported chains\nconst chains = await client.getChains();\n```\n\n## Pricing\n\n| Category | Price Range |\n|----------|-------------|\n| ENS Resolution | $0.01 |\n| Full Profile | $0.02 |\n| Social Graph | $0.01-0.03 |\n| Wallet Data | $0.01-0.03 |\n| Security Checks | $0.01-0.02 |\n| Demo | $0.001 |\n\nFree tier: 100 requests/day before payments required.\n\n## Requirements\n\n- Node.js >= 18\n- A wallet with USDC on Base for payments\n- `viem` peer dependency\n\n## Links\n\n- **API Docs:** https://api.web3domains.com/docs\n- **Website:** https://atv.eth.limo\n- **npm:** https://npmjs.com/package/@atv-eth/x402-sdk\n- **GitHub:** https://github.com/ATV-eth/x402-api\n\n## License\n\nMIT © ATV (Agent Trust Vector)\n","readmeFilename":"README.md"}