@agentpay-sui/x402-sui
v0.1.0
Published
Sui exact-scheme adapter for AgentPay's x402-compatible payment flow.
Readme
@agentpay-sui/x402-sui
Sui exact-scheme adapter for AgentPay's x402-compatible payment flow.
This package lets Sui agents and providers speak the upstream-style x402 envelope while preserving AgentPay's Sui-native PaymentAuth body:
scheme: "exact"externally, withexact-suicompatibility when needed- CAIP-style Sui network registration helpers
- client-side Sui
PaymentAuthcreation and signing - server-side payment requirement helpers
- facilitator adapter methods for AgentPay
/verifyand/settle
import { ExactSuiScheme } from "@agentpay-sui/x402-sui/exact/client";
import { X402_VERSION, encodeXPayment } from "@agentpay-sui/shared";
const scheme = new ExactSuiScheme({
signer,
agentId,
walletId,
});
const payload = await scheme.createPaymentPayload(X402_VERSION, requirement);
const header = encodeXPayment(payload);AgentPay reputation remains an extension carried in PAYMENT-RESPONSE settlement metadata. Plain x402 clients can pay and receive the resource; AgentPay-aware clients can additionally read receipt and reputation fields.
