@spicenet-io/spiceflow-ui 3.3.9 → 3.3.11

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.
Files changed (70) hide show
  1. package/dist/{Button-jx5yrM-s.js → Button-CAv7hfnV.js} +1 -1
  2. package/dist/{Button-CkSwrat1.js → Button-Cs81k5Pq.js} +1 -1
  3. package/dist/auth-dynamic.cjs.js +1 -1
  4. package/dist/auth-dynamic.js +1 -1
  5. package/dist/auth-privy.cjs.js +1 -1
  6. package/dist/auth-privy.js +1 -1
  7. package/dist/components/AccountDisplay/{AccountCustomSection.d.ts → parts/AccountCustomSection.d.ts} +2 -2
  8. package/dist/components/AccountDisplay/{AccountHeader.d.ts → parts/AccountHeader.d.ts} +1 -1
  9. package/dist/components/AccountDisplay/{AccountIdleBalances.d.ts → parts/AccountIdleBalances.d.ts} +2 -2
  10. package/dist/components/AccountDisplay/{AccountPanel.d.ts → parts/AccountPanel.d.ts} +3 -3
  11. package/dist/components/AccountDisplay/{AccountPendingDeposits.d.ts → parts/AccountPendingDeposits.d.ts} +2 -2
  12. package/dist/components/AssetSelector/index.d.ts +3 -3
  13. package/dist/components/AssetSelector/{AssetDropdown.d.ts → parts/AssetDropdown.d.ts} +1 -1
  14. package/dist/components/AssetSelector/{ChainIcon.d.ts → parts/ChainIcon.d.ts} +1 -1
  15. package/dist/components/AssetSelector/{TokenIcon.d.ts → parts/TokenIcon.d.ts} +1 -1
  16. package/dist/components/ProviderLogins/index.d.ts +4 -2
  17. package/dist/components/ProviderLogins/{DynamicLogin.d.ts → parts/DynamicLogin.d.ts} +1 -1
  18. package/dist/components/ProviderLogins/{PrivyLogin.d.ts → parts/PrivyLogin.d.ts} +1 -1
  19. package/dist/components/SpiceBalance/index.d.ts +2 -2
  20. package/dist/components/SpiceDeposit/index.d.ts +3 -3
  21. package/dist/components/SpiceDeposit/{depositBatches.d.ts → lib/depositBatches.d.ts} +3 -3
  22. package/dist/components/SpiceDeposit/{executors.d.ts → lib/executors.d.ts} +3 -3
  23. package/dist/components/SpiceDeposit/{feePreview.d.ts → lib/feePreview.d.ts} +1 -1
  24. package/dist/components/SpiceDeposit/{ConnectWalletModal.d.ts → steps/ConnectWalletModal.d.ts} +1 -1
  25. package/dist/components/SpiceDeposit/{DepositModal.d.ts → steps/DepositModal.d.ts} +1 -1
  26. package/dist/components/SpiceDeposit/{DepositRecoveryPrompt.d.ts → steps/DepositRecoveryPrompt.d.ts} +1 -1
  27. package/dist/components/SpiceDeposit/{DepositStatusModal.d.ts → steps/DepositStatusModal.d.ts} +3 -3
  28. package/dist/components/SpiceDeposit/{SelectChainModal.d.ts → steps/SelectChainModal.d.ts} +1 -1
  29. package/dist/components/SpiceDeposit/{SelectTokenModal.d.ts → steps/SelectTokenModal.d.ts} +1 -1
  30. package/dist/components/SpiceLock/{executors.d.ts → lib/executors.d.ts} +13 -14
  31. package/dist/components/SpiceLock/{helpers.d.ts → lib/helpers.d.ts} +2 -2
  32. package/dist/components/SpiceLock/{LockConfirmationPanel.d.ts → parts/LockConfirmationPanel.d.ts} +1 -1
  33. package/dist/components/SpiceLock/{LockDurationSlider.d.ts → parts/LockDurationSlider.d.ts} +1 -1
  34. package/dist/components/SpiceLock/{LockExpiryRow.d.ts → parts/LockExpiryRow.d.ts} +1 -1
  35. package/dist/components/SpiceLock/{VotingPowerRow.d.ts → parts/VotingPowerRow.d.ts} +1 -1
  36. package/dist/components/SpiceSupply/{buildBatches.d.ts → lib/buildBatches.d.ts} +8 -10
  37. package/dist/components/SpiceSupply/lib/executors.d.ts +67 -0
  38. package/dist/components/SpiceSupply/{feePreview.d.ts → lib/feePreview.d.ts} +9 -11
  39. package/dist/components/SpiceSupply/{DestinationEstimate.d.ts → parts/DestinationEstimate.d.ts} +2 -2
  40. package/dist/components/SpiceSupply/{SupplyEstimate.d.ts → parts/SupplyEstimate.d.ts} +1 -1
  41. package/dist/components/SpiceWithdraw/lib/executors.d.ts +34 -0
  42. package/dist/components/SpiceWithdraw/{SelectPopover.d.ts → parts/SelectPopover.d.ts} +1 -1
  43. package/dist/components/StatusDisplay/index.d.ts +3 -2
  44. package/dist/components/StatusDisplay/{StatusIcon.d.ts → parts/StatusIcon.d.ts} +1 -1
  45. package/dist/components/StatusDisplay/{StatusPanel.d.ts → parts/StatusPanel.d.ts} +1 -1
  46. package/dist/components/StatusDisplay/{StepItem.d.ts → parts/StepItem.d.ts} +1 -1
  47. package/dist/execution/gasless.d.ts +7 -0
  48. package/dist/execution/pollIntentStep.d.ts +28 -0
  49. package/dist/hooks/useSpiceExecution.d.ts +1 -0
  50. package/dist/index.cjs.js +12 -12
  51. package/dist/index.d.ts +2 -1
  52. package/dist/index.js +16 -16
  53. package/dist/{providerWallet-Ds1PM0vC.js → providerWallet-BC4uEdg8.js} +1 -1
  54. package/dist/{providerWallet-6FpyLYqw.js → providerWallet-QdrPrEd_.js} +1 -1
  55. package/dist/providers/dynamic.d.ts +2 -2
  56. package/dist/providers/privy.d.ts +2 -2
  57. package/dist/types/supply.d.ts +15 -0
  58. package/dist/utils/spiceConstants.d.ts +3 -0
  59. package/package.json +3 -3
  60. package/dist/components/SpiceDeposit/views/DepositSubtitle.d.ts +0 -9
  61. package/dist/components/SpiceSupply/executors.d.ts +0 -73
  62. package/dist/components/SpiceWithdraw/executors.d.ts +0 -50
  63. /package/dist/components/AccountDisplay/{AccountActions.d.ts → parts/AccountActions.d.ts} +0 -0
  64. /package/dist/components/SpiceBalance/{AccountItem.d.ts → parts/AccountItem.d.ts} +0 -0
  65. /package/dist/components/SpiceBalance/{BalanceSection.d.ts → parts/BalanceSection.d.ts} +0 -0
  66. /package/dist/components/SpiceDeposit/{views/AssetChooserList.d.ts → parts/DepositAssetChooser.d.ts} +0 -0
  67. /package/dist/components/SpiceDeposit/{ModalHeader.d.ts → parts/ModalHeader.d.ts} +0 -0
  68. /package/dist/components/SpiceWithdraw/{helpers.d.ts → lib/helpers.d.ts} +0 -0
  69. /package/dist/components/SpiceWithdraw/{views/BalancePopover.d.ts → parts/WithdrawBalancePopover.d.ts} +0 -0
  70. /package/dist/components/SpiceWithdraw/{views → parts}/WithdrawDetailsPanel.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import { type Address } from "viem";
2
2
  import { type FeeEstimateSummary } from "@spicenet-io/spiceflow-core";
3
- import type { ChainBatch } from "../../types/authorization";
3
+ import type { ChainBatch } from "../../../types/authorization";
4
4
  export declare function sumRollupBalanceForChainToken(balances: unknown, chainId: number, tokenAddress: string): bigint;
5
5
  export declare function fetchSpiceBalanceForChainToken(apiBaseUrl: string, user: Address, chainId: number, tokenAddress: string): Promise<bigint>;
6
6
  export declare function waitForSpiceBalanceIncrease({ apiBaseUrl, user, chainId, tokenAddress, prevBalance, timeoutMs, pollIntervalMs, }: {
@@ -23,7 +23,7 @@ export declare function build7702EstimateRequest(user: Address, batches: ChainBa
23
23
  chainBatches: {
24
24
  hash: any;
25
25
  chainId: any;
26
- tokenTransfers: import("../..").TokenTransferConfig[];
26
+ tokenTransfers: import("../../..").TokenTransferConfig[];
27
27
  calls: any;
28
28
  }[];
29
29
  }[];
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
- import type { LockConfirmationData, LockConfirmationPanelProps } from "../../types/lock";
2
+ import type { LockConfirmationData, LockConfirmationPanelProps } from "../../../types/lock";
3
3
  export type { LockConfirmationData, LockConfirmationPanelProps };
4
4
  export declare const LockConfirmationPanel: React.FC<LockConfirmationPanelProps>;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
- import type { LockDurationSliderProps } from "../../types/lock";
2
+ import type { LockDurationSliderProps } from "../../../types/lock";
3
3
  export type { LockDurationSliderProps };
4
4
  export declare const LockDurationSlider: React.FC<LockDurationSliderProps>;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
- import type { LockExpiryRowProps } from "../../types/lock";
2
+ import type { LockExpiryRowProps } from "../../../types/lock";
3
3
  export type { LockExpiryRowProps };
4
4
  export declare const LockExpiryRow: React.FC<LockExpiryRowProps>;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
- import type { VotingPowerRowProps } from "../../types/lock";
2
+ import type { VotingPowerRowProps } from "../../../types/lock";
3
3
  export type { VotingPowerRowProps };
4
4
  export declare const VotingPowerRow: React.FC<VotingPowerRowProps>;
@@ -1,10 +1,10 @@
1
1
  import { type Address } from "viem";
2
2
  import type { ResolvedSwap } from "@spicenet-io/spiceflow-core";
3
- import type { ChainBatch } from "../../types/authorization";
4
- import type { SelectedAsset } from "../../types/assets";
5
- import type { SpiceSupplyProps } from "../../types/supply";
6
- import type { ResolvedExactOutputSwap } from "../../utils/swapQuotes";
7
- import type { GaslessExecutionOptions } from "../../hooks/useSpiceExecution";
3
+ import type { ChainBatch } from "../../../types/authorization";
4
+ import type { SelectedAsset } from "../../../types/assets";
5
+ import type { SpiceSupplyProps, SupplyBatchBuildOptions } from "../../../types/supply";
6
+ import type { ResolvedExactOutputSwap } from "../../../utils/swapQuotes";
7
+ import type { GaslessExecutionOptions } from "../../../hooks/useSpiceExecution";
8
8
  import type { FeeEstimateSummary } from "@spicenet-io/spiceflow-core";
9
9
  type EstimateGaslessFn = (chainBatches: ChainBatch[], tokenAddress: string, tokenTransferAmount: bigint, options?: GaslessExecutionOptions) => Promise<FeeEstimateSummary>;
10
10
  export declare function scaleTokenAmount(amount: bigint, fromDecimals: number, toDecimals: number): bigint;
@@ -18,6 +18,7 @@ export interface BatchBuilderContext {
18
18
  isPayMode: boolean;
19
19
  resolvedChainId: number;
20
20
  buildActionCalls: SpiceSupplyProps["buildActionCalls"];
21
+ feeExecutionMode: SpiceSupplyProps["feeExecutionMode"];
21
22
  buildSpicenetBatch: SpiceSupplyProps["buildSpicenetBatch"];
22
23
  selectedAsset: SelectedAsset | null;
23
24
  needsSwap: boolean;
@@ -26,10 +27,7 @@ export interface BatchBuilderContext {
26
27
  quoteAmountOut: bigint | null;
27
28
  resolvedTokenIn: Address | null;
28
29
  }
29
- export declare function buildPayChainBatches(ctx: BatchBuilderContext, options?: {
30
- actionAmountOverride?: bigint;
31
- fundingAmountOverride?: bigint;
32
- }): Promise<ChainBatch[]>;
33
- export declare function buildSupplyChainBatches(ctx: BatchBuilderContext, spicenetFundingAmount?: bigint): Promise<ChainBatch[]>;
30
+ export declare function buildPayChainBatches(ctx: BatchBuilderContext, options?: SupplyBatchBuildOptions): Promise<ChainBatch[]>;
31
+ export declare function buildSupplyChainBatches(ctx: BatchBuilderContext, options?: SupplyBatchBuildOptions): Promise<ChainBatch[]>;
34
32
  export declare function estimateRequiredGrossFunding(requiredNetFunding: bigint, buildBatches: (grossFundingAmount: bigint) => ChainBatch[] | Promise<ChainBatch[]>, fundingToken: Address, estimateGasless: EstimateGaslessFn, gaslessOptions?: Pick<GaslessExecutionOptions, "useCustomTransfers" | "userOverride">): Promise<bigint>;
35
33
  export {};
@@ -0,0 +1,67 @@
1
+ import type { Dispatch, MutableRefObject, SetStateAction } from "react";
2
+ import { type Address } from "viem";
3
+ import type { ChainBatch } from "../../../types/authorization";
4
+ import type { SelectedAsset } from "../../../types/assets";
5
+ import type { SpiceSupplyProps, SupplyBatchBuildOptions } from "../../../types/supply";
6
+ import type { ResolvedExactOutputSwap } from "../../../utils/swapQuotes";
7
+ import type { GaslessExecutionOptions, GaslessProgress } from "../../../hooks/useSpiceExecution";
8
+ import type { GaslessRunner } from "../../../execution/gasless";
9
+ export type SupplyStep = "idle" | "signing-delegation" | "signing-intent" | "submitting" | "executing" | "success" | "error";
10
+ export type PaymentResult = {
11
+ status: "processing" | "success" | "failed";
12
+ txHash?: string;
13
+ error?: string;
14
+ };
15
+ type BuildPayBatchesFn = (options?: SupplyBatchBuildOptions) => Promise<ChainBatch[]>;
16
+ type BuildSupplyBatchesFn = (options?: SupplyBatchBuildOptions) => Promise<ChainBatch[]>;
17
+ type EstimateRequiredGrossFundingFn = (requiredNetFunding: bigint, buildBatches: (grossFundingAmount: bigint) => ChainBatch[] | Promise<ChainBatch[]>, fundingToken: Address, gaslessOptions?: Pick<GaslessExecutionOptions, "useCustomTransfers" | "userOverride">) => Promise<bigint>;
18
+ export type ExecutorContext = {
19
+ selectedAsset: SelectedAsset | null;
20
+ parsedAmount: number;
21
+ currentPaymentAmount: string;
22
+ isInsufficientBalance: boolean;
23
+ isPayMode: boolean;
24
+ isNon7702: boolean;
25
+ isSourceDestToken: boolean;
26
+ needsSwap: boolean;
27
+ exactOutputSwap: ResolvedExactOutputSwap | null;
28
+ selectedIsEquivalent: boolean;
29
+ resolvedTokenIn: Address | null;
30
+ embeddedWalletAddress: string | null | undefined;
31
+ providerEmbeddedAddress: string | null | undefined;
32
+ externalWallet: {
33
+ getEthereumProvider: () => Promise<any>;
34
+ } | null | undefined;
35
+ externalWalletAddress: string | null | undefined;
36
+ address: string | null | undefined;
37
+ isConnected: boolean;
38
+ ready: boolean;
39
+ authenticated: boolean;
40
+ provider: string | null | undefined;
41
+ resolvedChainId: number;
42
+ executionTokenAddress: Address;
43
+ gasless: GaslessRunner & {
44
+ buildPayChainBatches: BuildPayBatchesFn;
45
+ buildSupplyChainBatches: BuildSupplyBatchesFn;
46
+ estimateRequiredGrossFunding: EstimateRequiredGrossFundingFn;
47
+ onProgress: (progress: GaslessProgress) => void;
48
+ };
49
+ ui: {
50
+ setError: Dispatch<SetStateAction<string | null>>;
51
+ setStep: Dispatch<SetStateAction<SupplyStep>>;
52
+ setStatusMsg: Dispatch<SetStateAction<string>>;
53
+ setTxHash: Dispatch<SetStateAction<string | null>>;
54
+ setIsExecuting: Dispatch<SetStateAction<boolean>>;
55
+ setShowStatusPanel: Dispatch<SetStateAction<boolean>>;
56
+ setPaymentResult: Dispatch<SetStateAction<PaymentResult | null>>;
57
+ };
58
+ refs: {
59
+ spiceDepositSubmittedRef: MutableRefObject<boolean>;
60
+ abortControllerRef: MutableRefObject<AbortController | null>;
61
+ };
62
+ } & Pick<SpiceSupplyProps, "destinationToken" | "buildActionCalls" | "feeExecutionMode" | "buildSpicenetBatch" | "onPayExecute" | "onError">;
63
+ export declare function executeSupply(ctx: ExecutorContext): Promise<void>;
64
+ export declare function executeDirectExternalAction(ctx: ExecutorContext): Promise<`0x${string}` | undefined>;
65
+ export declare function executeNon7702Pay(ctx: ExecutorContext): Promise<string>;
66
+ export declare function executePay(ctx: ExecutorContext): Promise<void>;
67
+ export {};
@@ -1,18 +1,15 @@
1
1
  import { type Address } from "viem";
2
2
  import { type FeeEstimateSummary } from "@spicenet-io/spiceflow-core";
3
- import type { FeePreview } from "../../types/ui";
4
- import type { ChainBatch } from "../../types/authorization";
5
- import type { SelectedAsset } from "../../types/assets";
6
- import type { SpiceSupplyProps } from "../../types/supply";
7
- import type { ResolvedExactOutputSwap } from "../../utils/swapQuotes";
3
+ import type { FeePreview } from "../../../types/ui";
4
+ import type { ChainBatch } from "../../../types/authorization";
5
+ import type { SelectedAsset } from "../../../types/assets";
6
+ import type { SpiceSupplyProps, SupplyBatchBuildOptions } from "../../../types/supply";
7
+ import type { ResolvedExactOutputSwap } from "../../../utils/swapQuotes";
8
8
  import type { ResolvedSwap } from "@spicenet-io/spiceflow-core";
9
- import type { GaslessExecutionOptions } from "../../hooks/useSpiceExecution";
9
+ import type { GaslessExecutionOptions } from "../../../hooks/useSpiceExecution";
10
10
  type EstimateGaslessFn = (chainBatches: ChainBatch[], tokenAddress: string, tokenTransferAmount: bigint, options?: GaslessExecutionOptions) => Promise<FeeEstimateSummary>;
11
- type BuildPayBatchesFn = (options?: {
12
- actionAmountOverride?: bigint;
13
- fundingAmountOverride?: bigint;
14
- }) => Promise<ChainBatch[]>;
15
- type BuildSupplyBatchesFn = (spicenetFundingAmount?: bigint) => Promise<ChainBatch[]>;
11
+ type BuildPayBatchesFn = (options?: SupplyBatchBuildOptions) => Promise<ChainBatch[]>;
12
+ type BuildSupplyBatchesFn = (options?: SupplyBatchBuildOptions) => Promise<ChainBatch[]>;
16
13
  type EstimateRequiredGrossFundingFn = (requiredNetFunding: bigint, buildBatches: (grossFundingAmount: bigint) => ChainBatch[] | Promise<ChainBatch[]>, fundingToken: Address, gaslessOptions?: Pick<GaslessExecutionOptions, "useCustomTransfers" | "userOverride">) => Promise<bigint>;
17
14
  export interface FeePreviewContext {
18
15
  selectedAsset: SelectedAsset | null;
@@ -24,6 +21,7 @@ export interface FeePreviewContext {
24
21
  isSourceDestToken: boolean;
25
22
  currentPaymentAmount: string;
26
23
  destinationToken: SpiceSupplyProps["destinationToken"];
24
+ feeExecutionMode: SpiceSupplyProps["feeExecutionMode"];
27
25
  resolvedTokenIn: Address | null;
28
26
  embeddedWalletAddress: string | null | undefined;
29
27
  providerEmbeddedAddress: string | null | undefined;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import type { ResolvedExactOutputSwap } from "../../utils/swapQuotes";
3
- import type { ResolvedDarkPalette } from "../../utils/theme";
2
+ import type { ResolvedExactOutputSwap } from "../../../utils/swapQuotes";
3
+ import type { ResolvedDarkPalette } from "../../../utils/theme";
4
4
  interface DestinationEstimateProps {
5
5
  variant: "supply" | "pay";
6
6
  destinationSymbol: string;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
- import type { SupplyEstimateProps } from "../../types/supply";
2
+ import type { SupplyEstimateProps } from "../../../types/supply";
3
3
  export type { SupplyEstimateProps };
4
4
  export declare const SupplyEstimate: React.FC<SupplyEstimateProps>;
@@ -0,0 +1,34 @@
1
+ import type { Dispatch, MutableRefObject, SetStateAction } from "react";
2
+ import type { GaslessRunner } from "../../../execution/gasless";
3
+ import type { DestinationToken, SpiceWithdrawProps } from "../../../types/withdraw";
4
+ import type { ChainBatch } from "../../../types/authorization";
5
+ import type { GaslessProgress } from "../../../hooks/useSpiceExecution";
6
+ export type WithdrawalExecutionContext = {
7
+ actionId: string;
8
+ intentId: string;
9
+ intentIndex: number;
10
+ totalSteps: number;
11
+ };
12
+ export type WithdrawExecutorContext = {
13
+ batches: ChainBatch[];
14
+ walletAddress: string | null | undefined;
15
+ recipient: string | null | undefined;
16
+ token: DestinationToken | null;
17
+ chainId: number | null;
18
+ amount: string;
19
+ receiveAmountRaw: bigint;
20
+ gasFee: bigint | null;
21
+ isNon7702: boolean;
22
+ buildWithdrawBatches: (spicenetFundingAmount?: bigint) => ChainBatch[];
23
+ gasless: GaslessRunner;
24
+ ui: {
25
+ setIsExecuting: Dispatch<SetStateAction<boolean>>;
26
+ setExecutionError: Dispatch<SetStateAction<string | null>>;
27
+ setExecutionProgress: Dispatch<SetStateAction<GaslessProgress | null>>;
28
+ setLockedGasFee: Dispatch<SetStateAction<bigint | null>>;
29
+ };
30
+ executionContextRef: MutableRefObject<WithdrawalExecutionContext | null>;
31
+ isMountedRef: MutableRefObject<boolean>;
32
+ } & Pick<SpiceWithdrawProps, "onWithdrawExecute" | "onWithdrawSuccess" | "onWithdrawError" | "buildSpicenetBatch">;
33
+ export declare function executeWithdraw(ctx: WithdrawExecutorContext): Promise<void>;
34
+ export declare function retryWithdraw(ctx: WithdrawExecutorContext): Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { SelectPopoverItem } from "../../types/withdraw";
2
+ import type { SelectPopoverItem } from "../../../types/withdraw";
3
3
  export type { SelectPopoverItem };
4
4
  interface SelectPopoverProps {
5
5
  isOpen: boolean;
@@ -1,4 +1,5 @@
1
1
  export { StatusDisplay } from "./StatusDisplay";
2
- export { StatusIcon } from "./StatusIcon";
3
- export { StepItem } from "./StepItem";
2
+ export { StatusPanel } from "./parts/StatusPanel";
3
+ export { StatusIcon } from "./parts/StatusIcon";
4
+ export { StepItem } from "./parts/StepItem";
4
5
  export type { StatusIconProps, StepItemProps } from "../../types/status";
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
- import type { StatusIconProps } from "../../types/status";
2
+ import type { StatusIconProps } from "../../../types/status";
3
3
  export declare const StatusIcon: React.FC<StatusIconProps>;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
- import type { StatusResultItem, StatusPanelProps } from "../../types/status";
2
+ import type { StatusResultItem, StatusPanelProps } from "../../../types/status";
3
3
  export type { StatusResultItem, StatusPanelProps };
4
4
  export declare const StatusPanel: React.FC<StatusPanelProps>;
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
- import type { StepItemProps } from "../../types/status";
2
+ import type { StepItemProps } from "../../../types/status";
3
3
  export declare const StepItem: React.FC<StepItemProps>;
@@ -0,0 +1,7 @@
1
+ import type { FeeEstimateSummary } from "@spicenet-io/spiceflow-core";
2
+ import type { ChainBatch } from "../types/authorization";
3
+ import type { GaslessExecutionOptions, GaslessProgress } from "../hooks/useSpiceExecution";
4
+ export type GaslessRunner = {
5
+ estimateGasless: (chainBatches: ChainBatch[], tokenAddress: string, tokenTransferAmount: bigint, options?: GaslessExecutionOptions) => Promise<FeeEstimateSummary>;
6
+ executeGasless: (chainBatches: ChainBatch[], tokenAddress: string, tokenTransferAmount: bigint, onProgress?: (progress: GaslessProgress) => void, signal?: AbortSignal, options?: GaslessExecutionOptions) => Promise<string>;
7
+ };
@@ -0,0 +1,28 @@
1
+ export declare const FIRST_STEP_POLL_MS = 350;
2
+ export declare const STEP_POLL_MS = 1000;
3
+ export type PollIntentStepOptions = {
4
+ actionId: string;
5
+ intentIndex: number;
6
+ intentId: string;
7
+ stepIndex: number;
8
+ maxPolls?: number;
9
+ maxExecuteAttempts?: number;
10
+ pollsBeforeRetry?: number;
11
+ maxConsecutiveStatusErrors?: number;
12
+ onStatusMessage?: (message: string, txHash?: string) => void;
13
+ signal?: AbortSignal;
14
+ chainId?: number;
15
+ };
16
+ export declare function pollIntentStepUntilSuccess(options: PollIntentStepOptions): Promise<string | undefined>;
17
+ export declare function runAllIntentSteps(options: {
18
+ actionId: string;
19
+ intentIndex: number;
20
+ intentId: string;
21
+ totalSteps: number;
22
+ delayBeforeSpicenetStepMs?: number;
23
+ isSpicenetStep?: (stepIndex: number) => boolean;
24
+ maxExecuteAttemptsForStep?: (stepIndex: number) => number;
25
+ maxPolls?: number;
26
+ onStatusMessage?: (message: string, txHash?: string) => void;
27
+ signal?: AbortSignal;
28
+ }): Promise<string | undefined>;
@@ -22,6 +22,7 @@ export interface GaslessExecutionOptions {
22
22
  useCustomTransfers?: boolean;
23
23
  userOverride?: Address;
24
24
  signAuthorizationsForEstimate?: boolean;
25
+ feeExecutionMode?: "backend-transfer" | "user-transfer";
25
26
  }
26
27
  export declare function useSpiceExecution(): {
27
28
  executeGasless: (chainBatches: ChainBatch[], tokenAddress: string, tokenTransferAmount: bigint, onProgress?: OnProgress, signal?: AbortSignal, options?: GaslessExecutionOptions) => Promise<string>;