@fluent.xyz/connect 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,576 @@
1
+ import * as viem from 'viem';
2
+ import { Address, WalletClient, createPublicClient, Hex, Abi, Hash } from 'viem';
3
+ import * as React from 'react';
4
+ import { ReactNode, AnchorHTMLAttributes, SVGProps } from 'react';
5
+ import * as _privy_io_react_auth from '@privy-io/react-auth';
6
+ import { CallType } from '@zerodev/permissions/policies';
7
+ export { CallType, ParamCondition } from '@zerodev/permissions/policies';
8
+ import * as _zerodev_sdk from '@zerodev/sdk';
9
+ import { createKernelAccount, createKernelAccountClient, ZeroDevPaymasterClient } from '@zerodev/sdk';
10
+ import * as _zerodev_sdk_actions from '@zerodev/sdk/actions';
11
+ import * as viem_account_abstraction from 'viem/account-abstraction';
12
+ import { SmartAccount, GetPaymasterDataParameters } from 'viem/account-abstraction';
13
+ import * as node_modules_viem__types_utils_ccip from 'node_modules/viem/_types/utils/ccip';
14
+ import * as class_variance_authority_types from 'class-variance-authority/types';
15
+ import { Button as Button$1 } from '@base-ui/react/button';
16
+ import { VariantProps } from 'class-variance-authority';
17
+ import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
18
+ import { Separator as Separator$1 } from '@base-ui/react/separator';
19
+
20
+ type FluentTokenDefinition = {
21
+ chainId: number;
22
+ symbol: "ETH" | "USDnr" | "BLEND" | "USDC" | "USDT" | string;
23
+ name: string;
24
+ decimals: number;
25
+ address?: Address;
26
+ iconUrl?: string;
27
+ };
28
+ type FluentTokenBalance = FluentTokenDefinition & {
29
+ raw: bigint | null;
30
+ formatted: string | null;
31
+ status: "ready" | "not-configured" | "error";
32
+ error?: string;
33
+ };
34
+
35
+ type FluentAppIdentity = {
36
+ mode: "origin" | "registered";
37
+ origin: string;
38
+ installationId: string;
39
+ clientId?: string;
40
+ appName?: string;
41
+ };
42
+ type FluentSession = {
43
+ app: FluentAppIdentity;
44
+ user: {
45
+ id: string;
46
+ email?: string;
47
+ };
48
+ wallet: {
49
+ smartAccountAddress?: `0x${string}`;
50
+ };
51
+ scopes: string[];
52
+ issuedAt: number;
53
+ idToken?: string;
54
+ };
55
+
56
+ declare const FLUENT_GAS_PAYMENT_PRIORITY: readonly ["USDnr", "BLEND", "ETH"];
57
+ type FluentGasPaymentSymbol = typeof FLUENT_GAS_PAYMENT_PRIORITY[number];
58
+ type FluentGasPaymentValueTier = "green" | "yellow" | "red" | "neutral" | "unknown";
59
+ type FluentGasPaymentEthRates = Partial<Record<FluentGasPaymentSymbol, string>>;
60
+ declare const FLUENT_GAS_PAYMENT_DEFAULT_ETH_RATES: {
61
+ readonly ETH: "1";
62
+ };
63
+ type FluentGasPaymentSelection = {
64
+ status: "ready";
65
+ symbol: FluentGasPaymentSymbol;
66
+ balance: FluentTokenBalance;
67
+ } | {
68
+ status: "bridge-required";
69
+ symbol: null;
70
+ balance: null;
71
+ } | {
72
+ status: "loading";
73
+ symbol: null;
74
+ balance: null;
75
+ };
76
+ declare function selectFluentGasPaymentToken(params: {
77
+ balances: readonly FluentTokenBalance[];
78
+ loading?: boolean;
79
+ }): FluentGasPaymentSelection;
80
+ declare function getFluentGasPaymentTokens(tokens: readonly FluentTokenDefinition[]): FluentTokenDefinition[];
81
+ declare function getFluentGasPaymentEthValue(params: {
82
+ balance: FluentTokenBalance | undefined;
83
+ ethValueByToken?: FluentGasPaymentEthRates;
84
+ }): {
85
+ ethValueWei: null;
86
+ formatted: null;
87
+ tier: "unknown";
88
+ } | {
89
+ ethValueWei: bigint;
90
+ formatted: string;
91
+ tier: FluentGasPaymentValueTier;
92
+ };
93
+ declare function getFluentGasPaymentValueTier(ethValueWei: bigint): FluentGasPaymentValueTier;
94
+ declare function formatFluentGasTokenBalance(balance: Pick<FluentTokenBalance, "raw" | "decimals" | "formatted">, maximumFractionDigits?: number): string | null;
95
+
96
+ type FluentWidgetNetwork = "devnet" | "testnet" | "mainnet";
97
+
98
+ declare const FLUENT_WIDGET_SESSION_STORAGE_KEY = "fluent:widget:session:v1";
99
+
100
+ declare const FLUENT_CONNECT_DEFAULT_ASSETS: {
101
+ readonly fluentLogo: "/fluent-assets/fluent-logo.svg";
102
+ readonly walletConnectIcon: "/fluent-assets/walletconnect.svg";
103
+ readonly metamaskIcon: "/fluent-assets/metamask.png";
104
+ readonly coinbaseIcon: "/fluent-assets/coinbase.svg";
105
+ };
106
+
107
+ type FluentWidgetSession = FluentSession & {
108
+ clientId?: string;
109
+ idToken: string;
110
+ wallet: Omit<FluentSession["wallet"], "smartAccountAddress"> & {
111
+ smartAccountAddress: `0x${string}`;
112
+ signerAddress?: `0x${string}`;
113
+ authorizationSession?: {
114
+ expiresAt: number;
115
+ serializedPermissionAccount: string;
116
+ sessionPrivateKey: `0x${string}`;
117
+ signerAddress: `0x${string}`;
118
+ };
119
+ };
120
+ expiresAt?: number;
121
+ metadata?: Record<string, string>;
122
+ };
123
+ type FluentWidgetAuthMode = "hosted" | "direct";
124
+ type FluentWidgetConfig = {
125
+ network?: FluentWidgetNetwork;
126
+ appName?: string;
127
+ clientId?: string;
128
+ /**
129
+ * `hosted` opens Fluent authorize in a popup (default).
130
+ * `direct` opens Privy login modal in the host app — requires the host origin
131
+ * to be registered in the Fluent Privy Allowed Origins.
132
+ */
133
+ authMode?: FluentWidgetAuthMode;
134
+ authorizeUrl?: string;
135
+ faucetEndpoint?: string;
136
+ eventsEndpoint?: string;
137
+ publicApiUrl?: string;
138
+ reputationSignupUrl?: string;
139
+ bridgeUrl?: string;
140
+ swapper?: {
141
+ enabled?: boolean;
142
+ integratorId?: string;
143
+ dstChainId?: string;
144
+ dstTokenAddress?: string;
145
+ };
146
+ gasPayment?: {
147
+ ethValueByToken?: FluentGasPaymentEthRates;
148
+ };
149
+ scopes?: string[];
150
+ source?: string;
151
+ campaign?: string;
152
+ assets?: Partial<typeof FLUENT_CONNECT_DEFAULT_ASSETS>;
153
+ };
154
+
155
+ type FluentExternalWalletState = {
156
+ configured: boolean;
157
+ connected: boolean;
158
+ address?: string;
159
+ chainId?: number;
160
+ walletClient?: WalletClient;
161
+ open: () => void;
162
+ disconnect: () => void;
163
+ switchChain: (chainId: number) => Promise<void>;
164
+ };
165
+
166
+ type KernelAccount = Awaited<ReturnType<typeof createKernelAccount>>;
167
+ type KernelClient = ReturnType<typeof createKernelAccountClient>;
168
+ type FluentZeroDevSignerMode = "prompt" | "silent";
169
+ type FluentZeroDevCall = {
170
+ to: Address;
171
+ data?: Hex;
172
+ value?: bigint;
173
+ };
174
+ type FluentZeroDevKernel = {
175
+ account: KernelAccount;
176
+ client: KernelClient;
177
+ publicClient: ReturnType<typeof createPublicClient>;
178
+ smartAccountAddress: Address;
179
+ zeroDevRpcUrl: string;
180
+ signerMode: FluentZeroDevSignerMode;
181
+ signerSource: "privy" | "hosted" | "session";
182
+ };
183
+ type FluentZeroDevPermissionSession = {
184
+ serializedPermissionAccount: string;
185
+ sessionSignerAddress: Address;
186
+ smartAccountAddress: Address;
187
+ };
188
+ type FluentZeroDevPermissionCall = {
189
+ target: Address;
190
+ selector?: Hex;
191
+ abi?: Abi;
192
+ functionName?: string;
193
+ args?: readonly unknown[];
194
+ valueLimit?: bigint;
195
+ callType?: CallType;
196
+ };
197
+ declare function useFluentZeroDevAccount(hookOptions?: {
198
+ authorizeUrl?: string;
199
+ allowHostedSigner?: boolean;
200
+ authorizationSession?: {
201
+ expiresAt: number;
202
+ serializedPermissionAccount: string;
203
+ sessionPrivateKey: Hex;
204
+ };
205
+ sessionSignerAddress?: Address;
206
+ sessionSmartAccountAddress?: Address;
207
+ }): {
208
+ smartAccountEnabled: boolean;
209
+ smartAccountReady: boolean;
210
+ smartAccountAddress: `0x${string}` | undefined;
211
+ signerAddress: `0x${string}` | undefined;
212
+ privyReady: boolean;
213
+ privyAuthenticated: boolean;
214
+ embeddedWalletCount: number;
215
+ authenticate: (options?: _privy_io_react_auth.LoginModalOptions | React.MouseEvent<any, any>) => void;
216
+ kernel: FluentZeroDevKernel | null;
217
+ signerModesReady: FluentZeroDevSignerMode[];
218
+ error: Error | null;
219
+ ensureExecutionReady: (options?: {
220
+ confirmation?: "always" | "session";
221
+ }) => Promise<FluentZeroDevKernel>;
222
+ sendTransaction: (request: {
223
+ to: Address;
224
+ data?: Hex;
225
+ value?: bigint;
226
+ }) => Promise<Hash>;
227
+ sendCalls: (calls: FluentZeroDevCall[], options?: FluentBatchOperationExecuteOptions) => Promise<Hash>;
228
+ refresh: () => Promise<FluentZeroDevKernel | null>;
229
+ };
230
+ declare function createFluentZeroDevPermissionSession(params: {
231
+ kernel: FluentZeroDevKernel;
232
+ sessionPrivateKey: Hex;
233
+ calls: readonly FluentZeroDevPermissionCall[];
234
+ expiresAt?: number;
235
+ }): Promise<FluentZeroDevPermissionSession>;
236
+
237
+ type FluentPermissionArgConstraint = {
238
+ equals: unknown;
239
+ } | {
240
+ max: unknown;
241
+ } | {
242
+ min: unknown;
243
+ };
244
+ type FluentPermissionArgs = readonly (FluentPermissionArgConstraint | null | undefined)[] | Record<string, FluentPermissionArgConstraint | null | undefined>;
245
+ type FluentPermissionCallInput = {
246
+ id?: string;
247
+ to: Address;
248
+ abi: Abi;
249
+ method?: string;
250
+ functionName?: string;
251
+ args?: FluentPermissionArgs;
252
+ valueLimit?: bigint;
253
+ };
254
+ type FluentPermissionCallPolicy = {
255
+ kind: "call";
256
+ id?: string;
257
+ call: FluentPermissionCallInput;
258
+ };
259
+ type FluentPermissionBatchPolicy = {
260
+ kind: "batch";
261
+ id?: string;
262
+ calls: readonly FluentPermissionCallInput[];
263
+ };
264
+ type FluentPermissionBatchPolicyInput = {
265
+ id?: string;
266
+ calls: readonly FluentPermissionCallInput[];
267
+ };
268
+ type FluentPermissionPolicy = FluentPermissionCallPolicy | FluentPermissionBatchPolicy;
269
+ type FluentPermissionSessionInput = {
270
+ label?: string;
271
+ delegate?: Address;
272
+ expiresAt?: Date | number;
273
+ sessionPrivateKey?: Hex;
274
+ policies: readonly FluentPermissionPolicy[];
275
+ };
276
+ type FluentPermissionSession = FluentZeroDevPermissionSession & {
277
+ label?: string;
278
+ delegate?: Address;
279
+ expiresAt?: number;
280
+ policies: readonly FluentPermissionPolicy[];
281
+ };
282
+ type FluentPermissionPolicyBuilders = {
283
+ call: (input: FluentPermissionCallInput) => FluentPermissionCallPolicy;
284
+ batch: (input: FluentPermissionBatchPolicyInput) => FluentPermissionBatchPolicy;
285
+ };
286
+ type FluentPermissionApi = {
287
+ createPermissionSession: (input: FluentPermissionSessionInput) => Promise<FluentPermissionSession>;
288
+ policies: FluentPermissionPolicyBuilders;
289
+ };
290
+ type FluentPermissionSessionExecutor = {
291
+ kernel: FluentZeroDevKernel | null;
292
+ smartAccountReady?: boolean;
293
+ };
294
+ declare function createFluentPermissionApi(executor?: FluentPermissionSessionExecutor | null): FluentPermissionApi;
295
+ declare function createFluentPermissionPolicyBuilders(): FluentPermissionPolicyBuilders;
296
+ declare function createFluentPermissionSession(input: FluentPermissionSessionInput, executor?: FluentPermissionSessionExecutor | null): Promise<FluentPermissionSession>;
297
+
298
+ type FluentBatchButtonConfig = {
299
+ label: string;
300
+ pendingLabel?: string;
301
+ successLabel?: string;
302
+ };
303
+ type FluentBatchCallInput = {
304
+ id?: string;
305
+ label?: string;
306
+ to: Address;
307
+ value?: bigint;
308
+ data?: Hex;
309
+ abi?: Abi;
310
+ method?: string;
311
+ functionName?: string;
312
+ args?: readonly unknown[];
313
+ };
314
+ type FluentEncodedBatchCall = {
315
+ id?: string;
316
+ label?: string;
317
+ to: Address;
318
+ value: bigint;
319
+ data: Hex;
320
+ };
321
+ type FluentWidgetExecutionStatus = "disconnected" | "ready" | "unavailable" | "error";
322
+ type FluentWidgetAccount = {
323
+ address?: Address;
324
+ signerAddress?: Address;
325
+ connected: boolean;
326
+ executionReady: boolean;
327
+ executionStatus: FluentWidgetExecutionStatus;
328
+ executionError?: string;
329
+ };
330
+ type FluentWidgetGasPayment = {
331
+ symbol: FluentGasPaymentSymbol;
332
+ token?: Address;
333
+ decimals: number;
334
+ };
335
+ type FluentBatchOperationInput = {
336
+ id?: string;
337
+ button?: string | FluentBatchButtonConfig;
338
+ calls: readonly FluentBatchCallInput[];
339
+ };
340
+ type FluentBatchOperationExecutor = {
341
+ smartAccountReady?: boolean;
342
+ account?: FluentWidgetAccount;
343
+ ensureReady?: (options: FluentBatchOperationExecuteOptions) => Promise<unknown>;
344
+ defaultConfirmation?: FluentBatchConfirmationMode;
345
+ confirm?: (operation: FluentBatchOperationReview) => Promise<void>;
346
+ sendCalls: (calls: FluentEncodedBatchCall[], options: FluentBatchOperationExecuteOptions) => Promise<Hash>;
347
+ };
348
+ type FluentBatchConfirmationMode = "always" | "session";
349
+ type FluentGasPaymentBase = {
350
+ token: Address;
351
+ symbol?: string;
352
+ };
353
+ type FluentGasPayment = FluentGasPaymentBase & ({
354
+ includeApproval: true;
355
+ approveAmount: bigint;
356
+ } | {
357
+ includeApproval?: false;
358
+ approveAmount?: never;
359
+ });
360
+ type FluentBatchOperationExecuteOptions = {
361
+ confirmation?: FluentBatchConfirmationMode;
362
+ gasPayment?: FluentGasPayment;
363
+ };
364
+ type FluentBatchOperationReview = {
365
+ id?: string;
366
+ button?: FluentBatchButtonConfig;
367
+ calls: readonly FluentBatchCallInput[];
368
+ encodedCalls: FluentEncodedBatchCall[];
369
+ account?: FluentWidgetAccount;
370
+ };
371
+ type FluentBatchOperation = {
372
+ id?: string;
373
+ button?: FluentBatchButtonConfig;
374
+ calls: readonly FluentBatchCallInput[];
375
+ encodedCalls: FluentEncodedBatchCall[];
376
+ canExecute: boolean;
377
+ execute: (optionsOrExecutor?: FluentBatchOperationExecuteOptions | FluentBatchOperationExecutor, executor?: FluentBatchOperationExecutor) => Promise<Hash>;
378
+ };
379
+ type FluentBatchApi = FluentPermissionApi & {
380
+ account: FluentWidgetAccount;
381
+ confirmationMode: FluentBatchConfirmationMode;
382
+ gasPayment: FluentWidgetGasPayment;
383
+ createBatchOp: (input: FluentBatchOperationInput) => FluentBatchOperation;
384
+ };
385
+ declare function createFluentBatchOp(input: FluentBatchOperationInput, executor?: FluentBatchOperationExecutor | null): FluentBatchOperation;
386
+
387
+ type FluentWidgetRenderContext = {
388
+ session: FluentWidgetSession | null;
389
+ connectedAddress?: string;
390
+ wallet: FluentExternalWalletState | null;
391
+ widget: FluentBatchApi;
392
+ openConnect: () => void;
393
+ };
394
+ type FluentWidgetProps = {
395
+ wallet?: FluentExternalWalletState | null;
396
+ config?: FluentWidgetConfig;
397
+ mode?: "home" | "page";
398
+ renderHome?: (context: FluentWidgetRenderContext) => ReactNode;
399
+ renderPage?: (context: FluentWidgetRenderContext) => ReactNode;
400
+ renderPermissions?: (context: {
401
+ session: FluentWidgetSession | null;
402
+ compact: boolean;
403
+ }) => ReactNode;
404
+ tokens?: readonly FluentTokenDefinition[];
405
+ showDebugPayload?: boolean;
406
+ onSessionChange?: (session: FluentWidgetSession | null) => void;
407
+ };
408
+ declare function FluentWidget(props: FluentWidgetProps): React.JSX.Element;
409
+
410
+ declare const FLUENT_ZERODEV_ERC20_PAYMASTER_QUERY = "selfFunded=true";
411
+ declare const FLUENT_ZERODEV_PAYMASTER_DEMO_RECIPIENT: "0x000000000000000000000000000000000000dEaD";
412
+ declare const FLUENT_ZERODEV_ERC20_PAYMASTER_TOKENS: {
413
+ readonly BLEND: {
414
+ readonly address: "0x83Fed707A8dDDC2535aE591CF19fB6C91D542D8E";
415
+ readonly decimals: 18;
416
+ readonly symbol: "BLEND";
417
+ };
418
+ readonly USDNR: {
419
+ readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A";
420
+ readonly decimals: 18;
421
+ readonly symbol: "USDnr";
422
+ };
423
+ };
424
+ type FluentZeroDevErc20PaymasterTokenKey = keyof typeof FLUENT_ZERODEV_ERC20_PAYMASTER_TOKENS;
425
+ type FluentZeroDevErc20PaymasterToken = FluentZeroDevErc20PaymasterTokenKey | Address | {
426
+ address: Address;
427
+ symbol?: string;
428
+ };
429
+ type FluentZeroDevPaymasterKernel = {
430
+ account: SmartAccount;
431
+ publicClient: Parameters<typeof createKernelAccountClient>[0]["client"];
432
+ smartAccountAddress: Address;
433
+ zeroDevRpcUrl: string;
434
+ };
435
+ type FluentZeroDevPaymasterDemoResult = {
436
+ approvalIncluded: boolean;
437
+ gasToken: Address;
438
+ gasTokenSymbol?: string;
439
+ paymasterRpcUrl: string;
440
+ transactionHash: Hash;
441
+ userOpHash: Hash;
442
+ };
443
+ declare function createFluentZeroDevRpcUrl(params?: {
444
+ chainId?: number;
445
+ projectId?: string;
446
+ selfFunded?: boolean;
447
+ }): string;
448
+ declare function createFluentZeroDevErc20PaymasterRpcUrl(params?: {
449
+ chainId?: number;
450
+ projectId?: string;
451
+ }): string;
452
+ declare function resolveFluentZeroDevErc20PaymasterToken(token?: FluentZeroDevErc20PaymasterToken): {
453
+ readonly address: "0x83Fed707A8dDDC2535aE591CF19fB6C91D542D8E";
454
+ readonly decimals: 18;
455
+ readonly symbol: "BLEND";
456
+ } | {
457
+ readonly address: "0x092AE7564C6611a114C20C6df766B5B35A52334A";
458
+ readonly decimals: 18;
459
+ readonly symbol: "USDnr";
460
+ } | {
461
+ address: Address;
462
+ symbol?: string;
463
+ };
464
+ declare function createFluentZeroDevErc20PaymasterClient(params?: {
465
+ paymasterRpcUrl?: string;
466
+ }): {
467
+ account: SmartAccount | undefined;
468
+ batch?: {
469
+ multicall?: boolean | viem.Prettify<viem.MulticallBatchOptions> | undefined;
470
+ } | undefined;
471
+ cacheTime: number;
472
+ ccipRead?: false | {
473
+ request?: (parameters: viem.CcipRequestParameters) => Promise<node_modules_viem__types_utils_ccip.CcipRequestReturnType>;
474
+ } | undefined;
475
+ chain: viem.Chain | undefined;
476
+ dataSuffix?: viem.DataSuffix | undefined;
477
+ experimental_blockTag?: viem.BlockTag | undefined;
478
+ key: string;
479
+ name: string;
480
+ pollingInterval: number;
481
+ request: viem.EIP1193RequestFn<_zerodev_sdk.ZeroDevPaymasterRpcSchema<"0.7">>;
482
+ tokens: viem.Tokens | undefined;
483
+ transport: viem.TransportConfig<string, viem.EIP1193RequestFn> & Record<string, any>;
484
+ type: string;
485
+ uid: string;
486
+ getPaymasterData: (parameters: GetPaymasterDataParameters) => Promise<viem_account_abstraction.GetPaymasterDataReturnType>;
487
+ getPaymasterStubData: (parameters: viem_account_abstraction.GetPaymasterStubDataParameters) => Promise<viem_account_abstraction.GetPaymasterStubDataReturnType>;
488
+ sponsorUserOperation: (args: _zerodev_sdk.SponsorUserOperationParameters) => Promise<_zerodev_sdk.SponsorUserOperationReturnType>;
489
+ estimateGasInERC20: (args: _zerodev_sdk_actions.EstimateGasInERC20Parameters) => Promise<_zerodev_sdk_actions.EstimateGasInERC20ReturnType>;
490
+ extend: <const client extends {
491
+ [x: string]: unknown;
492
+ account?: undefined;
493
+ batch?: undefined;
494
+ cacheTime?: undefined;
495
+ ccipRead?: undefined;
496
+ chain?: undefined;
497
+ dataSuffix?: undefined;
498
+ experimental_blockTag?: undefined;
499
+ key?: undefined;
500
+ name?: undefined;
501
+ pollingInterval?: undefined;
502
+ request?: undefined;
503
+ tokens?: undefined;
504
+ transport?: undefined;
505
+ type?: undefined;
506
+ uid?: undefined;
507
+ } & viem.ExactPartial<Pick<viem.PublicActions<viem.Transport, viem.Chain | undefined, SmartAccount | undefined, viem.Tokens | 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, viem.Tokens | 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, viem.Tokens | undefined>) => 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, viem.Tokens | undefined>;
508
+ };
509
+ declare function createFluentZeroDevErc20Paymaster(params: {
510
+ gasToken?: FluentZeroDevErc20PaymasterToken;
511
+ paymasterClient?: ZeroDevPaymasterClient;
512
+ paymasterRpcUrl?: string;
513
+ }): {
514
+ getPaymasterData: (userOperation: GetPaymasterDataParameters) => Promise<_zerodev_sdk.SponsorUserOperationReturnType>;
515
+ };
516
+ declare function createFluentZeroDevErc20PaymasterApprovalCall(params: {
517
+ approveAmount: bigint;
518
+ gasToken?: FluentZeroDevErc20PaymasterToken;
519
+ paymasterClient?: ZeroDevPaymasterClient;
520
+ paymasterRpcUrl?: string;
521
+ }): Promise<{
522
+ to: Address;
523
+ value: bigint;
524
+ data: Hex;
525
+ }>;
526
+ type FluentZeroDevPaymasterDemoApproval = {
527
+ includeApproval: true;
528
+ approveAmount: bigint;
529
+ } | {
530
+ includeApproval?: false;
531
+ approveAmount?: never;
532
+ };
533
+ declare function sendFluentZeroDevErc20PaymasterDemo(params: {
534
+ gasToken?: FluentZeroDevErc20PaymasterToken;
535
+ kernel: FluentZeroDevPaymasterKernel;
536
+ paymasterRpcUrl?: string;
537
+ testRecipient?: Address;
538
+ } & FluentZeroDevPaymasterDemoApproval): Promise<{
539
+ approvalIncluded: boolean;
540
+ gasToken: `0x${string}`;
541
+ gasTokenSymbol: string | undefined;
542
+ paymasterRpcUrl: string;
543
+ transactionHash: `0x${string}`;
544
+ userOpHash: `0x${string}`;
545
+ }>;
546
+
547
+ declare const buttonVariants: (props?: ({
548
+ variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
549
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
550
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
551
+ type ButtonProps = Button$1.Props & VariantProps<typeof buttonVariants> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "target" | "rel">;
552
+ declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
553
+
554
+ declare function Dialog({ ...props }: Dialog$1.Root.Props): React.JSX.Element;
555
+ declare function DialogTrigger({ ...props }: Dialog$1.Trigger.Props): React.JSX.Element;
556
+ declare function DialogPortal({ ...props }: Dialog$1.Portal.Props): React.JSX.Element;
557
+ declare function DialogClose({ ...props }: Dialog$1.Close.Props): React.JSX.Element;
558
+ declare function DialogOverlay({ className, ...props }: Dialog$1.Backdrop.Props): React.JSX.Element;
559
+ declare function DialogContent({ className, children, showCloseButton, ...props }: Dialog$1.Popup.Props & {
560
+ showCloseButton?: boolean;
561
+ }): React.JSX.Element;
562
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
563
+ declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
564
+ showCloseButton?: boolean;
565
+ }): React.JSX.Element;
566
+ declare function DialogTitle({ className, ...props }: Dialog$1.Title.Props): React.JSX.Element;
567
+ declare function DialogDescription({ className, ...props }: Dialog$1.Description.Props): React.JSX.Element;
568
+
569
+ declare function Separator({ className, orientation, ...props }: Separator$1.Props): React.JSX.Element;
570
+
571
+ 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";
572
+ declare function Icon({ name, className, ...props }: {
573
+ name: IconName;
574
+ } & SVGProps<SVGSVGElement>): React.JSX.Element;
575
+
576
+ 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 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, 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, createFluentPermissionApi, createFluentPermissionPolicyBuilders, createFluentPermissionSession, createFluentZeroDevErc20Paymaster, createFluentZeroDevErc20PaymasterApprovalCall, createFluentZeroDevErc20PaymasterClient, createFluentZeroDevErc20PaymasterRpcUrl, createFluentZeroDevPermissionSession, createFluentZeroDevRpcUrl, formatFluentGasTokenBalance, getFluentGasPaymentEthValue, getFluentGasPaymentTokens, getFluentGasPaymentValueTier, resolveFluentZeroDevErc20PaymasterToken, selectFluentGasPaymentToken, sendFluentZeroDevErc20PaymasterDemo, useFluentZeroDevAccount };