x402z-server 0.0.10 → 0.0.19

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 +44 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -57,13 +57,56 @@ server.listen(8080);
57
57
 
58
58
  - `createX402zServer(config)`
59
59
  - `facilitatorUrl` (required): HTTP facilitator endpoint
60
- - `asset`, `eip712`, `decimals`, `batcherAddress`: scheme config
60
+ - `asset`, `eip712`, `decimals`, `batcherAddress`: scheme config
61
61
  - `signer` (required): signer used to decrypt transfer amounts
62
62
  - `relayer` (required): FHEVM relayer instance used for decryption
63
63
  - `routes`: map of `METHOD /path` to payment requirements
64
64
  - `onPaid`: handler for successful payment (returns response body + optional headers)
65
65
 
66
+ ## Examples
67
+
68
+ See `examples/README.md` for the full-process server + facilitator setup.
69
+
66
70
  ## Notes
67
71
 
68
72
  - Scheme name: `erc7984-mind-v1`
69
73
  - `confidential.batcherAddress` is required in requirements; clients bind encrypted inputs to it.
74
+
75
+ ## API surface
76
+
77
+ Exports:
78
+ - `X402zEvmServerScheme`: server scheme implementation for erc7984-mind-v1.
79
+ - `registerX402zEvmServerScheme`: registers the scheme with x402 server.
80
+ - `createX402zServer`: helper to configure the paywalled server.
81
+ - `x402ResourceServer`: core x402 resource server.
82
+ - `HTTPFacilitatorClient`: HTTP facilitator client wrapper.
83
+ - `x402HTTPResourceServer`: HTTP resource server helpers.
84
+
85
+ Types:
86
+ - `X402zServerSchemeOptions`: scheme config for server registration.
87
+ - `X402zServerNetworkOptions`: network config for the scheme.
88
+ - `X402zServerRegistrationOptions`: registration options for the scheme.
89
+ - `X402zRouteOptions`: route config for paywalled endpoints.
90
+ - `X402zRouteHandler`: handler signature for paid requests.
91
+ - `X402zServerOptions`: options for `createX402zServer`.
92
+ - `CompiledRoute`: compiled route metadata.
93
+ - `DynamicPayTo`: callback for dynamic payee address.
94
+ - `DynamicPrice`: callback for dynamic pricing.
95
+ - `FacilitatorClient`: facilitator interface for settle requests.
96
+ - `FacilitatorConfig`: facilitator config shape.
97
+ - `HTTPAdapter`: adapter for HTTP runtime integration.
98
+ - `HTTPProcessResult`: result type for processing requests.
99
+ - `HTTPRequestContext`: request context for handlers.
100
+ - `HTTPResponseInstructions`: response instructions for handlers.
101
+ - `PaywallConfig`: paywall configuration for routes.
102
+ - `PaywallProvider`: interface for paywall config providers.
103
+ - `PaymentOption`: acceptable payment option shape.
104
+ - `ProcessSettleFailureResponse`: settle failure response shape.
105
+ - `ProcessSettleResultResponse`: settle result response shape.
106
+ - `ProcessSettleSuccessResponse`: settle success response shape.
107
+ - `RouteConfigurationError`: route config validation error.
108
+ - `RouteValidationError`: route validation error type.
109
+ - `RoutesConfig`: routes config map.
110
+ - `UnpaidResponseBody`: unpaid response shape.
111
+ - `UnpaidResponseResult`: unpaid response result.
112
+ - re-exported types from `@x402/core/types`: shared x402 types.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x402z-server",
3
- "version": "0.0.10",
3
+ "version": "0.0.19",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "dependencies": {
11
11
  "@x402/core": "^2.0.0",
12
12
  "viem": "^2.43.3",
13
- "x402z-shared": "0.0.10"
13
+ "x402z-shared": "0.0.19"
14
14
  },
15
15
  "devDependencies": {
16
16
  "jest": "^29.7.0",