尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证x402 menu normalization, comparison, and preference ranking for caller-authorized snapshots.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Cannastack is a source-neutral API contract for processing caller-supplied menu snapshots. It normalizes menu structure, compares declared prices, and ranks items against exact caller-declared preferences.
Cannastack does not provide, crawl, fetch, verify, store, or redistribute third-party inventory. Processing is transient and does not write submitted menu data to application storage. Rights are caller-attested and unverified.
Results make no inventory, orderability, live availability, medical, or quality claims.
Payment verification uses an external facilitator, and settlement is a public transaction on Base. Payment authorization and settlement metadata therefore leave the menu-processing boundary. Published endpoint status describes the contract, not current network availability; readiness is evaluated on each request.
Each successfully paid request costs $0.02 USDC through x402 exact settlement on Base (eip155:8453).
| Operation | Route | Purpose |
|---|---|---|
| Normalize | POST /api/v1/menu/normalize | Canonicalize a caller-supplied menu snapshot. |
| Compare | POST /api/v1/menu/compare | Compare exact prices within caller-supplied menus. |
| Recommend | POST /api/v1/menu/recommend | Rank caller-supplied items by exact declared preferences. |
src/lib/endpoints.ts is the source of truth for endpoint prices, payment metadata, limits, and complete request and response JSON Schemas.
Every request must include a data_authorization object matching the published schema. The caller must:
cannastack.data-rights.v1.owner, license, or other_authorization.submitter_has_rights is true.contains_personal_data is false.Cannastack does not verify these claims. A missing or invalid attestation returns an uncharged HTTP 403 before payment handling.
Prepare a caller-authorized, operation-specific file named authorized-menu-request.json. Its contents must satisfy the selected request schema. Cannastack does not publish sample inventory.
curl --include --request POST 'https://cannastack.0x402.sh/api/v1/menu/normalize' \
--header 'content-type: application/json' \
--data-binary @authorized-menu-request.json
A schema-valid unpaid request returns HTTP 402. The PAYMENT-REQUIRED header contains the base64-encoded x402 v2 challenge, and the JSON body contains the same challenge decoded. An x402 v2 capable client can authorize payment and retry the same URL and body. Success returns HTTP 200 with PAYMENT-RESPONSE.
Malformed, unauthorized, oversized, unsupported, and schema-invalid requests return uncharged HTTP 400, 403, 413, 415, or 422. Payment service and configuration failures return HTTP 502 or 503 without a processing result.
HTTP 502 with error.code set to payment_settlement_indeterminate means the original settlement could not be confirmed. Inspect PAYMENT-RESPONSE and the public onchain state. Do not create or submit a new payment authorization until the original is confirmed unsettled.
/openapi.json publishes OpenAPI 3.1 paths, request and response schemas, validation responses, and x402 challenge compatibility./.well-known/x402.json publishes a Cannastack service catalog with x402 metadata, schemas, and processing semantics. It is not an official x402 protocol manifest; the runtime HTTP 402 response is the payment challenge source./llms.txt documents file-based use, rights attestation, payment flow, and legacy behavior./docs provides the human-readable API reference./status reports the published processor contract and disabled retrieval boundary without asserting network uptime.GET / with Accept: application/json returns the compact service catalog, versions, links, and source-neutral boundaries.The former retrieval APIs remain retired. /api/strain-finder, /api/price-compare, /api/deal-scout, and /api/price-history return HTTP 410 Gone without an x402 payment challenge. Their human-readable pages link to the published bring-your-own-menu documentation.
npm install
npm run dev
Verification commands:
npm test
npm run lint
npm run typecheck
npm run build
npm run test:e2e
git diff --check