@daski/x402-scheme 0.5.10 → 0.5.11

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 +7 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -15,6 +15,7 @@ import { ExactEvmScheme } from "@x402/evm/exact/client";
15
15
  import { registerDaskiExactEvmScheme } from "@daski/x402-scheme";
16
16
 
17
17
  const client = new x402Client();
18
+ client.setSpendControls({ maxAmountPerPayment: "$25" }); // the default is $1
18
19
  registerDaskiExactEvmScheme(client, {
19
20
  network: "eip155:84532",
20
21
  signer, // your SignerAdapter
@@ -36,6 +37,12 @@ The scheme name stays `"exact"`, because that is the only name the facilitator
36
37
  knows — inventing a second one would make the payments unverifiable.
37
38
  `findDefaultAsset` and `schemeHooks` are forwarded, so registering the
38
39
  composite does not quietly disable the host's spend controls.
40
+ Those controls apply to Daski purchases too. From `@x402/core` 2.23,
41
+ `x402Client` refuses anything above $1 by default. Mailboxes cost $9.99 and
42
+ other services are quoted per order, so choose your own limit. Keep a limit
43
+ rather than passing `false`: this package puts no other cap on challenges the
44
+ wrapped stock handler signs. Before 2.23 the client has no spend controls, so
45
+ leave the `setSpendControls` line out and add your own cap.
39
46
 
40
47
  ## The policy validator
41
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daski/x402-scheme",
3
- "version": "0.5.10",
3
+ "version": "0.5.11",
4
4
  "description": "Composite Exact-EVM client plugin for the modular x402 v2 SDK: wraps the stock handler, adds Daski recipe-order binding, and refuses to sign anything its policy validator has not independently checked.",
5
5
  "license": "MIT",
6
6
  "type": "module",