SDK
Types package
@px402-tech/types: the schemas of the public API.
npm install @px402-tech/types Use @px402-tech/types alone when you only talk to the HTTP API. These are the same schemas the server validates against.
| Area | Examples |
|---|---|
| x402 | PRIVATE_TRANSFER_SCHEME, SOLANA_DEVNET, PaymentRequiredSchema, PaymentSignatureSchema, PaymentResponseSchema |
| Claims | CLAIM_DOMAIN, claimMessageText |
| Errors | ERROR_CATALOG, ErrorCode, ErrorBodySchema, PAID_REJECTION_CODES, SdkErrorCode |
| Platform | org, domain, provider and route schemas, routeContractSchema, ROUTE_PRICE_BOUNDS |
| Owner views | EarningsResponseSchema, TransactionsResponseSchema, TimelineResponseSchema |
| Turnkey | generateTurnkeyApiKey, stampTurnkeyRequest, turnkeyCall (WebCrypto, no Turnkey SDK) |
| Encoding | encodeBase58, decodeBase58 |
On the wire, amounts are base-unit decimal strings. In process they are bigint, so parse with the schemas.