@fluent.xyz/connect 0.3.2 → 0.4.1

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,5 +1,5 @@
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
4
  import { ReactNode, RefObject, AnchorHTMLAttributes, SVGProps } from 'react';
5
5
  import * as _privy_io_react_auth from '@privy-io/react-auth';
@@ -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;
@@ -796,8 +925,8 @@ declare const fluentTestnetTokenDefaults: {
796
925
  readonly chainId: 20994;
797
926
  readonly symbol: "USDnr";
798
927
  readonly name: "USDnr";
799
- readonly decimals: 18;
800
- readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A";
928
+ readonly decimals: 6;
929
+ readonly address: "0x279a6DC6354374473f6f3CFB3999e6C2e146f8a1";
801
930
  readonly gasPriority: 2;
802
931
  };
803
932
  readonly BLEND: {
@@ -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
  };
@@ -848,8 +977,8 @@ declare function getFluentTokenDefaultsForNetwork(network: FluentNetworkName): {
848
977
  readonly chainId: 20994;
849
978
  readonly symbol: "USDnr";
850
979
  readonly name: "USDnr";
851
- readonly decimals: 18;
852
- readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A";
980
+ readonly decimals: 6;
981
+ readonly address: "0x279a6DC6354374473f6f3CFB3999e6C2e146f8a1";
853
982
  readonly gasPriority: 2;
854
983
  };
855
984
  readonly BLEND: {
@@ -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
  };
@@ -1078,8 +1207,8 @@ declare function getFluentTokenDefaults(network: FluentWidgetNetwork): {
1078
1207
  readonly chainId: 20994;
1079
1208
  readonly symbol: "USDnr";
1080
1209
  readonly name: "USDnr";
1081
- readonly decimals: 18;
1082
- readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A";
1210
+ readonly decimals: 6;
1211
+ readonly address: "0x279a6DC6354374473f6f3CFB3999e6C2e146f8a1";
1083
1212
  readonly gasPriority: 2;
1084
1213
  };
1085
1214
  readonly BLEND: {
@@ -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
@@ -1179,16 +1314,48 @@ declare function getFluentGasPaymentEthValue(params: {
1179
1314
  formatted: string;
1180
1315
  tier: FluentGasPaymentValueTier;
1181
1316
  };
1317
+ /**
1318
+ * ETH-value rates for `getFluentGasPaymentEthValue`, derived from the USD prices
1319
+ * the widget already holds rather than from configuration.
1320
+ *
1321
+ * `gasPayment.ethValueByToken` is the App's to set and almost no App sets it,
1322
+ * which left every "is this balance too small to pay a fee" question
1323
+ * unanswerable for anything but ETH. The prices are per Token identity and the
1324
+ * rates are per symbol, because that is what the two sides are keyed by.
1325
+ * Anything the App did configure still wins: it is a deliberate override of
1326
+ * exactly this guess.
1327
+ */
1328
+ declare function deriveFluentGasEthRates(params: {
1329
+ tokens: readonly (FluentTokenDefinition & {
1330
+ identity: string;
1331
+ })[];
1332
+ usdPrices: Readonly<Record<string, number>>;
1333
+ configured?: FluentGasPaymentEthRates;
1334
+ }): FluentGasPaymentEthRates;
1182
1335
  declare function getFluentGasPaymentValueTier(ethValueWei: bigint): FluentGasPaymentValueTier;
1183
1336
 
1184
1337
  declare const FLUENT_WIDGET_SESSION_STORAGE_KEY = "fluent:widget:session:v1";
1185
1338
  /**
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.
1339
+ * Tokens the user added by hand, in the states where no Fluent token can exist:
1340
+ * hosted mode with a Fluent ID, and the not-connected state. Everywhere
1341
+ * `getAuthToken()` resolves, the service holds the list per person and this key
1342
+ * is not read (ADR 0004).
1343
+ *
1344
+ * Keyed per chain inside the payload, not per account: one person holds both a
1345
+ * Fluent ID and possibly an external wallet and switches between them, and
1346
+ * their list should not appear to vanish when they disconnect one.
1190
1347
  */
1191
1348
  declare const FLUENT_WIDGET_USER_TOKENS_STORAGE_KEY = "fluent:widget:tokens:v1";
1349
+ /**
1350
+ * Set while the one-time import of the local token list is in flight, and
1351
+ * removed with the list itself once every entry is on the service. It is what
1352
+ * tells a resumed import from a person who simply already had a list there.
1353
+ *
1354
+ * Its value is the subject whose import stopped halfway, not a flag: this key is
1355
+ * per browser, and the next person to sign in here must not have another's
1356
+ * leftovers pushed into their list (ADR 0004).
1357
+ */
1358
+ declare const FLUENT_WIDGET_USER_TOKENS_IMPORT_MARKER_KEY = "fluent:widget:tokens-import:v1";
1192
1359
 
1193
1360
  declare const FLUENT_CONNECT_DEFAULT_ASSETS: {
1194
1361
  readonly fluentLogo: string;
@@ -1214,6 +1381,11 @@ type FluentWidgetSession = FluentSession & {
1214
1381
  metadata?: Record<string, string>;
1215
1382
  };
1216
1383
  type FluentWidgetAuthMode = "hosted" | "direct";
1384
+ /**
1385
+ * A sign-in method the inline (`authMode: "direct"`) dialog can offer beside X.
1386
+ * X is not on this list: it is always offered and cannot be switched off.
1387
+ */
1388
+ type FluentWidgetAuthMethod = "google" | "email" | "passkey";
1217
1389
  type FluentWidgetConfig = {
1218
1390
  /** The App's id (`app_<32 hex>`) — the same string the Fluent Dashboard shows and the token's `aud` carries. */
1219
1391
  appId: string;
@@ -1235,6 +1407,23 @@ type FluentWidgetConfig = {
1235
1407
  * to be registered in the Fluent Privy Allowed Origins.
1236
1408
  */
1237
1409
  authMode?: FluentWidgetAuthMode;
1410
+ /**
1411
+ * HTTPS callback for the widget's Privy OAuth flows. Capacitor apps must use a
1412
+ * Universal Link registered in Privy and handle its return in the host app.
1413
+ * Omit to keep Privy's current-page redirect. The hosted authorize popup owns
1414
+ * its own redirect and is not configured by this option.
1415
+ */
1416
+ customOAuthRedirectUrl?: string;
1417
+ /**
1418
+ * Sign-in methods the inline (`authMode: "direct"`) dialog offers beside X, in the
1419
+ * order given. Defaults to `["google", "email", "passkey"]` — all of them; name a
1420
+ * shorter set to drop the rest, or `[]` to leave X as the only Fluent method.
1421
+ * Sign-in with X is always offered and is not a value here.
1422
+ *
1423
+ * A method still has to be enabled on the shared Privy app — listing it here only
1424
+ * decides whether its button is drawn.
1425
+ */
1426
+ enabledAuthMethods?: FluentWidgetAuthMethod[];
1238
1427
  swapper?: {
1239
1428
  enabled?: boolean;
1240
1429
  integratorId?: string;
@@ -1242,6 +1431,10 @@ type FluentWidgetConfig = {
1242
1431
  dstTokenAddress?: string;
1243
1432
  };
1244
1433
  gasPayment?: {
1434
+ /** Initial/fallback token. Defaults to ETH; a valid saved user choice wins. */
1435
+ defaultToken?: FluentGasTokenSymbol;
1436
+ /** Native-gas sponsorship policy. Defaults to `auto`; `never` skips the paymaster. */
1437
+ sponsorship?: "auto" | "never";
1245
1438
  ethValueByToken?: FluentGasPaymentEthRates;
1246
1439
  };
1247
1440
  /**
@@ -1255,6 +1448,8 @@ type FluentWidgetConfig = {
1255
1448
  campaign?: string;
1256
1449
  /** Turns off all analytics: PostHog is never initialised, nothing is sent or stored. */
1257
1450
  disableAnalytics?: boolean;
1451
+ /** Restore injected wallets and WalletConnect by default; true restores all, false restores none. */
1452
+ reconnectOnMount?: boolean;
1258
1453
  /**
1259
1454
  * Point the widget at a sponsorship service other than the network default. Local
1260
1455
  * development only: the deployed URL is the one every real integration should use.
@@ -1288,6 +1483,9 @@ type ResolvedFluentWidgetConfig = {
1288
1483
  network: FluentWidgetNetwork;
1289
1484
  appName: string;
1290
1485
  authMode: FluentWidgetAuthMode;
1486
+ customOAuthRedirectUrl: string | undefined;
1487
+ /** What the dialog shows beside X, defaults applied. */
1488
+ authMethods: FluentWidgetAuthMethod[];
1291
1489
  authorizeUrl: string;
1292
1490
  faucetEndpoint: string;
1293
1491
  eventsEndpoint: string;
@@ -1295,6 +1493,7 @@ type ResolvedFluentWidgetConfig = {
1295
1493
  sponsorshipUrl: string;
1296
1494
  authTokenRenewalOffsetSeconds: number;
1297
1495
  disableAnalytics: boolean;
1496
+ reconnectOnMount: boolean | undefined;
1298
1497
  publicApiUrl: string;
1299
1498
  reputationSignupUrl: string;
1300
1499
  bridgeUrl: string;
@@ -1305,6 +1504,8 @@ type ResolvedFluentWidgetConfig = {
1305
1504
  dstTokenAddress: string;
1306
1505
  };
1307
1506
  gasPayment: {
1507
+ defaultToken: FluentGasTokenSymbol;
1508
+ sponsorship: "auto" | "never";
1308
1509
  ethValueByToken: FluentGasPaymentEthRates | undefined;
1309
1510
  };
1310
1511
  reputationEnabled: boolean;
@@ -1338,9 +1539,36 @@ declare function useFluentWidgetNetwork(): FluentWidgetNetworkContextValue;
1338
1539
  * the caller asked to pay its own gas, so the sponsorship paymaster was never contacted.
1339
1540
  */
1340
1541
  type FluentSponsorshipReason = "no_token" | "denied" | "unauthorized" | "unreachable" | "not_requested";
1542
+ /** Both sponsored submission and the account-paid fallback failed. */
1543
+ declare class FluentSponsorshipFallbackError extends Error {
1544
+ readonly sponsorshipReason: FluentSponsorshipReason;
1545
+ readonly fallbackError: unknown;
1546
+ constructor(params: {
1547
+ sponsorshipReason: FluentSponsorshipReason;
1548
+ /** The original sponsored submission error, retained as `cause`. */
1549
+ sponsorshipError: unknown;
1550
+ fallbackError: unknown;
1551
+ });
1552
+ }
1553
+
1554
+ /** How a sponsored operation asks for its Fluent token. `fresh` discards a rejected one first. */
1555
+ type SponsorshipTokenRequest = (options?: {
1556
+ fresh?: boolean;
1557
+ }) => Promise<string>;
1341
1558
 
1342
1559
  type KernelAccount = Awaited<ReturnType<typeof createKernelAccount>>;
1343
1560
  type KernelClient = ReturnType<typeof createKernelAccountClient>;
1561
+ /**
1562
+ * Where a sponsored operation gets its bearer: the Fluent token for the connected account, and
1563
+ * which kind of account that is. Read at send time through a function rather than taken as a
1564
+ * value, because `useFluentZeroDevAccount` is constructed before the widget has derived the
1565
+ * account or built its `getAuthToken()`, and reordering the widget would change when the kernel
1566
+ * initializes.
1567
+ */
1568
+ type FluentZeroDevSponsorshipTokenSource = {
1569
+ accountType: FluentAccountType | undefined;
1570
+ getAuthToken: SponsorshipTokenRequest;
1571
+ };
1344
1572
  type FluentZeroDevSignerMode = "prompt" | "silent";
1345
1573
  type FluentZeroDevCall = {
1346
1574
  to: Address;
@@ -1377,6 +1605,8 @@ declare function useFluentZeroDevAccount(hookOptions?: {
1377
1605
  /** App id in the sponsorship path. Sponsorship is off unless both this and the URL are set. */
1378
1606
  appId?: string;
1379
1607
  sponsorshipUrl?: string;
1608
+ /** The Fluent token a sponsored operation authenticates with. Without it nothing is sponsored. */
1609
+ sponsorshipTokenSource?: () => FluentZeroDevSponsorshipTokenSource | null;
1380
1610
  authorizationSession?: {
1381
1611
  expiresAt: number;
1382
1612
  serializedPermissionAccount: string;
@@ -1406,8 +1636,10 @@ declare function useFluentZeroDevAccount(hookOptions?: {
1406
1636
  data?: Hex;
1407
1637
  value?: bigint;
1408
1638
  }) => Promise<Hash>;
1409
- sendCalls: (calls: FluentZeroDevCall[], options?: FluentBatchOperationExecuteOptions) => Promise<{
1639
+ sendCalls: (calls: FluentZeroDevCall[], options?: FluentBatchOperationExecuteOptions, readyAccount?: unknown) => Promise<{
1410
1640
  hash: Hash;
1641
+ receipt: TransactionReceipt;
1642
+ userOpHash: Hash;
1411
1643
  sponsored: boolean;
1412
1644
  sponsorshipReason?: FluentSponsorshipReason;
1413
1645
  paymaster?: Address;
@@ -1423,7 +1655,7 @@ declare function createFluentZeroDevPermissionSession(params: {
1423
1655
  /**
1424
1656
  * Runs `sign` with the Privy prompt worded for a plain signature rather than a
1425
1657
  * UserOperation. The prompt kernel's signer reads a module-level context because
1426
- * Privy's `uiOptions` are fixed when the signer is built, not per call.
1658
+ * the signer is built once per mode, while the wording is per call.
1427
1659
  */
1428
1660
  declare function withFluentSignaturePrompt<T>(sign: () => Promise<T>): Promise<T>;
1429
1661
 
@@ -1519,6 +1751,20 @@ type FluentSignApi = {
1519
1751
  signTypedData: <const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(typedData: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
1520
1752
  };
1521
1753
 
1754
+ /** Execution gas policy for a smart-account batch. Other UserOperation gas fields remain estimated. */
1755
+ type FluentUserOperationGas = {
1756
+ callGasLimit: bigint;
1757
+ callGasBuffer?: never;
1758
+ } | {
1759
+ callGasLimit?: never;
1760
+ callGasBuffer: {
1761
+ /** Extra percent of the bundler estimate, rounded up. Must be a nonnegative safe integer. */
1762
+ percentage?: number;
1763
+ /** Extra gas added after the percentage buffer. Must be nonnegative. */
1764
+ fixed?: bigint;
1765
+ };
1766
+ };
1767
+
1522
1768
  type FluentBatchCallInput = {
1523
1769
  id?: string;
1524
1770
  label?: string;
@@ -1569,6 +1815,10 @@ type FluentExecuteResult = {
1569
1815
  hash: Hash;
1570
1816
  /** All transaction hashes in order. One for a smart-account UserOp; one per call for an EOA. */
1571
1817
  hashes: Hash[];
1818
+ /** Included receipt for hash (the final EOA call); not a finality guarantee. */
1819
+ receipt?: TransactionReceipt;
1820
+ /** ERC-4337 operation hash when executing through a smart account. */
1821
+ userOpHash?: Hash;
1572
1822
  /** True when all calls landed atomically (smart account), false for sequential EOA txs. */
1573
1823
  atomic: boolean;
1574
1824
  /**
@@ -1609,8 +1859,21 @@ type FluentBatchOperationExecutor = {
1609
1859
  * back to native gas (no ERC20 paymaster).
1610
1860
  */
1611
1861
  defaultGasPayment?: FluentWidgetGasPayment;
1862
+ /** Native-gas policy inherited from widget config; each execution may override it. */
1863
+ defaultSponsorship?: "auto" | "never";
1612
1864
  confirm?: (operation: FluentBatchOperationReview) => Promise<void>;
1613
- sendCalls: (calls: FluentEncodedBatchCall[], options: FluentBatchOperationExecuteOptions) => Promise<FluentExecuteResult>;
1865
+ /**
1866
+ * `readyAccount` is whatever `ensureReady` resolved with for this execution, and is
1867
+ * `undefined` when the executor was already ready and `ensureReady` never ran.
1868
+ *
1869
+ * It is passed because an executor assembled inside a React render — which is every
1870
+ * executor the widget builds — closes over the readiness state of that render, and
1871
+ * `ensureReady` resolving does not re-render it: in the tick after the account becomes
1872
+ * ready, `sendCalls` still sees "not ready" and has no way to reach the account that
1873
+ * now exists. This argument is that way. An executor whose readiness is not captured in
1874
+ * a closure can ignore it.
1875
+ */
1876
+ sendCalls: (calls: FluentEncodedBatchCall[], options: FluentBatchOperationExecuteOptions, readyAccount?: unknown) => Promise<FluentExecuteResult>;
1614
1877
  };
1615
1878
  type FluentBatchConfirmationMode = "always" | "session";
1616
1879
  type FluentGasPayment = {
@@ -1645,6 +1908,8 @@ type FluentGasPayment = {
1645
1908
  type FluentBatchOperationExecuteOptions = {
1646
1909
  confirmation?: FluentBatchConfirmationMode;
1647
1910
  gasPayment?: FluentGasPayment;
1911
+ /** Smart-account execution gas override or headroom. Ignored for external EOA transactions. */
1912
+ userOperationGas?: FluentUserOperationGas;
1648
1913
  };
1649
1914
  type FluentBatchOperationReview = {
1650
1915
  id?: string;
@@ -1669,6 +1934,13 @@ type FluentBatchApi = FluentPermissionApi & FluentSignApi & {
1669
1934
  };
1670
1935
  declare function createFluentBatchOp(input: FluentBatchOperationInput, executor?: FluentBatchOperationExecutor | null): FluentBatchOperation;
1671
1936
 
1937
+ type FluentWalletChoice = {
1938
+ id: string;
1939
+ name: string;
1940
+ icon?: string;
1941
+ /** This connector opens an external wallet/QR surface. */
1942
+ handoff?: boolean;
1943
+ };
1672
1944
  type FluentExternalWalletState = {
1673
1945
  configured: boolean;
1674
1946
  connected: boolean;
@@ -1682,6 +1954,9 @@ type FluentExternalWalletState = {
1682
1954
  * `"disconnected"` slightly earlier during a reload.
1683
1955
  */
1684
1956
  reconnecting?: boolean;
1957
+ /** Optional inline choices; hosts without them keep their existing open() picker. */
1958
+ choices?: readonly FluentWalletChoice[];
1959
+ connectChoice?: (id: string) => Promise<void>;
1685
1960
  open: () => void;
1686
1961
  disconnect: () => void;
1687
1962
  switchChain: (chainId: number) => Promise<void>;
@@ -1702,6 +1977,39 @@ type FluentExternalWalletState = {
1702
1977
  */
1703
1978
  type FluentWidgetStatus = "restoring" | "connecting" | "connected" | "disconnected";
1704
1979
 
1980
+ 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" | "not_authenticated" | "user_rejected" | "linked_to_another_user" | "link_failed";
1981
+ declare class FluentAuthError extends Error {
1982
+ readonly code: FluentAuthErrorCode;
1983
+ readonly status?: number | undefined;
1984
+ constructor(code: FluentAuthErrorCode, message: string, status?: number | undefined);
1985
+ }
1986
+
1987
+ /** One X account as the Fluent auth service reports it. */
1988
+ type FluentXAccount = {
1989
+ id: string;
1990
+ handle: string;
1991
+ avatarUrl: string;
1992
+ };
1993
+ /**
1994
+ * The wire body of `GET /api/v1/me/profile` and of `POST /api/v1/me/identity/privy`.
1995
+ *
1996
+ * `x` is required and nullable: the route always says something about the X account, and `null`
1997
+ * is that answer — this user has none linked. A body without the key at all is not this route's.
1998
+ */
1999
+ type FluentProfile = {
2000
+ subject: string;
2001
+ appId: string;
2002
+ x: FluentXAccount | null;
2003
+ };
2004
+ type FluentLinkXResult = {
2005
+ status: "linked";
2006
+ x: FluentXAccount;
2007
+ }
2008
+ /** The page is leaving for X. Call linkX() again after the return; useLinkX() does it on mount. */
2009
+ | {
2010
+ status: "redirecting";
2011
+ };
2012
+
1705
2013
  type FluentWidgetRenderContext = {
1706
2014
  session: FluentWidgetSession | null;
1707
2015
  connectedAddress?: string;
@@ -1712,9 +2020,16 @@ type FluentWidgetRenderContext = {
1712
2020
  /**
1713
2021
  * Tear down the current session without going through the widget's account
1714
2022
  * 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
2023
+ * direct auth. The session, the stored identity token and any external wallet
2024
+ * connection are cleared before this resolves, so a host can await it before
1717
2025
  * resetting its own state.
2026
+ *
2027
+ * It also covers ending the Fluent session at the service — revoking the refresh
2028
+ * family so the 30 days stop here — including for a `getAuthToken()` that was still
2029
+ * out when the user disconnected: a wallet signature answered late opens a session
2030
+ * of its own, and this promise does not resolve while one of those could still be
2031
+ * live. It can therefore take as long as that request does. It never rejects, and
2032
+ * the widget's own teardown does not wait for it.
1718
2033
  */
1719
2034
  disconnect: () => Promise<void>;
1720
2035
  hasConnectedAccount: boolean;
@@ -1742,11 +2057,48 @@ type FluentWidgetRenderContext = {
1742
2057
  * A short-lived (5 min) Fluent-signed JWT for the connected user. Verify it on your backend
1743
2058
  * against `<iss>/.well-known/jwks.json` (ES256), checking `iss`, `aud` (= your appId) and
1744
2059
  * `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).
2060
+ * before `exp`, and renewed silently after that — for a Fluent ID and for an external wallet
2061
+ * alike. The wallet signs once, when the session opens; the renewals that follow ask it for
2062
+ * nothing. A new signature is needed only when the session's 30-day refresh family expires,
2063
+ * when the service rejects the refresh credential, or when it was never stored (the user
2064
+ * disconnected, cleared site data, or opened another browser). A Fluent ID gets a token in
2065
+ * direct mode and throws `FluentAuthError` (`code: "hosted_not_supported"`) in hosted mode.
2066
+ * External wallets: EOAs and deployed smart-contract wallets sign in; a not-yet-deployed
2067
+ * smart account cannot (no ERC-6492).
1748
2068
  */
1749
2069
  getAuthToken: () => Promise<string>;
2070
+ /**
2071
+ * Link an X account to the connected Fluent ID, headless: no widget screen, no settings page,
2072
+ * one call. Idempotent and re-enterable, because linking X needs an OAuth round trip that
2073
+ * leaves the page and Privy offers no other primitive for it.
2074
+ *
2075
+ * A user who already has X resolves `{ status: "linked", x }` with no dialog and without
2076
+ * leaving: the SDK sends the one `POST /api/v1/me/identity/privy` the service needs and
2077
+ * returns the account from its answer. A user who has none resolves `{ status: "redirecting" }`
2078
+ * once the navigation to X has been started: the code after the `await` does run, briefly —
2079
+ * enough to show a "taking you to X" state — but the page is unloading, so nothing on it may
2080
+ * wait for the link to finish. When the browser comes back, call `linkX()` again — `useLinkX()`
2081
+ * does it for you on mount — and it resolves `linked`, having waited for Privy to restore the
2082
+ * user and seen the X account on it. Calling it again when the user already has X costs one
2083
+ * request and changes nothing, which is what makes it safe to call on every mount.
2084
+ *
2085
+ * A link somebody else started in this tab, or a stale record of one, is discarded rather
2086
+ * than resumed: the call does no work and rejects with `link_failed`; call again to start one
2087
+ * for the signed-in user.
2088
+ *
2089
+ * An external wallet is first signed in to Privy with SIWE — one signature prompt, never a
2090
+ * transaction — and then takes the same path; a repeat call with that session live signs
2091
+ * nothing again. The connected account, its kind and the wallet's Fluent token are unchanged
2092
+ * by it.
2093
+ *
2094
+ * Rejects with `FluentAuthError`: `user_rejected` (the user said no at X, or declined the
2095
+ * SIWE signature), `linked_to_another_user` (that X account belongs to another Fluent user),
2096
+ * `not_authenticated` (no Fluent ID or external wallet connected), `bad_request`,
2097
+ * `link_failed` (everything else) and `hosted_not_supported` (hosted mode, refused before any
2098
+ * other call). No other code reaches the caller: a refusal from under the call keeps its
2099
+ * message under `link_failed`.
2100
+ */
2101
+ linkX: () => Promise<FluentLinkXResult>;
1750
2102
  /** The resolved auth mode: `"hosted"` unless the config says `"direct"`. */
1751
2103
  authMode: FluentWidgetAuthMode;
1752
2104
  };
@@ -1809,38 +2161,304 @@ type FluentUserTokenAddResult = {
1809
2161
  limit: number;
1810
2162
  } | {
1811
2163
  status: "invalid";
2164
+ }
2165
+ /**
2166
+ * The store could not reach the truth: no network, no Fluent token, or the
2167
+ * service answered something other than a refusal it can name. Distinct from
2168
+ * `invalid`, which says the token itself is wrong and retrying cannot help.
2169
+ */
2170
+ | {
2171
+ status: "failed";
2172
+ message: string;
1812
2173
  };
1813
2174
  /**
1814
2175
  * Persistence for tokens the end user added by hand.
2176
+ *
2177
+ * Asynchronous because the truth may live on the service: while the widget
2178
+ * holds a Fluent token the backing store is `createFluentBackendUserTokenStore`
2179
+ * and the list follows the person between Apps and browsers; where no Fluent
2180
+ * token can exist (hosted mode with a Fluent ID, and the not-connected state)
2181
+ * it is `createFluentUserTokenStore` over this browser's localStorage. See
2182
+ * `docs/adr/0004-user-settings-live-on-the-service.md`.
1815
2183
  */
1816
2184
  type UserTokenStore = {
1817
- list(chainId: number): FluentTokenDefinition[];
1818
- add(token: FluentTokenDefinition): FluentUserTokenAddResult;
1819
- remove(token: Pick<FluentTokenDefinition, "chainId" | "address">): void;
2185
+ list(chainId: number): Promise<FluentTokenDefinition[]>;
2186
+ add(token: FluentTokenDefinition): Promise<FluentUserTokenAddResult>;
2187
+ remove(token: Pick<FluentTokenDefinition, "chainId" | "address">): Promise<void>;
1820
2188
  };
1821
2189
  /**
1822
- * The browser-backed store. Falls back to an in-memory list when storage is
1823
- * unavailable, so the UI keeps working for the current view instead of throwing.
2190
+ * The browser-backed store, used where no Fluent token can exist. Falls back to
2191
+ * an in-memory list when storage is unavailable, so the UI keeps working for
2192
+ * the current view instead of throwing. Its promises are already settled: the
2193
+ * async signatures exist for the backend store, not for this one.
1824
2194
  */
1825
2195
  declare function createFluentUserTokenStore(options?: {
1826
2196
  storage?: StorageLike;
1827
2197
  key?: string;
1828
2198
  }): UserTokenStore;
1829
2199
 
2200
+ /**
2201
+ * The tokens this person added by hand, on the current chain, plus the two
2202
+ * writes. Every call is asynchronous now: the store may be the service's
2203
+ * (`createFluentBackendUserTokenStore`) rather than this browser's.
2204
+ *
2205
+ * A failed load is not an empty list — the last one settled stays on screen and
2206
+ * the failure goes to `debugWarn`. A failed `add` comes back as a result the
2207
+ * form can show; nothing rejects out of here.
2208
+ */
1830
2209
  declare function useFluentUserTokens(options?: {
1831
2210
  store?: UserTokenStore;
1832
2211
  }): {
1833
2212
  tokens: FluentTokenDefinition[];
1834
- add: (token: FluentTokenDefinition) => FluentUserTokenAddResult;
1835
- remove: (token: Pick<FluentTokenDefinition, "chainId" | "address">) => void;
2213
+ add: (token: FluentTokenDefinition) => Promise<FluentUserTokenAddResult>;
2214
+ remove: (token: Pick<FluentTokenDefinition, "chainId" | "address">) => Promise<void>;
1836
2215
  };
1837
2216
 
1838
- 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";
1839
- declare class FluentAuthError extends Error {
1840
- readonly code: FluentAuthErrorCode;
2217
+ /**
2218
+ * Codes fluent-connect-service returns on the `/me` routes (FLU-1481), plus the
2219
+ * one the client mints when the failure never reached the service.
2220
+ */
2221
+ type FluentSettingsErrorCode = "invalid_request" | "invalid_token" | "at_capacity" | "internal" | "request_failed";
2222
+ declare class FluentSettingsError extends Error {
2223
+ readonly code: FluentSettingsErrorCode;
1841
2224
  readonly status?: number | undefined;
1842
- constructor(code: FluentAuthErrorCode, message: string, status?: number | undefined);
2225
+ constructor(code: FluentSettingsErrorCode, message: string, status?: number | undefined);
2226
+ }
2227
+ /** The three values the service keeps per person. */
2228
+ type FluentUserSettings = {
2229
+ quickSign: boolean;
2230
+ /** `null` means "no choice stored"; the widget's own default applies. */
2231
+ gasTokenSymbol: string | null;
2232
+ /** Every chain the person has tokens on; callers filter by chain themselves. */
2233
+ tokens: FluentTokenDefinition[];
2234
+ };
2235
+ type FluentUserSettingsPatch = {
2236
+ quickSign?: boolean;
2237
+ gasTokenSymbol?: string | null;
2238
+ };
2239
+ type FluentSettingsClient = {
2240
+ read(): Promise<FluentUserSettings>;
2241
+ /** At least one field; the service refuses an empty or unknown-field body. */
2242
+ patch(patch: FluentUserSettingsPatch): Promise<FluentUserSettings>;
2243
+ putToken(token: FluentTokenDefinition): Promise<void>;
2244
+ deleteToken(token: Pick<FluentTokenDefinition, "chainId" | "address">): Promise<void>;
2245
+ };
2246
+ /**
2247
+ * The widget's own client for `GET/PATCH /me/settings` and
2248
+ * `PUT/DELETE /me/tokens/{chain_id}/{address}`.
2249
+ *
2250
+ * Every request carries the Fluent token from `getAuthToken()` and nothing
2251
+ * else: the token names the person, so no route here carries a Privy DID, a
2252
+ * subject or a uuid.
2253
+ */
2254
+ declare function createFluentSettingsClient(params: {
2255
+ /** Already ends in `/api/v1`. */
2256
+ publicApiUrl: string;
2257
+ getAuthToken: () => Promise<string>;
2258
+ fetch?: typeof globalThis.fetch;
2259
+ }): FluentSettingsClient;
2260
+
2261
+ type BackendUserTokenStore = UserTokenStore & {
2262
+ /**
2263
+ * Adopt the list from a `GET /me/settings` the caller already made, so the
2264
+ * settings read and the token list share one round trip at sign-in.
2265
+ */
2266
+ prime(tokens: readonly FluentTokenDefinition[]): void;
2267
+ /** Forget the list; the next `list()` loads again. */
2268
+ reset(): void;
2269
+ };
2270
+ /**
2271
+ * `UserTokenStore` over the service's `/me/tokens` routes, used wherever
2272
+ * `getAuthToken()` can resolve. The list is cached in memory and kept in step
2273
+ * with every write, so browsing the token list costs no request after sign-in.
2274
+ *
2275
+ * `add` and `remove` never throw: the token list is a corner of a wallet menu,
2276
+ * and a failed write there must not reach the host App as a rejection. `list`
2277
+ * may reject — its caller (`createUserTokenListLoader`) keeps the last settled
2278
+ * list on screen instead.
2279
+ */
2280
+ declare function createFluentBackendUserTokenStore(params: {
2281
+ client: FluentSettingsClient;
2282
+ /**
2283
+ * The shared settings read. Called only when the store has no list yet, so a
2284
+ * controller that primes it after its own `GET` causes no second request.
2285
+ */
2286
+ load: () => Promise<readonly FluentTokenDefinition[]>;
2287
+ /** Shown next to the token list when a `DELETE` fails. */
2288
+ onRemoveError?: (message: string) => void;
2289
+ }): BackendUserTokenStore;
2290
+
2291
+ type UseLinkXStatus = "idle" | "pending" | "redirecting" | "linked" | "error";
2292
+ /**
2293
+ * Linking X as a component sees it: the call, and what the last one did.
2294
+ *
2295
+ * `redirecting` is the status a page is unlikely to render for long — it is set just before the
2296
+ * browser leaves for X — and `linked` after a return is what the mount-time re-entry produces
2297
+ * without the component asking for anything.
2298
+ */
2299
+ declare function useLinkX(): {
2300
+ linkX: () => Promise<FluentLinkXResult>;
2301
+ status: UseLinkXStatus;
2302
+ x: FluentXAccount | null;
2303
+ error: FluentAuthError | null;
2304
+ };
2305
+
2306
+ type FluentTokenTransferRequest = {
2307
+ token: FluentDisplayToken;
2308
+ to: Address;
2309
+ /** In the token's base units, already checked against the balance. */
2310
+ amount: bigint;
2311
+ /**
2312
+ * What the fee is charged in, for this one transfer. Overrides the gas token
2313
+ * stored in User settings without changing it: a withdrawal is exactly the
2314
+ * moment the usual choice may be the wrong one.
2315
+ */
2316
+ gasSymbol: FluentGasTokenSymbol;
2317
+ };
2318
+ type FluentTokenTransferOutcome = {
2319
+ status: "sent";
2320
+ hash: Hash;
1843
2321
  }
2322
+ /** The user dismissed the review. Not a failure, and nothing to report. */
2323
+ | {
2324
+ status: "rejected";
2325
+ } | {
2326
+ status: "failed";
2327
+ message: string;
2328
+ };
2329
+ /**
2330
+ * A transfer the widget has sent and is still waiting on. It has no hash yet —
2331
+ * `execute` resolves with one only after the receipt — so it cannot be a
2332
+ * `FluentTransactionHistoryEntry`, every one of which describes something
2333
+ * already mined. Activity lists these above the mined rows until the real one
2334
+ * takes over.
2335
+ */
2336
+ type FluentPendingTransfer = {
2337
+ id: string;
2338
+ symbol: string;
2339
+ /** Decimal, unsigned: a pending transfer is always outgoing. */
2340
+ amount: string;
2341
+ to: Address;
2342
+ /** Unix milliseconds, so it sorts into the list beside the mined rows. */
2343
+ startedAt: number;
2344
+ /**
2345
+ * Set once the transfer settles. The row stays until the history has caught
2346
+ * up and lists this hash: FluentScan indexes a little behind the receipt, so
2347
+ * dropping the row the moment `execute` resolves makes the transfer vanish
2348
+ * from the list for as long as the next refetch takes.
2349
+ */
2350
+ hash?: Hash;
2351
+ };
2352
+ /** What the wallet menu hands a form to actually move the money. */
2353
+ type FluentTokenTransferSender = (request: FluentTokenTransferRequest) => Promise<FluentTokenTransferOutcome>;
2354
+ declare const fluentTransferAbi: readonly [{
2355
+ readonly name: "transfer";
2356
+ readonly type: "function";
2357
+ readonly stateMutability: "nonpayable";
2358
+ readonly inputs: readonly [{
2359
+ readonly type: "address";
2360
+ readonly name: "to";
2361
+ }, {
2362
+ readonly type: "uint256";
2363
+ readonly name: "amount";
2364
+ }];
2365
+ readonly outputs: readonly [{
2366
+ readonly type: "bool";
2367
+ }];
2368
+ }];
2369
+ type FluentTransferRecipient = {
2370
+ status: "ok";
2371
+ address: Address;
2372
+ } | {
2373
+ status: "empty";
2374
+ } | {
2375
+ status: "rejected";
2376
+ message: string;
2377
+ };
2378
+ /**
2379
+ * The address a transfer would pay. Rejected rather than merely unparsed for
2380
+ * the two destinations that look valid and still lose the money: the sending
2381
+ * account itself, and a token's own contract.
2382
+ */
2383
+ declare function parseFluentTransferRecipient(params: {
2384
+ input: string;
2385
+ /** The account the funds leave, which can never be where they arrive. */
2386
+ self?: string;
2387
+ /** Contract addresses of the listed tokens, lowercased. */
2388
+ contracts?: ReadonlySet<string>;
2389
+ }): FluentTransferRecipient;
2390
+ type FluentTransferAmount = {
2391
+ status: "ok";
2392
+ raw: bigint;
2393
+ } | {
2394
+ status: "empty";
2395
+ } | {
2396
+ status: "rejected";
2397
+ message: string;
2398
+ };
2399
+ /**
2400
+ * The amount a transfer would move, in the token's own base units.
2401
+ *
2402
+ * `balance` is required and not nullable on purpose: every answer here is
2403
+ * checked against it, so a caller whose balance has not arrived yet has nothing
2404
+ * to validate against and must wait rather than pass a stand-in.
2405
+ */
2406
+ declare function parseFluentTransferAmount(params: {
2407
+ input: string;
2408
+ symbol: string;
2409
+ decimals: number;
2410
+ balance: bigint;
2411
+ }): FluentTransferAmount;
2412
+ type FluentTransferFee = {
2413
+ status: "ok";
2414
+ }
2415
+ /** Worth saying, but the send may still succeed. */
2416
+ | {
2417
+ status: "warning";
2418
+ message: string;
2419
+ }
2420
+ /** This send cannot pay its fee. Nothing to do but change something first. */
2421
+ | {
2422
+ status: "blocked";
2423
+ message: string;
2424
+ };
2425
+ /**
2426
+ * Whether the account can pay for this transfer's fee.
2427
+ *
2428
+ * Not a gas estimate — nothing here knows what the operation will cost. It
2429
+ * answers the one question that needs no estimate to answer: whether there is
2430
+ * any of the fee token at all. A send that empties the fee token's own balance
2431
+ * is left to the review and the chain, as any other operation is.
2432
+ *
2433
+ * "Blocked" and "warning" are the same facts under different gas paths.
2434
+ * Sponsorship covers native gas only — an ERC-20 fee is charged by that token's
2435
+ * own paymaster, which the App's paymaster never stands in for — so an empty
2436
+ * balance is certain failure there and merely likely failure on the native
2437
+ * path of a sponsoring App.
2438
+ */
2439
+ declare function checkFluentTransferFee(params: {
2440
+ /** The token the fee will be charged in, already resolved for this account. */
2441
+ feeToken: FluentDisplayToken;
2442
+ /** Its balance, or null while it is unread. */
2443
+ feeBalance: bigint | null;
2444
+ /**
2445
+ * Roughly what that balance is worth in wei, where the App configured
2446
+ * `gasPayment.ethValueByToken`. Without rates there is no way to call a
2447
+ * non-zero balance too small, and this stays undefined.
2448
+ */
2449
+ feeBalanceEthValue?: bigint | null;
2450
+ /** True where the App's paymaster may cover a native-gas operation. */
2451
+ sponsorshipAvailable: boolean;
2452
+ }): FluentTransferFee;
2453
+ /**
2454
+ * The one call that moves `amount` of `token` to `to`: a plain value send for
2455
+ * the chain's own currency, an ERC-20 `transfer` for everything else.
2456
+ */
2457
+ declare function buildFluentTransferCall(params: {
2458
+ token: Pick<FluentTokenDefinition, "address" | "symbol" | "native">;
2459
+ to: Address;
2460
+ amount: bigint;
2461
+ }): FluentBatchCallInput;
1844
2462
 
1845
2463
  /** One JSON-RPC request as the embedded page sends it: method plus positional params. */
1846
2464
  type FluentIframeRpcRequest = {
@@ -1999,15 +2617,20 @@ declare function createFluentZeroDevErc20PaymasterRpcUrl(params?: {
1999
2617
  chainId?: number;
2000
2618
  projectId?: string;
2001
2619
  }): string;
2002
- /** The App travels in the path, the user in the `Authorization` header. */
2620
+ /** The App travels in the path, the user's Fluent token in the `Authorization` header. */
2003
2621
  declare function createFluentSponsorshipRpcUrl(params: {
2004
2622
  sponsorshipUrl: string;
2005
2623
  appId: string;
2006
2624
  }): string;
2625
+ /**
2626
+ * The sponsorship paymaster for one user. `bearerToken` is the Fluent token that
2627
+ * `getAuthToken()` mints: the service binds its `aud` to the App and the UserOp `sender` to an
2628
+ * address this user proved, and a Privy access token carries neither binding.
2629
+ */
2007
2630
  declare function createFluentZeroDevSponsoredPaymaster(params: {
2008
2631
  chain: Chain;
2009
2632
  rpcUrl: string;
2010
- accessToken: string;
2633
+ bearerToken: string;
2011
2634
  }): {
2012
2635
  getPaymasterData: (userOperation: GetPaymasterDataParameters) => Promise<_zerodev_sdk.SponsorUserOperationReturnType>;
2013
2636
  };
@@ -2118,7 +2741,16 @@ interface FluentAccountDrawerProps {
2118
2741
  connectButton: ReactNode;
2119
2742
  accountMenuAddress?: string;
2120
2743
  onAccountMenuAction: (value: string | null) => void;
2744
+ /**
2745
+ * Title of the sub-page currently replacing the wallet menu (Settings,
2746
+ * Deposit, …). Set it and the header becomes a back
2747
+ * button plus this title.
2748
+ */
2749
+ subPageTitle?: string | null;
2750
+ onCloseSubPage?: () => void;
2751
+ /** @deprecated Pass `subPageTitle="Settings"` and `onCloseSubPage` instead. */
2121
2752
  settingsOpen?: boolean;
2753
+ /** @deprecated Renamed to `onCloseSubPage`. */
2122
2754
  onCloseSettings?: () => void;
2123
2755
  /** Preview harnesses relax these to keep the drawer pinned open; the widget keeps the modal defaults. */
2124
2756
  modal?: boolean | "trap-focus";
@@ -2130,11 +2762,11 @@ interface FluentAccountDrawerProps {
2130
2762
  }
2131
2763
  /**
2132
2764
  * The connected-account drawer shell: the connect-button trigger, the account
2133
- * header/actions menu (explorer / copy / settings / disconnect), and a slot
2134
- * (`children`) for the wallet menu card. Rendered whenever the widget has a
2135
- * connected account.
2765
+ * header/actions menu (explorer / copy / settings /
2766
+ * disconnect), and a slot (`children`) for the wallet menu card. Rendered
2767
+ * whenever the widget has a connected account.
2136
2768
  */
2137
- declare function FluentAccountDrawer({ accountOpen, setAccountOpen, hasConnectedAccount, isMobile, connectButton, accountMenuAddress, onAccountMenuAction, settingsOpen, onCloseSettings, modal, disablePointerDismissal, children, userLogoUrl, defaultLogoUrl, }: FluentAccountDrawerProps): React.JSX.Element;
2769
+ declare function FluentAccountDrawer({ accountOpen, setAccountOpen, hasConnectedAccount, isMobile, connectButton, accountMenuAddress, onAccountMenuAction, subPageTitle, onCloseSubPage, settingsOpen, onCloseSettings, modal, disablePointerDismissal, children, userLogoUrl, defaultLogoUrl, }: FluentAccountDrawerProps): React.JSX.Element;
2138
2770
 
2139
2771
  /** Colour scheme and design tokens for the widget's own UI — never around host content. */
2140
2772
  declare const WIDGET_STYLE_SCOPE = "fluent-root dark contents text-foreground";
@@ -2147,6 +2779,16 @@ declare const WIDGET_STYLE_SCOPE = "fluent-root dark contents text-foreground";
2147
2779
  * host mounting `<FluentWidget>` inside an element with `transform`, `filter` or
2148
2780
  * `contain` would turn that ancestor into their containing block and misplace
2149
2781
  * every one of them.
2782
+ *
2783
+ * Alongside it lives `dialog[data-fluent-top-layer]`, the host for the widget's
2784
+ * modal overlays. A host app that opens its own dialog with `showModal()` puts
2785
+ * it in the browser's top layer and makes the rest of the document inert — any
2786
+ * overlay we keep in the normal document is then covered and unclickable. Modal
2787
+ * overlays therefore portal into this `<dialog>`, and the first one to open
2788
+ * calls `showModal()` on it: it becomes the topmost modal, painted above the
2789
+ * host's dialog and exempt from its inertness. Elements in the top layer are
2790
+ * laid out against the viewport regardless of ancestors, so the `body`
2791
+ * constraint above is preserved for free.
2150
2792
  */
2151
2793
  declare function FluentPortalContainerProvider({ children }: {
2152
2794
  children: ReactNode;
@@ -2178,12 +2820,74 @@ interface WalletMenuActionCardProps {
2178
2820
  onConnectWithX: () => void;
2179
2821
  tab: string;
2180
2822
  onTabChange: (tab: string) => void;
2823
+ /**
2824
+ * Which Home panel is showing, "tokens" or "activity". Optional, and only
2825
+ * because the preview harnesses render this card outside a drawer; the widget
2826
+ * must pass it, or a panel opened for a settled transfer dies with the card
2827
+ * the review modal unmounted.
2828
+ */
2829
+ panel?: string;
2830
+ onPanelChange?: (panel: string) => void;
2181
2831
  /** The connected account address shown in the header (external EOA or Fluent smart account). */
2182
2832
  connectedAddress?: string;
2833
+ /**
2834
+ * Which account this menu is for. An External wallet (`"eoa"`) confirms every
2835
+ * call in the wallet itself and pays the chain's own gas, so it has neither
2836
+ * Quick sign nor a Gas token to choose and no Fluent smart account to claim a
2837
+ * faucet for; Settings shows both preferences disabled, hides Faucet and
2838
+ * sends Explorer to the EOA's own address.
2839
+ *
2840
+ * Optional, and absent reads as a Fluent ID: this card is exported
2841
+ * (`src/index.ts`), and the preview harnesses mount it with no account at all.
2842
+ */
2843
+ accountKind?: FluentAccountType;
2844
+ /** The External wallet that signs bridge deposits, while one is connected. */
2845
+ externalWalletAddress?: string;
2183
2846
  /** Bumped after a confirmed widget transaction so balances refetch. */
2184
2847
  balanceRevisionCounter?: number;
2848
+ /**
2849
+ * Where this person's hand-added tokens live. The service's store while the
2850
+ * widget holds a Fluent token, this browser's otherwise.
2851
+ */
2852
+ userTokenStore?: UserTokenStore;
2853
+ /**
2854
+ * True while the stored settings are still on their way. The preferences and
2855
+ * the token actions stay disabled so the answer cannot overwrite a choice
2856
+ * made while it was in flight.
2857
+ */
2858
+ settingsPending?: boolean;
2859
+ /** A preference the service refused to store. */
2860
+ settingsError?: string | null;
2861
+ /** A token write the service refused. */
2862
+ tokenListError?: string | null;
2863
+ /**
2864
+ * Moves a token out of this account. Absent where nothing can execute — the
2865
+ * preview harnesses render the card outside the widget — and the Send button
2866
+ * is then disabled rather than hidden.
2867
+ */
2868
+ onSendToken?: FluentTokenTransferSender;
2869
+ /** Transfers sent from here that have not settled yet, listed in Activity. */
2870
+ pendingTransfers?: readonly FluentPendingTransfer[];
2871
+ /**
2872
+ * Brings the account drawer back up. A transaction review closes it on its
2873
+ * way in, so without this a transfer that settles has nowhere to report
2874
+ * itself. Absent in the preview harnesses, which render the card with no
2875
+ * drawer around it.
2876
+ */
2877
+ onRevealAccount?: () => void;
2878
+ /**
2879
+ * What pays a transfer's fee, for the Send page's fee selector and warnings.
2880
+ * Defaults describe the Fluent smart account with no sponsorship, which is
2881
+ * the conservative reading: it warns where a sponsoring App would not need to.
2882
+ */
2883
+ gasContext?: {
2884
+ /** False for an external wallet, which has no paymaster to charge a token. */
2885
+ erc20Gas: boolean;
2886
+ /** True where the App's paymaster may cover a native-gas operation. */
2887
+ sponsorshipAvailable: boolean;
2888
+ };
2185
2889
  }
2186
- declare function WalletMenuActionCard({ track, session, smartAccountAddress, faucetBusy, onFaucet, config, tokens, gasPaymentToken, onGasPaymentTokenChange, silentSigningEnabled, onSilentSigningChange, onDisconnect, onConnectWithX, tab, onTabChange, connectedAddress, balanceRevisionCounter, }: WalletMenuActionCardProps): React.JSX.Element;
2890
+ declare function WalletMenuActionCard({ track, session, smartAccountAddress, faucetBusy, onFaucet, config, tokens, gasPaymentToken, onGasPaymentTokenChange, silentSigningEnabled, onSilentSigningChange, onDisconnect, onConnectWithX, tab, onTabChange, panel, onPanelChange, connectedAddress, accountKind, externalWalletAddress, balanceRevisionCounter, userTokenStore, settingsPending, settingsError, tokenListError, onSendToken, pendingTransfers, onRevealAccount, gasContext, }: WalletMenuActionCardProps): React.JSX.Element | null;
2187
2891
 
2188
2892
  declare const buttonVariants: (props?: ({
2189
2893
  variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
@@ -2200,7 +2904,7 @@ declare function Switch({ className, size, ...props }: Switch$1.Root.Props & {
2200
2904
 
2201
2905
  declare function Dialog({ ...props }: Dialog$1.Root.Props): React.JSX.Element;
2202
2906
  declare function DialogTrigger({ ...props }: Dialog$1.Trigger.Props): React.JSX.Element;
2203
- declare function DialogPortal({ container, ...props }: Dialog$1.Portal.Props): React.JSX.Element;
2907
+ declare function DialogPortal({ container, children, ...props }: Dialog$1.Portal.Props): React.JSX.Element;
2204
2908
  declare function DialogClose({ ...props }: Dialog$1.Close.Props): React.JSX.Element;
2205
2909
  declare function DialogOverlay({ className, ...props }: Dialog$1.Backdrop.Props): React.JSX.Element;
2206
2910
  declare function DialogContent({ className, children, showCloseButton, ...props }: Dialog$1.Popup.Props & {
@@ -2215,7 +2919,7 @@ declare function DialogDescription({ className, ...props }: Dialog$1.Description
2215
2919
 
2216
2920
  declare function Separator({ className, orientation, ...props }: Separator$1.Props): React.JSX.Element;
2217
2921
 
2218
- 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";
2922
+ type IconName = "coinbase" | "walletConnect" | "metaMask" | "rabby" | "keplr" | "okx" | "fluent" | "fluentLogomark" | "fluentLogotype" | "x" | "google" | "arrow-right-s-line" | "arrow-left-right-line" | "arrow-up-line" | "arrow-up-s-fill" | "arrow-down-s-fill" | "plus" | "eth" | "usdnr" | "usdc" | "blend";
2219
2923
  declare function Icon({ name, className, ...props }: {
2220
2924
  name: IconName;
2221
2925
  } & SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -2234,4 +2938,4 @@ type AccountAvatarProps = {
2234
2938
  */
2235
2939
  declare function AccountAvatar({ userLogoUrl, defaultLogoUrl, className }: AccountAvatarProps): React.JSX.Element;
2236
2940
 
2237
- 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 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 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 UseFluentIframeBridgeOptions, type UserTokenStore, WIDGET_STYLE_SCOPE, WalletMenuActionCard, type ZerodevIntegration, buttonVariants, clearPrivyRecentLoginMethod, createFluentBatchOp, createFluentClient, createFluentFamiliesClient, createFluentIframeBridge, createFluentIframeRpcHandler, 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, useFluentIframeBridge, useFluentUserTokens, useFluentWidget, useFluentWidgetNetwork, useFluentZeroDevAccount, useWidget, withFluentSignaturePrompt };
2941
+ 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 FluentLinkXResult, 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 FluentProfile, FluentReviewRejectedError, type FluentSession, type FluentSettingsClient, FluentSettingsError, type FluentSettingsErrorCode, type FluentSignApi, type FluentSignatureReview, type FluentSpendPeriod, type FluentSpendPermission, FluentSponsorshipFallbackError, type FluentSponsorshipReason, type FluentTokenBalance, type FluentTokenDefinition, type FluentTokenTransferOutcome, type FluentTokenTransferRequest, type FluentTokenTransferSender, type FluentTransferAmount, type FluentTransferFee, type FluentTransferRecipient, type FluentTypedDataRequest, type FluentUserOperationGas, type FluentUserSettings, type FluentUserSettingsPatch, type FluentUserTokenAddResult, type FluentWalletChoice, FluentWidget, type FluentWidgetAccount, type FluentWidgetAuthMethod, 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 FluentXAccount, 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, buildFluentTransferCall, buttonVariants, checkFluentTransferFee, clearPrivyRecentLoginMethod, createFluentBackendUserTokenStore, createFluentBatchOp, createFluentClient, createFluentFamiliesClient, createFluentIframeBridge, createFluentIframeRpcHandler, createFluentPermissionApi, createFluentPermissionClient, createFluentPermissionPolicyBuilders, createFluentPermissionSession, createFluentSettingsClient, createFluentSponsorshipRpcUrl, createFluentUserTokenStore, createFluentZeroDevErc20Paymaster, createFluentZeroDevErc20PaymasterApprovalCall, createFluentZeroDevErc20PaymasterClient, createFluentZeroDevErc20PaymasterRpcUrl, createFluentZeroDevPermissionSession, createFluentZeroDevRpcUrl, createFluentZeroDevSponsoredPaymaster, deriveFluentGasEthRates, findFluentSymbolCollisions, fluent, apps as fluentApps, fluentBridgeAbi, fluent$1 as fluentChain, fluentChains, fluentDefinitionToViemChain, integrations as fluentIntegrations, l1Chains as fluentL1Chains, fluentMainnet, fluentMainnetTokenDefaults, fluentTestnet, fluentTestnetTokenDefaults, fluentTokenIdentity, fluentTransferAbi, 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, parseFluentTransferAmount, parseFluentTransferRecipient, readFluentTokenBalances, readFluentTokenMetadata, registryVersion, resolveBridgeAddresses, resolveDefaultGasToken, resolveFluentWidgetNetworkFromEnv, resolveFluentZeroDevErc20PaymasterToken, resolveL1Definition, selectFluentGasPaymentToken, sendFluentZeroDevErc20PaymasterDemo, sortFluentGasTokens, useFluentIframeBridge, useFluentUserTokens, useFluentWidget, useFluentWidgetNetwork, useFluentZeroDevAccount, useLinkX, useWidget, withFluentSignaturePrompt };