mppx 0.17.4 → 0.17.6

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 (39) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +15 -0
  3. package/dist/cli/cli.js +141 -137
  4. package/dist/cli/stripe.d.ts +53 -0
  5. package/dist/cli/stripe.js +241 -0
  6. package/dist/client/Mppx.js +1 -0
  7. package/dist/extensions/identity/email-otp/Constants.d.ts +16 -0
  8. package/dist/extensions/identity/email-otp/Constants.js +16 -0
  9. package/dist/extensions/identity/email-otp/Types.d.ts +12 -0
  10. package/dist/extensions/identity/email-otp/Types.js +2 -0
  11. package/dist/extensions/identity/email-otp/client/index.d.ts +116 -0
  12. package/dist/extensions/identity/email-otp/client/index.js +119 -0
  13. package/dist/extensions/identity/email-otp/index.d.ts +17 -0
  14. package/dist/extensions/identity/email-otp/index.js +16 -0
  15. package/dist/extensions/identity/email-otp/internal/Attestation.d.ts +66 -0
  16. package/dist/extensions/identity/email-otp/internal/Attestation.js +128 -0
  17. package/dist/extensions/identity/email-otp/internal/Constants.d.ts +20 -0
  18. package/dist/extensions/identity/email-otp/internal/Constants.js +20 -0
  19. package/dist/extensions/identity/email-otp/internal/Jwks.d.ts +30 -0
  20. package/dist/extensions/identity/email-otp/internal/Jwks.js +114 -0
  21. package/dist/extensions/identity/email-otp/internal/Prover.d.ts +46 -0
  22. package/dist/extensions/identity/email-otp/internal/Prover.js +168 -0
  23. package/dist/extensions/identity/email-otp/internal/Types.d.ts +48 -0
  24. package/dist/extensions/identity/email-otp/internal/Types.js +2 -0
  25. package/dist/extensions/identity/email-otp/internal/Verifier.d.ts +56 -0
  26. package/dist/extensions/identity/email-otp/internal/Verifier.js +116 -0
  27. package/dist/extensions/identity/email-otp/server/index.d.ts +48 -0
  28. package/dist/extensions/identity/email-otp/server/index.js +56 -0
  29. package/dist/extensions/identity/index.d.ts +2 -0
  30. package/dist/extensions/identity/index.js +2 -0
  31. package/dist/identity/Callback.d.ts +47 -0
  32. package/dist/identity/Callback.js +64 -0
  33. package/dist/identity/index.d.ts +1 -0
  34. package/dist/identity/index.js +1 -0
  35. package/dist/internal/version.d.ts +2 -2
  36. package/dist/internal/version.js +1 -1
  37. package/dist/proxy/internal/Headers.js +2 -0
  38. package/dist/tempo/server/internal/html.gen.js +1 -1
  39. package/package.json +5 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # mppx
2
2
 
3
+ ## 0.17.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 9bd6ad6: Fixed the email OTP client helpers so they refuse to send an address or code to a plaintext http issuer other than localhost.
8
+ - 0a01b79: Added `mppx/extensions/identity/email-otp`: `EmailOtp.Server.verifier` requires a verified email address, sent as an issuer-signed attestation in `Identity-Attestation` and bound to the server's origin, and `EmailOtp.Client.prover` obtains one with a one-time code when a server answers 401 with `Identity-Attestation-Required`.
9
+ - 9bd6ad6: Fixed the email OTP verifier so an attestation the route's policy rejects no longer hides an allowed one later in the same request.
10
+ - 3d8fe95: Fixed the email OTP verifier so a forged attestation with a later expiry no longer hides a valid one, and a key rotated in during an issuer outage answers 503 instead of 401.
11
+ - 970ac7b: Added `Identity.from` and `Identity.Rejection` to `mppx/identity`: `Identity.from({ verify })` turns a function, such as a lookup in your own database, session store or KYC provider, into a route identity verifier. It returns the caller's identity, `undefined` for a 401, or throws `Identity.Rejection` to reject the request before any payment.
12
+ - db73851: Fixed `mppx stripe address --env` to recognize multiline dotenv values under any key Node accepts, such as one starting with a digit or holding a space, and in files with CRLF line endings, so a line inside one is no longer taken for the deposit address. It also checks the result with Node's dotenv parser and refuses to write when Node would read the address or any other entry differently.
13
+ - 2067b0c: Fixed `mppx stripe address` to reject a deposit address that isn't valid for its network (Solana addresses must decode to 32 bytes), refuse env values with line breaks, and leave exactly one assignment of the key when writing with `--env`.
14
+
15
+ ## 0.17.5
16
+
17
+ ### Patch Changes
18
+
19
+ - b1d85f0: Added `mppx stripe address`, which creates a Stripe crypto deposit address for machine payments and prints it, or writes it to an env file with `--env`. The Stripe key comes from `--secret-key`, `STRIPE_SECRET_KEY` or the Stripe CLI's login.
20
+
3
21
  ## 0.17.4
4
22
 
5
23
  ### Patch Changes
package/README.md CHANGED
@@ -124,6 +124,21 @@ mppx sessions close --all --yes
124
124
  mppx example.com -M allowCustomEscrow=true
125
125
  ```
126
126
 
127
+ `mppx stripe address` creates a Stripe crypto deposit address for
128
+ `stripe.create({ depositAddresses })` and prints only the address:
129
+
130
+ ```bash
131
+ mppx stripe address # print a new Tempo address
132
+ mppx stripe address --env # write TEMPO_DEPOSIT_ADDRESS to ./.env instead
133
+ mppx stripe address -n base --env .env.local
134
+ mppx stripe address --json # id, livemode, network and supported tokens too
135
+ ```
136
+
137
+ The key comes from `--secret-key`, then `STRIPE_SECRET_KEY`, then the Stripe CLI's login
138
+ (`stripe login`; `--project-name` or `STRIPE_PROJECT_NAME` picks the project, `--live` its live
139
+ key). The Stripe CLI logs in with a restricted key (`rk_...`); if Stripe refuses it for deposit
140
+ addresses, pass a secret key with `--secret-key`.
141
+
127
142
  `--session auto` is the default. Pass `new` to open another channel or a channel ID to select one
128
143
  explicitly.
129
144