mppx 0.9.1 → 0.9.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 (35) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +7 -0
  3. package/dist/cli/cli.d.ts +1 -0
  4. package/dist/cli/cli.js +36 -36
  5. package/dist/cli/internal.js +2 -2
  6. package/dist/cli/plugins/evm.js +2 -0
  7. package/dist/cli/plugins/index.d.ts +1 -0
  8. package/dist/cli/plugins/index.js +3 -3
  9. package/dist/cli/plugins/x402.d.ts +3 -0
  10. package/dist/cli/plugins/x402.js +61 -0
  11. package/dist/middlewares/internal/mppx.js +17 -3
  12. package/dist/stripe/Methods.d.ts +20 -2
  13. package/dist/stripe/client/Charge.d.ts +20 -2
  14. package/dist/stripe/client/Methods.d.ts +20 -2
  15. package/dist/stripe/internal/constants.d.ts +4 -0
  16. package/dist/stripe/internal/constants.js +2 -0
  17. package/dist/stripe/internal/payment-intent.d.ts +10 -1
  18. package/dist/stripe/internal/payment-intent.js +8 -1
  19. package/dist/stripe/internal/types.d.ts +4 -0
  20. package/dist/stripe/server/Charge.d.ts +20 -2
  21. package/dist/stripe/server/Charge.js +27 -11
  22. package/dist/stripe/server/Methods.d.ts +6 -0
  23. package/dist/stripe/server/Methods.js +19 -2
  24. package/dist/stripe/server/internal/hosted-fee-payer.d.ts +10 -0
  25. package/dist/stripe/server/internal/hosted-fee-payer.js +54 -0
  26. package/dist/stripe/server/internal/html.gen.d.ts +1 -1
  27. package/dist/stripe/server/internal/html.gen.js +1 -1
  28. package/dist/stripe/server/internal/record-payment.d.ts +3 -1
  29. package/dist/stripe/server/internal/record-payment.js +33 -5
  30. package/dist/tempo/internal/account.d.ts +1 -0
  31. package/dist/tempo/internal/remote-fee-payer.d.ts +2 -0
  32. package/dist/tempo/server/internal/html.gen.d.ts +1 -1
  33. package/dist/tempo/server/internal/html.gen.js +1 -1
  34. package/dist/viem/Client.js +1 -0
  35. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # mppx
2
2
 
3
+ ## 0.9.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 14e8b25: Added CLI support for selecting and paying x402 payment challenges.
8
+ - 5cbc5e4: Added request-scoped PaymentIntent customer, receipt email, and Tax calculation options, with fallback recording without rejected optional fields for completed crypto payments.
9
+ - b12e65b: Fixed framework adapters to preserve multi-method intent challenges.
10
+ - f13f800: Added a machine-payment metadata field to every Stripe PaymentIntent created by mppx.
11
+ - 9dd9969: Added opt-in Stripe-hosted Tempo fee sponsorship to `stripe.create()` using the configured Stripe client.
12
+
3
13
  ## 0.9.1
4
14
 
5
15
  ### Patch Changes
package/README.md CHANGED
@@ -109,6 +109,9 @@ mppx account create
109
109
  # make request - automatic payment handling, curl-like api
110
110
  mppx example.com
111
111
 
112
+ # pay an x402 offer on a server that advertises both protocols
113
+ mppx example.com --protocol x402
114
+
112
115
  # open another session instead of reusing the preferred channel
113
116
  mppx example.com --session new
114
117
 
@@ -131,6 +134,10 @@ its configured custom escrow in the payment challenge, but the client rejects it
131
134
  that do not support custom escrows should leave it unset. See the
132
135
  [session escrow trust documentation](./src/tempo/session/README.md#escrow-configuration-and-trust).
133
136
 
137
+ `--protocol auto` is the default: MPP is preferred when available, and x402 is used otherwise.
138
+ Pass `mpp` or `x402` to require one protocol. x402 payments use the same EVM account as EVM
139
+ charges, so `MPPX_PRIVATE_KEY` or a stored account works for both.
140
+
134
141
  You can also install globally to use the `mppx` CLI from anywhere:
135
142
 
136
143
  ```bash
package/dist/cli/cli.d.ts CHANGED
@@ -21,6 +21,7 @@ declare const cli: Cli.Cli<{
21
21
  methodOpt?: string[] | undefined;
22
22
  network?: "mainnet" | "testnet" | undefined;
23
23
  payWith?: string | undefined;
24
+ protocol: "auto" | "mpp" | "x402";
24
25
  rpcUrl?: string | undefined;
25
26
  session: string;
26
27
  silent: boolean;