@dexterai/x402 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -30,15 +30,17 @@ This SDK handles the entire flow automatically—you just call `fetch()` and pay
30
30
 
31
31
  ## Why This SDK?
32
32
 
33
- **Phantom wallet support on Solana mainnet.** The Dexter facilitator is the only x402 facilitator that handles Phantom's Lighthouse safety assertions. Other facilitators fail silently or reject Phantom transactions on mainnet. This SDK uses the Dexter facilitator by default.
33
+ **Monetize any API in minutes.** Add payments to your server in ~10 lines. Clients pay automatically—no checkout pages, no subscriptions, no invoices. Just HTTP.
34
34
 
35
- **Multi-chain.** Solana and Base with the same API. Add wallets for both chains and the SDK picks the right one based on what the server accepts.
35
+ **Dynamic pricing.** Charge based on usage: characters, tokens, records, pixels, API calls—whatever makes sense. Price scales with input, not fixed rates.
36
36
 
37
- **Built-in RPC.** Uses Dexter's RPC proxy by default—no need to configure Helius, QuickNode, or other providers. Just pass your wallet and go.
37
+ **Token-accurate LLM pricing.** Built-in [tiktoken](https://github.com/openai/tiktoken) support prices AI requests by actual token count. Works with OpenAI models out of the box, or bring your own rates for Anthropic, Gemini, Mistral, or local models.
38
38
 
39
- **Pre-flight balance check.** Shows "Insufficient USDC balance" *before* the wallet popup, not after a failed transaction.
39
+ **Full-stack.** Client SDK for browsers, server SDK for backends. React hooks, Express middleware patterns, facilitator client—everything you need.
40
40
 
41
- **React hook included.** `useX402Payment` with loading states, balances, and transaction tracking.
41
+ **Multi-chain.** Solana and Base (Ethereum L2) with the same API. Add wallets for both and the SDK picks the right one automatically.
42
+
43
+ **Works out of the box.** Built-in RPC proxy, pre-flight balance checks, automatic retry on 402. Uses the [Dexter facilitator](https://x402.dexter.cash) by default—the only x402 facilitator with full Phantom wallet support on Solana mainnet.
42
44
 
43
45
  ---
44
46
 
@@ -181,7 +183,7 @@ app.post('/protected', async (req, res) => {
181
183
  });
182
184
  ```
183
185
 
184
- > **Note:** The server SDK has not been battle-tested in production yet. The client SDK and React hook have been verified with real payments at [dexter.cash/sdk](https://dexter.cash/sdk).
186
+ *Client SDK, React hook, and pricing utilities are production-verified at [dexter.cash/sdk](https://dexter.cash/sdk). `createX402Server` is a convenience wrapper not yet used in production.*
185
187
 
186
188
  ---
187
189
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexterai/x402",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Chain-agnostic x402 v2 SDK for Solana, Base, and EVM payments",
5
5
  "author": "Dexter",
6
6
  "license": "MIT",