@fluent.xyz/connect 0.1.1 → 0.1.3

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 { Transport, Chain, PublicClient, Address, WalletClient, createPublicClient, Hex, Abi, Hash } from 'viem';
2
+ import { Chain, PublicClient, Transport, Address, createPublicClient, Hex, Abi, Hash, WalletClient } from 'viem';
3
3
  import * as React from 'react';
4
4
  import { ReactNode, AnchorHTMLAttributes, SVGProps } from 'react';
5
5
  import * as _privy_io_react_auth from '@privy-io/react-auth';
@@ -17,6 +17,21 @@ import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
17
17
  import { Separator as Separator$1 } from '@base-ui/react/separator';
18
18
  import { z } from 'zod';
19
19
 
20
+ /**
21
+ * Minimal FluentBridge view ABI for connectivity checks.
22
+ * Full ABI will be synced from solidity-contracts in a later release.
23
+ */
24
+ declare const fluentBridgeAbi: readonly [{
25
+ readonly type: "function";
26
+ readonly name: "otherSideChainId";
27
+ readonly stateMutability: "view";
28
+ readonly inputs: readonly [];
29
+ readonly outputs: readonly [{
30
+ readonly name: "";
31
+ readonly type: "uint256";
32
+ }];
33
+ }];
34
+
20
35
  declare const fluentChainSchema: z.ZodObject<{
21
36
  id: z.ZodString;
22
37
  name: z.ZodString;
@@ -379,8 +394,323 @@ declare const l1ChainSchema: z.ZodObject<{
379
394
  }> | undefined;
380
395
  pairedL2?: string | undefined;
381
396
  }>;
397
+ declare const appSchema: z.ZodObject<{
398
+ id: z.ZodString;
399
+ name: z.ZodString;
400
+ category: z.ZodString;
401
+ description: z.ZodOptional<z.ZodString>;
402
+ docs: z.ZodOptional<z.ZodString>;
403
+ deployments: z.ZodRecord<z.ZodString, z.ZodObject<{
404
+ contract: z.ZodString;
405
+ address: z.ZodString;
406
+ }, "strip", z.ZodTypeAny, {
407
+ address: string;
408
+ contract: string;
409
+ }, {
410
+ address: string;
411
+ contract: string;
412
+ }>>;
413
+ }, "strip", z.ZodTypeAny, {
414
+ id: string;
415
+ name: string;
416
+ category: string;
417
+ deployments: Record<string, {
418
+ address: string;
419
+ contract: string;
420
+ }>;
421
+ description?: string | undefined;
422
+ docs?: string | undefined;
423
+ }, {
424
+ id: string;
425
+ name: string;
426
+ category: string;
427
+ deployments: Record<string, {
428
+ address: string;
429
+ contract: string;
430
+ }>;
431
+ description?: string | undefined;
432
+ docs?: string | undefined;
433
+ }>;
382
434
  type FluentChainDefinition = z.infer<typeof fluentChainSchema>;
383
435
  type L1ChainDefinition = z.infer<typeof l1ChainSchema>;
436
+ type AppDefinition = z.infer<typeof appSchema>;
437
+ declare const zerodevIntegrationSchema: z.ZodObject<{
438
+ id: z.ZodLiteral<"zerodev">;
439
+ name: z.ZodString;
440
+ description: z.ZodString;
441
+ docs: z.ZodString;
442
+ dashboard: z.ZodString;
443
+ rpcUrlTemplate: z.ZodString;
444
+ supportedFluentChains: z.ZodArray<z.ZodObject<{
445
+ fluentChainId: z.ZodString;
446
+ chainId: z.ZodNumber;
447
+ }, "strip", z.ZodTypeAny, {
448
+ chainId: number;
449
+ fluentChainId: string;
450
+ }, {
451
+ chainId: number;
452
+ fluentChainId: string;
453
+ }>, "many">;
454
+ privy: z.ZodObject<{
455
+ docs: z.ZodString;
456
+ embeddedWalletCreateOnLogin: z.ZodString;
457
+ }, "strip", z.ZodTypeAny, {
458
+ docs: string;
459
+ embeddedWalletCreateOnLogin: string;
460
+ }, {
461
+ docs: string;
462
+ embeddedWalletCreateOnLogin: string;
463
+ }>;
464
+ }, "strip", z.ZodTypeAny, {
465
+ id: "zerodev";
466
+ name: string;
467
+ description: string;
468
+ docs: string;
469
+ dashboard: string;
470
+ rpcUrlTemplate: string;
471
+ supportedFluentChains: {
472
+ chainId: number;
473
+ fluentChainId: string;
474
+ }[];
475
+ privy: {
476
+ docs: string;
477
+ embeddedWalletCreateOnLogin: string;
478
+ };
479
+ }, {
480
+ id: "zerodev";
481
+ name: string;
482
+ description: string;
483
+ docs: string;
484
+ dashboard: string;
485
+ rpcUrlTemplate: string;
486
+ supportedFluentChains: {
487
+ chainId: number;
488
+ fluentChainId: string;
489
+ }[];
490
+ privy: {
491
+ docs: string;
492
+ embeddedWalletCreateOnLogin: string;
493
+ };
494
+ }>;
495
+ type ZerodevIntegration = z.infer<typeof zerodevIntegrationSchema>;
496
+
497
+ declare const fluentChains: {
498
+ readonly devnet: {
499
+ id: string;
500
+ name: string;
501
+ chainId: number;
502
+ testnet: boolean;
503
+ nativeCurrency: {
504
+ symbol: string;
505
+ name: string;
506
+ decimals: number;
507
+ };
508
+ rpcUrls: {
509
+ default: {
510
+ http: string[];
511
+ webSocket?: string[] | undefined;
512
+ };
513
+ };
514
+ blockExplorers: {
515
+ default: {
516
+ name: string;
517
+ url: string;
518
+ };
519
+ };
520
+ infoURL: string;
521
+ faucets?: string[] | undefined;
522
+ parent?: {
523
+ type: "L2";
524
+ chainId: number;
525
+ bridgeUrl: string;
526
+ } | undefined;
527
+ contracts?: {
528
+ fluentBridge?: {
529
+ address: string;
530
+ implementation?: string | undefined;
531
+ } | undefined;
532
+ universalTokenFactory?: {
533
+ address: string;
534
+ implementation?: string | undefined;
535
+ } | undefined;
536
+ paymentGateway?: {
537
+ address: string;
538
+ implementation?: string | undefined;
539
+ } | undefined;
540
+ peggedTokenPrecompile?: {
541
+ address: string;
542
+ } | undefined;
543
+ } | undefined;
544
+ };
545
+ readonly testnet: {
546
+ id: string;
547
+ name: string;
548
+ chainId: number;
549
+ testnet: boolean;
550
+ nativeCurrency: {
551
+ symbol: string;
552
+ name: string;
553
+ decimals: number;
554
+ };
555
+ rpcUrls: {
556
+ default: {
557
+ http: string[];
558
+ webSocket?: string[] | undefined;
559
+ };
560
+ };
561
+ blockExplorers: {
562
+ default: {
563
+ name: string;
564
+ url: string;
565
+ };
566
+ };
567
+ infoURL: string;
568
+ faucets?: string[] | undefined;
569
+ parent?: {
570
+ type: "L2";
571
+ chainId: number;
572
+ bridgeUrl: string;
573
+ } | undefined;
574
+ contracts?: {
575
+ fluentBridge?: {
576
+ address: string;
577
+ implementation?: string | undefined;
578
+ } | undefined;
579
+ universalTokenFactory?: {
580
+ address: string;
581
+ implementation?: string | undefined;
582
+ } | undefined;
583
+ paymentGateway?: {
584
+ address: string;
585
+ implementation?: string | undefined;
586
+ } | undefined;
587
+ peggedTokenPrecompile?: {
588
+ address: string;
589
+ } | undefined;
590
+ } | undefined;
591
+ };
592
+ readonly mainnet: {
593
+ id: string;
594
+ name: string;
595
+ chainId: number;
596
+ testnet: boolean;
597
+ nativeCurrency: {
598
+ symbol: string;
599
+ name: string;
600
+ decimals: number;
601
+ };
602
+ rpcUrls: {
603
+ default: {
604
+ http: string[];
605
+ webSocket?: string[] | undefined;
606
+ };
607
+ };
608
+ blockExplorers: {
609
+ default: {
610
+ name: string;
611
+ url: string;
612
+ };
613
+ };
614
+ infoURL: string;
615
+ faucets?: string[] | undefined;
616
+ parent?: {
617
+ type: "L2";
618
+ chainId: number;
619
+ bridgeUrl: string;
620
+ } | undefined;
621
+ contracts?: {
622
+ fluentBridge?: {
623
+ address: string;
624
+ implementation?: string | undefined;
625
+ } | undefined;
626
+ universalTokenFactory?: {
627
+ address: string;
628
+ implementation?: string | undefined;
629
+ } | undefined;
630
+ paymentGateway?: {
631
+ address: string;
632
+ implementation?: string | undefined;
633
+ } | undefined;
634
+ peggedTokenPrecompile?: {
635
+ address: string;
636
+ } | undefined;
637
+ } | undefined;
638
+ };
639
+ };
640
+ declare const l1Chains: {
641
+ readonly sepolia: {
642
+ id: string;
643
+ name: string;
644
+ chainId: number;
645
+ testnet: boolean;
646
+ nativeCurrency: {
647
+ symbol: string;
648
+ name: string;
649
+ decimals: number;
650
+ };
651
+ rpcUrls: {
652
+ default: {
653
+ http: string[];
654
+ };
655
+ };
656
+ blockExplorers: {
657
+ default: {
658
+ name: string;
659
+ url: string;
660
+ };
661
+ };
662
+ contracts?: Record<string, {
663
+ address: string;
664
+ implementation?: string | undefined;
665
+ }> | undefined;
666
+ pairedL2?: string | undefined;
667
+ };
668
+ };
669
+ declare const apps: {
670
+ readonly fluentBridge: {
671
+ id: string;
672
+ name: string;
673
+ category: string;
674
+ deployments: Record<string, {
675
+ address: string;
676
+ contract: string;
677
+ }>;
678
+ description?: string | undefined;
679
+ docs?: string | undefined;
680
+ };
681
+ };
682
+ declare const integrations: {
683
+ readonly zerodev: {
684
+ id: "zerodev";
685
+ name: string;
686
+ description: string;
687
+ docs: string;
688
+ dashboard: string;
689
+ rpcUrlTemplate: string;
690
+ supportedFluentChains: {
691
+ chainId: number;
692
+ fluentChainId: string;
693
+ }[];
694
+ privy: {
695
+ docs: string;
696
+ embeddedWalletCreateOnLogin: string;
697
+ };
698
+ };
699
+ };
700
+ declare const registryVersion: "0.1.0";
701
+ /** Fluent chain IDs with ZeroDev bundler/paymaster support */
702
+ declare const fluentZeroDevChainIds: readonly number[];
703
+ declare function getFluentChain(id: keyof typeof fluentChains): FluentChainDefinition;
704
+ declare function getFluentChainByChainId(chainId: number): FluentChainDefinition | undefined;
705
+ declare function getL1Chain(id: keyof typeof l1Chains): L1ChainDefinition;
706
+ declare function getL1ForFluentChain(fluent: FluentChainDefinition): L1ChainDefinition | undefined;
707
+ declare function getApp(id: keyof typeof apps): AppDefinition;
708
+ declare function getZerodevIntegration(): ZerodevIntegration;
709
+ declare function getZeroDevRpcUrl(params: {
710
+ projectId: string;
711
+ chainId: number;
712
+ }): string;
713
+ declare function isFluentZeroDevChain(chainId: number): boolean;
384
714
 
385
715
  type BridgeAddresses = {
386
716
  l2?: {
@@ -392,16 +722,24 @@ type BridgeAddresses = {
392
722
  implementation?: `0x${string}`;
393
723
  };
394
724
  };
725
+ declare function resolveBridgeAddresses(definition: FluentChainDefinition): BridgeAddresses;
726
+ declare function getContractAddressFromChain(chain: Chain, name: "fluentBridge" | "paymentGateway" | "universalTokenFactory"): `0x${string}` | undefined;
727
+ declare function resolveL1Definition(definition: FluentChainDefinition): L1ChainDefinition | undefined;
395
728
 
396
- type FluentClientConfig<TTransport extends Transport = Transport> = {
397
- /** Viem chain (use exports from `@fluent.xyz/connect-sdk`) */
398
- chain: Chain;
399
- transport: TTransport;
400
- };
401
- type FluentClient<TTransport extends Transport = Transport> = {
729
+ type FluentClientConfig = {
730
+ /** Fluent network to target. Defaults to `"testnet"`. */
731
+ network?: "devnet" | "testnet" | "mainnet";
732
+ /** Custom RPC URL. Defaults to the selected chain's built-in RPC. */
733
+ rpcUrl?: string;
734
+ /** Advanced override: pass a viem chain directly (takes precedence over `network`). */
735
+ chain?: Chain;
736
+ /** Advanced override: pass a viem transport directly (takes precedence over `rpcUrl`). */
737
+ transport?: Transport;
738
+ };
739
+ type FluentClient = {
402
740
  chain: Chain;
403
741
  definition: FluentChainDefinition;
404
- public: PublicClient<TTransport, Chain>;
742
+ public: PublicClient;
405
743
  addresses: {
406
744
  bridge: BridgeAddresses;
407
745
  peggedTokenPrecompile?: `0x${string}`;
@@ -412,7 +750,7 @@ type FluentClient<TTransport extends Transport = Transport> = {
412
750
  /** Read L2 bridge `otherSideChainId` when deployed */
413
751
  readOtherSideChainId: () => Promise<bigint | undefined>;
414
752
  };
415
- declare function createFluentClient<TTransport extends Transport>(config: FluentClientConfig<TTransport>): FluentClient<TTransport>;
753
+ declare function createFluentClient(config?: FluentClientConfig): FluentClient;
416
754
 
417
755
  type FluentPermissionStatus = "pending" | "active" | "expired" | "revoked";
418
756
  type FluentCallPermission = {
@@ -472,6 +810,7 @@ type FluentPermissionClient = {
472
810
  };
473
811
  declare function createFluentPermissionClient(config: FluentPermissionClientConfig): FluentPermissionClient;
474
812
 
813
+ type FluentNetworkName = "devnet" | "testnet" | "mainnet";
475
814
  type FluentTokenDefinition = {
476
815
  chainId: number;
477
816
  symbol: "ETH" | "USDnr" | "BLEND" | "USDC" | "USDT" | string;
@@ -523,6 +862,124 @@ declare const fluentTestnetTokenDefaults: {
523
862
  };
524
863
  };
525
864
  declare const fluentTestnetWidgetTokens: readonly FluentTokenDefinition[];
865
+ declare const fluentMainnetTokenDefaults: {
866
+ readonly ETH: {
867
+ readonly chainId: 25363;
868
+ readonly symbol: "ETH";
869
+ readonly name: "Ether";
870
+ readonly decimals: 18;
871
+ };
872
+ readonly USDnr: {
873
+ readonly chainId: 25363;
874
+ readonly symbol: "USDnr";
875
+ readonly name: "USDnr";
876
+ readonly decimals: 18;
877
+ readonly address: "0xD48e565561416dE59DA1050ED70b8d75e8eF28f9";
878
+ };
879
+ readonly BLEND: {
880
+ readonly chainId: 25363;
881
+ readonly symbol: "BLEND";
882
+ readonly name: "Fluent";
883
+ readonly decimals: 18;
884
+ readonly address: "0x1385b8f55a84f2bda13eed4099d29eae03d553b2";
885
+ };
886
+ };
887
+ declare const fluentMainnetWidgetTokens: readonly FluentTokenDefinition[];
888
+ declare const fluentDevnetTokenDefaults: {
889
+ readonly ETH: {
890
+ readonly chainId: 20994;
891
+ readonly symbol: "ETH";
892
+ readonly name: "Ether";
893
+ readonly decimals: 18;
894
+ };
895
+ readonly USDnr: {
896
+ readonly chainId: 20994;
897
+ readonly symbol: "USDnr";
898
+ readonly name: "USDnr";
899
+ readonly decimals: 18;
900
+ readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A";
901
+ };
902
+ readonly BLEND: {
903
+ readonly chainId: 20994;
904
+ readonly symbol: "BLEND";
905
+ readonly name: "Mock Blend";
906
+ readonly decimals: 18;
907
+ readonly address: "0x83Fed707A8dDDC2535aE591CF19fB6C91D542D8E";
908
+ };
909
+ readonly USDC: {
910
+ readonly chainId: 20994;
911
+ readonly symbol: "USDC";
912
+ readonly name: "USD Coin";
913
+ readonly decimals: 6;
914
+ readonly address: "0xC8Ebbf08Cb2A87aB90cC8EeC34C721764b7755e9";
915
+ };
916
+ readonly USDT: {
917
+ readonly chainId: 20994;
918
+ readonly symbol: "USDT";
919
+ readonly name: "USDT";
920
+ readonly decimals: 6;
921
+ readonly address: "0xD80Ca465c268e76F0d897D44a35fC97Db75AB797";
922
+ };
923
+ };
924
+ declare const fluentDevnetWidgetTokens: readonly FluentTokenDefinition[];
925
+ declare function getFluentTokenDefaultsForNetwork(network: FluentNetworkName): {
926
+ readonly ETH: {
927
+ readonly chainId: 20994;
928
+ readonly symbol: "ETH";
929
+ readonly name: "Ether";
930
+ readonly decimals: 18;
931
+ };
932
+ readonly USDnr: {
933
+ readonly chainId: 20994;
934
+ readonly symbol: "USDnr";
935
+ readonly name: "USDnr";
936
+ readonly decimals: 18;
937
+ readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A";
938
+ };
939
+ readonly BLEND: {
940
+ readonly chainId: 20994;
941
+ readonly symbol: "BLEND";
942
+ readonly name: "Mock Blend";
943
+ readonly decimals: 18;
944
+ readonly address: "0x83Fed707A8dDDC2535aE591CF19fB6C91D542D8E";
945
+ };
946
+ readonly USDC: {
947
+ readonly chainId: 20994;
948
+ readonly symbol: "USDC";
949
+ readonly name: "USD Coin";
950
+ readonly decimals: 6;
951
+ readonly address: "0xC8Ebbf08Cb2A87aB90cC8EeC34C721764b7755e9";
952
+ };
953
+ readonly USDT: {
954
+ readonly chainId: 20994;
955
+ readonly symbol: "USDT";
956
+ readonly name: "USDT";
957
+ readonly decimals: 6;
958
+ readonly address: "0xD80Ca465c268e76F0d897D44a35fC97Db75AB797";
959
+ };
960
+ } | {
961
+ readonly ETH: {
962
+ readonly chainId: 25363;
963
+ readonly symbol: "ETH";
964
+ readonly name: "Ether";
965
+ readonly decimals: 18;
966
+ };
967
+ readonly USDnr: {
968
+ readonly chainId: 25363;
969
+ readonly symbol: "USDnr";
970
+ readonly name: "USDnr";
971
+ readonly decimals: 18;
972
+ readonly address: "0xD48e565561416dE59DA1050ED70b8d75e8eF28f9";
973
+ };
974
+ readonly BLEND: {
975
+ readonly chainId: 25363;
976
+ readonly symbol: "BLEND";
977
+ readonly name: "Fluent";
978
+ readonly decimals: 18;
979
+ readonly address: "0x1385b8f55a84f2bda13eed4099d29eae03d553b2";
980
+ };
981
+ };
982
+ declare function getFluentDefaultWidgetGasTokens(network: FluentNetworkName): readonly FluentTokenDefinition[];
526
983
  declare function readFluentTokenBalances<TTransport extends Transport = Transport, TChain extends Chain = Chain>(params: {
527
984
  client: PublicClient<TTransport, TChain>;
528
985
  account: Address;
@@ -549,12 +1006,20 @@ type FluentFamiliesClient = {
549
1006
  };
550
1007
  declare function createFluentFamiliesClient(config: FluentFamiliesClientConfig): FluentFamiliesClient;
551
1008
 
1009
+ declare function fluentDefinitionToViemChain(definition: FluentChainDefinition): Chain;
1010
+ declare function l1DefinitionToViemChain(definition: L1ChainDefinition): Chain;
1011
+
552
1012
  /** Fluent Developer Preview (chain id 20993) */
553
1013
  declare const fluentDevnet: viem.Chain;
554
1014
  /** Fluent public testnet (chain id 20994) */
555
1015
  declare const fluentTestnet: viem.Chain;
556
1016
  /** Fluent mainnet (chain id 25363) */
557
1017
  declare const fluentMainnet: viem.Chain;
1018
+ declare const fluent$1: {
1019
+ readonly devnet: viem.Chain;
1020
+ readonly testnet: viem.Chain;
1021
+ readonly mainnet: viem.Chain;
1022
+ };
558
1023
 
559
1024
  type FluentNetwork = "devnet" | "testnet" | "mainnet";
560
1025
  type FluentInitializeConfig = {
@@ -667,16 +1132,79 @@ declare function getFluentGasPaymentEthValue(params: {
667
1132
  };
668
1133
  declare function getFluentGasPaymentValueTier(ethValueWei: bigint): FluentGasPaymentValueTier;
669
1134
  declare function formatFluentGasTokenBalance(balance: Pick<FluentTokenBalance, "raw" | "decimals" | "formatted">, maximumFractionDigits?: number): string | null;
1135
+ /** de-DE separators: `.` thousands, `,` decimals (same as portfolio total). */
1136
+ declare function formatFluentLocaleAmount(value: string | number, maximumFractionDigits?: number): string;
670
1137
 
671
1138
  type FluentWidgetNetwork = "devnet" | "testnet" | "mainnet";
1139
+ declare function isFaucetNetwork(network: FluentWidgetNetwork): network is "testnet" | "devnet";
1140
+ declare function getFluentChainForNetwork(network: FluentWidgetNetwork): Chain;
1141
+ declare function getFluentTokenDefaults(network: FluentWidgetNetwork): {
1142
+ readonly ETH: {
1143
+ readonly chainId: 20994;
1144
+ readonly symbol: "ETH";
1145
+ readonly name: "Ether";
1146
+ readonly decimals: 18;
1147
+ };
1148
+ readonly USDnr: {
1149
+ readonly chainId: 20994;
1150
+ readonly symbol: "USDnr";
1151
+ readonly name: "USDnr";
1152
+ readonly decimals: 18;
1153
+ readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A";
1154
+ };
1155
+ readonly BLEND: {
1156
+ readonly chainId: 20994;
1157
+ readonly symbol: "BLEND";
1158
+ readonly name: "Mock Blend";
1159
+ readonly decimals: 18;
1160
+ readonly address: "0x83Fed707A8dDDC2535aE591CF19fB6C91D542D8E";
1161
+ };
1162
+ readonly USDC: {
1163
+ readonly chainId: 20994;
1164
+ readonly symbol: "USDC";
1165
+ readonly name: "USD Coin";
1166
+ readonly decimals: 6;
1167
+ readonly address: "0xC8Ebbf08Cb2A87aB90cC8EeC34C721764b7755e9";
1168
+ };
1169
+ readonly USDT: {
1170
+ readonly chainId: 20994;
1171
+ readonly symbol: "USDT";
1172
+ readonly name: "USDT";
1173
+ readonly decimals: 6;
1174
+ readonly address: "0xD80Ca465c268e76F0d897D44a35fC97Db75AB797";
1175
+ };
1176
+ } | {
1177
+ readonly ETH: {
1178
+ readonly chainId: 25363;
1179
+ readonly symbol: "ETH";
1180
+ readonly name: "Ether";
1181
+ readonly decimals: 18;
1182
+ };
1183
+ readonly USDnr: {
1184
+ readonly chainId: 25363;
1185
+ readonly symbol: "USDnr";
1186
+ readonly name: "USDnr";
1187
+ readonly decimals: 18;
1188
+ readonly address: "0xD48e565561416dE59DA1050ED70b8d75e8eF28f9";
1189
+ };
1190
+ readonly BLEND: {
1191
+ readonly chainId: 25363;
1192
+ readonly symbol: "BLEND";
1193
+ readonly name: "Fluent";
1194
+ readonly decimals: 18;
1195
+ readonly address: "0x1385b8f55a84f2bda13eed4099d29eae03d553b2";
1196
+ };
1197
+ };
1198
+ declare function getFluentDefaultGasTokens(network: FluentWidgetNetwork): readonly FluentTokenDefinition[];
1199
+ declare function getFluentExplorerBaseUrl(network: FluentWidgetNetwork): string | undefined;
672
1200
 
673
1201
  declare const FLUENT_WIDGET_SESSION_STORAGE_KEY = "fluent:widget:session:v1";
674
1202
 
675
1203
  declare const FLUENT_CONNECT_DEFAULT_ASSETS: {
676
- readonly fluentLogo: "/fluent-assets/fluent-logo.svg";
677
- readonly walletConnectIcon: "/fluent-assets/walletconnect.svg";
678
- readonly metamaskIcon: "/fluent-assets/metamask.png";
679
- readonly coinbaseIcon: "/fluent-assets/coinbase.svg";
1204
+ readonly fluentLogo: string;
1205
+ readonly walletConnectIcon: string;
1206
+ readonly metamaskIcon: string;
1207
+ readonly coinbaseIcon: string;
680
1208
  };
681
1209
 
682
1210
  type FluentWidgetSession = FluentSession & {
@@ -697,21 +1225,15 @@ type FluentWidgetSession = FluentSession & {
697
1225
  };
698
1226
  type FluentWidgetAuthMode = "hosted" | "direct";
699
1227
  type FluentWidgetConfig = {
1228
+ clientId: string;
700
1229
  network?: FluentWidgetNetwork;
701
1230
  appName?: string;
702
- clientId?: string;
703
1231
  /**
704
1232
  * `hosted` opens Fluent authorize in a popup (default).
705
1233
  * `direct` opens Privy login modal in the host app — requires the host origin
706
1234
  * to be registered in the Fluent Privy Allowed Origins.
707
1235
  */
708
1236
  authMode?: FluentWidgetAuthMode;
709
- authorizeUrl?: string;
710
- faucetEndpoint?: string;
711
- eventsEndpoint?: string;
712
- publicApiUrl?: string;
713
- reputationSignupUrl?: string;
714
- bridgeUrl?: string;
715
1237
  swapper?: {
716
1238
  enabled?: boolean;
717
1239
  integratorId?: string;
@@ -724,19 +1246,51 @@ type FluentWidgetConfig = {
724
1246
  scopes?: string[];
725
1247
  source?: string;
726
1248
  campaign?: string;
1249
+ /** Turns off all analytics: PostHog is never initialised, nothing is sent or stored. */
1250
+ disableAnalytics?: boolean;
727
1251
  assets?: Partial<typeof FLUENT_CONNECT_DEFAULT_ASSETS>;
728
1252
  };
1253
+ type ResolvedFluentWidgetConfig = {
1254
+ clientId: string;
1255
+ network: FluentWidgetNetwork;
1256
+ appName: string;
1257
+ authMode: FluentWidgetAuthMode;
1258
+ authorizeUrl: string;
1259
+ faucetEndpoint: string;
1260
+ eventsEndpoint: string;
1261
+ analyticsHost: string;
1262
+ disableAnalytics: boolean;
1263
+ publicApiUrl: string;
1264
+ reputationSignupUrl: string;
1265
+ bridgeUrl: string;
1266
+ swapper: {
1267
+ enabled: boolean;
1268
+ integratorId: string;
1269
+ dstChainId: string;
1270
+ dstTokenAddress: string;
1271
+ };
1272
+ gasPayment: {
1273
+ ethValueByToken: FluentGasPaymentEthRates | undefined;
1274
+ };
1275
+ scopes: string[];
1276
+ source: string;
1277
+ campaign: string | undefined;
1278
+ assets: typeof FLUENT_CONNECT_DEFAULT_ASSETS & Partial<typeof FLUENT_CONNECT_DEFAULT_ASSETS>;
1279
+ };
729
1280
 
730
- type FluentExternalWalletState = {
731
- configured: boolean;
732
- connected: boolean;
733
- address?: string;
734
- chainId?: number;
735
- walletClient?: WalletClient;
736
- open: () => void;
737
- disconnect: () => void;
738
- switchChain: (chainId: number) => Promise<void>;
1281
+ declare function normalizeFluentWidgetNetwork(value: string | undefined): FluentWidgetNetwork | undefined;
1282
+ /** Reads `VITE_FLUENT_WIDGET_NETWORK` / `FLUENT_NETWORK` (`testnet`, `mainnet`, `dev`, `prod`, …). */
1283
+ declare function resolveFluentWidgetNetworkFromEnv(): FluentWidgetNetwork | undefined;
1284
+
1285
+ type FluentWidgetNetworkContextValue = {
1286
+ network: FluentWidgetNetwork;
1287
+ chain: Chain;
739
1288
  };
1289
+ declare function FluentWidgetNetworkProvider({ network, children, }: {
1290
+ network: FluentWidgetNetwork;
1291
+ children: ReactNode;
1292
+ }): React.JSX.Element;
1293
+ declare function useFluentWidgetNetwork(): FluentWidgetNetworkContextValue;
740
1294
 
741
1295
  type KernelAccount = Awaited<ReturnType<typeof createKernelAccount>>;
742
1296
  type KernelClient = ReturnType<typeof createKernelAccountClient>;
@@ -752,6 +1306,7 @@ type FluentZeroDevKernel = {
752
1306
  publicClient: ReturnType<typeof createPublicClient>;
753
1307
  smartAccountAddress: Address;
754
1308
  zeroDevRpcUrl: string;
1309
+ chain: Chain;
755
1310
  signerMode: FluentZeroDevSignerMode;
756
1311
  signerSource: "privy" | "hosted" | "session";
757
1312
  };
@@ -779,6 +1334,8 @@ declare function useFluentZeroDevAccount(hookOptions?: {
779
1334
  };
780
1335
  sessionSignerAddress?: Address;
781
1336
  sessionSmartAccountAddress?: Address;
1337
+ /** Prefer over Privy's login when the host needs to remount Privy first. */
1338
+ login?: () => void;
782
1339
  }): {
783
1340
  smartAccountEnabled: boolean;
784
1341
  smartAccountReady: boolean;
@@ -870,11 +1427,6 @@ declare function createFluentPermissionApi(executor?: FluentPermissionSessionExe
870
1427
  declare function createFluentPermissionPolicyBuilders(): FluentPermissionPolicyBuilders;
871
1428
  declare function createFluentPermissionSession(input: FluentPermissionSessionInput, executor?: FluentPermissionSessionExecutor | null): Promise<FluentPermissionSession>;
872
1429
 
873
- type FluentBatchButtonConfig = {
874
- label: string;
875
- pendingLabel?: string;
876
- successLabel?: string;
877
- };
878
1430
  type FluentBatchCallInput = {
879
1431
  id?: string;
880
1432
  label?: string;
@@ -894,6 +1446,19 @@ type FluentEncodedBatchCall = {
894
1446
  data: Hex;
895
1447
  };
896
1448
  type FluentWidgetExecutionStatus = "disconnected" | "ready" | "unavailable" | "error";
1449
+ /** How the connected account executes transactions. */
1450
+ type FluentAccountType = "smart" | "eoa";
1451
+ type FluentAccountCapabilities = {
1452
+ /** Multiple calls land in a single atomic transaction (smart account only). */
1453
+ atomicBatch: boolean;
1454
+ /**
1455
+ * Gas can be paid in an ERC-20 (BLEND / USDnr) via the paymaster instead of
1456
+ * native ETH — smart account only. This is NOT free/sponsored gas: the user
1457
+ * still pays, just in a token. Without an ERC-20 selection the smart account
1458
+ * pays gas in native ETH from its own balance.
1459
+ */
1460
+ erc20Gas: boolean;
1461
+ };
897
1462
  type FluentWidgetAccount = {
898
1463
  address?: Address;
899
1464
  signerAddress?: Address;
@@ -901,6 +1466,19 @@ type FluentWidgetAccount = {
901
1466
  executionReady: boolean;
902
1467
  executionStatus: FluentWidgetExecutionStatus;
903
1468
  executionError?: string;
1469
+ /** Active account kind, or undefined when nothing is connected. */
1470
+ type?: FluentAccountType;
1471
+ /** What the active account can do — lets hosts adapt UI without branching on `type`. */
1472
+ capabilities: FluentAccountCapabilities;
1473
+ };
1474
+ /** Result of executing a batch operation. */
1475
+ type FluentExecuteResult = {
1476
+ /** Primary transaction hash — the final/target call (e.g. deposit/withdraw). */
1477
+ hash: Hash;
1478
+ /** All transaction hashes in order. One for a smart-account UserOp; one per call for an EOA. */
1479
+ hashes: Hash[];
1480
+ /** True when all calls landed atomically (smart account), false for sequential EOA txs. */
1481
+ atomic: boolean;
904
1482
  };
905
1483
  type FluentWidgetGasPayment = {
906
1484
  symbol: FluentGasPaymentSymbol;
@@ -909,7 +1487,8 @@ type FluentWidgetGasPayment = {
909
1487
  };
910
1488
  type FluentBatchOperationInput = {
911
1489
  id?: string;
912
- button?: string | FluentBatchButtonConfig;
1490
+ /** Heading shown in the Fluent transaction-review modal (smart account, confirmation "always"). Defaults to "Confirm transaction". */
1491
+ reviewTitle?: string;
913
1492
  calls: readonly FluentBatchCallInput[];
914
1493
  };
915
1494
  type FluentBatchOperationExecutor = {
@@ -917,8 +1496,15 @@ type FluentBatchOperationExecutor = {
917
1496
  account?: FluentWidgetAccount;
918
1497
  ensureReady?: (options: FluentBatchOperationExecuteOptions) => Promise<unknown>;
919
1498
  defaultConfirmation?: FluentBatchConfirmationMode;
1499
+ /**
1500
+ * Gas token selected in the widget UI. Used as the default when `execute` is
1501
+ * called without an explicit `gasPayment`, so the in-widget selector actually
1502
+ * drives which token pays for gas. Native-gas selections (no `token`) fall
1503
+ * back to native gas (no ERC20 paymaster).
1504
+ */
1505
+ defaultGasPayment?: FluentWidgetGasPayment;
920
1506
  confirm?: (operation: FluentBatchOperationReview) => Promise<void>;
921
- sendCalls: (calls: FluentEncodedBatchCall[], options: FluentBatchOperationExecuteOptions) => Promise<Hash>;
1507
+ sendCalls: (calls: FluentEncodedBatchCall[], options: FluentBatchOperationExecuteOptions) => Promise<FluentExecuteResult>;
922
1508
  };
923
1509
  type FluentBatchConfirmationMode = "always" | "session";
924
1510
  type FluentGasPaymentBase = {
@@ -938,18 +1524,18 @@ type FluentBatchOperationExecuteOptions = {
938
1524
  };
939
1525
  type FluentBatchOperationReview = {
940
1526
  id?: string;
941
- button?: FluentBatchButtonConfig;
1527
+ reviewTitle?: string;
942
1528
  calls: readonly FluentBatchCallInput[];
943
1529
  encodedCalls: FluentEncodedBatchCall[];
944
1530
  account?: FluentWidgetAccount;
945
1531
  };
946
1532
  type FluentBatchOperation = {
947
1533
  id?: string;
948
- button?: FluentBatchButtonConfig;
1534
+ reviewTitle?: string;
949
1535
  calls: readonly FluentBatchCallInput[];
950
1536
  encodedCalls: FluentEncodedBatchCall[];
951
1537
  canExecute: boolean;
952
- execute: (optionsOrExecutor?: FluentBatchOperationExecuteOptions | FluentBatchOperationExecutor, executor?: FluentBatchOperationExecutor) => Promise<Hash>;
1538
+ execute: (optionsOrExecutor?: FluentBatchOperationExecuteOptions | FluentBatchOperationExecutor, executor?: FluentBatchOperationExecutor) => Promise<FluentExecuteResult>;
953
1539
  };
954
1540
  type FluentBatchApi = FluentPermissionApi & {
955
1541
  account: FluentWidgetAccount;
@@ -959,31 +1545,108 @@ type FluentBatchApi = FluentPermissionApi & {
959
1545
  };
960
1546
  declare function createFluentBatchOp(input: FluentBatchOperationInput, executor?: FluentBatchOperationExecutor | null): FluentBatchOperation;
961
1547
 
1548
+ type FluentExternalWalletState = {
1549
+ configured: boolean;
1550
+ connected: boolean;
1551
+ address?: string;
1552
+ chainId?: number;
1553
+ walletClient?: WalletClient;
1554
+ open: () => void;
1555
+ disconnect: () => void;
1556
+ switchChain: (chainId: number) => Promise<void>;
1557
+ };
1558
+
962
1559
  type FluentWidgetRenderContext = {
963
1560
  session: FluentWidgetSession | null;
964
1561
  connectedAddress?: string;
965
1562
  wallet: FluentExternalWalletState | null;
966
1563
  widget: FluentBatchApi;
967
1564
  openConnect: () => void;
1565
+ openAccount: () => void;
1566
+ hasConnectedAccount: boolean;
1567
+ /** True while a direct-auth smart account is being prepared after sign-in. */
1568
+ connecting: boolean;
1569
+ /**
1570
+ * Refetch the widget's on-chain balances. Transactions run through
1571
+ * `widget.createBatchOp` refresh automatically; call this after a tx sent via
1572
+ * an external wallet client (outside the widget's execution path).
1573
+ */
1574
+ refreshBalances: () => void;
1575
+ };
1576
+ type FluentWidgetConnectButtonRenderContext = {
1577
+ connected: boolean;
1578
+ /** True while a direct-auth smart account is being prepared after sign-in. */
1579
+ pending: boolean;
1580
+ addressLabel?: string;
1581
+ onClick: () => void;
1582
+ openConnect: () => void;
1583
+ openAccount: () => void;
1584
+ DefaultButton: () => ReactNode;
968
1585
  };
969
1586
  type FluentWidgetProps = {
970
1587
  wallet?: FluentExternalWalletState | null;
971
- config?: FluentWidgetConfig;
1588
+ config: FluentWidgetConfig;
972
1589
  mode?: "home" | "page";
1590
+ /**
1591
+ * Show the default connect/account control.
1592
+ * - `"fixed"` (default) — top-right floating button
1593
+ * - `"inline"` — same button, no fixed positioning (host places via CSS / wrapper)
1594
+ * - `false` — hide; use `renderConnectButton`, `openConnect`, or `openAccount`
1595
+ */
1596
+ connectButton?: "fixed" | "inline" | false;
1597
+ /** Replace the default connect button UI / placement entirely. */
1598
+ renderConnectButton?: (context: FluentWidgetConnectButtonRenderContext) => ReactNode;
973
1599
  renderHome?: (context: FluentWidgetRenderContext) => ReactNode;
974
1600
  renderPage?: (context: FluentWidgetRenderContext) => ReactNode;
975
- renderPermissions?: (context: {
976
- session: FluentWidgetSession | null;
977
- compact: boolean;
978
- }) => ReactNode;
979
1601
  tokens?: readonly FluentTokenDefinition[];
980
1602
  showDebugPayload?: boolean;
1603
+ /**
1604
+ * Print the widget's internal connect / smart-account / signing diagnostics to
1605
+ * the console. Off by default; turn on only while debugging an integration.
1606
+ */
1607
+ debugLogging?: boolean;
981
1608
  onSessionChange?: (session: FluentWidgetSession | null) => void;
982
1609
  };
983
1610
  declare function FluentWidget(props: FluentWidgetProps): React.JSX.Element;
984
1611
 
1612
+ /**
1613
+ * Access the Fluent widget render context from any component rendered inside
1614
+ * `<FluentWidget>` (e.g. within `renderHome` / `renderPage`). Returns the same
1615
+ * object the render props receive — `session`, `widget`, `openConnect`, etc. —
1616
+ * so host apps no longer need to prop-drill it.
1617
+ *
1618
+ * Throws if used outside `<FluentWidget>`.
1619
+ */
1620
+ declare function useFluentWidget(): FluentWidgetRenderContext;
1621
+ /** Convenience hook returning just the widget API (`createBatchOp`, permissions, account…). */
1622
+ declare function useWidget(): FluentBatchApi;
1623
+
1624
+ type FluentWidgetConnectButtonProps = {
1625
+ connected: boolean;
1626
+ /** Preparing the account after sign-in — disables the button and shows a spinner. */
1627
+ pending?: boolean;
1628
+ addressLabel?: string;
1629
+ onClick: () => void;
1630
+ className?: string;
1631
+ };
1632
+ /** Default Fluent Connect / account button — place it anywhere in your layout. */
1633
+ declare function FluentWidgetConnectButton({ connected, pending, addressLabel, onClick, className, }: FluentWidgetConnectButtonProps): React.JSX.Element;
1634
+
985
1635
  declare const FLUENT_ZERODEV_ERC20_PAYMASTER_QUERY = "selfFunded=true";
986
1636
  declare const FLUENT_ZERODEV_PAYMASTER_DEMO_RECIPIENT: "0x000000000000000000000000000000000000dEaD";
1637
+ declare function getFluentZeroDevErc20PaymasterTokens(network?: FluentWidgetNetwork): {
1638
+ readonly BLEND: {
1639
+ readonly address: "0x83Fed707A8dDDC2535aE591CF19fB6C91D542D8E" | "0x1385b8f55a84f2bda13eed4099d29eae03d553b2";
1640
+ readonly decimals: 18;
1641
+ readonly symbol: "BLEND";
1642
+ };
1643
+ readonly USDNR: {
1644
+ readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A" | "0xD48e565561416dE59DA1050ED70b8d75e8eF28f9";
1645
+ readonly decimals: 18;
1646
+ readonly symbol: "USDnr";
1647
+ };
1648
+ };
1649
+ /** @deprecated Use `getFluentZeroDevErc20PaymasterTokens(network)` instead. */
987
1650
  declare const FLUENT_ZERODEV_ERC20_PAYMASTER_TOKENS: {
988
1651
  readonly BLEND: {
989
1652
  readonly address: "0x83Fed707A8dDDC2535aE591CF19fB6C91D542D8E";
@@ -1024,12 +1687,12 @@ declare function createFluentZeroDevErc20PaymasterRpcUrl(params?: {
1024
1687
  chainId?: number;
1025
1688
  projectId?: string;
1026
1689
  }): string;
1027
- declare function resolveFluentZeroDevErc20PaymasterToken(token?: FluentZeroDevErc20PaymasterToken): {
1028
- readonly address: "0x83Fed707A8dDDC2535aE591CF19fB6C91D542D8E";
1690
+ declare function resolveFluentZeroDevErc20PaymasterToken(token?: FluentZeroDevErc20PaymasterToken, network?: FluentWidgetNetwork): {
1691
+ readonly address: "0x83Fed707A8dDDC2535aE591CF19fB6C91D542D8E" | "0x1385b8f55a84f2bda13eed4099d29eae03d553b2";
1029
1692
  readonly decimals: 18;
1030
1693
  readonly symbol: "BLEND";
1031
1694
  } | {
1032
- readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A";
1695
+ readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A" | "0xD48e565561416dE59DA1050ED70b8d75e8eF28f9";
1033
1696
  readonly decimals: 18;
1034
1697
  readonly symbol: "USDnr";
1035
1698
  } | {
@@ -1037,6 +1700,7 @@ declare function resolveFluentZeroDevErc20PaymasterToken(token?: FluentZeroDevEr
1037
1700
  symbol?: string;
1038
1701
  };
1039
1702
  declare function createFluentZeroDevErc20PaymasterClient(params?: {
1703
+ chain?: Chain;
1040
1704
  paymasterRpcUrl?: string;
1041
1705
  }): {
1042
1706
  account: SmartAccount | undefined;
@@ -1047,7 +1711,7 @@ declare function createFluentZeroDevErc20PaymasterClient(params?: {
1047
1711
  ccipRead?: false | {
1048
1712
  request?: (parameters: viem.CcipRequestParameters) => Promise<`0x${string}`>;
1049
1713
  } | undefined;
1050
- chain: viem.Chain | undefined;
1714
+ chain: Chain | undefined;
1051
1715
  dataSuffix?: viem.DataSuffix | undefined;
1052
1716
  experimental_blockTag?: viem.BlockTag | undefined;
1053
1717
  key: string;
@@ -1077,10 +1741,12 @@ declare function createFluentZeroDevErc20PaymasterClient(params?: {
1077
1741
  transport?: undefined;
1078
1742
  type?: undefined;
1079
1743
  uid?: undefined;
1080
- } & viem.ExactPartial<Pick<viem.PublicActions<viem.Transport, viem.Chain | undefined, SmartAccount | undefined>, "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getChainId" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "prepareTransactionRequest" | "readContract" | "sendRawTransaction" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<viem.WalletActions<viem.Chain | undefined, SmartAccount | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: viem.Client<viem.Transport, viem.Chain | undefined, SmartAccount | undefined, _zerodev_sdk.ZeroDevPaymasterRpcSchema<"0.7">, viem_account_abstraction.PaymasterActions & _zerodev_sdk.ZeroDevPaymasterClientActions>) => client) => viem.Client<viem.Transport, viem.Chain | undefined, SmartAccount | undefined, _zerodev_sdk.ZeroDevPaymasterRpcSchema<"0.7">, { [K in keyof client]: client[K]; } & viem_account_abstraction.PaymasterActions & _zerodev_sdk.ZeroDevPaymasterClientActions>;
1744
+ } & viem.ExactPartial<Pick<viem.PublicActions<viem.Transport, Chain | undefined, SmartAccount | undefined>, "prepareTransactionRequest" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getChainId" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "sendRawTransaction" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<viem.WalletActions<Chain | undefined, SmartAccount | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: viem.Client<viem.Transport, Chain | undefined, SmartAccount | undefined, _zerodev_sdk.ZeroDevPaymasterRpcSchema<"0.7">, viem_account_abstraction.PaymasterActions & _zerodev_sdk.ZeroDevPaymasterClientActions>) => client) => viem.Client<viem.Transport, Chain | undefined, SmartAccount | undefined, _zerodev_sdk.ZeroDevPaymasterRpcSchema<"0.7">, { [K in keyof client]: client[K]; } & viem_account_abstraction.PaymasterActions & _zerodev_sdk.ZeroDevPaymasterClientActions>;
1081
1745
  };
1082
1746
  declare function createFluentZeroDevErc20Paymaster(params: {
1747
+ chain?: Chain;
1083
1748
  gasToken?: FluentZeroDevErc20PaymasterToken;
1749
+ network?: FluentWidgetNetwork;
1084
1750
  paymasterClient?: ZeroDevPaymasterClient;
1085
1751
  paymasterRpcUrl?: string;
1086
1752
  }): {
@@ -1088,7 +1754,9 @@ declare function createFluentZeroDevErc20Paymaster(params: {
1088
1754
  };
1089
1755
  declare function createFluentZeroDevErc20PaymasterApprovalCall(params: {
1090
1756
  approveAmount: bigint;
1757
+ chain?: Chain;
1091
1758
  gasToken?: FluentZeroDevErc20PaymasterToken;
1759
+ network?: FluentWidgetNetwork;
1092
1760
  paymasterClient?: ZeroDevPaymasterClient;
1093
1761
  paymasterRpcUrl?: string;
1094
1762
  }): Promise<{
@@ -1104,8 +1772,10 @@ type FluentZeroDevPaymasterDemoApproval = {
1104
1772
  approveAmount?: never;
1105
1773
  };
1106
1774
  declare function sendFluentZeroDevErc20PaymasterDemo(params: {
1775
+ chain?: Chain;
1107
1776
  gasToken?: FluentZeroDevErc20PaymasterToken;
1108
1777
  kernel: FluentZeroDevPaymasterKernel;
1778
+ network?: FluentWidgetNetwork;
1109
1779
  paymasterRpcUrl?: string;
1110
1780
  testRecipient?: Address;
1111
1781
  } & FluentZeroDevPaymasterDemoApproval): Promise<{
@@ -1117,6 +1787,13 @@ declare function sendFluentZeroDevErc20PaymasterDemo(params: {
1117
1787
  userOpHash: `0x${string}`;
1118
1788
  }>;
1119
1789
 
1790
+ /**
1791
+ * Privy promotes the last-used login method to the top of its modal via
1792
+ * localStorage. Fluent Connect always wants X first (email in overflow), so
1793
+ * clear these keys before mounting/opening Privy login.
1794
+ */
1795
+ declare function clearPrivyRecentLoginMethod(appId: string): void;
1796
+
1120
1797
  declare const buttonVariants: (props?: ({
1121
1798
  variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
1122
1799
  size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
@@ -1141,9 +1818,9 @@ declare function DialogDescription({ className, ...props }: Dialog$1.Description
1141
1818
 
1142
1819
  declare function Separator({ className, orientation, ...props }: Separator$1.Props): React.JSX.Element;
1143
1820
 
1144
- type IconName = "coinbase" | "walletConnect" | "metaMask" | "rabby" | "keplr" | "okx" | "fluent" | "arrow-right-s-line" | "arrow-left-right-line" | "arrow-up-s-fill" | "arrow-down-s-fill" | "plus" | "eth" | "usdnr" | "blend" | "usdc" | "usdt";
1821
+ 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" | "usdc" | "usdt";
1145
1822
  declare function Icon({ name, className, ...props }: {
1146
1823
  name: IconName;
1147
1824
  } & SVGProps<SVGSVGElement>): React.JSX.Element;
1148
1825
 
1149
- export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, FLUENT_GAS_PAYMENT_DEFAULT_ETH_RATES, FLUENT_GAS_PAYMENT_PRIORITY, FLUENT_WIDGET_SESSION_STORAGE_KEY, FLUENT_ZERODEV_ERC20_PAYMASTER_QUERY, FLUENT_ZERODEV_ERC20_PAYMASTER_TOKENS, FLUENT_ZERODEV_PAYMASTER_DEMO_RECIPIENT, type FluentBatchApi, type FluentBatchButtonConfig, type FluentBatchCallInput, type FluentBatchConfirmationMode, type FluentBatchOperation, type FluentBatchOperationExecuteOptions, type FluentBatchOperationExecutor, type FluentBatchOperationInput, type FluentBatchOperationReview, type FluentEncodedBatchCall, type FluentExternalWalletState, type FluentFamilies, type FluentGasPayment, type FluentGasPaymentEthRates, type FluentGasPaymentSelection, type FluentGasPaymentSymbol, type FluentGasPaymentValueTier, type FluentPermissionApi, type FluentPermissionArgConstraint, type FluentPermissionArgs, type FluentPermissionBatchPolicy, type FluentPermissionBatchPolicyInput, type FluentPermissionCallInput, type FluentPermissionCallPolicy, type FluentPermissionPolicy, type FluentPermissionPolicyBuilders, type FluentPermissionSession, type FluentPermissionSessionExecutor, type FluentPermissionSessionInput, type FluentSession, type FluentTokenBalance, type FluentTokenDefinition, FluentWidget, type FluentWidgetAccount, type FluentWidgetAuthMode, type FluentWidgetConfig, type FluentWidgetExecutionStatus, type FluentWidgetGasPayment, type FluentWidgetProps, type FluentWidgetRenderContext, type FluentWidgetSession, type FluentZeroDevErc20PaymasterToken, type FluentZeroDevErc20PaymasterTokenKey, type FluentZeroDevKernel, type FluentZeroDevPaymasterDemoResult, type FluentZeroDevPaymasterKernel, type FluentZeroDevPermissionCall, type FluentZeroDevPermissionSession, type FluentZeroDevSignerMode, Icon, type IconName, Separator, buttonVariants, createFluentBatchOp, createFluentClient, createFluentFamiliesClient, createFluentPermissionApi, createFluentPermissionClient, createFluentPermissionPolicyBuilders, createFluentPermissionSession, createFluentZeroDevErc20Paymaster, createFluentZeroDevErc20PaymasterApprovalCall, createFluentZeroDevErc20PaymasterClient, createFluentZeroDevErc20PaymasterRpcUrl, createFluentZeroDevPermissionSession, createFluentZeroDevRpcUrl, fluent, fluentDevnet, fluentMainnet, fluentTestnet, fluentTestnetTokenDefaults, fluentTestnetWidgetTokens, formatFluentGasTokenBalance, getFluentGasPaymentEthValue, getFluentGasPaymentTokens, getFluentGasPaymentValueTier, readFluentTokenBalances, resolveFluentZeroDevErc20PaymasterToken, selectFluentGasPaymentToken, sendFluentZeroDevErc20PaymasterDemo, useFluentZeroDevAccount };
1826
+ export { 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_GAS_PAYMENT_PRIORITY, FLUENT_WIDGET_SESSION_STORAGE_KEY, FLUENT_ZERODEV_ERC20_PAYMASTER_QUERY, FLUENT_ZERODEV_ERC20_PAYMASTER_TOKENS, FLUENT_ZERODEV_PAYMASTER_DEMO_RECIPIENT, type FluentAccountCapabilities, type FluentAccountType, 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 FluentGasPaymentSymbol, type FluentGasPaymentValueTier, 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, type FluentSession, type FluentSpendPeriod, type FluentSpendPermission, type FluentTokenBalance, type FluentTokenDefinition, 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 FluentZeroDevErc20PaymasterToken, type FluentZeroDevErc20PaymasterTokenKey, type FluentZeroDevKernel, type FluentZeroDevPaymasterDemoResult, type FluentZeroDevPaymasterKernel, type FluentZeroDevPermissionCall, type FluentZeroDevPermissionSession, type FluentZeroDevSignerMode, Icon, type IconName, type L1ChainDefinition, type ResolvedFluentWidgetConfig, Separator, type ZerodevIntegration, buttonVariants, clearPrivyRecentLoginMethod, createFluentBatchOp, createFluentClient, createFluentFamiliesClient, createFluentPermissionApi, createFluentPermissionClient, createFluentPermissionPolicyBuilders, createFluentPermissionSession, createFluentZeroDevErc20Paymaster, createFluentZeroDevErc20PaymasterApprovalCall, createFluentZeroDevErc20PaymasterClient, createFluentZeroDevErc20PaymasterRpcUrl, createFluentZeroDevPermissionSession, createFluentZeroDevRpcUrl, fluent, apps as fluentApps, fluentBridgeAbi, fluent$1 as fluentChain, fluentChains, fluentDefinitionToViemChain, fluentDevnet, fluentDevnetTokenDefaults, fluentDevnetWidgetTokens, integrations as fluentIntegrations, l1Chains as fluentL1Chains, fluentMainnet, fluentMainnetTokenDefaults, fluentMainnetWidgetTokens, fluentTestnet, fluentTestnetTokenDefaults, fluentTestnetWidgetTokens, fluentZeroDevChainIds, formatFluentGasTokenBalance, formatFluentLocaleAmount, getApp, getContractAddressFromChain, getFluentChain, getFluentChainByChainId, getFluentChainForNetwork, getFluentDefaultGasTokens, getFluentDefaultWidgetGasTokens, getFluentExplorerBaseUrl, getFluentGasPaymentEthValue, getFluentGasPaymentTokens, getFluentGasPaymentValueTier, getFluentTokenDefaults, getFluentTokenDefaultsForNetwork, getFluentZeroDevErc20PaymasterTokens, getL1Chain, getL1ForFluentChain, getZeroDevRpcUrl, getZerodevIntegration, isFaucetNetwork, isFluentZeroDevChain, l1DefinitionToViemChain, normalizeFluentWidgetNetwork, readFluentTokenBalances, registryVersion, resolveBridgeAddresses, resolveFluentWidgetNetworkFromEnv, resolveFluentZeroDevErc20PaymasterToken, resolveL1Definition, selectFluentGasPaymentToken, sendFluentZeroDevErc20PaymasterDemo, useFluentWidget, useFluentWidgetNetwork, useFluentZeroDevAccount, useWidget };