@glacislabs/stablegenie-zerodelta 4.9.0 → 4.10.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.
@@ -1007,6 +1007,16 @@ interface ResolvedConfig {
1007
1007
  fetchImpl: typeof fetch;
1008
1008
  rpcOverrides: Record<number, string>;
1009
1009
  onTransaction?: EngineConfig["onTransaction"];
1010
+ /**
1011
+ * Who may share this engine's registry reads (chains, tokens, routes, route-health, vaults) — see
1012
+ * `registryCacheFor` in api.ts. Set only when every input to those reads is known up front: the
1013
+ * page's own `fetch` and a static key. A host that injects `fetchImpl` or `getApiKey` keeps a
1014
+ * private cache, as every engine had before.
1015
+ */
1016
+ registryScope?: {
1017
+ fetch: object;
1018
+ key: string;
1019
+ };
1010
1020
  }
1011
1021
  declare function parseAllowedApiBase(value: unknown): string | null;
1012
1022
  /** Resolve the request base. A relative base (e.g. `/api/widget/v1`) is same-origin and allowed as
@@ -1105,7 +1115,7 @@ interface ApiClient {
1105
1115
  }) => Promise<boolean>;
1106
1116
  apiBase: string;
1107
1117
  }
1108
- /** Build an API client bound to a resolved config. The 60s resource cache is per-instance. */
1118
+ /** Build an API client bound to a resolved config. The 60s registry cache is shared — see `registryCacheFor`. */
1109
1119
  declare function createApiClient(cfg: ResolvedConfig): ApiClient;
1110
1120
 
1111
1121
  declare function registryRpc(chain: Chain | null): string;
@@ -1007,6 +1007,16 @@ interface ResolvedConfig {
1007
1007
  fetchImpl: typeof fetch;
1008
1008
  rpcOverrides: Record<number, string>;
1009
1009
  onTransaction?: EngineConfig["onTransaction"];
1010
+ /**
1011
+ * Who may share this engine's registry reads (chains, tokens, routes, route-health, vaults) — see
1012
+ * `registryCacheFor` in api.ts. Set only when every input to those reads is known up front: the
1013
+ * page's own `fetch` and a static key. A host that injects `fetchImpl` or `getApiKey` keeps a
1014
+ * private cache, as every engine had before.
1015
+ */
1016
+ registryScope?: {
1017
+ fetch: object;
1018
+ key: string;
1019
+ };
1010
1020
  }
1011
1021
  declare function parseAllowedApiBase(value: unknown): string | null;
1012
1022
  /** Resolve the request base. A relative base (e.g. `/api/widget/v1`) is same-origin and allowed as
@@ -1105,7 +1115,7 @@ interface ApiClient {
1105
1115
  }) => Promise<boolean>;
1106
1116
  apiBase: string;
1107
1117
  }
1108
- /** Build an API client bound to a resolved config. The 60s resource cache is per-instance. */
1118
+ /** Build an API client bound to a resolved config. The 60s registry cache is shared — see `registryCacheFor`. */
1109
1119
  declare function createApiClient(cfg: ResolvedConfig): ApiClient;
1110
1120
 
1111
1121
  declare function registryRpc(chain: Chain | null): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glacislabs/stablegenie-zerodelta",
3
- "version": "4.9.0",
3
+ "version": "4.10.0",
4
4
  "description": "Lightweight embeddable ZeroDelta payment + swap widget (exact-receive Pay and exact-in Swap). Wallet always owns the final signature.",
5
5
  "type": "module",
6
6
  "license": "MIT",