Skip to Content
px402Devnet
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.

AreaExamples
x402PRIVATE_TRANSFER_SCHEME, SOLANA_DEVNET, PaymentRequiredSchema, PaymentSignatureSchema, PaymentResponseSchema
ClaimsCLAIM_DOMAIN, claimMessageText
ErrorsERROR_CATALOG, ErrorCode, ErrorBodySchema, PAID_REJECTION_CODES, SdkErrorCode
Platformorg, domain, provider and route schemas, routeContractSchema, ROUTE_PRICE_BOUNDS
Owner viewsEarningsResponseSchema, TransactionsResponseSchema, TimelineResponseSchema
TurnkeygenerateTurnkeyApiKey, stampTurnkeyRequest, turnkeyCall (WebCrypto, no Turnkey SDK)
EncodingencodeBase58, decodeBase58

On the wire, amounts are base-unit decimal strings. In process they are bigint, so parse with the schemas.