{"_id":"@chain-lens/create-seller","_rev":"6-f761a0f428155c231f583b03a0ae2b5c","name":"@chain-lens/create-seller","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@chain-lens/create-seller","version":"0.0.1","keywords":["chain-lens","cli","seller","web3","base","agents"],"license":"MIT","_id":"@chain-lens/create-seller@0.0.1","maintainers":[{"name":"camping123","email":"zedd1324@gmail.com"}],"homepage":"https://github.com/Chain-Lens/ChainLens#readme","bugs":{"url":"https://github.com/Chain-Lens/ChainLens/issues"},"bin":{"chain-lens-seller":"dist/index.js","create-chain-lens-seller":"dist/index.js"},"dist":{"shasum":"4c6ff6bb79fdcb3c03a15258d8eff34ee52da9f0","tarball":"https://registry.npmjs.org/@chain-lens/create-seller/-/create-seller-0.0.1.tgz","fileCount":24,"integrity":"sha512-z/7hfj25xIiZsggI77lf5rz6bgZ61CTJFIhLPBJYyyUOMQva6c7eFH6sHKTQUyQl/XEMVVO7fRUZ9FrqAaXIlA==","signatures":[{"sig":"MEUCIQCYOXpjh95KFc4rJLXERMaOuXrdxm8vQVoJ3D644L0HsgIgFwTq6HIMzJxZcVa63nrtJC2ZVlFcj/WKyJlQne8Jkzk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53711},"main":"dist/index.js","type":"module","_from":"file:chain-lens-create-seller-0.0.1.tgz","scripts":{"dev":"tsx src/index.ts","test":"tsx --test 'src/**/*.test.ts'","build":"tsc && node scripts/copy-templates.mjs","clean":"rm -rf dist"},"_npmUser":{"name":"camping123","email":"zedd1324@gmail.com"},"_resolved":"/tmp/993d4f01bef8777283d256af679a10d5/chain-lens-create-seller-0.0.1.tgz","_integrity":"sha512-z/7hfj25xIiZsggI77lf5rz6bgZ61CTJFIhLPBJYyyUOMQva6c7eFH6sHKTQUyQl/XEMVVO7fRUZ9FrqAaXIlA==","deprecated":"Superseded by 0.0.2 for version parity","repository":{"url":"git+https://github.com/Chain-Lens/ChainLens.git","type":"git","directory":"packages/create-seller"},"_npmVersion":"11.11.0","description":"Scaffold, deploy, and register a ChainLens seller (data wrapper) from a single CLI.","directories":{},"_nodeVersion":"24.14.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/create-seller_0.0.1_1776620318040_0.630446600326426","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@chain-lens/create-seller","version":"0.0.2","keywords":["chain-lens","cli","seller","web3","base","agents"],"license":"MIT","_id":"@chain-lens/create-seller@0.0.2","maintainers":[{"name":"camping123","email":"zedd1324@gmail.com"}],"homepage":"https://github.com/Chain-Lens/ChainLens#readme","bugs":{"url":"https://github.com/Chain-Lens/ChainLens/issues"},"bin":{"chain-lens-seller":"dist/index.js","create-chain-lens-seller":"dist/index.js"},"dist":{"shasum":"f6daf12b4d456254d1e1fc059156288b215802be","tarball":"https://registry.npmjs.org/@chain-lens/create-seller/-/create-seller-0.0.2.tgz","fileCount":24,"integrity":"sha512-YpQsD/sMO9dZ/VSfsKym/dx8ZhqlEUZFfCIRET7fSQI3/gEi3wmto+Wi7NPdXNxR9K7kUiW9AwsYeoZnmJp44w==","signatures":[{"sig":"MEYCIQCrQBwooUK8J/FrZapOwg+M8HEMspYTlehahjQEB1rbQQIhALUc+gkBV+zTe2DVWP+e7O2GjfuHxNPlOplglueP6owI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53711},"main":"dist/index.js","type":"module","_from":"file:chain-lens-create-seller-0.0.2.tgz","scripts":{"dev":"tsx src/index.ts","test":"tsx --test 'src/**/*.test.ts'","build":"tsc && node scripts/copy-templates.mjs","clean":"rm -rf dist"},"_npmUser":{"name":"camping123","email":"zedd1324@gmail.com"},"_resolved":"/tmp/7bef9ab40df33b14ad32490f81e4af01/chain-lens-create-seller-0.0.2.tgz","_integrity":"sha512-YpQsD/sMO9dZ/VSfsKym/dx8ZhqlEUZFfCIRET7fSQI3/gEi3wmto+Wi7NPdXNxR9K7kUiW9AwsYeoZnmJp44w==","repository":{"url":"git+https://github.com/Chain-Lens/ChainLens.git","type":"git","directory":"packages/create-seller"},"_npmVersion":"11.11.0","description":"Scaffold, deploy, and register a ChainLens seller (data wrapper) from a single CLI.","directories":{},"_nodeVersion":"24.14.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/create-seller_0.0.2_1776620589549_0.9303139980658319","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Use 0.0.3 — fixes TS6059 template build, domain typo, adds env fallbacks + Vercel protection docs"},"0.0.3":{"name":"@chain-lens/create-seller","version":"0.0.3","keywords":["chain-lens","cli","seller","web3","base","agents"],"license":"MIT","_id":"@chain-lens/create-seller@0.0.3","maintainers":[{"name":"pelican_hojae","email":"ghwo336@gmail.com"},{"name":"camping123","email":"zedd1324@gmail.com"}],"homepage":"https://github.com/Chain-Lens/ChainLens#readme","bugs":{"url":"https://github.com/Chain-Lens/ChainLens/issues"},"bin":{"chain-lens-seller":"dist/index.js","create-chain-lens-seller":"dist/index.js"},"dist":{"shasum":"815f12302d1346b4022211cf41d3e6b596e41468","tarball":"https://registry.npmjs.org/@chain-lens/create-seller/-/create-seller-0.0.3.tgz","fileCount":24,"integrity":"sha512-+qZqb2MtYBdfdqcUc1PbPxYWWkJRm9ycvbZ/VVH8na6OKqXf2M8LEmtLgZWH5s6e1iP1VncDsH1h8tocBoLvhA==","signatures":[{"sig":"MEUCIQDB1Aobk5j70UM7e3w/3tpQgyZEm+7A9tQPQ1FCgCNc9QIgT6NiKwXxzdy9p5zD4IB71i+7qrqudneRgKyg5q+ullg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69244},"main":"dist/index.js","type":"module","gitHead":"d01e4d75b5bd80d6f5006a2a6ce70721a46ca733","scripts":{"dev":"tsx src/index.ts","test":"tsx --test 'src/**/*.test.ts'","build":"tsc && node scripts/copy-templates.mjs","clean":"rm -rf dist","prepublishOnly":"pnpm build"},"_npmUser":{"name":"camping123","email":"zedd1324@gmail.com"},"repository":{"url":"git+https://github.com/Chain-Lens/ChainLens.git","type":"git","directory":"packages/create-seller"},"_npmVersion":"11.11.0","description":"Scaffold, deploy, and register a ChainLens seller (data wrapper) from a single CLI.","directories":{},"_nodeVersion":"24.14.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/create-seller_0.0.3_1776628700443_0.6941941369244926","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-04-19T17:38:37.944Z","modified":"2026-04-19T19:59:11.566Z","0.0.1":"2026-04-19T17:38:38.181Z","0.0.2":"2026-04-19T17:43:09.695Z","0.0.3":"2026-04-19T19:58:20.567Z"},"bugs":{"url":"https://github.com/Chain-Lens/ChainLens/issues"},"license":"MIT","homepage":"https://github.com/Chain-Lens/ChainLens#readme","keywords":["chain-lens","cli","seller","web3","base","agents"],"repository":{"url":"git+https://github.com/Chain-Lens/ChainLens.git","type":"git","directory":"packages/create-seller"},"description":"Scaffold, deploy, and register a ChainLens seller (data wrapper) from a single CLI.","maintainers":[{"name":"camping123","email":"zedd1324@gmail.com"},{"name":"pelican_hojae","email":"ghwo336@gmail.com"}],"readme":"# @chain-lens/create-seller\n\nCLI for scaffolding, deploying, and registering a\n[ChainLens](https://github.com/Chain-Lens/ChainLens) seller — a data wrapper\nthat agents pay in USDC to call.\n\n## Before you start\n\n> ⚠ **Run these commands in a plain directory, NOT inside a pnpm/yarn/npm\n> workspace.** Workspace managers will detect the parent root and skip\n> installing the scaffolded project's own `node_modules`, which breaks\n> `pnpm dev`. A good home is `~/my-seller` or `~/Code/chain-lens-sellers/...`.\n\nYou will also need a Vercel account\n([vercel.com/signup](https://vercel.com/signup)) — the `deploy` step uses\nyour local `vercel` CLI, which is **not bundled** with this package (see\n[Why isn't vercel bundled?](#why-isnt-vercel-bundled)).\n\n## Quickstart\n\n```bash\n# 0. One-time setup — install both CLIs and log into Vercel.\nnpm i -g @chain-lens/create-seller vercel\nvercel login                                        # opens browser, pick your email\n\n# 1. Scaffold (run from ~/ or similar, NOT inside a monorepo).\nchain-lens-seller init my-seller --task-type defillama_tvl\ncd my-seller\npnpm install                                        # or npm install / yarn\n\n# 2. Implement your task handler in src/handler.ts.\n#    The stub returns placeholder data — registering without editing it\n#    means buyers will get garbage and the gateway will refund them.\npnpm dev                                            # local smoke test at :3000/health\n\n# 3. Deploy to Vercel. `chain-lens-seller deploy` will check that\n#    vercel is installed and logged in, then run `vercel --prod --yes`.\nchain-lens-seller deploy\n\n# 3a. IMPORTANT: disable Vercel deployment protection for this project.\n#     New Vercel projects default to \"Vercel Authentication\" = enabled,\n#     which puts every deployment behind a 401 auth-wall. That breaks the\n#     gateway's /health probe AND every buyer call, so the seller cannot\n#     function at all. See \"Disable Vercel deployment protection\" below\n#     for a one-time click-through in the Vercel dashboard.\n\n# 4. Register with the ChainLens gateway.\n#    --wallet is your PUBLIC payout address (0x...), NEVER a private key.\n#    --gateway defaults to https://chainlens.pelicanlab.dev/api — override with\n#    --gateway <url> or $CHAIN_LENS_API_URL for self-hosted backends.\nchain-lens-seller register \\\n  --task-type defillama_tvl \\\n  --price 0.05 \\\n  --wallet 0xYourPayoutAddress\n\n# 5. Monitor jobs + health.\nchain-lens-seller status --wallet 0xYourPayoutAddress\n```\n\n> Tip: if you'll run `register` / `status` a lot, set\n> `export CHAIN_LENS_PAYOUT_ADDRESS=0x...` in your shell once and drop the\n> `--wallet` flag. The CLI also reads `$CHAIN_LENS_API_URL` for custom\n> gateways.\n\n> One-shot alternative without global install:\n> `npx -p @chain-lens/create-seller chain-lens-seller <cmd>`\n> Note that `npx chain-lens-seller ...` alone 404s — `chain-lens-seller` is\n> a bin name, not a package name on the registry.\n\n## Commands\n\n| Command | Purpose |\n| --- | --- |\n| `init <name>` | Copy a minimal Express seller template into `./<name>/` with `task_type`, `port`, and handler stub pre-filled. |\n| `deploy` | Check `vercel --version` + `vercel whoami`, then run `vercel --prod --yes`. Saves the production URL to `.chain-lens-deploy.json`. |\n| `register` | POST to `<gateway>/apis/register` with the deployed URL, task type, and price-per-call. `--wallet` is the public payout address (falls back to `$CHAIN_LENS_PAYOUT_ADDRESS`). `--gateway` defaults to the public MVP, or `$CHAIN_LENS_API_URL`. |\n| `status` | GET `<gateway>/reputation/<seller>` + `<deployed-url>/health` for jobsCompleted/jobsFailed + uptime. Same wallet/gateway resolution as `register`. |\n\n## Disable Vercel deployment protection\n\nEvery new Vercel project ships with **Vercel Authentication** enabled by\ndefault. This makes every deployment (preview and production) return\n`HTTP 401` unless the caller is a logged-in Vercel team member — which\nmeans:\n\n- The ChainLens gateway's automated `/health` probe fails, so your seller\n  never leaves `PENDING`.\n- Every paid buyer call gets `401` and is auto-refunded.\n\nOne-time fix (per project):\n\n1. Open the project in the Vercel dashboard → **Settings** →\n   **Deployment Protection**\n   (`https://vercel.com/<team>/<project>/settings/deployment-protection`).\n2. Find **Vercel Authentication** and toggle it to **Disabled**.\n3. Save.\n\nVerify with:\n\n```bash\ncurl -i \"$(jq -r .url .chain-lens-deploy.json)/health\"\n# HTTP/2 200 + {\"status\":\"ok\",\"seller\":\"...\",\"capabilities\":[\"...\"]}\n```\n\nIf your team policy forbids disabling protection on public endpoints,\nyou'll need a \"Protection Bypass for Automation\" token — ChainLens does\nnot currently support that path, so the only workable option today is\n**Disabled**.\n\n## Troubleshooting\n\n| Symptom | Cause | Fix |\n| --- | --- | --- |\n| `pnpm dev` → `tsx: not found` | Scaffolded inside a pnpm/yarn/npm workspace — parent workspace hijacked install and skipped this project's `node_modules`. | Move the project outside the workspace (`mv my-seller ~/my-seller`), `rm -rf node_modules`, `pnpm install`. |\n| `npx chain-lens-seller <cmd>` → **E404 Not Found** | `chain-lens-seller` is a bin name, not a package on npm. | `npm i -g @chain-lens/create-seller` then `chain-lens-seller <cmd>`, or `npx -p @chain-lens/create-seller chain-lens-seller <cmd>`. |\n| `chain-lens-seller deploy` → `vercel CLI not found` | Vercel CLI not installed globally. | `npm i -g vercel`. |\n| `chain-lens-seller deploy` → `vercel is not logged in` | Never ran `vercel login`, or token expired. | Run `vercel login` in this shell, then retry. |\n| `/health` returns `HTTP 401` after deploy | Vercel Authentication (deployment protection) enabled on the project — default for new Vercel projects. | Disable it: see [Disable Vercel deployment protection](#disable-vercel-deployment-protection) above. |\n| Seller stays `PENDING` forever on the gateway | Automated probe can't reach `/health` (usually Vercel auth-wall) or handler returns invalid JSON. | First check `/health` is publicly 200. Then verify your `src/handler.ts` output matches the task type schema. |\n| Vercel build: `TS6059: File '...api/index.ts' is not under 'rootDir' 'src'` | Known bug in `create-seller` ≤ 0.0.2 templates. | In the scaffolded project, open `tsconfig.json` and delete the `\"rootDir\": \"src\"` line. Then change the `start` script in `package.json` to `\"node dist/src/index.js\"`. Fixed in 0.0.3. |\n| `register` → `400 invalid_address` | `--wallet` is malformed or missing `0x`. | Paste a valid 0x-prefixed 20-byte address. |\n| `register` → `400 invalid task_type` | Typoed task type. | Use one of `blockscout_contract_source`, `blockscout_tx_info`, `defillama_tvl`, `sourcify_verify`, `chainlink_price_feed`. |\n| `status` → `seller_not_registered` (404) | Admin hasn't approved yet, or wrong wallet. | Wait and retry; double-check the wallet matches what you passed to `register`. |\n\n## Intended for agent orchestration\n\nThis CLI is designed so an IDE agent (Claude Code, Cursor, Aider, etc.)\ncan drive the full onboarding with a single prompt. See\n[SKILL.md](SKILL.md) for the agent-facing skill contract.\n\n## Why isn't vercel bundled?\n\nTempting to make `npm i -g @chain-lens/create-seller` also drag in Vercel so\n`deploy` works out-of-the-box, but:\n\n- `vercel` is ~150 MB of transitive deps — doubles install time and disk\n  usage for every user, even those who already have it globally.\n- Bundling pins a single `vercel` version. When Vercel rev-bumps their CLI\n  (breaking flags / auth tokens), you'd need a create-seller release to\n  pick it up. Keeping it as a sibling install lets users upgrade on their\n  own cadence.\n- `vercel login` opens a browser and mints a long-lived token. Doing that\n  during a package install (via `postinstall`) is a security smell — users\n  can't audit what's opening the browser, and scripts can't prove they\n  aren't phishing. It should stay an explicit, user-initiated step.\n\nThe CLI checks `vercel --version` and `vercel whoami` before every\n`deploy` and prints a clear install/login hint if either is missing.\n\n## Prerequisites\n\n- Node.js 20+ and pnpm/npm.\n- A Vercel account — [vercel.com/signup](https://vercel.com/signup).\n- The `vercel` CLI installed and logged in (`npm i -g vercel && vercel login`).\n- The payout wallet address you want to receive USDC on (Base Sepolia for\n  the public MVP, Base Mainnet when addresses go live).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}