@fluent.xyz/connect 0.1.2 → 0.1.4

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 = {
@@ -628,8 +1093,77 @@ declare const fluent: {
628
1093
  initialize: typeof initialize;
629
1094
  };
630
1095
 
1096
+ type FluentWidgetNetwork = "devnet" | "testnet" | "mainnet";
1097
+ declare function isFaucetNetwork(network: FluentWidgetNetwork): network is "testnet" | "devnet";
1098
+ declare function getFluentChainForNetwork(network: FluentWidgetNetwork): Chain;
1099
+ declare function getFluentTokenDefaults(network: FluentWidgetNetwork): {
1100
+ readonly ETH: {
1101
+ readonly chainId: 20994;
1102
+ readonly symbol: "ETH";
1103
+ readonly name: "Ether";
1104
+ readonly decimals: 18;
1105
+ };
1106
+ readonly USDnr: {
1107
+ readonly chainId: 20994;
1108
+ readonly symbol: "USDnr";
1109
+ readonly name: "USDnr";
1110
+ readonly decimals: 18;
1111
+ readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A";
1112
+ };
1113
+ readonly BLEND: {
1114
+ readonly chainId: 20994;
1115
+ readonly symbol: "BLEND";
1116
+ readonly name: "Mock Blend";
1117
+ readonly decimals: 18;
1118
+ readonly address: "0x83Fed707A8dDDC2535aE591CF19fB6C91D542D8E";
1119
+ };
1120
+ readonly USDC: {
1121
+ readonly chainId: 20994;
1122
+ readonly symbol: "USDC";
1123
+ readonly name: "USD Coin";
1124
+ readonly decimals: 6;
1125
+ readonly address: "0xC8Ebbf08Cb2A87aB90cC8EeC34C721764b7755e9";
1126
+ };
1127
+ readonly USDT: {
1128
+ readonly chainId: 20994;
1129
+ readonly symbol: "USDT";
1130
+ readonly name: "USDT";
1131
+ readonly decimals: 6;
1132
+ readonly address: "0xD80Ca465c268e76F0d897D44a35fC97Db75AB797";
1133
+ };
1134
+ } | {
1135
+ readonly ETH: {
1136
+ readonly chainId: 25363;
1137
+ readonly symbol: "ETH";
1138
+ readonly name: "Ether";
1139
+ readonly decimals: 18;
1140
+ };
1141
+ readonly USDnr: {
1142
+ readonly chainId: 25363;
1143
+ readonly symbol: "USDnr";
1144
+ readonly name: "USDnr";
1145
+ readonly decimals: 18;
1146
+ readonly address: "0xD48e565561416dE59DA1050ED70b8d75e8eF28f9";
1147
+ };
1148
+ readonly BLEND: {
1149
+ readonly chainId: 25363;
1150
+ readonly symbol: "BLEND";
1151
+ readonly name: "Fluent";
1152
+ readonly decimals: 18;
1153
+ readonly address: "0x1385b8f55a84f2bda13eed4099d29eae03d553b2";
1154
+ };
1155
+ };
1156
+ declare function getFluentDefaultGasTokens(network: FluentWidgetNetwork): readonly FluentTokenDefinition[];
1157
+ declare function getFluentExplorerBaseUrl(network: FluentWidgetNetwork): string | undefined;
1158
+
631
1159
  declare const FLUENT_GAS_PAYMENT_PRIORITY: readonly ["USDnr", "BLEND", "ETH"];
632
1160
  type FluentGasPaymentSymbol = typeof FLUENT_GAS_PAYMENT_PRIORITY[number];
1161
+ /**
1162
+ * Resolve a gas token symbol to its ERC-20 paymaster address on `network`.
1163
+ * Returns `undefined` for native `ETH` (no paymaster) and for a symbol without a
1164
+ * configured address on the network.
1165
+ */
1166
+ declare function getFluentGasTokenAddress(symbol: FluentGasPaymentSymbol, network: FluentWidgetNetwork): Address | undefined;
633
1167
  type FluentGasPaymentValueTier = "green" | "yellow" | "red" | "neutral" | "unknown";
634
1168
  type FluentGasPaymentEthRates = Partial<Record<FluentGasPaymentSymbol, string>>;
635
1169
  declare const FLUENT_GAS_PAYMENT_DEFAULT_ETH_RATES: {
@@ -667,16 +1201,16 @@ declare function getFluentGasPaymentEthValue(params: {
667
1201
  };
668
1202
  declare function getFluentGasPaymentValueTier(ethValueWei: bigint): FluentGasPaymentValueTier;
669
1203
  declare function formatFluentGasTokenBalance(balance: Pick<FluentTokenBalance, "raw" | "decimals" | "formatted">, maximumFractionDigits?: number): string | null;
670
-
671
- type FluentWidgetNetwork = "devnet" | "testnet" | "mainnet";
1204
+ /** de-DE separators: `.` thousands, `,` decimals (same as portfolio total). */
1205
+ declare function formatFluentLocaleAmount(value: string | number, maximumFractionDigits?: number): string;
672
1206
 
673
1207
  declare const FLUENT_WIDGET_SESSION_STORAGE_KEY = "fluent:widget:session:v1";
674
1208
 
675
1209
  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";
1210
+ readonly fluentLogo: string;
1211
+ readonly walletConnectIcon: string;
1212
+ readonly metamaskIcon: string;
1213
+ readonly coinbaseIcon: string;
680
1214
  };
681
1215
 
682
1216
  type FluentWidgetSession = FluentSession & {
@@ -697,21 +1231,15 @@ type FluentWidgetSession = FluentSession & {
697
1231
  };
698
1232
  type FluentWidgetAuthMode = "hosted" | "direct";
699
1233
  type FluentWidgetConfig = {
1234
+ clientId: string;
700
1235
  network?: FluentWidgetNetwork;
701
1236
  appName?: string;
702
- clientId?: string;
703
1237
  /**
704
1238
  * `hosted` opens Fluent authorize in a popup (default).
705
1239
  * `direct` opens Privy login modal in the host app — requires the host origin
706
1240
  * to be registered in the Fluent Privy Allowed Origins.
707
1241
  */
708
1242
  authMode?: FluentWidgetAuthMode;
709
- authorizeUrl?: string;
710
- faucetEndpoint?: string;
711
- eventsEndpoint?: string;
712
- publicApiUrl?: string;
713
- reputationSignupUrl?: string;
714
- bridgeUrl?: string;
715
1243
  swapper?: {
716
1244
  enabled?: boolean;
717
1245
  integratorId?: string;
@@ -724,19 +1252,51 @@ type FluentWidgetConfig = {
724
1252
  scopes?: string[];
725
1253
  source?: string;
726
1254
  campaign?: string;
1255
+ /** Turns off all analytics: PostHog is never initialised, nothing is sent or stored. */
1256
+ disableAnalytics?: boolean;
727
1257
  assets?: Partial<typeof FLUENT_CONNECT_DEFAULT_ASSETS>;
728
1258
  };
1259
+ type ResolvedFluentWidgetConfig = {
1260
+ clientId: string;
1261
+ network: FluentWidgetNetwork;
1262
+ appName: string;
1263
+ authMode: FluentWidgetAuthMode;
1264
+ authorizeUrl: string;
1265
+ faucetEndpoint: string;
1266
+ eventsEndpoint: string;
1267
+ analyticsHost: string;
1268
+ disableAnalytics: boolean;
1269
+ publicApiUrl: string;
1270
+ reputationSignupUrl: string;
1271
+ bridgeUrl: string;
1272
+ swapper: {
1273
+ enabled: boolean;
1274
+ integratorId: string;
1275
+ dstChainId: string;
1276
+ dstTokenAddress: string;
1277
+ };
1278
+ gasPayment: {
1279
+ ethValueByToken: FluentGasPaymentEthRates | undefined;
1280
+ };
1281
+ scopes: string[];
1282
+ source: string;
1283
+ campaign: string | undefined;
1284
+ assets: typeof FLUENT_CONNECT_DEFAULT_ASSETS & Partial<typeof FLUENT_CONNECT_DEFAULT_ASSETS>;
1285
+ };
729
1286
 
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>;
1287
+ declare function normalizeFluentWidgetNetwork(value: string | undefined): FluentWidgetNetwork | undefined;
1288
+ /** Reads `VITE_FLUENT_WIDGET_NETWORK` / `FLUENT_NETWORK` (`testnet`, `mainnet`, `dev`, `prod`, …). */
1289
+ declare function resolveFluentWidgetNetworkFromEnv(): FluentWidgetNetwork | undefined;
1290
+
1291
+ type FluentWidgetNetworkContextValue = {
1292
+ network: FluentWidgetNetwork;
1293
+ chain: Chain;
739
1294
  };
1295
+ declare function FluentWidgetNetworkProvider({ network, children, }: {
1296
+ network: FluentWidgetNetwork;
1297
+ children: ReactNode;
1298
+ }): React.JSX.Element;
1299
+ declare function useFluentWidgetNetwork(): FluentWidgetNetworkContextValue;
740
1300
 
741
1301
  type KernelAccount = Awaited<ReturnType<typeof createKernelAccount>>;
742
1302
  type KernelClient = ReturnType<typeof createKernelAccountClient>;
@@ -752,6 +1312,7 @@ type FluentZeroDevKernel = {
752
1312
  publicClient: ReturnType<typeof createPublicClient>;
753
1313
  smartAccountAddress: Address;
754
1314
  zeroDevRpcUrl: string;
1315
+ chain: Chain;
755
1316
  signerMode: FluentZeroDevSignerMode;
756
1317
  signerSource: "privy" | "hosted" | "session";
757
1318
  };
@@ -779,6 +1340,8 @@ declare function useFluentZeroDevAccount(hookOptions?: {
779
1340
  };
780
1341
  sessionSignerAddress?: Address;
781
1342
  sessionSmartAccountAddress?: Address;
1343
+ /** Prefer over Privy's login when the host needs to remount Privy first. */
1344
+ login?: () => void;
782
1345
  }): {
783
1346
  smartAccountEnabled: boolean;
784
1347
  smartAccountReady: boolean;
@@ -870,11 +1433,6 @@ declare function createFluentPermissionApi(executor?: FluentPermissionSessionExe
870
1433
  declare function createFluentPermissionPolicyBuilders(): FluentPermissionPolicyBuilders;
871
1434
  declare function createFluentPermissionSession(input: FluentPermissionSessionInput, executor?: FluentPermissionSessionExecutor | null): Promise<FluentPermissionSession>;
872
1435
 
873
- type FluentBatchButtonConfig = {
874
- label: string;
875
- pendingLabel?: string;
876
- successLabel?: string;
877
- };
878
1436
  type FluentBatchCallInput = {
879
1437
  id?: string;
880
1438
  label?: string;
@@ -894,6 +1452,19 @@ type FluentEncodedBatchCall = {
894
1452
  data: Hex;
895
1453
  };
896
1454
  type FluentWidgetExecutionStatus = "disconnected" | "ready" | "unavailable" | "error";
1455
+ /** How the connected account executes transactions. */
1456
+ type FluentAccountType = "smart" | "eoa";
1457
+ type FluentAccountCapabilities = {
1458
+ /** Multiple calls land in a single atomic transaction (smart account only). */
1459
+ atomicBatch: boolean;
1460
+ /**
1461
+ * Gas can be paid in an ERC-20 (BLEND / USDnr) via the paymaster instead of
1462
+ * native ETH — smart account only. This is NOT free/sponsored gas: the user
1463
+ * still pays, just in a token. Without an ERC-20 selection the smart account
1464
+ * pays gas in native ETH from its own balance.
1465
+ */
1466
+ erc20Gas: boolean;
1467
+ };
897
1468
  type FluentWidgetAccount = {
898
1469
  address?: Address;
899
1470
  signerAddress?: Address;
@@ -901,6 +1472,19 @@ type FluentWidgetAccount = {
901
1472
  executionReady: boolean;
902
1473
  executionStatus: FluentWidgetExecutionStatus;
903
1474
  executionError?: string;
1475
+ /** Active account kind, or undefined when nothing is connected. */
1476
+ type?: FluentAccountType;
1477
+ /** What the active account can do — lets hosts adapt UI without branching on `type`. */
1478
+ capabilities: FluentAccountCapabilities;
1479
+ };
1480
+ /** Result of executing a batch operation. */
1481
+ type FluentExecuteResult = {
1482
+ /** Primary transaction hash — the final/target call (e.g. deposit/withdraw). */
1483
+ hash: Hash;
1484
+ /** All transaction hashes in order. One for a smart-account UserOp; one per call for an EOA. */
1485
+ hashes: Hash[];
1486
+ /** True when all calls landed atomically (smart account), false for sequential EOA txs. */
1487
+ atomic: boolean;
904
1488
  };
905
1489
  type FluentWidgetGasPayment = {
906
1490
  symbol: FluentGasPaymentSymbol;
@@ -909,7 +1493,8 @@ type FluentWidgetGasPayment = {
909
1493
  };
910
1494
  type FluentBatchOperationInput = {
911
1495
  id?: string;
912
- button?: string | FluentBatchButtonConfig;
1496
+ /** Heading shown in the Fluent transaction-review modal (smart account, confirmation "always"). Defaults to "Confirm transaction". */
1497
+ reviewTitle?: string;
913
1498
  calls: readonly FluentBatchCallInput[];
914
1499
  };
915
1500
  type FluentBatchOperationExecutor = {
@@ -917,15 +1502,25 @@ type FluentBatchOperationExecutor = {
917
1502
  account?: FluentWidgetAccount;
918
1503
  ensureReady?: (options: FluentBatchOperationExecuteOptions) => Promise<unknown>;
919
1504
  defaultConfirmation?: FluentBatchConfirmationMode;
1505
+ /**
1506
+ * Gas token selected in the widget UI. Used as the default when `execute` is
1507
+ * called without an explicit `gasPayment`, so the in-widget selector actually
1508
+ * drives which token pays for gas. Native-gas selections (no `token`) fall
1509
+ * back to native gas (no ERC20 paymaster).
1510
+ */
1511
+ defaultGasPayment?: FluentWidgetGasPayment;
920
1512
  confirm?: (operation: FluentBatchOperationReview) => Promise<void>;
921
- sendCalls: (calls: FluentEncodedBatchCall[], options: FluentBatchOperationExecuteOptions) => Promise<Hash>;
1513
+ sendCalls: (calls: FluentEncodedBatchCall[], options: FluentBatchOperationExecuteOptions) => Promise<FluentExecuteResult>;
922
1514
  };
923
1515
  type FluentBatchConfirmationMode = "always" | "session";
924
- type FluentGasPaymentBase = {
925
- token: Address;
926
- symbol?: string;
927
- };
928
- type FluentGasPayment = FluentGasPaymentBase & ({
1516
+ type FluentGasPayment = {
1517
+ /**
1518
+ * Gas token symbol. The widget resolves the ERC-20 address for the active
1519
+ * network internally — callers never pass (or risk mistyping) an address.
1520
+ * `"ETH"` means native gas (no paymaster).
1521
+ */
1522
+ symbol: FluentGasPaymentSymbol;
1523
+ } & ({
929
1524
  includeApproval: true;
930
1525
  approveAmount: bigint;
931
1526
  } | {
@@ -938,18 +1533,18 @@ type FluentBatchOperationExecuteOptions = {
938
1533
  };
939
1534
  type FluentBatchOperationReview = {
940
1535
  id?: string;
941
- button?: FluentBatchButtonConfig;
1536
+ reviewTitle?: string;
942
1537
  calls: readonly FluentBatchCallInput[];
943
1538
  encodedCalls: FluentEncodedBatchCall[];
944
1539
  account?: FluentWidgetAccount;
945
1540
  };
946
1541
  type FluentBatchOperation = {
947
1542
  id?: string;
948
- button?: FluentBatchButtonConfig;
1543
+ reviewTitle?: string;
949
1544
  calls: readonly FluentBatchCallInput[];
950
1545
  encodedCalls: FluentEncodedBatchCall[];
951
1546
  canExecute: boolean;
952
- execute: (optionsOrExecutor?: FluentBatchOperationExecuteOptions | FluentBatchOperationExecutor, executor?: FluentBatchOperationExecutor) => Promise<Hash>;
1547
+ execute: (optionsOrExecutor?: FluentBatchOperationExecuteOptions | FluentBatchOperationExecutor, executor?: FluentBatchOperationExecutor) => Promise<FluentExecuteResult>;
953
1548
  };
954
1549
  type FluentBatchApi = FluentPermissionApi & {
955
1550
  account: FluentWidgetAccount;
@@ -959,44 +1554,108 @@ type FluentBatchApi = FluentPermissionApi & {
959
1554
  };
960
1555
  declare function createFluentBatchOp(input: FluentBatchOperationInput, executor?: FluentBatchOperationExecutor | null): FluentBatchOperation;
961
1556
 
1557
+ type FluentExternalWalletState = {
1558
+ configured: boolean;
1559
+ connected: boolean;
1560
+ address?: string;
1561
+ chainId?: number;
1562
+ walletClient?: WalletClient;
1563
+ open: () => void;
1564
+ disconnect: () => void;
1565
+ switchChain: (chainId: number) => Promise<void>;
1566
+ };
1567
+
962
1568
  type FluentWidgetRenderContext = {
963
1569
  session: FluentWidgetSession | null;
964
1570
  connectedAddress?: string;
965
1571
  wallet: FluentExternalWalletState | null;
966
1572
  widget: FluentBatchApi;
967
1573
  openConnect: () => void;
1574
+ openAccount: () => void;
1575
+ hasConnectedAccount: boolean;
1576
+ /** True while a direct-auth smart account is being prepared after sign-in. */
1577
+ connecting: boolean;
1578
+ /**
1579
+ * Refetch the widget's on-chain balances. Transactions run through
1580
+ * `widget.createBatchOp` refresh automatically; call this after a tx sent via
1581
+ * an external wallet client (outside the widget's execution path).
1582
+ */
1583
+ refreshBalances: () => void;
1584
+ };
1585
+ type FluentWidgetConnectButtonRenderContext = {
1586
+ connected: boolean;
1587
+ /** True while a direct-auth smart account is being prepared after sign-in. */
1588
+ pending: boolean;
1589
+ addressLabel?: string;
1590
+ onClick: () => void;
1591
+ openConnect: () => void;
1592
+ openAccount: () => void;
1593
+ DefaultButton: () => ReactNode;
968
1594
  };
969
1595
  type FluentWidgetProps = {
970
1596
  wallet?: FluentExternalWalletState | null;
971
- config?: FluentWidgetConfig;
1597
+ config: FluentWidgetConfig;
972
1598
  mode?: "home" | "page";
1599
+ /**
1600
+ * Show the default connect/account control.
1601
+ * - `"fixed"` (default) — top-right floating button
1602
+ * - `"inline"` — same button, no fixed positioning (host places via CSS / wrapper)
1603
+ * - `false` — hide; use `renderConnectButton`, `openConnect`, or `openAccount`
1604
+ */
1605
+ connectButton?: "fixed" | "inline" | false;
1606
+ /** Replace the default connect button UI / placement entirely. */
1607
+ renderConnectButton?: (context: FluentWidgetConnectButtonRenderContext) => ReactNode;
973
1608
  renderHome?: (context: FluentWidgetRenderContext) => ReactNode;
974
1609
  renderPage?: (context: FluentWidgetRenderContext) => ReactNode;
975
- renderPermissions?: (context: {
976
- session: FluentWidgetSession | null;
977
- compact: boolean;
978
- }) => ReactNode;
979
1610
  tokens?: readonly FluentTokenDefinition[];
980
1611
  showDebugPayload?: boolean;
1612
+ /**
1613
+ * Print the widget's internal connect / smart-account / signing diagnostics to
1614
+ * the console. Off by default; turn on only while debugging an integration.
1615
+ */
1616
+ debugLogging?: boolean;
981
1617
  onSessionChange?: (session: FluentWidgetSession | null) => void;
982
1618
  };
983
1619
  declare function FluentWidget(props: FluentWidgetProps): React.JSX.Element;
984
1620
 
1621
+ /**
1622
+ * Access the Fluent widget render context from any component rendered inside
1623
+ * `<FluentWidget>` (e.g. within `renderHome` / `renderPage`). Returns the same
1624
+ * object the render props receive — `session`, `widget`, `openConnect`, etc. —
1625
+ * so host apps no longer need to prop-drill it.
1626
+ *
1627
+ * Throws if used outside `<FluentWidget>`.
1628
+ */
1629
+ declare function useFluentWidget(): FluentWidgetRenderContext;
1630
+ /** Convenience hook returning just the widget API (`createBatchOp`, permissions, account…). */
1631
+ declare function useWidget(): FluentBatchApi;
1632
+
1633
+ type FluentWidgetConnectButtonProps = {
1634
+ connected: boolean;
1635
+ /** Preparing the account after sign-in — disables the button and shows a spinner. */
1636
+ pending?: boolean;
1637
+ addressLabel?: string;
1638
+ onClick: () => void;
1639
+ className?: string;
1640
+ };
1641
+ /** Default Fluent Connect / account button — place it anywhere in your layout. */
1642
+ declare function FluentWidgetConnectButton({ connected, pending, addressLabel, onClick, className, }: FluentWidgetConnectButtonProps): React.JSX.Element;
1643
+
985
1644
  declare const FLUENT_ZERODEV_ERC20_PAYMASTER_QUERY = "selfFunded=true";
986
1645
  declare const FLUENT_ZERODEV_PAYMASTER_DEMO_RECIPIENT: "0x000000000000000000000000000000000000dEaD";
987
- declare const FLUENT_ZERODEV_ERC20_PAYMASTER_TOKENS: {
1646
+ declare function getFluentZeroDevErc20PaymasterTokens(network?: FluentWidgetNetwork): {
988
1647
  readonly BLEND: {
989
- readonly address: "0x83Fed707A8dDDC2535aE591CF19fB6C91D542D8E";
1648
+ readonly address: "0x83Fed707A8dDDC2535aE591CF19fB6C91D542D8E" | "0x1385b8f55a84f2bda13eed4099d29eae03d553b2";
990
1649
  readonly decimals: 18;
991
1650
  readonly symbol: "BLEND";
992
1651
  };
993
1652
  readonly USDNR: {
994
- readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A";
1653
+ readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A" | "0xD48e565561416dE59DA1050ED70b8d75e8eF28f9";
995
1654
  readonly decimals: 18;
996
1655
  readonly symbol: "USDnr";
997
1656
  };
998
1657
  };
999
- type FluentZeroDevErc20PaymasterTokenKey = keyof typeof FLUENT_ZERODEV_ERC20_PAYMASTER_TOKENS;
1658
+ type FluentZeroDevErc20PaymasterTokenKey = keyof ReturnType<typeof getFluentZeroDevErc20PaymasterTokens>;
1000
1659
  type FluentZeroDevErc20PaymasterToken = FluentZeroDevErc20PaymasterTokenKey | Address | {
1001
1660
  address: Address;
1002
1661
  symbol?: string;
@@ -1024,12 +1683,12 @@ declare function createFluentZeroDevErc20PaymasterRpcUrl(params?: {
1024
1683
  chainId?: number;
1025
1684
  projectId?: string;
1026
1685
  }): string;
1027
- declare function resolveFluentZeroDevErc20PaymasterToken(token?: FluentZeroDevErc20PaymasterToken): {
1028
- readonly address: "0x83Fed707A8dDDC2535aE591CF19fB6C91D542D8E";
1686
+ declare function resolveFluentZeroDevErc20PaymasterToken(token?: FluentZeroDevErc20PaymasterToken, network?: FluentWidgetNetwork): {
1687
+ readonly address: "0x83Fed707A8dDDC2535aE591CF19fB6C91D542D8E" | "0x1385b8f55a84f2bda13eed4099d29eae03d553b2";
1029
1688
  readonly decimals: 18;
1030
1689
  readonly symbol: "BLEND";
1031
1690
  } | {
1032
- readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A";
1691
+ readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A" | "0xD48e565561416dE59DA1050ED70b8d75e8eF28f9";
1033
1692
  readonly decimals: 18;
1034
1693
  readonly symbol: "USDnr";
1035
1694
  } | {
@@ -1037,6 +1696,7 @@ declare function resolveFluentZeroDevErc20PaymasterToken(token?: FluentZeroDevEr
1037
1696
  symbol?: string;
1038
1697
  };
1039
1698
  declare function createFluentZeroDevErc20PaymasterClient(params?: {
1699
+ chain?: Chain;
1040
1700
  paymasterRpcUrl?: string;
1041
1701
  }): {
1042
1702
  account: SmartAccount | undefined;
@@ -1047,7 +1707,7 @@ declare function createFluentZeroDevErc20PaymasterClient(params?: {
1047
1707
  ccipRead?: false | {
1048
1708
  request?: (parameters: viem.CcipRequestParameters) => Promise<`0x${string}`>;
1049
1709
  } | undefined;
1050
- chain: viem.Chain | undefined;
1710
+ chain: Chain | undefined;
1051
1711
  dataSuffix?: viem.DataSuffix | undefined;
1052
1712
  experimental_blockTag?: viem.BlockTag | undefined;
1053
1713
  key: string;
@@ -1077,10 +1737,12 @@ declare function createFluentZeroDevErc20PaymasterClient(params?: {
1077
1737
  transport?: undefined;
1078
1738
  type?: undefined;
1079
1739
  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>;
1740
+ } & 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
1741
  };
1082
1742
  declare function createFluentZeroDevErc20Paymaster(params: {
1743
+ chain?: Chain;
1083
1744
  gasToken?: FluentZeroDevErc20PaymasterToken;
1745
+ network?: FluentWidgetNetwork;
1084
1746
  paymasterClient?: ZeroDevPaymasterClient;
1085
1747
  paymasterRpcUrl?: string;
1086
1748
  }): {
@@ -1088,7 +1750,9 @@ declare function createFluentZeroDevErc20Paymaster(params: {
1088
1750
  };
1089
1751
  declare function createFluentZeroDevErc20PaymasterApprovalCall(params: {
1090
1752
  approveAmount: bigint;
1753
+ chain?: Chain;
1091
1754
  gasToken?: FluentZeroDevErc20PaymasterToken;
1755
+ network?: FluentWidgetNetwork;
1092
1756
  paymasterClient?: ZeroDevPaymasterClient;
1093
1757
  paymasterRpcUrl?: string;
1094
1758
  }): Promise<{
@@ -1104,8 +1768,10 @@ type FluentZeroDevPaymasterDemoApproval = {
1104
1768
  approveAmount?: never;
1105
1769
  };
1106
1770
  declare function sendFluentZeroDevErc20PaymasterDemo(params: {
1771
+ chain?: Chain;
1107
1772
  gasToken?: FluentZeroDevErc20PaymasterToken;
1108
1773
  kernel: FluentZeroDevPaymasterKernel;
1774
+ network?: FluentWidgetNetwork;
1109
1775
  paymasterRpcUrl?: string;
1110
1776
  testRecipient?: Address;
1111
1777
  } & FluentZeroDevPaymasterDemoApproval): Promise<{
@@ -1117,6 +1783,13 @@ declare function sendFluentZeroDevErc20PaymasterDemo(params: {
1117
1783
  userOpHash: `0x${string}`;
1118
1784
  }>;
1119
1785
 
1786
+ /**
1787
+ * Privy promotes the last-used login method to the top of its modal via
1788
+ * localStorage. Fluent Connect always wants X first (email in overflow), so
1789
+ * clear these keys before mounting/opening Privy login.
1790
+ */
1791
+ declare function clearPrivyRecentLoginMethod(appId: string): void;
1792
+
1120
1793
  declare const buttonVariants: (props?: ({
1121
1794
  variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
1122
1795
  size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
@@ -1141,9 +1814,9 @@ declare function DialogDescription({ className, ...props }: Dialog$1.Description
1141
1814
 
1142
1815
  declare function Separator({ className, orientation, ...props }: Separator$1.Props): React.JSX.Element;
1143
1816
 
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";
1817
+ 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
1818
  declare function Icon({ name, className, ...props }: {
1146
1819
  name: IconName;
1147
1820
  } & SVGProps<SVGSVGElement>): React.JSX.Element;
1148
1821
 
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 };
1822
+ 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_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, getFluentGasTokenAddress, getFluentTokenDefaults, getFluentTokenDefaultsForNetwork, getFluentZeroDevErc20PaymasterTokens, getL1Chain, getL1ForFluentChain, getZeroDevRpcUrl, getZerodevIntegration, isFaucetNetwork, isFluentZeroDevChain, l1DefinitionToViemChain, normalizeFluentWidgetNetwork, readFluentTokenBalances, registryVersion, resolveBridgeAddresses, resolveFluentWidgetNetworkFromEnv, resolveFluentZeroDevErc20PaymasterToken, resolveL1Definition, selectFluentGasPaymentToken, sendFluentZeroDevErc20PaymasterDemo, useFluentWidget, useFluentWidgetNetwork, useFluentZeroDevAccount, useWidget };