@x402r/core
v0.0.2
Published
Core types, ABIs, and utilities for the X402r SDK
Readme
@x402r/core
Core types, ABIs, and utilities for the x402r refundable payments protocol.
Install
npm install @x402r/coreUsage
import { getContractAddresses, PaymentState } from "@x402r/core";
// Get contract addresses for Base Sepolia
const addresses = getContractAddresses(84532);
// Use payment state enum
if (state === PaymentState.Authorized) {
// payment is authorized and held in escrow
}Exports
- Types —
PaymentInfo,PaymentState,RefundRequestData, and more - ABIs — Contract ABIs for AuthCaptureEscrow, PaymentOperator, USDC
- Config — Contract addresses and chain configuration
- Errors — Typed error classes for SDK operations
- Factory — Utilities for deploying and configuring operators
- Conditions — Condition builder for escrow terms
- Fees — Fee calculation utilities
Links
License
Apache-2.0
