@glacislabs/stablegenie-zerodelta 4.9.0 → 4.11.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.
@@ -483,6 +483,12 @@ interface Plan {
483
483
  expiresAt: string;
484
484
  apiBase?: string;
485
485
  routes: RouteResult[];
486
+ /**
487
+ * Funding options the live catalogue offers for this payment that the plan did not price (its
488
+ * quote budget is bounded). Show them; price one with `engine.quotePayOption` when it is picked.
489
+ * Exact-receive plans only.
490
+ */
491
+ unquotedOptions?: PayOption[];
486
492
  /** Wallet balances already read while choosing funding candidates. Payment UIs reuse these so
487
493
  * route rendering does not trigger the same RPC scan a second time. */
488
494
  fundingBalances?: Record<string, {
@@ -1007,6 +1013,16 @@ interface ResolvedConfig {
1007
1013
  fetchImpl: typeof fetch;
1008
1014
  rpcOverrides: Record<number, string>;
1009
1015
  onTransaction?: EngineConfig["onTransaction"];
1016
+ /**
1017
+ * Who may share this engine's registry reads (chains, tokens, routes, route-health, vaults) — see
1018
+ * `registryCacheFor` in api.ts. Set only when every input to those reads is known up front: the
1019
+ * page's own `fetch` and a static key. A host that injects `fetchImpl` or `getApiKey` keeps a
1020
+ * private cache, as every engine had before.
1021
+ */
1022
+ registryScope?: {
1023
+ fetch: object;
1024
+ key: string;
1025
+ };
1010
1026
  }
1011
1027
  declare function parseAllowedApiBase(value: unknown): string | null;
1012
1028
  /** Resolve the request base. A relative base (e.g. `/api/widget/v1`) is same-origin and allowed as
@@ -1105,7 +1121,7 @@ interface ApiClient {
1105
1121
  }) => Promise<boolean>;
1106
1122
  apiBase: string;
1107
1123
  }
1108
- /** Build an API client bound to a resolved config. The 60s resource cache is per-instance. */
1124
+ /** Build an API client bound to a resolved config. The 60s registry cache is shared — see `registryCacheFor`. */
1109
1125
  declare function createApiClient(cfg: ResolvedConfig): ApiClient;
1110
1126
 
1111
1127
  declare function registryRpc(chain: Chain | null): string;
@@ -483,6 +483,12 @@ interface Plan {
483
483
  expiresAt: string;
484
484
  apiBase?: string;
485
485
  routes: RouteResult[];
486
+ /**
487
+ * Funding options the live catalogue offers for this payment that the plan did not price (its
488
+ * quote budget is bounded). Show them; price one with `engine.quotePayOption` when it is picked.
489
+ * Exact-receive plans only.
490
+ */
491
+ unquotedOptions?: PayOption[];
486
492
  /** Wallet balances already read while choosing funding candidates. Payment UIs reuse these so
487
493
  * route rendering does not trigger the same RPC scan a second time. */
488
494
  fundingBalances?: Record<string, {
@@ -1007,6 +1013,16 @@ interface ResolvedConfig {
1007
1013
  fetchImpl: typeof fetch;
1008
1014
  rpcOverrides: Record<number, string>;
1009
1015
  onTransaction?: EngineConfig["onTransaction"];
1016
+ /**
1017
+ * Who may share this engine's registry reads (chains, tokens, routes, route-health, vaults) — see
1018
+ * `registryCacheFor` in api.ts. Set only when every input to those reads is known up front: the
1019
+ * page's own `fetch` and a static key. A host that injects `fetchImpl` or `getApiKey` keeps a
1020
+ * private cache, as every engine had before.
1021
+ */
1022
+ registryScope?: {
1023
+ fetch: object;
1024
+ key: string;
1025
+ };
1010
1026
  }
1011
1027
  declare function parseAllowedApiBase(value: unknown): string | null;
1012
1028
  /** Resolve the request base. A relative base (e.g. `/api/widget/v1`) is same-origin and allowed as
@@ -1105,7 +1121,7 @@ interface ApiClient {
1105
1121
  }) => Promise<boolean>;
1106
1122
  apiBase: string;
1107
1123
  }
1108
- /** Build an API client bound to a resolved config. The 60s resource cache is per-instance. */
1124
+ /** Build an API client bound to a resolved config. The 60s registry cache is shared — see `registryCacheFor`. */
1109
1125
  declare function createApiClient(cfg: ResolvedConfig): ApiClient;
1110
1126
 
1111
1127
  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.11.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",