s402 0.5.0 → 0.6.0
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.
- package/CHANGELOG.md +32 -0
- package/README.md +10 -0
- package/dist/compat-mpp.d.mts +160 -0
- package/dist/compat-mpp.mjs +363 -0
- package/dist/errors.d.mts +3 -1
- package/dist/errors.mjs +12 -2
- package/dist/http.d.mts +24 -7
- package/dist/http.mjs +30 -8
- package/dist/index.d.mts +301 -6
- package/dist/index.mjs +595 -86
- package/dist/test-utils.d.mts +1 -1
- package/dist/types.d.mts +2 -1
- package/dist/types.mjs +2 -1
- package/package.json +8 -1
- /package/dist/{scheme-m-uk4zyH.d.mts → scheme-CKinOhyx.d.mts} +0 -0
package/dist/test-utils.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s402PaymentPayload, s402PaymentRequirements, s402SettleResponse, s402VerifyResponse } from "./types.mjs";
|
|
2
|
-
import { a as s402ServerScheme, r as s402FacilitatorScheme, t as s402ClientScheme } from "./scheme-
|
|
2
|
+
import { a as s402ServerScheme, r as s402FacilitatorScheme, t as s402ClientScheme } from "./scheme-CKinOhyx.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/test-utils.d.ts
|
|
5
5
|
/**
|
package/dist/types.d.mts
CHANGED
|
@@ -446,7 +446,8 @@ declare const S402_HEADERS: {
|
|
|
446
446
|
/** Server → client: payment requirements (base64 JSON in 402 response) */readonly PAYMENT_REQUIRED: "payment-required"; /** Client → server: payment payload (base64 JSON) */
|
|
447
447
|
readonly PAYMENT: "x-payment"; /** Server → client: settlement result (base64 JSON) */
|
|
448
448
|
readonly PAYMENT_RESPONSE: "payment-response"; /** Client → server: active stream ID (phase 2 of stream protocol) */
|
|
449
|
-
readonly STREAM_ID: "x-stream-id";
|
|
449
|
+
readonly STREAM_ID: "x-stream-id"; /** Client → server: scheme preference negotiation (RFC 7231-style q-values) */
|
|
450
|
+
readonly ACCEPT_PAYMENT: "accept-payment";
|
|
450
451
|
};
|
|
451
452
|
//#endregion
|
|
452
453
|
export { S402_HEADERS, S402_VERSION, s402Discovery, s402EscrowExtra, s402EscrowPayload, s402ExactPayload, s402Mandate, s402MandateRequirements, s402PaymentPayload, s402PaymentPayloadBase, s402PaymentRequirements, s402PaymentSession, s402PrepaidExtra, s402PrepaidPayload, s402RegistryQuery, s402Scheme, s402ServiceEntry, s402SettleResponse, s402SettlementMode, s402SettlementOverrides, s402StreamExtra, s402StreamPayload, s402UnlockExtra, s402UnlockPayload, s402UptoExtra, s402UptoPayload, s402VerifyResponse };
|
package/dist/types.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "s402",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "s402 — Chain-agnostic HTTP 402 wire format. Types, HTTP encoding, and scheme registry for six payment schemes. Wire-compatible with x402. Zero runtime dependencies.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -75,6 +75,13 @@
|
|
|
75
75
|
},
|
|
76
76
|
"default": "./dist/compat.mjs"
|
|
77
77
|
},
|
|
78
|
+
"./compat-mpp": {
|
|
79
|
+
"import": {
|
|
80
|
+
"types": "./dist/compat-mpp.d.mts",
|
|
81
|
+
"default": "./dist/compat-mpp.mjs"
|
|
82
|
+
},
|
|
83
|
+
"default": "./dist/compat-mpp.mjs"
|
|
84
|
+
},
|
|
78
85
|
"./errors": {
|
|
79
86
|
"import": {
|
|
80
87
|
"types": "./dist/errors.d.mts",
|
|
File without changes
|