@fluent.xyz/connect 0.6.3 → 0.6.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
@@ -2,7 +2,9 @@ import * as react from 'react';
2
2
  import { ReactNode, RefObject } from 'react';
3
3
  import * as web from '@privy-io/react-auth';
4
4
  import * as viem from 'viem';
5
- import { Chain, SignableMessage, Hex, TypedData, TypedDataDefinition, Address, Abi, Hash, TransactionReceipt, WalletClient } from 'viem';
5
+ import { Address, WalletClient } from 'viem';
6
+ import { a as FluentWidgetNetwork, b as FluentGasTokenSymbol, c as FluentGasPaymentEthRates, d as FluentAccountType, e as FluentBatchApi } from './batchOperation-BXn9nmvk.js';
7
+ export { f as FluentAccountCapabilities, F as FluentBatchCallInput, h as FluentBatchOperation, j as FluentBatchOperationExecuteOptions, k as FluentBatchOperationInput, l as FluentEncodedBatchCall, m as FluentExecuteResult, o as FluentExecuteTiming, p as FluentExecuteTimingInstants, q as FluentFixedAccountGas, r as FluentFixedPaymasterGas, s as FluentGasPayment, t as FluentSignApi, u as FluentSigningMode, v as FluentUserOperationGas, w as FluentUserOperationGasError, x as FluentUserOperationGasErrorCode, y as FluentWidgetAccount, z as FluentWidgetExecutionStatus, A as FluentWidgetGasPayment, B as getFluentChainForNetwork } from './batchOperation-BXn9nmvk.js';
6
8
 
7
9
  /**
8
10
  * Privy runtime supplied by a host using a native SDK. Its Provider owns session
@@ -106,34 +108,6 @@ declare const fluentTestnet: viem.Chain;
106
108
  /** Fluent mainnet (chain id 25363) */
107
109
  declare const fluentMainnet: viem.Chain;
108
110
 
109
- /** Which of Fluent's two deployments the widget runs on. */
110
- type FluentWidgetNetwork = "testnet" | "mainnet";
111
- /**
112
- * The viem chain of a Network, for a host's own chain config.
113
- *
114
- * @example
115
- * ```ts
116
- * import { getFluentChainForNetwork } from "@fluent.xyz/connect";
117
- *
118
- * export const chain = getFluentChainForNetwork("mainnet"); // chain.id === 25363
119
- * ```
120
- */
121
- declare function getFluentChainForNetwork(network: FluentWidgetNetwork): Chain;
122
-
123
- /**
124
- * A symbol that can pay for gas. Deliberately `string`: which tokens are
125
- * payable is data on the token definitions now, not a fixed set of literals.
126
- */
127
- type FluentGasTokenSymbol = string;
128
- /**
129
- * What one unit of each Gas token is worth in ETH, as a decimal string, keyed by its
130
- * `FluentGasTokenSymbol`.
131
- *
132
- * @experimental May change or be removed in a minor release while the defaults are measured;
133
- * the defaults are the recommended setting.
134
- */
135
- type FluentGasPaymentEthRates = Partial<Record<FluentGasTokenSymbol, string>>;
136
-
137
111
  /**
138
112
  * Why an operation was not sponsored, and the `code` of a `FluentSponsorshipFallbackError`.
139
113
  * `not_requested` is the only one that is not a failure: the caller asked to pay its own gas,
@@ -200,481 +174,6 @@ declare class FluentGasPaymentError extends Error {
200
174
  });
201
175
  }
202
176
 
203
- /**
204
- * The signatures of the Widget API, for the Widget account. A Fluent ID shows the Review in
205
- * Prompt mode and none in Silent mode; an External wallet always shows the Review, then its own
206
- * prompt.
207
- */
208
- type FluentSignApi = {
209
- /**
210
- * EIP-191 signature. ERC-1271 (ERC-6492 before deployment) for a smart account, ECDSA for an
211
- * External wallet.
212
- *
213
- * @throws `FluentReviewRejectedError` with `code` `signature_review_rejected` when the person
214
- * dismisses the Review: always shown for an External wallet, and for a Fluent ID unless Quick
215
- * sign is on. An External wallet's refusal in its own prompt rejects with the wallet's error.
216
- * @throws `FluentAuthError` with `code` `not_connected` when no Widget account is connected or
217
- * the External wallet has no client, and `root_signer_required` when neither of the Fluent
218
- * ID's signing paths signs with its root Signer, a guard no configuration reaches today.
219
- *
220
- * @example
221
- * ```ts
222
- * import { useFluentWidget } from "@fluent.xyz/connect";
223
- *
224
- * export function useSignGreeting() {
225
- * const { widget } = useFluentWidget();
226
- * return () => widget.signMessage({ message: "Sign in to Marketplace" });
227
- * }
228
- * ```
229
- */
230
- signMessage: (params: {
231
- message: SignableMessage;
232
- }) => Promise<Hex>;
233
- /**
234
- * EIP-712 signature. ERC-1271 (ERC-6492 before deployment) for a smart account, ECDSA for an
235
- * External wallet.
236
- *
237
- * @throws `FluentReviewRejectedError` with `code` `signature_review_rejected` when the person
238
- * dismisses the Review, as for `signMessage`.
239
- * @throws `FluentAuthError` with `code` `not_connected` or `root_signer_required`, as for
240
- * `signMessage`.
241
- *
242
- * @example
243
- * ```ts
244
- * import { useFluentWidget } from "@fluent.xyz/connect";
245
- *
246
- * const verifyingContract = "0x0000000000000000000000000000000000000001";
247
- * const order = { maker: "0x0000000000000000000000000000000000000002", price: 100n } as const;
248
- *
249
- * export function useSignOrder() {
250
- * const { widget } = useFluentWidget();
251
- * return () =>
252
- * widget.signTypedData({
253
- * domain: { name: "Marketplace", version: "1", chainId: 20994, verifyingContract },
254
- * types: {
255
- * Order: [
256
- * { name: "maker", type: "address" },
257
- * { name: "price", type: "uint256" },
258
- * ],
259
- * },
260
- * primaryType: "Order",
261
- * message: order,
262
- * });
263
- * }
264
- * ```
265
- */
266
- signTypedData: <const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(typedData: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
267
- };
268
-
269
- /**
270
- * The account's own gas limits, all three fixed, for a `FluentUserOperationGas` that skips
271
- * estimation.
272
- *
273
- * @experimental May change or be removed in a minor release while the gas policy is measured;
274
- * omitting it, which lets the widget estimate, is the recommended setting.
275
- */
276
- type FluentFixedAccountGas = {
277
- /** Whole-batch execution budget, including any Gas token approval. Positive uint128. */
278
- callGasLimit: bigint;
279
- /** Account validation and deployment budget. Positive uint128. */
280
- verificationGasLimit: bigint;
281
- /** Calldata overhead, or its ceiling with provider-owned paymaster gas. Positive uint256. */
282
- preVerificationGas: bigint;
283
- };
284
- /**
285
- * The paymaster's gas limits for a `FluentUserOperationGas` that skips estimation: both, or
286
- * neither to use the limits the paymaster authorizes.
287
- *
288
- * @experimental May change or be removed in a minor release while the gas policy is measured;
289
- * omitting it, which lets the widget estimate, is the recommended setting.
290
- */
291
- type FluentFixedPaymasterGas = {
292
- /** Fixed validation budget, a positive uint128. Omit both paymaster limits to use its answer. */
293
- paymasterVerificationGasLimit?: bigint;
294
- /** Fixed post-operation budget, a nonnegative uint128. Supplied together with validation. */
295
- paymasterPostOpGasLimit?: bigint;
296
- };
297
- /**
298
- * Gas policy for a Fluent ID batch. Estimation is enabled unless `skipEstimation` is true.
299
- * Skipping requires account limits. Omit both paymaster limits to use provider-authorized
300
- * paymaster gas and calldata overhead within `preVerificationGas`; supply both to fix all gas.
301
- * The fixed limits are a `FluentFixedAccountGas` and a `FluentFixedPaymasterGas`.
302
- *
303
- * @experimental May change or be removed in a minor release while the gas policy is measured;
304
- * omitting it, which lets the widget estimate, is the recommended setting.
305
- */
306
- type FluentUserOperationGas = (FluentFixedAccountGas & FluentFixedPaymasterGas & {
307
- /** Skip the account gas hook and bundler gas estimation. Defaults to false. */
308
- skipEstimation: true;
309
- callGasBuffer?: never;
310
- }) | {
311
- skipEstimation?: false;
312
- callGasLimit: bigint;
313
- callGasBuffer?: never;
314
- } | {
315
- skipEstimation?: false;
316
- callGasLimit?: never;
317
- callGasBuffer: {
318
- /** Extra percent of the bundler estimate, rounded up. Must be a nonnegative safe integer. */
319
- percentage?: number;
320
- /** Extra gas added after the percentage buffer. Must be nonnegative. */
321
- fixed?: bigint;
322
- };
323
- };
324
- /**
325
- * Reasons explicit gas preparation can fail before signing.
326
- *
327
- * @experimental May change or be removed in a minor release while the gas policy is measured;
328
- * omitting it, which lets the widget estimate, is the recommended setting.
329
- */
330
- type FluentUserOperationGasErrorCode = "invalid_policy" | "paymaster_gas_mismatch";
331
- /**
332
- * An invalid skip-estimation policy or paymaster authorization for different gas limits.
333
- * `code`, a `FluentUserOperationGasErrorCode`, identifies the failure; `message` names the
334
- * option or gas field to correct.
335
- *
336
- * @experimental May change or be removed in a minor release while the gas policy is measured;
337
- * omitting it, which lets the widget estimate, is the recommended setting.
338
- */
339
- declare class FluentUserOperationGasError extends Error {
340
- readonly code: FluentUserOperationGasErrorCode;
341
- constructor(code: FluentUserOperationGasErrorCode, message: string);
342
- }
343
-
344
- /**
345
- * One contract call of a Batch operation: either raw `data`, or an `abi` with the `method` to
346
- * encode and its `args`.
347
- */
348
- type FluentBatchCallInput = {
349
- id?: string;
350
- label?: string;
351
- to: Address;
352
- /** Native ETH sent with the call, in wei. Defaults to `0n`. */
353
- value?: bigint;
354
- data?: Hex;
355
- abi?: Abi;
356
- /** The ABI function to encode, with `abi` and `args`, when `data` is not given. */
357
- method?: string;
358
- args?: readonly unknown[];
359
- };
360
- /** A Batch operation's call as it is sent: `data` encoded, `value` defaulted to `0n`. */
361
- type FluentEncodedBatchCall = {
362
- id?: string;
363
- label?: string;
364
- to: Address;
365
- value: bigint;
366
- data: Hex;
367
- };
368
- /**
369
- * Whether the Widget account can send now: `ready`, `disconnected`, `unavailable` (connected
370
- * but not ready yet) or `error` (see `FluentWidgetAccount.executionError`).
371
- */
372
- type FluentWidgetExecutionStatus = "disconnected" | "ready" | "unavailable" | "error";
373
- /** How the connected account executes transactions. */
374
- type FluentAccountType = "smart" | "eoa";
375
- /** What the Widget account can do, so a host adapts its UI without branching on its type. */
376
- type FluentAccountCapabilities = {
377
- /** Multiple calls land in a single atomic transaction (smart account only). */
378
- atomicBatch: boolean;
379
- /**
380
- * Gas can be paid in an ERC-20 (BLEND / USDnr) via the paymaster instead of
381
- * native ETH — smart account only. This is NOT free/sponsored gas: the user
382
- * still pays, just in a token.
383
- */
384
- erc20Gas: boolean;
385
- };
386
- /**
387
- * The Widget account as the Widget API reports it: its address and type, whether it is
388
- * connected and can send now, and what it can do.
389
- */
390
- type FluentWidgetAccount = {
391
- /** The Widget account's address: the Fluent ID's, or the External wallet's. */
392
- address?: Address;
393
- /** Whether a Widget account, a Fluent ID or an External wallet, is connected. */
394
- connected: boolean;
395
- /** Whether the Widget account can send now; `executionStatus` says why it cannot. */
396
- executionReady: boolean;
397
- /** Where sending stands, a `FluentWidgetExecutionStatus`. */
398
- executionStatus: FluentWidgetExecutionStatus;
399
- /**
400
- * The message of the last failure to prepare the Fluent ID's account, if any: the reason an
401
- * `executionStatus` of `"error"` gives.
402
- */
403
- executionError?: string;
404
- /** Active account kind, or undefined when nothing is connected. */
405
- type?: FluentAccountType;
406
- /** What the active account can do — lets hosts adapt UI without branching on `type`. */
407
- capabilities: FluentAccountCapabilities;
408
- };
409
- /**
410
- * Absolute instants behind `FluentExecuteTiming`, kept so its signed estimates can be
411
- * re-checked rather than believed. Epoch milliseconds (`Date.now()`), because the only other
412
- * clock in the arithmetic — the including block's `timestamp` — is a wall clock too.
413
- *
414
- * @experimental May change or be removed in a minor release while the numbers are measured.
415
- */
416
- type FluentExecuteTimingInstants = {
417
- /** When the first submission attempt of this send began. */
418
- submittedAtEpochMs: number;
419
- /** When the bundler accepted the operation that settled. */
420
- broadcastedAtEpochMs: number;
421
- /** When that operation's receipt was in hand. */
422
- receivedAtEpochMs: number;
423
- /**
424
- * The including block's `timestamp`, in milliseconds. Absent exactly when `inclusionMs` and
425
- * `detectMs` are absent: the block could not be read.
426
- */
427
- blockTimestampEpochMs?: number;
428
- /** How many operations were submitted; more than one means a retry or an own-gas fallback. */
429
- attempts: number;
430
- };
431
- /**
432
- * Where one send's milliseconds went, stage by stage.
433
- *
434
- * Two clocks, and the difference decides how these numbers may be read. `prepareMs`,
435
- * `signMs`, `broadcastMs`, `retryMs` and `totalMs` are direct monotonic measurements on the
436
- * client (`performance.now()`). `inclusionMs` and `detectMs` are *signed estimates* across the
437
- * client's clock and the chain's: `block.timestamp` has one-second resolution and no relation
438
- * to the browser's clock, so either may legitimately be negative when it is small, and neither
439
- * is clamped — a clamp would turn a known skew into a silent zero. `instants` keeps the inputs,
440
- * so the subtraction can be redone by whoever doubts it.
441
- *
442
- * `totalMs` is measured, not summed: it runs from the start of the first submission to the
443
- * instant the receipt was in hand, and excludes both the smart-account and authentication setup
444
- * before the send and the block read after it. It does not equal the sum of the stages and must
445
- * not be displayed as if it did.
446
- *
447
- * Collected for every send, whatever `debugLogging` is set to — the numbers are the answer to
448
- * "where did the four seconds go", which is a question a host asks in production. A failure
449
- * inside the measuring code costs the stages it could not establish, never the send.
450
- *
451
- * @experimental May change or be removed in a minor release while the numbers are measured.
452
- */
453
- type FluentExecuteTiming = {
454
- /**
455
- * Building the UserOperation — nonce, gas estimate, paymaster — up to the signature request.
456
- * Absent when the clock could not be read at that boundary: every stage here is absent rather
457
- * than approximated, because a stage silently widened to cover its neighbours is worse than a
458
- * stage the display can mark as unmeasured.
459
- */
460
- prepareMs?: number;
461
- /** Producing the signature. Absent when the settled attempt never got that far. */
462
- signMs?: number;
463
- /** Handing the signed operation to the bundler. Absent when signing never finished. */
464
- broadcastMs?: number;
465
- /**
466
- * Bundler acceptance to the including block's timestamp: bundling plus block time. Signed
467
- * estimate; absent when the including block could not be read.
468
- */
469
- inclusionMs?: number;
470
- /**
471
- * The including block's timestamp to the instant this client held the receipt: how long the
472
- * inclusion took to notice. Signed estimate; absent when the including block could not be read.
473
- */
474
- detectMs?: number;
475
- /**
476
- * Time spent on submissions that did not settle — a rejected sponsorship bearer, a refused
477
- * sponsorship falling back to own gas — and on the token exchange between them. It belongs to
478
- * no stage, is counted inside `totalMs`, and is `0` for a send that submitted once.
479
- */
480
- retryMs: number;
481
- /** First submission to receipt in hand. Measured directly; never a sum of the stages. */
482
- totalMs: number;
483
- /** The raw instants the signed estimates above were computed from. */
484
- instants: FluentExecuteTimingInstants;
485
- };
486
- /** Result of executing a batch operation. */
487
- type FluentExecuteResult = {
488
- /** Primary transaction hash — the final/target call (e.g. deposit/withdraw). */
489
- hash: Hash;
490
- /** All transaction hashes in order. One for a smart-account UserOp; one per call for an EOA. */
491
- hashes: Hash[];
492
- /** Included receipt for hash (the final EOA call); not a finality guarantee. */
493
- receipt?: TransactionReceipt;
494
- /** ERC-4337 operation hash when executing through a smart account. */
495
- userOpHash?: Hash;
496
- /** True when all calls landed atomically (smart account), false for sequential EOA txs. */
497
- atomic: boolean;
498
- /**
499
- * Whether the App's Sponsorship paid the gas for this operation, read back off the settled
500
- * operation (which contract the EntryPoint charged) first: a refused Sponsorship falls back
501
- * to the account paying its own gas, so a flag set from asking for Sponsorship would report
502
- * the fallback as a success. `false` for a Gas token payment and always for an External
503
- * wallet, which has no paymaster. When a Fluent ID's receipt names no paymaster, the way the
504
- * operation was sent decides: `false` when it made no sponsored submission (the fallback,
505
- * `sponsorship: "never"`, Sponsorship unavailable or not configured), and `null` after a
506
- * sponsored submission, where nothing says who paid.
507
- */
508
- sponsored: boolean | null;
509
- /**
510
- * The paymaster a Fluent ID's receipt names: the Sponsorship paymaster or a Gas token's
511
- * paymaster, when one paid. Undefined when the receipt carried no paymaster — `sponsored` is
512
- * then `false`, or `null` after a sponsored submission — and always for an External wallet,
513
- * which has no paymaster.
514
- *
515
- * @experimental May change or be removed in a minor release while the numbers are measured.
516
- */
517
- paymaster?: Address;
518
- /**
519
- * Where this send's milliseconds went, as a `FluentExecuteTiming` whose raw instants are a
520
- * `FluentExecuteTimingInstants`. Fluent ID only: an External wallet performs its prompt, its
521
- * signing and its broadcast behind one `sendTransaction` await, so EIP-1193 exposes no
522
- * truthful instant to put a boundary on.
523
- *
524
- * @experimental May change or be removed in a minor release while the numbers are measured.
525
- */
526
- timing?: FluentExecuteTiming;
527
- };
528
- /** The Gas payment chosen in the widget: the Gas token's symbol, its address and decimals. */
529
- type FluentWidgetGasPayment = {
530
- symbol: FluentGasTokenSymbol;
531
- token?: Address;
532
- decimals: number;
533
- };
534
- /** What `widget.createBatchOp` takes: the calls of one Batch operation, and its Review title. */
535
- type FluentBatchOperationInput = {
536
- id?: string;
537
- /**
538
- * Heading of this Batch operation's Review (Fluent ID, Prompt mode). Defaults to the
539
- * widget's own copy, "Confirm transaction".
540
- */
541
- reviewTitle?: string;
542
- calls: readonly FluentBatchCallInput[];
543
- };
544
- /**
545
- * How a Fluent ID signs: `"prompt"` shows the widget's Review first (Prompt mode), `"silent"`
546
- * signs with none (Silent mode), except that where the App set `quickSign.whitelistAddresses`, a
547
- * Batch operation with a call outside it is signed as `"prompt"`. An External wallet always
548
- * shows its own prompt.
549
- */
550
- type FluentSigningMode = "prompt" | "silent";
551
- /**
552
- * How one operation's gas is paid: a Gas token by symbol, or native ETH, and whether
553
- * Sponsorship is asked for.
554
- *
555
- * Without `includeApproval`, the widget adds the approval of the Gas token to its ERC-20
556
- * paymaster at the start of the operation when the account's allowance is below the threshold:
557
- * 1 USDnr when the allowance is below 0.1 USDnr, 10 BLEND when it is below 1 BLEND. An
558
- * allowance that cannot be read counts as none. `includeApproval: true` with an `approveAmount`
559
- * approves that amount instead, whatever the allowance. Either way the Review lists the
560
- * operation's own calls, and nothing is added for `"ETH"` or for an External wallet.
561
- */
562
- type FluentGasPayment = {
563
- /**
564
- * Gas token symbol. The widget resolves the ERC-20 address for the active
565
- * network internally — callers never pass (or risk mistyping) an address.
566
- * `"ETH"` means native gas (no ERC-20 paymaster).
567
- */
568
- symbol: FluentGasTokenSymbol;
569
- /**
570
- * Whether to ask the App's sponsorship paymaster to pay for this operation.
571
- *
572
- * `"auto"` tries Sponsorship, and if the paymaster refuses, resends with the account paying
573
- * its own gas. `"never"` skips the paymaster outright, so the account pays from the first
574
- * attempt and the result reports `sponsored: false`. What an omitted value means:
575
- * [guides/sponsorship.md](guides/sponsorship.md#not-asking-sponsorship-never-and-gas-tokens).
576
- *
577
- * Ignored when `symbol` names an ERC-20: that token's own paymaster pays,
578
- * and sponsorship is not in the picture.
579
- */
580
- sponsorship?: "auto" | "never";
581
- } & ({
582
- /** Approves `approveAmount` to the paymaster whatever the allowance, for a Gas token. */
583
- includeApproval: true;
584
- /** In the Gas token's smallest unit. */
585
- approveAmount: bigint;
586
- } | {
587
- includeApproval?: false;
588
- approveAmount?: never;
589
- });
590
- /** The options of `FluentBatchOperation.execute`, every one optional. */
591
- type FluentBatchOperationExecuteOptions = {
592
- /**
593
- * The `FluentSigningMode` of this operation. Defaults to the widget's `signingMode`, which
594
- * follows the person's Quick sign. A `"silent"` operation with a call outside
595
- * `quickSign.whitelistAddresses` is signed as `"prompt"`. Any value but `"silent"`, 0.5's
596
- * `"always"` and `"session"` included, is `"prompt"`. Ignored for an External wallet.
597
- */
598
- confirmation?: FluentSigningMode;
599
- /** How the gas of this operation is paid. Defaults to the Gas payment chosen in the widget. */
600
- gasPayment?: FluentGasPayment;
601
- /**
602
- * Fluent ID gas limits, estimation opt-out or headroom: a `FluentUserOperationGas`, whose
603
- * fixed limits are a `FluentFixedAccountGas` and a `FluentFixedPaymasterGas`. Ignored for
604
- * External wallet sends.
605
- *
606
- * @experimental May change or be removed in a minor release while the gas policy is measured;
607
- * omitting it, which lets the widget estimate, is the recommended setting.
608
- */
609
- userOperationGas?: FluentUserOperationGas;
610
- };
611
- /**
612
- * A Batch operation `widget.createBatchOp` built: its calls, encoded, and `execute`, which sends
613
- * them for the Widget account.
614
- */
615
- type FluentBatchOperation = {
616
- /** `FluentBatchOperationInput.id`, copied. */
617
- id?: string;
618
- /** `FluentBatchOperationInput.reviewTitle`, copied. */
619
- reviewTitle?: string;
620
- /** The calls as the host passed them. */
621
- calls: readonly FluentBatchCallInput[];
622
- /** The same calls encoded, in order: what `execute()` sends. */
623
- encodedCalls: FluentEncodedBatchCall[];
624
- /**
625
- * Whether the widget could send the operation when it was built: the Widget account ready, or
626
- * able to prepare itself when `execute()` is called. Not updated afterwards; read
627
- * `widget.account.executionReady` for the live value.
628
- */
629
- canExecute: boolean;
630
- /**
631
- * Executes the operation for the Widget account and resolves once it is included.
632
- *
633
- * @throws `FluentReviewRejectedError` with `code` `transaction_review_rejected` when the
634
- * person dismisses the Review, which a Fluent ID shows in Prompt mode; an External wallet's
635
- * refusal in its own prompt rejects with the wallet's error.
636
- * @throws `FluentSponsorshipFallbackError` when a Fluent ID asked for Sponsorship, a sponsored
637
- * submission failed, and the submission in which the account pays its own gas failed too;
638
- * its `code` says why Sponsorship failed: `denied`, `unauthorized`, `unreachable` or
639
- * `no_token`. A failure while waiting for an operation's inclusion is not wrapped: it rejects
640
- * with its own error, and an operation whose wait failed was submitted. What else is not
641
- * wrapped: [guides/sponsorship.md](guides/sponsorship.md#both-failed-fluentsponsorshipfallbackerror).
642
- * @throws `FluentUserOperationGasError` (experimental) with `code` `invalid_policy` for a
643
- * `skipEstimation` policy that cannot be used (other invalid `userOperationGas` values throw a
644
- * plain `Error`), and `paymaster_gas_mismatch` when, with estimation skipped,
645
- * the paymaster's authorization of a Gas token payment does not match the fixed gas limits.
646
- * Under Sponsorship, a failed check of the paymaster's gas fails the sponsored submission
647
- * instead, and the account pays its own gas.
648
- * @throws `FluentGasPaymentError` when a Fluent ID's operation is paid in a Gas token and
649
- * cannot be prepared; nothing has been signed or sent. Its `code` is `paymaster_unavailable`
650
- * when the address of the paymaster to approve the Gas token to cannot be read,
651
- * `insufficient_gas_token` when the account's balance of the Gas token is below the fee the
652
- * paymaster quotes for the operation or the paymaster's simulation cannot charge the fee in it,
653
- * and `paymaster_rejected` when the paymaster refuses to charge the fee in the Gas token for
654
- * another reason.
655
- */
656
- execute: (options?: FluentBatchOperationExecuteOptions) => Promise<FluentExecuteResult>;
657
- };
658
- /**
659
- * The Widget API: what the widget gives an App's code to act for the Widget account. Reached as
660
- * `widget` in the render context or from `useFluentWidget()`.
661
- */
662
- type FluentBatchApi = FluentSignApi & {
663
- /** The Widget account: its address, type, readiness and capabilities. */
664
- account: FluentWidgetAccount;
665
- /** How the widget signs by default: `"silent"` while the person's Quick sign is on. */
666
- signingMode: FluentSigningMode;
667
- /** The Gas payment chosen in the widget, which `execute()` uses when given no `gasPayment`. */
668
- gasPayment: FluentWidgetGasPayment;
669
- /**
670
- * Builds a Batch operation, encoding its calls now; `execute()` sends it.
671
- *
672
- * @throws `Error` when `calls` is empty, or when a call has neither `data` nor `abi` with
673
- * `method`: a call that still names its function in 0.5's `functionName` is one.
674
- */
675
- createBatchOp: (input: FluentBatchOperationInput) => FluentBatchOperation;
676
- };
677
-
678
177
  /**
679
178
  * Images for the widget, each a URL or a data URI. Today the widget reads only `fluentLogo`,
680
179
  * which it passes to the provider behind Direct login as its logo; see `assets` in
@@ -1430,4 +929,4 @@ type AccountAvatarProps = {
1430
929
  */
1431
930
  declare function AccountAvatar({ userAvatarUrl, defaultLogoUrl, className }: AccountAvatarProps): react.JSX.Element;
1432
931
 
1433
- export { AccountAvatar, type AccountAvatarProps, type FluentAccountCapabilities, type FluentAccountType, FluentAuthError, type FluentAuthErrorCode, type FluentBatchApi, type FluentBatchCallInput, type FluentBatchOperation, type FluentBatchOperationExecuteOptions, type FluentBatchOperationInput, type FluentChainDefinition, type FluentEncodedBatchCall, type FluentExecuteResult, type FluentExecuteTiming, type FluentExecuteTimingInstants, type FluentExternalWalletState, type FluentFixedAccountGas, type FluentFixedPaymasterGas, type FluentGasPayment, FluentGasPaymentError, type FluentGasPaymentErrorCode, type FluentGasPaymentEthRates, type FluentGasTokenSymbol, type FluentIframeElement, type FluentLinkXResult, type FluentLinkXStatus, type FluentPrivyAdapter, FluentReviewRejectedError, type FluentReviewRejectedErrorCode, type FluentSignApi, type FluentSigningMode, FluentSponsorshipFallbackError, type FluentSponsorshipReason, type FluentTokenDefinition, type FluentUserOperationGas, FluentUserOperationGasError, type FluentUserOperationGasErrorCode, type FluentWalletChoice, FluentWidget, type FluentWidgetAccount, type FluentWidgetAssets, type FluentWidgetAuthMethod, type FluentWidgetConfig, FluentWidgetConfigError, type FluentWidgetConfigErrorCode, type FluentWidgetConnectButtonRenderContext, type FluentWidgetExecution, type FluentWidgetExecutionSource, type FluentWidgetExecutionStatus, type FluentWidgetGasPayment, type FluentWidgetNetwork, type FluentWidgetProps, type FluentWidgetRenderContext, type FluentWidgetSession, type FluentWidgetStatus, type FluentXAccount, type UseFluentIframeBridgeOptions, fluentMainnet, fluentTestnet, getFluentChainByChainId, getFluentChainForNetwork, useFluentIframeBridge, useFluentWidget, useLinkX };
932
+ export { AccountAvatar, type AccountAvatarProps, FluentAccountType, FluentAuthError, type FluentAuthErrorCode, FluentBatchApi, type FluentChainDefinition, type FluentExternalWalletState, FluentGasPaymentError, type FluentGasPaymentErrorCode, FluentGasPaymentEthRates, FluentGasTokenSymbol, type FluentIframeElement, type FluentLinkXResult, type FluentLinkXStatus, type FluentPrivyAdapter, FluentReviewRejectedError, type FluentReviewRejectedErrorCode, FluentSponsorshipFallbackError, type FluentSponsorshipReason, type FluentTokenDefinition, type FluentWalletChoice, FluentWidget, type FluentWidgetAssets, type FluentWidgetAuthMethod, type FluentWidgetConfig, FluentWidgetConfigError, type FluentWidgetConfigErrorCode, type FluentWidgetConnectButtonRenderContext, type FluentWidgetExecution, type FluentWidgetExecutionSource, FluentWidgetNetwork, type FluentWidgetProps, type FluentWidgetRenderContext, type FluentWidgetSession, type FluentWidgetStatus, type FluentXAccount, type UseFluentIframeBridgeOptions, fluentMainnet, fluentTestnet, getFluentChainByChainId, useFluentIframeBridge, useFluentWidget, useLinkX };
package/dist/index.js CHANGED
@@ -5612,7 +5612,7 @@ function createFluentConnectForWidget(config) {
5612
5612
  }
5613
5613
 
5614
5614
  // package.json
5615
- var version = "0.6.3";
5615
+ var version = "0.6.4";
5616
5616
 
5617
5617
  // src/core/analytics.ts
5618
5618
  var INSTANCE_NAME = "fluent";