Skip to content

feat: add versioning strategy for payment methods and intents#113

Closed
brendanjryan wants to merge 149 commits into
mainfrom
feat/versioning-strategy
Closed

feat: add versioning strategy for payment methods and intents#113
brendanjryan wants to merge 149 commits into
mainfrom
feat/versioning-strategy

Conversation

@brendanjryan

@brendanjryan brendanjryan commented Feb 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a formal versioning strategy for the Payment Auth spec

Three-Layer Versioning

Layer Mechanism Breaking Change
Core Protocol No wire version (stable Payment scheme name) New scheme name (Payment2)
Payment Methods Identifier + optional methodDetails.version New identifier (tempo-v2)
Payment Intents request.version field (default: 1) Increment version

Changes

Types

  • Added version?: number to TempoMethodDetails (method-level)
  • Added version?: number to all intent request types: ChargeRequest, AuthorizeRequest, SubscriptionRequest, StreamRequest
  • Both packages/paymentauth-protocol and packages/protocol

Apps

  • Set version: 1 in all app ChargeRequest constructions (paymentauth-basic, paymentauth-tetris, paymentauth-x402, payments, reth-snapshots)

Documentation

  • Added VERSIONING.md documenting the full strategy with prior art references

Design Rationale

  • Core unversioned: Matches every deployed HTTP auth scheme (Basic, Bearer, Digest). Core is thin enough that breaking changes are unlikely.
  • Methods version by identifier: Fundamentally different payment networks warrant distinct identifiers. IANA registry handles independent evolution.
  • Intents version in request blob: Intent schemas evolve incrementally; a version field inside the opaque request JSON avoids registry churn while enabling schema migration.

See VERSIONING.md for full details and IETF prior art analysis.

Zygimantass and others added 30 commits January 15, 2026 23:40
Adds comprehensive documentation for building Tempo AI payment apps:

AGENTS.md enhancements:
- Tempo blockchain integration (tempo.ts, TIP-20 tokens)
- Fee sponsorship with access keys
- IDXS for on-chain activity queries
- Onramp integration (Coinbase)
- Subscription with cron jobs
- UI development (Tailwind CSS v4, CVA)
- Local development (OrbStack, Tailscale)
- New app creation guide

SKILLS.md additions:
- #9 Tempo Blockchain SDK (tempo.ts)
- #10 IDXS Activity Queries
- #11 Fee Sponsorship
- #12 Onramp Integration
- #13 Passkey Authentication
- #14 Subscription Management
- New app checklist

New files:
- apps/_template/ - Copy-paste starter app
- scripts/create-app.ts - Scaffold new apps with `pnpm create-app`

Based on team discussion for enabling one-shot full-stack app generation.
feat: enhance AGENTS.md and SKILLS.md with full Tempo stack
- Add biome.json for linting/formatting (tabs, single quotes, recommended rules)
- Update package.json:
  - Bump pnpm to 10.28.0
  - Add check and check:biome scripts
  - Add @biomejs/biome devDependency
add basic github actions workflows
Migrated all apps and packages from https://github.com/tempoxyz/ietf-paymentauth-demos

## Packages
- `@tempo/paymentauth-protocol` - Core types and encoding for IETF 402 payment auth
- `@tempo/paymentauth-hono` - Hono middleware for payment gating
- `@tempo/paymentauth-x402-compat` - x402 protocol translation layer

## Demo Apps
- `@tempo/paymentauth-basic` - Basic Tempo payment server
- `@tempo/paymentauth-x402` - x402-compatible payment server
- `@tempo/paymentauth-base` - Base Sepolia payment server (using paymentauth-hono)
- `@tempo/paymentauth-tetris` - Pay-per-move Tetris game with WebAuthn support

All packages and apps follow ai-payments conventions:
- Turbo for build orchestration
- TypeScript strict mode with workers types
- Cloudflare Workers deployment
- Vitest for testing
feat: merge paymentauth demos from ietf-paymentauth-demos
- Copy client with demo.ts, demo.sh, and paymentauth.sh scripts
- Update imports to use @tempo/paymentauth-protocol
- Add verification instructions to AGENTS.md

Amp-Thread-ID: https://ampcode.com/threads/T-019bc4b2-cabc-74ed-b382-9e02fb2e3c9e
Co-authored-by: Amp <amp@ampcode.com>
- Paid reth mainnet snapshot downloads via IETF Payments Auth
- Per-gigabyte pricing using pathUSD token
- Streams snapshots from Cloudflare R2 bucket
- Endpoints: /health, /snapshots (list), /snapshots/:filename (paid download)
- Local protocol module for Payment Auth types and encoding
- Add pnpm workspace configuration with version catalog
- Add biome.json for linting and formatting
- Add base tsconfig.json
- Add @ai-payments/protocol package (IETF Payment Auth types and utilities)
- Add @ai-payments/hono package (Hono middleware for 402 flows)
- Add comprehensive AGENTS.md for AI development guidance
- Add SKILLS.md with pointers to relevant development skills
- Add apps/ directory for Cloudflare Worker apps
feat: Cloudflare Apps Monorepo + Paid Reth Snapshots API
brendanjryan and others added 25 commits January 28, 2026 14:35
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Amp <amp@ampcode.com>
- Deploy verified contract at 0x9d136eEa063eDE5418A6BC7bEafF009bBb6CFa70
- Refactor streaming demo to use @tempo/stream-channels StreamChannelClient
  for on-chain operations (approve, open, getChannel, computeChannelId)
- Move stream intent code from src/lib/ to src/stream/ with cleaner module
  structure (Types, Voucher, Intents, Chain, Receipt, Storage, Method)
- Simplify demo.ts by removing manual encodeFunctionData/ABI calls
- Update escrow contract address in wrangler.jsonc and demo.ts
- Fix explorer URL to https://explore.testnet.tempo.xyz
- Add version field to TempoMethodDetails (method-level versioning)
- Add version field to all intent request types (ChargeRequest,
  AuthorizeRequest, SubscriptionRequest, StreamRequest)
- Set version: 1 in all app ChargeRequest constructions
- Add VERSIONING.md documenting the three-layer versioning strategy:
  core (stable, no wire version), methods (version by identifier),
  intents (version in request schema)
@github-actions

github-actions Bot commented Feb 6, 2026

Copy link
Copy Markdown

Cloudflare Deployments

App Status Preview

No deployments found.

Move versioning content from standalone VERSIONING.md into the
Versioning section of STYLE.md where it belongs alongside the
existing design principles and layered architecture docs.
@brendanjryan brendanjryan changed the base branch from brendanryan-simple-stream to main February 7, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants