This guide helps you migrate your Shielded x402 integration when upgrading between versions.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nhestrompia/shielded-x402/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Shielded x402 follows semantic versioning. Breaking changes are introduced in major and minor versions, with migration paths documented here.Version History
v0.3.0 (2026-02-16) - Privacy Hardening
Major privacy improvements with breaking changes to wallet state and SDK APIs.Breaking Changes
Wallet state schema change
Wallet state schema change
What changed:
wallet-state.jsonschema bumped from version1to version2- Version
1wallet state files are intentionally unsupported
- Existing wallet state files must be recreated/reseeded
- No automatic migration path available
Nullifier secret handling
Nullifier secret handling
What changed:New API:Migration steps:
- SDK payment APIs now require explicit
nullifierSecretparameter - Removed
payerPkHashnaming from context and method signatures FileBackedWalletStatenow persists note-specificnullifierSecretvalues
Change note handling
Change note handling
What changed:
- Relayer settlement now carries
changeNullifierSecret - Change notes are immediately reusable without external secret derivation
FileBackedWalletState. If you have custom wallet state management, ensure you handle changeNullifierSecret from settlement responses.What to Update
Fixed Issues
- Client unit tests now use explicit independent nullifier-secret fixtures instead of reusing
note.pkHash
v0.2.4 (2026-02-16) - Relayer Bridge Fixes
Bug fixes for relayer payout provider integration.Changes
Payout provider bridge improvements
Fixed provider-specific x402 header/network transformations while preserving normalized x402 requirement semantics.
402 JSON body parsing
Added fallback parsing for 402 JSON bodies that omit the
PAYMENT-REQUIRED header in both:- Relayed client flow
- Relayer challenge fetcher
Migration
This is a patch release with no breaking changes. Update dependencies:
v0.2.2 (2026-02-15) - Circuit Build Fix
Fixed stale circuit artifact publishing.Changes
@shielded-x402/clientbuild now always refreshesdist/circuits/spend_change.json- Prevents stale published circuit ABI (32-depth) from drifting against runtime Merkle depth (24)
- Package build cleans
distbefore emit for deterministic artifacts
Migration
No code changes required. Update to latest patch:
v0.2.1 (2026-02-15) - Relayer Bridge Types
Added missing relayer bridge types to published package.Changes
Published types
Added to
@shielded-x402/shared-types:parsePaymentRequiredEnvelopeRELAYER_ROUTES.challengeRelayerChallengeRequest/RelayerChallengeResponse- Binary-safe relay payload fields (
bodyBase64)
Workspace dependency fix
@shielded-x402/client now depends on @shielded-x402/shared-types via workspace:^0.2.1 for correct monorepo linking and publish-time semver resolution.Migration
Update dependencies:
Migrating from Legacy Credit Channel
If you’re using the old/v1/relay/credit/* endpoints, you must migrate to the sequencer/relayer architecture.
Architecture Changes
Old: Direct credit channel
Old: Direct credit channel
Legacy flow:
- Agent → Relayer: Issue credit
- Relayer: Track credit internally
- Agent → Relayer: Spend credit
- Relayer: Execute payment
- No cross-chain credit sharing
- No independent auditability
- Relayer must track all state
New: Sequencer-authorized flow
New: Sequencer-authorized flow
Migration Steps
Deploy sequencer
API Mapping
| Legacy Endpoint | New Flow |
|---|---|
POST /v1/relay/credit/issue | POST /v1/admin/credit (sequencer) |
POST /v1/relay/credit/spend | POST /v1/credit/authorize → POST /v1/relay/pay |
GET /v1/relay/credit/balance | Track client-side via authorization responses |
| N/A | POST /v1/credit/executions (relayer → sequencer) |
| N/A | GET /v1/commitments/latest (audit trail) |
| N/A | GET /v1/commitments/proof (inclusion proof) |
Breaking Changes Summary
v0.3.0
- Wallet state: Schema v2 incompatible with v1, must recreate
- SDK API:
nullifierSecretnow required inprepare402Payment - Environment: Replace
PAYER_PK_HASHwithNULLIFIER_SECRET
v0.2.x → v0.3.0
- No breaking changes in v0.2.x patch releases
- Safe to upgrade within v0.2.x series
Legacy → Current
- Complete architecture change: Credit channel → Sequencer/relayer
- All endpoints changed: See API mapping table above
- No backward compatibility: Must fully migrate
Rollback Guidance
Getting Help
If you encounter issues during migration:Examples
Review working examples for current version
Testing
Validate your migration with the test suite
Architecture
Understand the new architecture
GitHub Issues
Report migration problems
Version Support Policy
- Current version (v0.3.x): Full support, active development
- Previous minor (v0.2.x): Security fixes only
- Legacy credit channel: No support, must migrate
Always test migrations in a development environment before deploying to production.