x402z-client-web 0.0.18 → 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.
- package/README.md +21 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -55,8 +55,29 @@ console.log(response.status);
|
|
|
55
55
|
- `fetch` (optional): custom fetch implementation
|
|
56
56
|
- `client.pay(url, options?)`: performs the 402 handshake and retries with payment headers
|
|
57
57
|
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
60
|
+
See `examples/README.md` for the full-process web examples (`examples/full-process/web-vite` and `examples/full-process/web-next`).
|
|
61
|
+
|
|
58
62
|
## Notes
|
|
59
63
|
|
|
60
64
|
- Web builds use `@zama-fhe/relayer-sdk/web` (no CDN script tag or bundle).
|
|
61
65
|
- Requires an injected wallet that supports `eth_signTypedData_v4` (e.g. MetaMask).
|
|
62
66
|
- Scheme name: `erc7984-mind-v1`
|
|
67
|
+
|
|
68
|
+
## API surface
|
|
69
|
+
|
|
70
|
+
Exports:
|
|
71
|
+
- `createX402zClient`: convenience client wrapper for browser pay flows.
|
|
72
|
+
- `X402zEvmClientScheme`: client scheme implementation for erc7984-mind-v1.
|
|
73
|
+
- `registerX402zEvmClientScheme`: registers the scheme with x402 client.
|
|
74
|
+
|
|
75
|
+
Types:
|
|
76
|
+
- `X402zClient`: client instance type.
|
|
77
|
+
- `X402zClientOptions`: options for `createX402zClient`.
|
|
78
|
+
- `PayOptions`: per-request payment options.
|
|
79
|
+
- `X402zClientSchemeOptions`: scheme config for client registration.
|
|
80
|
+
- `X402zClientRegistrationOptions`: registration options for the scheme.
|
|
81
|
+
- `ConfidentialRequirementsExtra`: scheme requirements extension payload.
|
|
82
|
+
- `RelayerInstance`: relayer instance type.
|
|
83
|
+
- re-exported types from `@x402/core/types`: shared x402 types.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x402z-client-web",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@x402/core": "^2.0.0",
|
|
19
19
|
"@x402/evm": "^2.0.0",
|
|
20
20
|
"viem": "^2.39.3",
|
|
21
|
-
"x402z-shared-web": "0.0.
|
|
21
|
+
"x402z-shared-web": "0.0.19"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"jest": "^29.7.0",
|