@reckon402/types
v0.1.0
Published
Canonical x402 v2 wire-format types for Reckon402
Readme
@reckon402/types
Canonical x402 Foundation v2 wire-format TypeScript types for Reckon402.
Zero runtime dependencies. Pure type definitions.
Install
npm install @reckon402/typesIn the monorepo (workspace consumption):
// in any packages/* or workers/* package.json:
{ "@reckon402/types": "workspace:*" }Usage
import type {
PaymentRequirements,
PaymentPayload,
XPaymentRequired,
SettlementResponse,
Facilitator,
FacilitatorVerifyResponse,
FacilitatorSettleResponse,
} from '@reckon402/types'Wire-compat notes
networkfield: CAIP-2 string (eip155:8453,eip155:84532), never integer.x402Version: 2only — workers reject any other value.transaction(nottxHash),payerat top level (notfrom).payToinPaymentRequirements(notrecipient).Facilitatorinterface is the L2↔L3 swap point:CdpFacilitator(L2) andReckon402Facilitator(L3) both implement it.
