@glacislabs/stablegenie-zerodelta 3.3.0 → 3.4.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.
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, S as SettlementMethod, d as StableGenieConfig, e as StableGenieExchange, f as StableGenieExchangeProps, g as StableGeniePay, h as StableGeniePayProps, i as StableGenieProvider, j as StableGenieSwap, k as StableGenieSwapProps, l as StableGenieTheme, m as SuccessInfo, n as SupportedAsset, o as darkTheme, p as lightTheme, q as mount, r as resolveTheme } from './mount-DNvmtX0y.cjs';
2
- export { Engine, createEngine } from './core/index.cjs';
3
- export { E as EngineConfig, P as Plan, R as RouteResult, S as SanitizedTxEntry, T as TxHistoryEntry, V as VerifyResult } from './verify-7lk90Ado.cjs';
1
+ export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, S as SettlementMethod, d as StableGenieConfig, e as StableGenieExchange, f as StableGenieExchangeProps, g as StableGeniePay, h as StableGeniePayProps, i as StableGenieProvider, j as StableGenieRwaExchange, k as StableGenieSwap, l as StableGenieSwapProps, m as StableGenieTheme, n as SuccessInfo, o as SupportedAsset, p as darkTheme, q as lightTheme, r as mount, s as resolveTheme } from './mount-D8NmWtqV.cjs';
2
+ export { EXECUTABLE_STABLE_ASSETS, Engine, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, createEngine, symbolKey } from './core/index.cjs';
3
+ export { A as Availability, B as BrokenLane, C as Catalogue, a as Chain, E as EngineConfig, b as ExchangeProduct, P as Plan, R as Route, c as RouteResult, S as SanitizedTxEntry, T as Token, d as TxHistoryEntry, V as VerifyResult, e as assetClassOf, f as brokenLaneReason, g as counterpartTokens, h as destinationAvailability } from './verify-34voZYj1.cjs';
4
4
  import 'react';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, S as SettlementMethod, d as StableGenieConfig, e as StableGenieExchange, f as StableGenieExchangeProps, g as StableGeniePay, h as StableGeniePayProps, i as StableGenieProvider, j as StableGenieSwap, k as StableGenieSwapProps, l as StableGenieTheme, m as SuccessInfo, n as SupportedAsset, o as darkTheme, p as lightTheme, q as mount, r as resolveTheme } from './mount-jxrT-DMe.js';
2
- export { Engine, createEngine } from './core/index.js';
3
- export { E as EngineConfig, P as Plan, R as RouteResult, S as SanitizedTxEntry, T as TxHistoryEntry, V as VerifyResult } from './verify-7lk90Ado.js';
1
+ export { B as BankPayoutAccount, E as Eip1193Provider, a as ExchangeMode, L as LinkIdentity, M as MountConfig, P as PaymentIsland, b as PaymentIslandKind, c as PaymentIslandProps, S as SettlementMethod, d as StableGenieConfig, e as StableGenieExchange, f as StableGenieExchangeProps, g as StableGeniePay, h as StableGeniePayProps, i as StableGenieProvider, j as StableGenieRwaExchange, k as StableGenieSwap, l as StableGenieSwapProps, m as StableGenieTheme, n as SuccessInfo, o as SupportedAsset, p as darkTheme, q as lightTheme, r as mount, s as resolveTheme } from './mount-BT2NejVt.js';
2
+ export { EXECUTABLE_STABLE_ASSETS, Engine, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, createEngine, symbolKey } from './core/index.js';
3
+ export { A as Availability, B as BrokenLane, C as Catalogue, a as Chain, E as EngineConfig, b as ExchangeProduct, P as Plan, R as Route, c as RouteResult, S as SanitizedTxEntry, T as Token, d as TxHistoryEntry, V as VerifyResult, e as assetClassOf, f as brokenLaneReason, g as counterpartTokens, h as destinationAvailability } from './verify-34voZYj1.js';
4
4
  import 'react';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { PaymentIsland, StableGenieExchange, StableGeniePay, StableGenieProvider, StableGenieSwap, darkTheme, lightTheme, mount, resolveTheme } from './chunk-QKGRMRS4.js';
2
- export { createEngine } from './chunk-OOURZ5DL.js';
1
+ export { PaymentIsland, StableGenieExchange, StableGeniePay, StableGenieProvider, StableGenieRwaExchange, StableGenieSwap, darkTheme, lightTheme, mount, resolveTheme } from './chunk-Q3YSX4D5.js';
2
+ export { EXECUTABLE_STABLE_ASSETS, STABLE_ASSETS, SUPPORTED_ASSETS, SUPPORTED_CHAIN_IDS, TRADEABLE_RWA_ASSETS, assetClassOf, brokenLaneReason, counterpartTokens, createEngine, destinationAvailability, symbolKey } from './chunk-TYQF2L5C.js';
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { P as Plan, V as VerifyResult, R as RouteResult, S as SanitizedTxEntry } from './verify-7lk90Ado.cjs';
3
+ import { P as Plan, V as VerifyResult, c as RouteResult, S as SanitizedTxEntry, b as ExchangeProduct } from './verify-34voZYj1.js';
4
4
 
5
5
  interface Eip1193Provider {
6
6
  request(args: {
@@ -71,11 +71,25 @@ declare function StableGenieProvider({ children, ...config }: StableGenieConfig
71
71
  type ExchangeMode = "exchange" | "onramp" | "offramp";
72
72
  interface StableGenieExchangeProps extends StableGenieConfig {
73
73
  mode?: ExchangeMode;
74
+ /**
75
+ * Which asset universe this card trades — a SEPARATE axis from `mode` (added 2026-09-08).
76
+ *
77
+ * `"stable"` (default) is stable ⇄ stable. `"rwa"` is stable ⇄ real-world asset, where exactly one
78
+ * leg is the RWA and the other narrows to stables. `StableGenieRwaExchange` is this component with
79
+ * the prop set.
80
+ *
81
+ * The RWA form is deliberately the SAME component rather than a second one: same card, same
82
+ * pickers, same flow, same engine — only the catalogue and the pair rule differ, and both come
83
+ * from `core/availability.ts`. A parallel component would drift the moment either surface gained a
84
+ * feature, which is exactly how this widget and the dapp came to disagree in the first place. The
85
+ * dapp reaches the same conclusion with one `mode` prop on one Swap page.
86
+ */
87
+ product?: ExchangeProduct;
74
88
  /** "pill" → ZeroDelta Link express checkout (the shared PaymentIsland). */
75
89
  variant?: "compact" | "wide" | "pill";
76
90
  /** Fixed widget height in px (content scrolls). Omit for fit-content. */
77
91
  heightPx?: number;
78
- /** Allowed asset universe. Defaults to the stables (USDC/USDT/USDE) — "stable exchange". */
92
+ /** Narrows the product's universe further. Omit for everything the product carries. */
79
93
  assets?: SupportedAsset[];
80
94
  defaultFromChainId?: number;
81
95
  defaultFromAsset?: SupportedAsset;
@@ -88,6 +102,16 @@ interface StableGenieExchangeProps extends StableGenieConfig {
88
102
  fiatCurrency?: "USD" | "EUR" | "GBP" | "CHF";
89
103
  }
90
104
  declare function StableGenieExchange(props: StableGenieExchangeProps): react.JSX.Element;
105
+ /**
106
+ * The RWA exchange: stable ⇄ real-world asset, exactly one leg of each.
107
+ *
108
+ * The same card as `StableGenieExchange` with `product="rwa"` — same pickers, same flow, same
109
+ * engine, same guarantees. What differs is the catalogue (a wider stable list plus the vault shares
110
+ * and the Centrifuge pair) and the pair rule that keeps one leg on each side. Orders for the vault
111
+ * shares are CHAINED: the gateway answers with two legs and the wallet signs them as one
112
+ * `submitOrder`, which the engine binds leg-to-leg before it will encode anything.
113
+ */
114
+ declare function StableGenieRwaExchange(props: Omit<StableGenieExchangeProps, "product">): react.JSX.Element;
91
115
 
92
116
  type PaymentIslandKind = "pay" | "swap" | "exchange";
93
117
  /** How the merchant wants to be settled. Set by the COMPANY embedding the widget, not the payer. */
@@ -127,7 +151,10 @@ interface PaymentIslandProps extends StableGenieConfig {
127
151
  * deliberately NOT a full account number — the widget never handles bank credentials. */
128
152
  bankAccount?: BankPayoutAccount;
129
153
  mode?: ExchangeMode;
130
- /** Allowed asset universe for the in-card From/To pickers. Defaults to the stables. */
154
+ /** Which asset universe the in-card pickers trade — see `StableGenieExchange`. Pay always uses
155
+ * the stable catalogue: a merchant invoice is owed in dollars, never in a vault share. */
156
+ product?: ExchangeProduct;
157
+ /** Narrows the product's universe further. Omit for everything the product carries. */
131
158
  assets?: SupportedAsset[];
132
159
  defaultFromChainId?: number;
133
160
  defaultFromAsset?: SupportedAsset;
@@ -146,7 +173,18 @@ interface PaymentIslandProps extends StableGenieConfig {
146
173
  }
147
174
  declare function PaymentIsland(props: PaymentIslandProps): react.JSX.Element;
148
175
 
149
- type SupportedAsset = "USDC" | "USDT" | "USDE" | "XAUT";
176
+ /**
177
+ * Every asset the engine can price, across BOTH products.
178
+ *
179
+ * Kept in step with `SUPPORTED_ASSETS` in core/constants.ts — `test/engine/supported-assets.test.ts`
180
+ * pins the two together, because a type narrower than the engine silently refuses integrations for
181
+ * assets the gateway supports, and a type wider than it promises assets that cannot be priced.
182
+ *
183
+ * Not every symbol is valid on every surface: the stable exchange trades the first seven, a deposit
184
+ * settles in one of the twelve stables, and the RWA exchange pairs a stable with a real-world asset.
185
+ * The catalogue enforces that; this union only bounds what can be NAMED.
186
+ */
187
+ type SupportedAsset = "USDC" | "USDT" | "USDE" | "USDTB" | "AUSD" | "PYUSD" | "USDG" | "USD1" | "WM" | "USDS" | "DAI" | "RLUSD" | "XAUT" | "NALPHA" | "NTBILL" | "NBASIS" | "NCREDIT" | "NOPAL" | "NWISDOM" | "NACRDX" | "NLCRD" | "NAXI" | "NCLOA" | "NFALCON" | "DEJAAA" | "DESPXA";
150
188
  interface StableGeniePayProps extends StableGenieConfig {
151
189
  /** The address that must receive the funds (the merchant / dApp deposit address). */
152
190
  recipient: string;
@@ -197,8 +235,10 @@ type MountConfig = ({
197
235
  variant: "swap";
198
236
  } & Omit<StableGenieSwapProps, "variant">) | ({
199
237
  variant: "exchange";
200
- } & Omit<StableGenieExchangeProps, "variant">);
238
+ } & Omit<StableGenieExchangeProps, "variant">) | ({
239
+ variant: "rwa";
240
+ } & Omit<StableGenieExchangeProps, "variant" | "product">);
201
241
  /** Imperatively mount a widget into an element (for non-JSX / vanilla React hosts). Returns unmount. */
202
242
  declare function mount(el: HTMLElement, config: MountConfig): () => void;
203
243
 
204
- export { type BankPayoutAccount as B, type Eip1193Provider as E, type LinkIdentity as L, type MountConfig as M, PaymentIsland as P, type SettlementMethod as S, type ExchangeMode as a, type PaymentIslandKind as b, type PaymentIslandProps as c, type StableGenieConfig as d, StableGenieExchange as e, type StableGenieExchangeProps as f, StableGeniePay as g, type StableGeniePayProps as h, StableGenieProvider as i, StableGenieSwap as j, type StableGenieSwapProps as k, type StableGenieTheme as l, type SuccessInfo as m, type SupportedAsset as n, darkTheme as o, lightTheme as p, mount as q, resolveTheme as r };
244
+ export { type BankPayoutAccount as B, type Eip1193Provider as E, type LinkIdentity as L, type MountConfig as M, PaymentIsland as P, type SettlementMethod as S, type ExchangeMode as a, type PaymentIslandKind as b, type PaymentIslandProps as c, type StableGenieConfig as d, StableGenieExchange as e, type StableGenieExchangeProps as f, StableGeniePay as g, type StableGeniePayProps as h, StableGenieProvider as i, StableGenieRwaExchange as j, StableGenieSwap as k, type StableGenieSwapProps as l, type StableGenieTheme as m, type SuccessInfo as n, type SupportedAsset as o, darkTheme as p, lightTheme as q, mount as r, resolveTheme as s };
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { P as Plan, V as VerifyResult, R as RouteResult, S as SanitizedTxEntry } from './verify-7lk90Ado.js';
3
+ import { P as Plan, V as VerifyResult, c as RouteResult, S as SanitizedTxEntry, b as ExchangeProduct } from './verify-34voZYj1.cjs';
4
4
 
5
5
  interface Eip1193Provider {
6
6
  request(args: {
@@ -71,11 +71,25 @@ declare function StableGenieProvider({ children, ...config }: StableGenieConfig
71
71
  type ExchangeMode = "exchange" | "onramp" | "offramp";
72
72
  interface StableGenieExchangeProps extends StableGenieConfig {
73
73
  mode?: ExchangeMode;
74
+ /**
75
+ * Which asset universe this card trades — a SEPARATE axis from `mode` (added 2026-09-08).
76
+ *
77
+ * `"stable"` (default) is stable ⇄ stable. `"rwa"` is stable ⇄ real-world asset, where exactly one
78
+ * leg is the RWA and the other narrows to stables. `StableGenieRwaExchange` is this component with
79
+ * the prop set.
80
+ *
81
+ * The RWA form is deliberately the SAME component rather than a second one: same card, same
82
+ * pickers, same flow, same engine — only the catalogue and the pair rule differ, and both come
83
+ * from `core/availability.ts`. A parallel component would drift the moment either surface gained a
84
+ * feature, which is exactly how this widget and the dapp came to disagree in the first place. The
85
+ * dapp reaches the same conclusion with one `mode` prop on one Swap page.
86
+ */
87
+ product?: ExchangeProduct;
74
88
  /** "pill" → ZeroDelta Link express checkout (the shared PaymentIsland). */
75
89
  variant?: "compact" | "wide" | "pill";
76
90
  /** Fixed widget height in px (content scrolls). Omit for fit-content. */
77
91
  heightPx?: number;
78
- /** Allowed asset universe. Defaults to the stables (USDC/USDT/USDE) — "stable exchange". */
92
+ /** Narrows the product's universe further. Omit for everything the product carries. */
79
93
  assets?: SupportedAsset[];
80
94
  defaultFromChainId?: number;
81
95
  defaultFromAsset?: SupportedAsset;
@@ -88,6 +102,16 @@ interface StableGenieExchangeProps extends StableGenieConfig {
88
102
  fiatCurrency?: "USD" | "EUR" | "GBP" | "CHF";
89
103
  }
90
104
  declare function StableGenieExchange(props: StableGenieExchangeProps): react.JSX.Element;
105
+ /**
106
+ * The RWA exchange: stable ⇄ real-world asset, exactly one leg of each.
107
+ *
108
+ * The same card as `StableGenieExchange` with `product="rwa"` — same pickers, same flow, same
109
+ * engine, same guarantees. What differs is the catalogue (a wider stable list plus the vault shares
110
+ * and the Centrifuge pair) and the pair rule that keeps one leg on each side. Orders for the vault
111
+ * shares are CHAINED: the gateway answers with two legs and the wallet signs them as one
112
+ * `submitOrder`, which the engine binds leg-to-leg before it will encode anything.
113
+ */
114
+ declare function StableGenieRwaExchange(props: Omit<StableGenieExchangeProps, "product">): react.JSX.Element;
91
115
 
92
116
  type PaymentIslandKind = "pay" | "swap" | "exchange";
93
117
  /** How the merchant wants to be settled. Set by the COMPANY embedding the widget, not the payer. */
@@ -127,7 +151,10 @@ interface PaymentIslandProps extends StableGenieConfig {
127
151
  * deliberately NOT a full account number — the widget never handles bank credentials. */
128
152
  bankAccount?: BankPayoutAccount;
129
153
  mode?: ExchangeMode;
130
- /** Allowed asset universe for the in-card From/To pickers. Defaults to the stables. */
154
+ /** Which asset universe the in-card pickers trade — see `StableGenieExchange`. Pay always uses
155
+ * the stable catalogue: a merchant invoice is owed in dollars, never in a vault share. */
156
+ product?: ExchangeProduct;
157
+ /** Narrows the product's universe further. Omit for everything the product carries. */
131
158
  assets?: SupportedAsset[];
132
159
  defaultFromChainId?: number;
133
160
  defaultFromAsset?: SupportedAsset;
@@ -146,7 +173,18 @@ interface PaymentIslandProps extends StableGenieConfig {
146
173
  }
147
174
  declare function PaymentIsland(props: PaymentIslandProps): react.JSX.Element;
148
175
 
149
- type SupportedAsset = "USDC" | "USDT" | "USDE" | "XAUT";
176
+ /**
177
+ * Every asset the engine can price, across BOTH products.
178
+ *
179
+ * Kept in step with `SUPPORTED_ASSETS` in core/constants.ts — `test/engine/supported-assets.test.ts`
180
+ * pins the two together, because a type narrower than the engine silently refuses integrations for
181
+ * assets the gateway supports, and a type wider than it promises assets that cannot be priced.
182
+ *
183
+ * Not every symbol is valid on every surface: the stable exchange trades the first seven, a deposit
184
+ * settles in one of the twelve stables, and the RWA exchange pairs a stable with a real-world asset.
185
+ * The catalogue enforces that; this union only bounds what can be NAMED.
186
+ */
187
+ type SupportedAsset = "USDC" | "USDT" | "USDE" | "USDTB" | "AUSD" | "PYUSD" | "USDG" | "USD1" | "WM" | "USDS" | "DAI" | "RLUSD" | "XAUT" | "NALPHA" | "NTBILL" | "NBASIS" | "NCREDIT" | "NOPAL" | "NWISDOM" | "NACRDX" | "NLCRD" | "NAXI" | "NCLOA" | "NFALCON" | "DEJAAA" | "DESPXA";
150
188
  interface StableGeniePayProps extends StableGenieConfig {
151
189
  /** The address that must receive the funds (the merchant / dApp deposit address). */
152
190
  recipient: string;
@@ -197,8 +235,10 @@ type MountConfig = ({
197
235
  variant: "swap";
198
236
  } & Omit<StableGenieSwapProps, "variant">) | ({
199
237
  variant: "exchange";
200
- } & Omit<StableGenieExchangeProps, "variant">);
238
+ } & Omit<StableGenieExchangeProps, "variant">) | ({
239
+ variant: "rwa";
240
+ } & Omit<StableGenieExchangeProps, "variant" | "product">);
201
241
  /** Imperatively mount a widget into an element (for non-JSX / vanilla React hosts). Returns unmount. */
202
242
  declare function mount(el: HTMLElement, config: MountConfig): () => void;
203
243
 
204
- export { type BankPayoutAccount as B, type Eip1193Provider as E, type LinkIdentity as L, type MountConfig as M, PaymentIsland as P, type SettlementMethod as S, type ExchangeMode as a, type PaymentIslandKind as b, type PaymentIslandProps as c, type StableGenieConfig as d, StableGenieExchange as e, type StableGenieExchangeProps as f, StableGeniePay as g, type StableGeniePayProps as h, StableGenieProvider as i, StableGenieSwap as j, type StableGenieSwapProps as k, type StableGenieTheme as l, type SuccessInfo as m, type SupportedAsset as n, darkTheme as o, lightTheme as p, mount as q, resolveTheme as r };
244
+ export { type BankPayoutAccount as B, type Eip1193Provider as E, type LinkIdentity as L, type MountConfig as M, PaymentIsland as P, type SettlementMethod as S, type ExchangeMode as a, type PaymentIslandKind as b, type PaymentIslandProps as c, type StableGenieConfig as d, StableGenieExchange as e, type StableGenieExchangeProps as f, StableGeniePay as g, type StableGeniePayProps as h, StableGenieProvider as i, StableGenieRwaExchange as j, StableGenieSwap as k, type StableGenieSwapProps as l, type StableGenieTheme as m, type SuccessInfo as n, type SupportedAsset as o, darkTheme as p, lightTheme as q, mount as r, resolveTheme as s };