@spicenet-io/spiceflow-ui 4.8.3-next.2 → 4.9.1-alchemy.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.
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";const r=require("./privy-ROtJpoJf.js");require("react/jsx-runtime"),require("react"),require("@spicenet-io/spiceflow-core"),require("viem"),require("viem/actions"),require("@privy-io/react-auth"),require("wagmi"),require("@tanstack/react-query"),exports.PrivyLogin=r.PrivyLogin;
2
+ "use strict";const r=require("./privy-8_x0Dkgt.js");require("react/jsx-runtime"),require("react"),require("@spicenet-io/spiceflow-core"),require("viem"),require("viem/actions"),require("@privy-io/react-auth"),require("wagmi"),require("@tanstack/react-query"),exports.PrivyLogin=r.PrivyLogin;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{P as g}from"./privy-CftKcsmt.js";import"react/jsx-runtime";import"react";import"@spicenet-io/spiceflow-core";import"viem";import"viem/actions";import"@privy-io/react-auth";import"wagmi";import"@tanstack/react-query";export{g as PrivyLogin};
2
+ import{P as g}from"./privy-3-oQOCCP.js";import"react/jsx-runtime";import"react";import"@spicenet-io/spiceflow-core";import"viem";import"viem/actions";import"@privy-io/react-auth";import"wagmi";import"@tanstack/react-query";export{g as PrivyLogin};
@@ -49,6 +49,12 @@ export type LockExecutorContext = {
49
49
  refreshSpiceAssets: () => void;
50
50
  refreshWalletAssets: () => void;
51
51
  feeQuote: LockFeeQuote | null;
52
+ swapFunding?: {
53
+ amount: bigint;
54
+ decimals: number;
55
+ symbol: string;
56
+ };
57
+ assertCurrentQuote?: () => void;
52
58
  ui: {
53
59
  setError: Dispatch<SetStateAction<string | null>>;
54
60
  setIsExecuting: Dispatch<SetStateAction<boolean>>;
@@ -1,6 +1,16 @@
1
1
  import { type Address } from "viem";
2
- import { type FeeEstimateSummary } from "@spicenet-io/spiceflow-core";
2
+ import { type FeeEstimateSummary, type ResolvedSwap } from "@spicenet-io/spiceflow-core";
3
3
  import type { ChainAuthorization, ChainBatch } from "../../../types/authorization";
4
+ import type { Asset } from "../../../types/assets";
5
+ export declare function isDirectLockSource(asset: Asset, lockChainId: number): boolean;
6
+ export declare function composeLockSwapBatches(batches: ChainBatch[], params: {
7
+ chainId: number;
8
+ recipient: Address;
9
+ tokenIn: Address;
10
+ amountIn: bigint;
11
+ swap: ResolvedSwap | null;
12
+ escrowFunded: boolean;
13
+ }): ChainBatch[];
4
14
  export declare function build7702EstimateRequest(user: Address, batches: ChainBatch[]): {
5
15
  intents: {
6
16
  mode: "7702";
@@ -0,0 +1,3 @@
1
+ import type { Asset } from "../../../types/assets";
2
+ import type { DestinationToken } from "../../../types/withdraw";
3
+ export declare function resolveWithdrawDestinationToken(asset: Asset | null, chainId: number | null, availableTokens: DestinationToken[]): DestinationToken | null;
@@ -0,0 +1,24 @@
1
+ import { type Address } from "viem";
2
+ import type { Asset, SelectedAsset } from "../types/assets";
3
+ export declare function useSpiceLockQuote(params: {
4
+ enabled: boolean;
5
+ selectedAsset: SelectedAsset | null;
6
+ lockChainId: number;
7
+ destinationTokenAddress?: Address;
8
+ lockTokenSymbol: string;
9
+ lockTokenLogoURI?: string;
10
+ recipient?: Address;
11
+ }): {
12
+ conversion: {
13
+ input: Asset;
14
+ amountIn: bigint;
15
+ output: Asset;
16
+ minimum: bigint;
17
+ swap: import("@spicenet-io/spiceflow-core").ResolvedSwap | null;
18
+ key: string;
19
+ expiresAt: number | null;
20
+ } | null;
21
+ error: string | null;
22
+ retryQuote: () => void;
23
+ isQuoting: boolean;
24
+ };
@@ -15,9 +15,14 @@ export interface UseSupplyQuoteOpts {
15
15
  chainId: number;
16
16
  recipient: Address | undefined;
17
17
  paymentAmount?: string;
18
+ maxSlippage?: number;
19
+ refreshIntervalMs?: number;
18
20
  resolveExactOutputSwap?: (intent: ExactOutputSwapIntent, chainId: number, recipient: Address) => Promise<ResolvedExactOutputSwap | null>;
19
21
  }
20
22
  export interface SupplyQuoteResult {
23
+ quoteKey: string | null;
24
+ quoteExpiresAt: number | null;
25
+ refreshQuote: () => void;
21
26
  isQuoting: boolean;
22
27
  quoteError: string | null;
23
28
  estimatedOutput: string | null;
@@ -36,6 +41,7 @@ export declare function resolveInputSupplySwapQuote(params: {
36
41
  tokenIn: Address;
37
42
  tokenOut: Address;
38
43
  amountIn: bigint;
44
+ maxSlippage?: number;
39
45
  liquidityVenues?: LiquidityVenuesConfig;
40
46
  }): Promise<ResolvedSwap>;
41
47
  export declare function useSupplyQuote(opts: UseSupplyQuoteOpts): SupplyQuoteResult;
@@ -1,5 +1,6 @@
1
1
  import { Address } from "viem";
2
2
  import { Asset, MultiChainBalances } from "../types/assets";
3
+ export declare const DISCOVERED_TOKEN_MIN_USD = 0.01;
3
4
  export declare const fetchBalances: (walletAddress: Address, supportedChains?: number[]) => Promise<MultiChainBalances>;
4
5
  export interface UseAssetsConfig {
5
6
  address?: Address;