@fluent.xyz/connect 0.3.1 → 0.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.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as viem from 'viem';
2
- import { Chain, PublicClient, Transport, Address, createPublicClient, Hex, Abi, Hash, SignableMessage, TypedData, TypedDataDefinition, WalletClient } from 'viem';
2
+ import { Chain, PublicClient, Transport, Address, createPublicClient, Hex, Abi, Hash, TransactionReceipt, SignableMessage, TypedData, TypedDataDefinition, WalletClient } from 'viem';
3
3
  import * as React from 'react';
4
- import { ReactNode, AnchorHTMLAttributes, SVGProps } from 'react';
4
+ import { ReactNode, RefObject, AnchorHTMLAttributes, SVGProps } from 'react';
5
5
  import * as _privy_io_react_auth from '@privy-io/react-auth';
6
6
  import { CallType } from '@zerodev/permissions/policies';
7
7
  export { CallType, ParamCondition } from '@zerodev/permissions/policies';
@@ -121,6 +121,36 @@ declare const fluentChainSchema: z.ZodObject<{
121
121
  address: string;
122
122
  implementation?: string | undefined;
123
123
  }>>;
124
+ nativeGateway: z.ZodOptional<z.ZodObject<{
125
+ address: z.ZodString;
126
+ implementation: z.ZodOptional<z.ZodString>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ address: string;
129
+ implementation?: string | undefined;
130
+ }, {
131
+ address: string;
132
+ implementation?: string | undefined;
133
+ }>>;
134
+ erc20Gateway: z.ZodOptional<z.ZodObject<{
135
+ address: z.ZodString;
136
+ implementation: z.ZodOptional<z.ZodString>;
137
+ }, "strip", z.ZodTypeAny, {
138
+ address: string;
139
+ implementation?: string | undefined;
140
+ }, {
141
+ address: string;
142
+ implementation?: string | undefined;
143
+ }>>;
144
+ wethGateway: z.ZodOptional<z.ZodObject<{
145
+ address: z.ZodString;
146
+ implementation: z.ZodOptional<z.ZodString>;
147
+ }, "strip", z.ZodTypeAny, {
148
+ address: string;
149
+ implementation?: string | undefined;
150
+ }, {
151
+ address: string;
152
+ implementation?: string | undefined;
153
+ }>>;
124
154
  universalTokenFactory: z.ZodOptional<z.ZodObject<{
125
155
  address: z.ZodString;
126
156
  implementation: z.ZodOptional<z.ZodString>;
@@ -153,6 +183,18 @@ declare const fluentChainSchema: z.ZodObject<{
153
183
  address: string;
154
184
  implementation?: string | undefined;
155
185
  } | undefined;
186
+ nativeGateway?: {
187
+ address: string;
188
+ implementation?: string | undefined;
189
+ } | undefined;
190
+ erc20Gateway?: {
191
+ address: string;
192
+ implementation?: string | undefined;
193
+ } | undefined;
194
+ wethGateway?: {
195
+ address: string;
196
+ implementation?: string | undefined;
197
+ } | undefined;
156
198
  universalTokenFactory?: {
157
199
  address: string;
158
200
  implementation?: string | undefined;
@@ -169,6 +211,18 @@ declare const fluentChainSchema: z.ZodObject<{
169
211
  address: string;
170
212
  implementation?: string | undefined;
171
213
  } | undefined;
214
+ nativeGateway?: {
215
+ address: string;
216
+ implementation?: string | undefined;
217
+ } | undefined;
218
+ erc20Gateway?: {
219
+ address: string;
220
+ implementation?: string | undefined;
221
+ } | undefined;
222
+ wethGateway?: {
223
+ address: string;
224
+ implementation?: string | undefined;
225
+ } | undefined;
172
226
  universalTokenFactory?: {
173
227
  address: string;
174
228
  implementation?: string | undefined;
@@ -215,6 +269,18 @@ declare const fluentChainSchema: z.ZodObject<{
215
269
  address: string;
216
270
  implementation?: string | undefined;
217
271
  } | undefined;
272
+ nativeGateway?: {
273
+ address: string;
274
+ implementation?: string | undefined;
275
+ } | undefined;
276
+ erc20Gateway?: {
277
+ address: string;
278
+ implementation?: string | undefined;
279
+ } | undefined;
280
+ wethGateway?: {
281
+ address: string;
282
+ implementation?: string | undefined;
283
+ } | undefined;
218
284
  universalTokenFactory?: {
219
285
  address: string;
220
286
  implementation?: string | undefined;
@@ -261,6 +327,18 @@ declare const fluentChainSchema: z.ZodObject<{
261
327
  address: string;
262
328
  implementation?: string | undefined;
263
329
  } | undefined;
330
+ nativeGateway?: {
331
+ address: string;
332
+ implementation?: string | undefined;
333
+ } | undefined;
334
+ erc20Gateway?: {
335
+ address: string;
336
+ implementation?: string | undefined;
337
+ } | undefined;
338
+ wethGateway?: {
339
+ address: string;
340
+ implementation?: string | undefined;
341
+ } | undefined;
264
342
  universalTokenFactory?: {
265
343
  address: string;
266
344
  implementation?: string | undefined;
@@ -530,6 +608,18 @@ declare const fluentChains: {
530
608
  address: string;
531
609
  implementation?: string | undefined;
532
610
  } | undefined;
611
+ nativeGateway?: {
612
+ address: string;
613
+ implementation?: string | undefined;
614
+ } | undefined;
615
+ erc20Gateway?: {
616
+ address: string;
617
+ implementation?: string | undefined;
618
+ } | undefined;
619
+ wethGateway?: {
620
+ address: string;
621
+ implementation?: string | undefined;
622
+ } | undefined;
533
623
  universalTokenFactory?: {
534
624
  address: string;
535
625
  implementation?: string | undefined;
@@ -577,6 +667,18 @@ declare const fluentChains: {
577
667
  address: string;
578
668
  implementation?: string | undefined;
579
669
  } | undefined;
670
+ nativeGateway?: {
671
+ address: string;
672
+ implementation?: string | undefined;
673
+ } | undefined;
674
+ erc20Gateway?: {
675
+ address: string;
676
+ implementation?: string | undefined;
677
+ } | undefined;
678
+ wethGateway?: {
679
+ address: string;
680
+ implementation?: string | undefined;
681
+ } | undefined;
580
682
  universalTokenFactory?: {
581
683
  address: string;
582
684
  implementation?: string | undefined;
@@ -592,6 +694,33 @@ declare const fluentChains: {
592
694
  };
593
695
  };
594
696
  declare const l1Chains: {
697
+ readonly ethereum: {
698
+ id: string;
699
+ name: string;
700
+ chainId: number;
701
+ testnet: boolean;
702
+ nativeCurrency: {
703
+ symbol: string;
704
+ name: string;
705
+ decimals: number;
706
+ };
707
+ rpcUrls: {
708
+ default: {
709
+ http: string[];
710
+ };
711
+ };
712
+ blockExplorers: {
713
+ default: {
714
+ name: string;
715
+ url: string;
716
+ };
717
+ };
718
+ contracts?: Record<string, {
719
+ address: string;
720
+ implementation?: string | undefined;
721
+ }> | undefined;
722
+ pairedL2?: string | undefined;
723
+ };
595
724
  readonly sepolia: {
596
725
  id: string;
597
726
  name: string;
@@ -822,7 +951,7 @@ declare const fluentMainnetTokenDefaults: {
822
951
  readonly chainId: 25363;
823
952
  readonly symbol: "USDnr";
824
953
  readonly name: "USDnr";
825
- readonly decimals: 18;
954
+ readonly decimals: 6;
826
955
  readonly address: "0xD48e565561416dE59DA1050ED70b8d75e8eF28f9";
827
956
  readonly gasPriority: 2;
828
957
  };
@@ -873,7 +1002,7 @@ declare function getFluentTokenDefaultsForNetwork(network: FluentNetworkName): {
873
1002
  readonly chainId: 25363;
874
1003
  readonly symbol: "USDnr";
875
1004
  readonly name: "USDnr";
876
- readonly decimals: 18;
1005
+ readonly decimals: 6;
877
1006
  readonly address: "0xD48e565561416dE59DA1050ED70b8d75e8eF28f9";
878
1007
  readonly gasPriority: 2;
879
1008
  };
@@ -1103,7 +1232,7 @@ declare function getFluentTokenDefaults(network: FluentWidgetNetwork): {
1103
1232
  readonly chainId: 25363;
1104
1233
  readonly symbol: "USDnr";
1105
1234
  readonly name: "USDnr";
1106
- readonly decimals: 18;
1235
+ readonly decimals: 6;
1107
1236
  readonly address: "0xD48e565561416dE59DA1050ED70b8d75e8eF28f9";
1108
1237
  readonly gasPriority: 2;
1109
1238
  };
@@ -1123,6 +1252,12 @@ declare function getFluentExplorerBaseUrl(network: FluentWidgetNetwork): string
1123
1252
  * payable is data on the token definitions now, not a fixed set of literals.
1124
1253
  */
1125
1254
  type FluentGasTokenSymbol = string;
1255
+ /**
1256
+ * What the widget charges gas to until the person chooses otherwise, and what
1257
+ * a stored choice falls back to when it names no Gas token on this network.
1258
+ */
1259
+ declare const FLUENT_WIDGET_DEFAULT_GAS_TOKEN: FluentGasTokenSymbol;
1260
+ declare function resolveDefaultGasToken(network: FluentWidgetNetwork, symbol?: string): FluentGasTokenSymbol;
1126
1261
  /**
1127
1262
  * Resolve a gas token symbol to its ERC-20 paymaster address on `network`.
1128
1263
  * Returns `undefined` for the native currency, which pays gas directly, and for
@@ -1183,12 +1318,26 @@ declare function getFluentGasPaymentValueTier(ethValueWei: bigint): FluentGasPay
1183
1318
 
1184
1319
  declare const FLUENT_WIDGET_SESSION_STORAGE_KEY = "fluent:widget:session:v1";
1185
1320
  /**
1186
- * Tokens the user added by hand. Keyed per chain inside the payload, not per
1187
- * account: one person holds both a Fluent ID and possibly an external wallet
1188
- * and switches between them, and their list should not appear to vanish when
1189
- * they disconnect one.
1321
+ * Tokens the user added by hand, in the states where no Fluent token can exist:
1322
+ * hosted mode with a Fluent ID, and the not-connected state. Everywhere
1323
+ * `getAuthToken()` resolves, the service holds the list per person and this key
1324
+ * is not read (ADR 0004).
1325
+ *
1326
+ * Keyed per chain inside the payload, not per account: one person holds both a
1327
+ * Fluent ID and possibly an external wallet and switches between them, and
1328
+ * their list should not appear to vanish when they disconnect one.
1190
1329
  */
1191
1330
  declare const FLUENT_WIDGET_USER_TOKENS_STORAGE_KEY = "fluent:widget:tokens:v1";
1331
+ /**
1332
+ * Set while the one-time import of the local token list is in flight, and
1333
+ * removed with the list itself once every entry is on the service. It is what
1334
+ * tells a resumed import from a person who simply already had a list there.
1335
+ *
1336
+ * Its value is the subject whose import stopped halfway, not a flag: this key is
1337
+ * per browser, and the next person to sign in here must not have another's
1338
+ * leftovers pushed into their list (ADR 0004).
1339
+ */
1340
+ declare const FLUENT_WIDGET_USER_TOKENS_IMPORT_MARKER_KEY = "fluent:widget:tokens-import:v1";
1192
1341
 
1193
1342
  declare const FLUENT_CONNECT_DEFAULT_ASSETS: {
1194
1343
  readonly fluentLogo: string;
@@ -1242,6 +1391,10 @@ type FluentWidgetConfig = {
1242
1391
  dstTokenAddress?: string;
1243
1392
  };
1244
1393
  gasPayment?: {
1394
+ /** Initial/fallback token. Defaults to ETH; a valid saved user choice wins. */
1395
+ defaultToken?: FluentGasTokenSymbol;
1396
+ /** Native-gas sponsorship policy. Defaults to `auto`; `never` skips the paymaster. */
1397
+ sponsorship?: "auto" | "never";
1245
1398
  ethValueByToken?: FluentGasPaymentEthRates;
1246
1399
  };
1247
1400
  /**
@@ -1255,6 +1408,8 @@ type FluentWidgetConfig = {
1255
1408
  campaign?: string;
1256
1409
  /** Turns off all analytics: PostHog is never initialised, nothing is sent or stored. */
1257
1410
  disableAnalytics?: boolean;
1411
+ /** Restore external wallets on load. Off by default: some connectors open an interactive prompt. */
1412
+ reconnectOnMount?: boolean;
1258
1413
  /**
1259
1414
  * Point the widget at a sponsorship service other than the network default. Local
1260
1415
  * development only: the deployed URL is the one every real integration should use.
@@ -1295,6 +1450,7 @@ type ResolvedFluentWidgetConfig = {
1295
1450
  sponsorshipUrl: string;
1296
1451
  authTokenRenewalOffsetSeconds: number;
1297
1452
  disableAnalytics: boolean;
1453
+ reconnectOnMount: boolean;
1298
1454
  publicApiUrl: string;
1299
1455
  reputationSignupUrl: string;
1300
1456
  bridgeUrl: string;
@@ -1305,6 +1461,8 @@ type ResolvedFluentWidgetConfig = {
1305
1461
  dstTokenAddress: string;
1306
1462
  };
1307
1463
  gasPayment: {
1464
+ defaultToken: FluentGasTokenSymbol;
1465
+ sponsorship: "auto" | "never";
1308
1466
  ethValueByToken: FluentGasPaymentEthRates | undefined;
1309
1467
  };
1310
1468
  reputationEnabled: boolean;
@@ -1338,9 +1496,36 @@ declare function useFluentWidgetNetwork(): FluentWidgetNetworkContextValue;
1338
1496
  * the caller asked to pay its own gas, so the sponsorship paymaster was never contacted.
1339
1497
  */
1340
1498
  type FluentSponsorshipReason = "no_token" | "denied" | "unauthorized" | "unreachable" | "not_requested";
1499
+ /** Both sponsored submission and the account-paid fallback failed. */
1500
+ declare class FluentSponsorshipFallbackError extends Error {
1501
+ readonly sponsorshipReason: FluentSponsorshipReason;
1502
+ readonly fallbackError: unknown;
1503
+ constructor(params: {
1504
+ sponsorshipReason: FluentSponsorshipReason;
1505
+ /** The original sponsored submission error, retained as `cause`. */
1506
+ sponsorshipError: unknown;
1507
+ fallbackError: unknown;
1508
+ });
1509
+ }
1510
+
1511
+ /** How a sponsored operation asks for its Fluent token. `fresh` discards a rejected one first. */
1512
+ type SponsorshipTokenRequest = (options?: {
1513
+ fresh?: boolean;
1514
+ }) => Promise<string>;
1341
1515
 
1342
1516
  type KernelAccount = Awaited<ReturnType<typeof createKernelAccount>>;
1343
1517
  type KernelClient = ReturnType<typeof createKernelAccountClient>;
1518
+ /**
1519
+ * Where a sponsored operation gets its bearer: the Fluent token for the connected account, and
1520
+ * which kind of account that is. Read at send time through a function rather than taken as a
1521
+ * value, because `useFluentZeroDevAccount` is constructed before the widget has derived the
1522
+ * account or built its `getAuthToken()`, and reordering the widget would change when the kernel
1523
+ * initializes.
1524
+ */
1525
+ type FluentZeroDevSponsorshipTokenSource = {
1526
+ accountType: FluentAccountType | undefined;
1527
+ getAuthToken: SponsorshipTokenRequest;
1528
+ };
1344
1529
  type FluentZeroDevSignerMode = "prompt" | "silent";
1345
1530
  type FluentZeroDevCall = {
1346
1531
  to: Address;
@@ -1377,6 +1562,8 @@ declare function useFluentZeroDevAccount(hookOptions?: {
1377
1562
  /** App id in the sponsorship path. Sponsorship is off unless both this and the URL are set. */
1378
1563
  appId?: string;
1379
1564
  sponsorshipUrl?: string;
1565
+ /** The Fluent token a sponsored operation authenticates with. Without it nothing is sponsored. */
1566
+ sponsorshipTokenSource?: () => FluentZeroDevSponsorshipTokenSource | null;
1380
1567
  authorizationSession?: {
1381
1568
  expiresAt: number;
1382
1569
  serializedPermissionAccount: string;
@@ -1408,6 +1595,8 @@ declare function useFluentZeroDevAccount(hookOptions?: {
1408
1595
  }) => Promise<Hash>;
1409
1596
  sendCalls: (calls: FluentZeroDevCall[], options?: FluentBatchOperationExecuteOptions) => Promise<{
1410
1597
  hash: Hash;
1598
+ receipt: TransactionReceipt;
1599
+ userOpHash: Hash;
1411
1600
  sponsored: boolean;
1412
1601
  sponsorshipReason?: FluentSponsorshipReason;
1413
1602
  paymaster?: Address;
@@ -1569,6 +1758,10 @@ type FluentExecuteResult = {
1569
1758
  hash: Hash;
1570
1759
  /** All transaction hashes in order. One for a smart-account UserOp; one per call for an EOA. */
1571
1760
  hashes: Hash[];
1761
+ /** Included receipt for hash (the final EOA call); not a finality guarantee. */
1762
+ receipt?: TransactionReceipt;
1763
+ /** ERC-4337 operation hash when executing through a smart account. */
1764
+ userOpHash?: Hash;
1572
1765
  /** True when all calls landed atomically (smart account), false for sequential EOA txs. */
1573
1766
  atomic: boolean;
1574
1767
  /**
@@ -1609,6 +1802,8 @@ type FluentBatchOperationExecutor = {
1609
1802
  * back to native gas (no ERC20 paymaster).
1610
1803
  */
1611
1804
  defaultGasPayment?: FluentWidgetGasPayment;
1805
+ /** Native-gas policy inherited from widget config; each execution may override it. */
1806
+ defaultSponsorship?: "auto" | "never";
1612
1807
  confirm?: (operation: FluentBatchOperationReview) => Promise<void>;
1613
1808
  sendCalls: (calls: FluentEncodedBatchCall[], options: FluentBatchOperationExecuteOptions) => Promise<FluentExecuteResult>;
1614
1809
  };
@@ -1669,6 +1864,13 @@ type FluentBatchApi = FluentPermissionApi & FluentSignApi & {
1669
1864
  };
1670
1865
  declare function createFluentBatchOp(input: FluentBatchOperationInput, executor?: FluentBatchOperationExecutor | null): FluentBatchOperation;
1671
1866
 
1867
+ type FluentWalletChoice = {
1868
+ id: string;
1869
+ name: string;
1870
+ icon?: string;
1871
+ /** This connector opens an external wallet/QR surface. */
1872
+ handoff?: boolean;
1873
+ };
1672
1874
  type FluentExternalWalletState = {
1673
1875
  configured: boolean;
1674
1876
  connected: boolean;
@@ -1682,6 +1884,9 @@ type FluentExternalWalletState = {
1682
1884
  * `"disconnected"` slightly earlier during a reload.
1683
1885
  */
1684
1886
  reconnecting?: boolean;
1887
+ /** Optional inline choices; hosts without them keep their existing open() picker. */
1888
+ choices?: readonly FluentWalletChoice[];
1889
+ connectChoice?: (id: string) => Promise<void>;
1685
1890
  open: () => void;
1686
1891
  disconnect: () => void;
1687
1892
  switchChain: (chainId: number) => Promise<void>;
@@ -1712,9 +1917,16 @@ type FluentWidgetRenderContext = {
1712
1917
  /**
1713
1918
  * Tear down the current session without going through the widget's account
1714
1919
  * menu — the same teardown that menu's "Disconnect" runs, for both hosted and
1715
- * direct auth. Resolves once the session, the stored identity token and any
1716
- * external wallet connection are cleared, so a host can await it before
1920
+ * direct auth. The session, the stored identity token and any external wallet
1921
+ * connection are cleared before this resolves, so a host can await it before
1717
1922
  * resetting its own state.
1923
+ *
1924
+ * It also covers ending the Fluent session at the service — revoking the refresh
1925
+ * family so the 30 days stop here — including for a `getAuthToken()` that was still
1926
+ * out when the user disconnected: a wallet signature answered late opens a session
1927
+ * of its own, and this promise does not resolve while one of those could still be
1928
+ * live. It can therefore take as long as that request does. It never rejects, and
1929
+ * the widget's own teardown does not wait for it.
1718
1930
  */
1719
1931
  disconnect: () => Promise<void>;
1720
1932
  hasConnectedAccount: boolean;
@@ -1742,11 +1954,18 @@ type FluentWidgetRenderContext = {
1742
1954
  * A short-lived (5 min) Fluent-signed JWT for the connected user. Verify it on your backend
1743
1955
  * against `<iss>/.well-known/jwks.json` (ES256), checking `iss`, `aud` (= your appId) and
1744
1956
  * `exp`; `sub` is stable per user per app. Reused until `authTokenRenewalOffsetSeconds`
1745
- * before `exp`. Direct auth only; throws `FluentAuthError`
1746
- * (`code: "hosted_not_supported"`) in hosted mode. External wallets: EOAs and deployed
1747
- * smart-contract wallets sign in; a not-yet-deployed smart account cannot (no ERC-6492).
1957
+ * before `exp`, and renewed silently after that — for a Fluent ID and for an external wallet
1958
+ * alike. The wallet signs once, when the session opens; the renewals that follow ask it for
1959
+ * nothing. A new signature is needed only when the session's 30-day refresh family expires,
1960
+ * when the service rejects the refresh credential, or when it was never stored (the user
1961
+ * disconnected, cleared site data, or opened another browser). A Fluent ID gets a token in
1962
+ * direct mode and throws `FluentAuthError` (`code: "hosted_not_supported"`) in hosted mode.
1963
+ * External wallets: EOAs and deployed smart-contract wallets sign in; a not-yet-deployed
1964
+ * smart account cannot (no ERC-6492).
1748
1965
  */
1749
1966
  getAuthToken: () => Promise<string>;
1967
+ /** The resolved auth mode: `"hosted"` unless the config says `"direct"`. */
1968
+ authMode: FluentWidgetAuthMode;
1750
1969
  };
1751
1970
  type FluentWidgetConnectButtonRenderContext = {
1752
1971
  connected: boolean;
@@ -1807,39 +2026,243 @@ type FluentUserTokenAddResult = {
1807
2026
  limit: number;
1808
2027
  } | {
1809
2028
  status: "invalid";
2029
+ }
2030
+ /**
2031
+ * The store could not reach the truth: no network, no Fluent token, or the
2032
+ * service answered something other than a refusal it can name. Distinct from
2033
+ * `invalid`, which says the token itself is wrong and retrying cannot help.
2034
+ */
2035
+ | {
2036
+ status: "failed";
2037
+ message: string;
1810
2038
  };
1811
2039
  /**
1812
2040
  * Persistence for tokens the end user added by hand.
2041
+ *
2042
+ * Asynchronous because the truth may live on the service: while the widget
2043
+ * holds a Fluent token the backing store is `createFluentBackendUserTokenStore`
2044
+ * and the list follows the person between Apps and browsers; where no Fluent
2045
+ * token can exist (hosted mode with a Fluent ID, and the not-connected state)
2046
+ * it is `createFluentUserTokenStore` over this browser's localStorage. See
2047
+ * `docs/adr/0004-user-settings-live-on-the-service.md`.
1813
2048
  */
1814
2049
  type UserTokenStore = {
1815
- list(chainId: number): FluentTokenDefinition[];
1816
- add(token: FluentTokenDefinition): FluentUserTokenAddResult;
1817
- remove(token: Pick<FluentTokenDefinition, "chainId" | "address">): void;
2050
+ list(chainId: number): Promise<FluentTokenDefinition[]>;
2051
+ add(token: FluentTokenDefinition): Promise<FluentUserTokenAddResult>;
2052
+ remove(token: Pick<FluentTokenDefinition, "chainId" | "address">): Promise<void>;
1818
2053
  };
1819
2054
  /**
1820
- * The browser-backed store. Falls back to an in-memory list when storage is
1821
- * unavailable, so the UI keeps working for the current view instead of throwing.
2055
+ * The browser-backed store, used where no Fluent token can exist. Falls back to
2056
+ * an in-memory list when storage is unavailable, so the UI keeps working for
2057
+ * the current view instead of throwing. Its promises are already settled: the
2058
+ * async signatures exist for the backend store, not for this one.
1822
2059
  */
1823
2060
  declare function createFluentUserTokenStore(options?: {
1824
2061
  storage?: StorageLike;
1825
2062
  key?: string;
1826
2063
  }): UserTokenStore;
1827
2064
 
2065
+ /**
2066
+ * The tokens this person added by hand, on the current chain, plus the two
2067
+ * writes. Every call is asynchronous now: the store may be the service's
2068
+ * (`createFluentBackendUserTokenStore`) rather than this browser's.
2069
+ *
2070
+ * A failed load is not an empty list — the last one settled stays on screen and
2071
+ * the failure goes to `debugWarn`. A failed `add` comes back as a result the
2072
+ * form can show; nothing rejects out of here.
2073
+ */
1828
2074
  declare function useFluentUserTokens(options?: {
1829
2075
  store?: UserTokenStore;
1830
2076
  }): {
1831
2077
  tokens: FluentTokenDefinition[];
1832
- add: (token: FluentTokenDefinition) => FluentUserTokenAddResult;
1833
- remove: (token: Pick<FluentTokenDefinition, "chainId" | "address">) => void;
2078
+ add: (token: FluentTokenDefinition) => Promise<FluentUserTokenAddResult>;
2079
+ remove: (token: Pick<FluentTokenDefinition, "chainId" | "address">) => Promise<void>;
2080
+ };
2081
+
2082
+ /**
2083
+ * Codes fluent-connect-service returns on the `/me` routes (FLU-1481), plus the
2084
+ * one the client mints when the failure never reached the service.
2085
+ */
2086
+ type FluentSettingsErrorCode = "invalid_request" | "invalid_token" | "at_capacity" | "internal" | "request_failed";
2087
+ declare class FluentSettingsError extends Error {
2088
+ readonly code: FluentSettingsErrorCode;
2089
+ readonly status?: number | undefined;
2090
+ constructor(code: FluentSettingsErrorCode, message: string, status?: number | undefined);
2091
+ }
2092
+ /** The three values the service keeps per person. */
2093
+ type FluentUserSettings = {
2094
+ quickSign: boolean;
2095
+ /** `null` means "no choice stored"; the widget's own default applies. */
2096
+ gasTokenSymbol: string | null;
2097
+ /** Every chain the person has tokens on; callers filter by chain themselves. */
2098
+ tokens: FluentTokenDefinition[];
2099
+ };
2100
+ type FluentUserSettingsPatch = {
2101
+ quickSign?: boolean;
2102
+ gasTokenSymbol?: string | null;
2103
+ };
2104
+ type FluentSettingsClient = {
2105
+ read(): Promise<FluentUserSettings>;
2106
+ /** At least one field; the service refuses an empty or unknown-field body. */
2107
+ patch(patch: FluentUserSettingsPatch): Promise<FluentUserSettings>;
2108
+ putToken(token: FluentTokenDefinition): Promise<void>;
2109
+ deleteToken(token: Pick<FluentTokenDefinition, "chainId" | "address">): Promise<void>;
2110
+ };
2111
+ /**
2112
+ * The widget's own client for `GET/PATCH /me/settings` and
2113
+ * `PUT/DELETE /me/tokens/{chain_id}/{address}`.
2114
+ *
2115
+ * Every request carries the Fluent token from `getAuthToken()` and nothing
2116
+ * else: the token names the person, so no route here carries a Privy DID, a
2117
+ * subject or a uuid.
2118
+ */
2119
+ declare function createFluentSettingsClient(params: {
2120
+ /** Already ends in `/api/v1`. */
2121
+ publicApiUrl: string;
2122
+ getAuthToken: () => Promise<string>;
2123
+ fetch?: typeof globalThis.fetch;
2124
+ }): FluentSettingsClient;
2125
+
2126
+ type BackendUserTokenStore = UserTokenStore & {
2127
+ /**
2128
+ * Adopt the list from a `GET /me/settings` the caller already made, so the
2129
+ * settings read and the token list share one round trip at sign-in.
2130
+ */
2131
+ prime(tokens: readonly FluentTokenDefinition[]): void;
2132
+ /** Forget the list; the next `list()` loads again. */
2133
+ reset(): void;
1834
2134
  };
2135
+ /**
2136
+ * `UserTokenStore` over the service's `/me/tokens` routes, used wherever
2137
+ * `getAuthToken()` can resolve. The list is cached in memory and kept in step
2138
+ * with every write, so browsing the token list costs no request after sign-in.
2139
+ *
2140
+ * `add` and `remove` never throw: the token list is a corner of a wallet menu,
2141
+ * and a failed write there must not reach the host App as a rejection. `list`
2142
+ * may reject — its caller (`createUserTokenListLoader`) keeps the last settled
2143
+ * list on screen instead.
2144
+ */
2145
+ declare function createFluentBackendUserTokenStore(params: {
2146
+ client: FluentSettingsClient;
2147
+ /**
2148
+ * The shared settings read. Called only when the store has no list yet, so a
2149
+ * controller that primes it after its own `GET` causes no second request.
2150
+ */
2151
+ load: () => Promise<readonly FluentTokenDefinition[]>;
2152
+ /** Shown next to the token list when a `DELETE` fails. */
2153
+ onRemoveError?: (message: string) => void;
2154
+ }): BackendUserTokenStore;
1835
2155
 
1836
- type FluentAuthErrorCode = "unknown_app" | "app_not_auth_enabled" | "origin_not_allowed" | "origin_missing" | "bad_request" | "nonce_unknown" | "nonce_used" | "nonce_expired" | "app_mismatch" | "invalid_signature" | "signature_prefix_rejected" | "address_already_linked" | "invalid_privy_token" | "no_embedded_wallet" | "rate_limited" | "internal" | "hosted_not_supported" | "not_connected" | "root_signer_required" | "privy_token_missing" | "origin_mismatch" | "request_failed";
2156
+ type FluentAuthErrorCode = "unknown_app" | "app_not_auth_enabled" | "origin_not_allowed" | "origin_missing" | "bad_request" | "nonce_unknown" | "nonce_used" | "nonce_expired" | "app_mismatch" | "invalid_signature" | "signature_prefix_rejected" | "address_already_linked" | "invalid_privy_token" | "no_embedded_wallet" | "invalid_refresh_token" | "refresh_token_reused" | "rate_limited" | "internal" | "hosted_not_supported" | "not_connected" | "root_signer_required" | "privy_token_missing" | "origin_mismatch" | "request_failed";
1837
2157
  declare class FluentAuthError extends Error {
1838
2158
  readonly code: FluentAuthErrorCode;
1839
2159
  readonly status?: number | undefined;
1840
2160
  constructor(code: FluentAuthErrorCode, message: string, status?: number | undefined);
1841
2161
  }
1842
2162
 
2163
+ /** One JSON-RPC request as the embedded page sends it: method plus positional params. */
2164
+ type FluentIframeRpcRequest = {
2165
+ method: string;
2166
+ params?: unknown[];
2167
+ };
2168
+ /**
2169
+ * The widget surface answering an embedded page's wallet calls needs. Every field is
2170
+ * injected so the handler is pure: it never reads the DOM or React state on its own.
2171
+ */
2172
+ type FluentIframeRpcExecutor = {
2173
+ authMode: FluentWidgetAuthMode;
2174
+ /** Read at call time: the account changes while the bridge lives. */
2175
+ account: () => FluentWidgetAccount;
2176
+ chainId: number;
2177
+ sign: FluentSignApi;
2178
+ sendCalls: (calls: FluentEncodedBatchCall[]) => Promise<FluentExecuteResult>;
2179
+ /** Read-only chain access for the methods the wallet does not answer itself. */
2180
+ rpc: (method: string, params?: unknown[]) => Promise<unknown>;
2181
+ };
2182
+ type FluentIframeRpcHandler = (request: FluentIframeRpcRequest) => Promise<unknown>;
2183
+ /**
2184
+ * An error the embedded page understands: EIP-1193 provider codes (4001 user rejected,
2185
+ * 4100 unauthorized, 4200 unsupported method) and EIP-1474 JSON-RPC codes (-32602
2186
+ * invalid params, -32603 internal error).
2187
+ */
2188
+ declare class FluentIframeRpcError extends Error {
2189
+ readonly code: number;
2190
+ constructor(code: number, message: string);
2191
+ }
2192
+ declare function createFluentIframeRpcHandler(executor: FluentIframeRpcExecutor): FluentIframeRpcHandler;
2193
+ /** The part of a `message` event the bridge reads; named so tests can build one without a DOM. */
2194
+ type FluentIframeMessageEvent = {
2195
+ origin: string;
2196
+ source: unknown;
2197
+ data: unknown;
2198
+ };
2199
+ type MessageListener = (event: FluentIframeMessageEvent) => void;
2200
+ /** Where the bridge listens for the iframe's messages; `window` outside tests. */
2201
+ type FluentIframeListenTarget = {
2202
+ addEventListener: (type: "message", listener: MessageListener) => void;
2203
+ removeEventListener: (type: "message", listener: MessageListener) => void;
2204
+ };
2205
+ /**
2206
+ * The iframe element, reduced to the window the bridge replies to. Read on every
2207
+ * message, so an element swapped in later is picked up without rebuilding the bridge.
2208
+ */
2209
+ type FluentIframeElement = {
2210
+ contentWindow: {
2211
+ postMessage: (message: unknown, targetOrigin: string) => void;
2212
+ } | null;
2213
+ };
2214
+ type FluentIframeBridgeOptions = {
2215
+ /**
2216
+ * The exact origin the marketplace is served from. Messages from any other origin are
2217
+ * dropped without a reply: `@ledgerhq/iframe-provider` posts with `targetOrigin "*"`
2218
+ * and checks nothing itself, so this is the only origin check in the exchange.
2219
+ */
2220
+ allowedOrigin: string;
2221
+ executor: FluentIframeRpcExecutor;
2222
+ listenOn?: FluentIframeListenTarget;
2223
+ };
2224
+ type FluentIframeBridge = {
2225
+ /** Tell the iframe who is signed in now: `[]` on sign-out. */
2226
+ notifyAccountsChanged: (accounts: readonly Address[]) => void;
2227
+ notifyChainChanged: (chainId: number) => void;
2228
+ /**
2229
+ * Stop listening and stop notifying. A request accepted before this is still answered,
2230
+ * so a review confirmed after the host unmounts does not leave the iframe waiting.
2231
+ */
2232
+ dispose: () => void;
2233
+ };
2234
+ /**
2235
+ * Answers an embedded page's EIP-1193 calls with the widget, over the JSON-RPC 2.0
2236
+ * `postMessage` protocol `@ledgerhq/iframe-provider` speaks, which marketplace
2237
+ * white-label frontends embed: a request is `{jsonrpc, id, method, params}` posted to `window.parent`, the reply
2238
+ * carries the same `id` with `result` or `error`, and events are `{jsonrpc, method, params}`
2239
+ * without an `id`.
2240
+ */
2241
+ declare function createFluentIframeBridge(iframe: FluentIframeElement, options: FluentIframeBridgeOptions): FluentIframeBridge;
2242
+
2243
+ /**
2244
+ * The user dismissed a review (transaction or signature) instead of confirming it.
2245
+ * A class, not a message, so callers that translate errors for another party — the
2246
+ * iframe bridge maps it to EIP-1193 `4001` — can recognise it without parsing prose.
2247
+ */
2248
+ declare class FluentReviewRejectedError extends Error {
2249
+ readonly review: "transaction" | "signature";
2250
+ constructor(review: "transaction" | "signature");
2251
+ }
2252
+
2253
+ type UseFluentIframeBridgeOptions = {
2254
+ /** The exact origin the embedded page is served from; see `createFluentIframeBridge`. */
2255
+ allowedOrigin: string;
2256
+ };
2257
+ /**
2258
+ * Lets a page embedded in `iframeRef` use the account signed in here, over the
2259
+ * JSON-RPC `postMessage` protocol `@ledgerhq/iframe-provider` speaks. The bridge lives
2260
+ * while the component is mounted; the bridge states the chain and account before its
2261
+ * first reply, and sign-in and sign-out reach the iframe as `accountsChanged`. Direct mode only: in hosted mode
2262
+ * the signing and sending calls reject the way `signMessage` does.
2263
+ */
2264
+ declare function useFluentIframeBridge(iframeRef: RefObject<FluentIframeElement | null>, { allowedOrigin }: UseFluentIframeBridgeOptions): void;
2265
+
1843
2266
  type FluentWidgetConnectButtonProps = {
1844
2267
  connected: boolean;
1845
2268
  /** Preparing the account after sign-in — disables the button and shows a spinner. */
@@ -1894,15 +2317,20 @@ declare function createFluentZeroDevErc20PaymasterRpcUrl(params?: {
1894
2317
  chainId?: number;
1895
2318
  projectId?: string;
1896
2319
  }): string;
1897
- /** The App travels in the path, the user in the `Authorization` header. */
2320
+ /** The App travels in the path, the user's Fluent token in the `Authorization` header. */
1898
2321
  declare function createFluentSponsorshipRpcUrl(params: {
1899
2322
  sponsorshipUrl: string;
1900
2323
  appId: string;
1901
2324
  }): string;
2325
+ /**
2326
+ * The sponsorship paymaster for one user. `bearerToken` is the Fluent token that
2327
+ * `getAuthToken()` mints: the service binds its `aud` to the App and the UserOp `sender` to an
2328
+ * address this user proved, and a Privy access token carries neither binding.
2329
+ */
1902
2330
  declare function createFluentZeroDevSponsoredPaymaster(params: {
1903
2331
  chain: Chain;
1904
2332
  rpcUrl: string;
1905
- accessToken: string;
2333
+ bearerToken: string;
1906
2334
  }): {
1907
2335
  getPaymasterData: (userOperation: GetPaymasterDataParameters) => Promise<_zerodev_sdk.SponsorUserOperationReturnType>;
1908
2336
  };
@@ -2013,7 +2441,16 @@ interface FluentAccountDrawerProps {
2013
2441
  connectButton: ReactNode;
2014
2442
  accountMenuAddress?: string;
2015
2443
  onAccountMenuAction: (value: string | null) => void;
2444
+ /**
2445
+ * Title of the sub-page currently replacing the wallet menu (Settings,
2446
+ * Deposit, …). Set it and the header becomes a back
2447
+ * button plus this title.
2448
+ */
2449
+ subPageTitle?: string | null;
2450
+ onCloseSubPage?: () => void;
2451
+ /** @deprecated Pass `subPageTitle="Settings"` and `onCloseSubPage` instead. */
2016
2452
  settingsOpen?: boolean;
2453
+ /** @deprecated Renamed to `onCloseSubPage`. */
2017
2454
  onCloseSettings?: () => void;
2018
2455
  /** Preview harnesses relax these to keep the drawer pinned open; the widget keeps the modal defaults. */
2019
2456
  modal?: boolean | "trap-focus";
@@ -2025,11 +2462,11 @@ interface FluentAccountDrawerProps {
2025
2462
  }
2026
2463
  /**
2027
2464
  * The connected-account drawer shell: the connect-button trigger, the account
2028
- * header/actions menu (explorer / copy / settings / disconnect), and a slot
2029
- * (`children`) for the wallet menu card. Rendered whenever the widget has a
2030
- * connected account.
2465
+ * header/actions menu (explorer / copy / settings /
2466
+ * disconnect), and a slot (`children`) for the wallet menu card. Rendered
2467
+ * whenever the widget has a connected account.
2031
2468
  */
2032
- declare function FluentAccountDrawer({ accountOpen, setAccountOpen, hasConnectedAccount, isMobile, connectButton, accountMenuAddress, onAccountMenuAction, settingsOpen, onCloseSettings, modal, disablePointerDismissal, children, userLogoUrl, defaultLogoUrl, }: FluentAccountDrawerProps): React.JSX.Element;
2469
+ declare function FluentAccountDrawer({ accountOpen, setAccountOpen, hasConnectedAccount, isMobile, connectButton, accountMenuAddress, onAccountMenuAction, subPageTitle, onCloseSubPage, settingsOpen, onCloseSettings, modal, disablePointerDismissal, children, userLogoUrl, defaultLogoUrl, }: FluentAccountDrawerProps): React.JSX.Element;
2033
2470
 
2034
2471
  /** Colour scheme and design tokens for the widget's own UI — never around host content. */
2035
2472
  declare const WIDGET_STYLE_SCOPE = "fluent-root dark contents text-foreground";
@@ -2075,10 +2512,27 @@ interface WalletMenuActionCardProps {
2075
2512
  onTabChange: (tab: string) => void;
2076
2513
  /** The connected account address shown in the header (external EOA or Fluent smart account). */
2077
2514
  connectedAddress?: string;
2515
+ /** The External wallet that signs bridge deposits, while one is connected. */
2516
+ externalWalletAddress?: string;
2078
2517
  /** Bumped after a confirmed widget transaction so balances refetch. */
2079
2518
  balanceRevisionCounter?: number;
2519
+ /**
2520
+ * Where this person's hand-added tokens live. The service's store while the
2521
+ * widget holds a Fluent token, this browser's otherwise.
2522
+ */
2523
+ userTokenStore?: UserTokenStore;
2524
+ /**
2525
+ * True while the stored settings are still on their way. The preferences and
2526
+ * the token actions stay disabled so the answer cannot overwrite a choice
2527
+ * made while it was in flight.
2528
+ */
2529
+ settingsPending?: boolean;
2530
+ /** A preference the service refused to store. */
2531
+ settingsError?: string | null;
2532
+ /** A token write the service refused. */
2533
+ tokenListError?: string | null;
2080
2534
  }
2081
- declare function WalletMenuActionCard({ track, session, smartAccountAddress, faucetBusy, onFaucet, config, tokens, gasPaymentToken, onGasPaymentTokenChange, silentSigningEnabled, onSilentSigningChange, onDisconnect, onConnectWithX, tab, onTabChange, connectedAddress, balanceRevisionCounter, }: WalletMenuActionCardProps): React.JSX.Element;
2535
+ declare function WalletMenuActionCard({ track, session, smartAccountAddress, faucetBusy, onFaucet, config, tokens, gasPaymentToken, onGasPaymentTokenChange, silentSigningEnabled, onSilentSigningChange, onDisconnect, onConnectWithX, tab, onTabChange, connectedAddress, externalWalletAddress, balanceRevisionCounter, userTokenStore, settingsPending, settingsError, tokenListError, }: WalletMenuActionCardProps): React.JSX.Element | null;
2082
2536
 
2083
2537
  declare const buttonVariants: (props?: ({
2084
2538
  variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
@@ -2110,7 +2564,7 @@ declare function DialogDescription({ className, ...props }: Dialog$1.Description
2110
2564
 
2111
2565
  declare function Separator({ className, orientation, ...props }: Separator$1.Props): React.JSX.Element;
2112
2566
 
2113
- type IconName = "coinbase" | "walletConnect" | "metaMask" | "rabby" | "keplr" | "okx" | "fluent" | "x" | "arrow-right-s-line" | "arrow-left-right-line" | "arrow-up-s-fill" | "arrow-down-s-fill" | "plus" | "eth" | "usdnr" | "blend";
2567
+ type IconName = "coinbase" | "walletConnect" | "metaMask" | "rabby" | "keplr" | "okx" | "fluent" | "x" | "google" | "arrow-right-s-line" | "arrow-left-right-line" | "arrow-up-s-fill" | "arrow-down-s-fill" | "plus" | "eth" | "usdnr" | "usdc" | "blend";
2114
2568
  declare function Icon({ name, className, ...props }: {
2115
2569
  name: IconName;
2116
2570
  } & SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -2129,4 +2583,4 @@ type AccountAvatarProps = {
2129
2583
  */
2130
2584
  declare function AccountAvatar({ userLogoUrl, defaultLogoUrl, className }: AccountAvatarProps): React.JSX.Element;
2131
2585
 
2132
- export { AccountAvatar, type AccountAvatarProps, type AppDefinition, type BridgeAddresses, Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, FLUENT_CONNECT_DEFAULT_ASSETS, FLUENT_GAS_PAYMENT_DEFAULT_ETH_RATES, FLUENT_USER_TOKEN_LIMIT, FLUENT_WIDGET_SESSION_STORAGE_KEY, FLUENT_WIDGET_USER_TOKENS_STORAGE_KEY, FLUENT_ZERODEV_ERC20_PAYMASTER_QUERY, FLUENT_ZERODEV_PAYMASTER_DEMO_RECIPIENT, type FluentAccountCapabilities, FluentAccountDrawer, type FluentAccountType, FluentAuthError, type FluentAuthErrorCode, type FluentBatchApi, type FluentBatchCallInput, type FluentBatchConfirmationMode, type FluentBatchOperation, type FluentBatchOperationExecuteOptions, type FluentBatchOperationExecutor, type FluentBatchOperationInput, type FluentBatchOperationReview, type FluentCallPermission, type FluentChainDefinition, type FluentClient, type FluentClientConfig, type FluentEncodedBatchCall, type FluentExecuteResult, type FluentExternalWalletState, type FluentFamilies, type FluentFamiliesClient, type FluentFamiliesClientConfig, type FluentFamily, type FluentFamilyTier, type FluentFamilyType, type FluentGasPayment, type FluentGasPaymentEthRates, type FluentGasPaymentSelection, type FluentGasPaymentValueTier, type FluentGasTokenSymbol, type FluentPermissionApi, type FluentPermissionArgConstraint, type FluentPermissionArgs, type FluentPermissionBatchPolicy, type FluentPermissionBatchPolicyInput, type FluentPermissionCallInput, type FluentPermissionCallPolicy, type FluentPermissionClient, type FluentPermissionClientConfig, type FluentPermissionGrant, type FluentPermissionGrantRequest, type FluentPermissionPolicy, type FluentPermissionPolicyBuilders, type FluentPermissionPreview, type FluentPermissionSession, type FluentPermissionSessionExecutor, type FluentPermissionSessionInput, type FluentPermissionStatus, FluentPortalContainerProvider, type FluentSession, type FluentSignApi, type FluentSignatureReview, type FluentSpendPeriod, type FluentSpendPermission, type FluentSponsorshipReason, type FluentTokenBalance, type FluentTokenDefinition, type FluentTypedDataRequest, type FluentUserTokenAddResult, FluentWidget, type FluentWidgetAccount, type FluentWidgetAuthMode, type FluentWidgetConfig, FluentWidgetConnectButton, type FluentWidgetConnectButtonProps, type FluentWidgetConnectButtonRenderContext, type FluentWidgetExecutionStatus, type FluentWidgetGasPayment, type FluentWidgetNetwork, FluentWidgetNetworkProvider, type FluentWidgetProps, type FluentWidgetRenderContext, type FluentWidgetSession, type FluentWidgetStatus, type FluentZeroDevErc20PaymasterToken, type FluentZeroDevErc20PaymasterTokenInfo, type FluentZeroDevKernel, type FluentZeroDevPaymasterDemoResult, type FluentZeroDevPaymasterKernel, type FluentZeroDevPermissionCall, type FluentZeroDevPermissionSession, type FluentZeroDevSignerMode, Icon, type IconName, type L1ChainDefinition, Label, type ResolvedFluentWidgetConfig, Separator, Switch, type UserTokenStore, WIDGET_STYLE_SCOPE, WalletMenuActionCard, type ZerodevIntegration, buttonVariants, clearPrivyRecentLoginMethod, createFluentBatchOp, createFluentClient, createFluentFamiliesClient, createFluentPermissionApi, createFluentPermissionClient, createFluentPermissionPolicyBuilders, createFluentPermissionSession, createFluentSponsorshipRpcUrl, createFluentUserTokenStore, createFluentZeroDevErc20Paymaster, createFluentZeroDevErc20PaymasterApprovalCall, createFluentZeroDevErc20PaymasterClient, createFluentZeroDevErc20PaymasterRpcUrl, createFluentZeroDevPermissionSession, createFluentZeroDevRpcUrl, createFluentZeroDevSponsoredPaymaster, findFluentSymbolCollisions, fluent, apps as fluentApps, fluentBridgeAbi, fluent$1 as fluentChain, fluentChains, fluentDefinitionToViemChain, integrations as fluentIntegrations, l1Chains as fluentL1Chains, fluentMainnet, fluentMainnetTokenDefaults, fluentTestnet, fluentTestnetTokenDefaults, fluentTokenIdentity, fluentZeroDevChainIds, getApp, getContractAddressFromChain, getFluentChain, getFluentChainByChainId, getFluentChainForNetwork, getFluentDefaultWidgetDisplayTokens, getFluentDefaultWidgetGasTokens, getFluentExplorerBaseUrl, getFluentGasPaymentEthValue, getFluentGasPaymentTokens, getFluentGasPaymentValueTier, getFluentGasTokenAddress, getFluentTokenDefaults, getFluentTokenDefaultsForNetwork, getFluentZeroDevErc20PaymasterTokens, getL1Chain, getL1ForFluentChain, getZeroDevRpcUrl, getZerodevIntegration, isFaucetNetwork, isFluentDefaultToken, isFluentNativeToken, isFluentZeroDevChain, l1DefinitionToViemChain, mergeFluentDisplayTokens, normalizeFluentWidgetNetwork, readFluentTokenBalances, readFluentTokenMetadata, registryVersion, resolveBridgeAddresses, resolveFluentWidgetNetworkFromEnv, resolveFluentZeroDevErc20PaymasterToken, resolveL1Definition, selectFluentGasPaymentToken, sendFluentZeroDevErc20PaymasterDemo, sortFluentGasTokens, useFluentUserTokens, useFluentWidget, useFluentWidgetNetwork, useFluentZeroDevAccount, useWidget, withFluentSignaturePrompt };
2586
+ export { AccountAvatar, type AccountAvatarProps, type AppDefinition, type BackendUserTokenStore, type BridgeAddresses, Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, FLUENT_CONNECT_DEFAULT_ASSETS, FLUENT_GAS_PAYMENT_DEFAULT_ETH_RATES, FLUENT_USER_TOKEN_LIMIT, FLUENT_WIDGET_DEFAULT_GAS_TOKEN, FLUENT_WIDGET_SESSION_STORAGE_KEY, FLUENT_WIDGET_USER_TOKENS_IMPORT_MARKER_KEY, FLUENT_WIDGET_USER_TOKENS_STORAGE_KEY, FLUENT_ZERODEV_ERC20_PAYMASTER_QUERY, FLUENT_ZERODEV_PAYMASTER_DEMO_RECIPIENT, type FluentAccountCapabilities, FluentAccountDrawer, type FluentAccountType, FluentAuthError, type FluentAuthErrorCode, type FluentBatchApi, type FluentBatchCallInput, type FluentBatchConfirmationMode, type FluentBatchOperation, type FluentBatchOperationExecuteOptions, type FluentBatchOperationExecutor, type FluentBatchOperationInput, type FluentBatchOperationReview, type FluentCallPermission, type FluentChainDefinition, type FluentClient, type FluentClientConfig, type FluentEncodedBatchCall, type FluentExecuteResult, type FluentExternalWalletState, type FluentFamilies, type FluentFamiliesClient, type FluentFamiliesClientConfig, type FluentFamily, type FluentFamilyTier, type FluentFamilyType, type FluentGasPayment, type FluentGasPaymentEthRates, type FluentGasPaymentSelection, type FluentGasPaymentValueTier, type FluentGasTokenSymbol, type FluentIframeBridge, type FluentIframeBridgeOptions, type FluentIframeElement, FluentIframeRpcError, type FluentIframeRpcExecutor, type FluentIframeRpcHandler, type FluentIframeRpcRequest, type FluentPermissionApi, type FluentPermissionArgConstraint, type FluentPermissionArgs, type FluentPermissionBatchPolicy, type FluentPermissionBatchPolicyInput, type FluentPermissionCallInput, type FluentPermissionCallPolicy, type FluentPermissionClient, type FluentPermissionClientConfig, type FluentPermissionGrant, type FluentPermissionGrantRequest, type FluentPermissionPolicy, type FluentPermissionPolicyBuilders, type FluentPermissionPreview, type FluentPermissionSession, type FluentPermissionSessionExecutor, type FluentPermissionSessionInput, type FluentPermissionStatus, FluentPortalContainerProvider, FluentReviewRejectedError, type FluentSession, type FluentSettingsClient, FluentSettingsError, type FluentSettingsErrorCode, type FluentSignApi, type FluentSignatureReview, type FluentSpendPeriod, type FluentSpendPermission, FluentSponsorshipFallbackError, type FluentSponsorshipReason, type FluentTokenBalance, type FluentTokenDefinition, type FluentTypedDataRequest, type FluentUserSettings, type FluentUserSettingsPatch, type FluentUserTokenAddResult, type FluentWalletChoice, FluentWidget, type FluentWidgetAccount, type FluentWidgetAuthMode, type FluentWidgetConfig, FluentWidgetConnectButton, type FluentWidgetConnectButtonProps, type FluentWidgetConnectButtonRenderContext, type FluentWidgetExecutionStatus, type FluentWidgetGasPayment, type FluentWidgetNetwork, FluentWidgetNetworkProvider, type FluentWidgetProps, type FluentWidgetRenderContext, type FluentWidgetSession, type FluentWidgetStatus, type FluentZeroDevErc20PaymasterToken, type FluentZeroDevErc20PaymasterTokenInfo, type FluentZeroDevKernel, type FluentZeroDevPaymasterDemoResult, type FluentZeroDevPaymasterKernel, type FluentZeroDevPermissionCall, type FluentZeroDevPermissionSession, type FluentZeroDevSignerMode, type FluentZeroDevSponsorshipTokenSource, Icon, type IconName, type L1ChainDefinition, Label, type ResolvedFluentWidgetConfig, Separator, Switch, type UseFluentIframeBridgeOptions, type UserTokenStore, WIDGET_STYLE_SCOPE, WalletMenuActionCard, type ZerodevIntegration, buttonVariants, clearPrivyRecentLoginMethod, createFluentBackendUserTokenStore, createFluentBatchOp, createFluentClient, createFluentFamiliesClient, createFluentIframeBridge, createFluentIframeRpcHandler, createFluentPermissionApi, createFluentPermissionClient, createFluentPermissionPolicyBuilders, createFluentPermissionSession, createFluentSettingsClient, createFluentSponsorshipRpcUrl, createFluentUserTokenStore, createFluentZeroDevErc20Paymaster, createFluentZeroDevErc20PaymasterApprovalCall, createFluentZeroDevErc20PaymasterClient, createFluentZeroDevErc20PaymasterRpcUrl, createFluentZeroDevPermissionSession, createFluentZeroDevRpcUrl, createFluentZeroDevSponsoredPaymaster, findFluentSymbolCollisions, fluent, apps as fluentApps, fluentBridgeAbi, fluent$1 as fluentChain, fluentChains, fluentDefinitionToViemChain, integrations as fluentIntegrations, l1Chains as fluentL1Chains, fluentMainnet, fluentMainnetTokenDefaults, fluentTestnet, fluentTestnetTokenDefaults, fluentTokenIdentity, fluentZeroDevChainIds, getApp, getContractAddressFromChain, getFluentChain, getFluentChainByChainId, getFluentChainForNetwork, getFluentDefaultWidgetDisplayTokens, getFluentDefaultWidgetGasTokens, getFluentExplorerBaseUrl, getFluentGasPaymentEthValue, getFluentGasPaymentTokens, getFluentGasPaymentValueTier, getFluentGasTokenAddress, getFluentTokenDefaults, getFluentTokenDefaultsForNetwork, getFluentZeroDevErc20PaymasterTokens, getL1Chain, getL1ForFluentChain, getZeroDevRpcUrl, getZerodevIntegration, isFaucetNetwork, isFluentDefaultToken, isFluentNativeToken, isFluentZeroDevChain, l1DefinitionToViemChain, mergeFluentDisplayTokens, normalizeFluentWidgetNetwork, readFluentTokenBalances, readFluentTokenMetadata, registryVersion, resolveBridgeAddresses, resolveDefaultGasToken, resolveFluentWidgetNetworkFromEnv, resolveFluentZeroDevErc20PaymasterToken, resolveL1Definition, selectFluentGasPaymentToken, sendFluentZeroDevErc20PaymasterDemo, sortFluentGasTokens, useFluentIframeBridge, useFluentUserTokens, useFluentWidget, useFluentWidgetNetwork, useFluentZeroDevAccount, useWidget, withFluentSignaturePrompt };