@spicenet-io/spiceflow-ui 4.9.2 → 4.9.3-anydeposit.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.
- package/dist/auth-privy.js +1 -1
- package/dist/components/SpiceDeposit/lib/escrowCredit.d.ts +2 -0
- package/dist/components/SpiceSupply/lib/buildBatches.d.ts +2 -0
- package/dist/components/SpiceSupply/lib/executors.d.ts +1 -0
- package/dist/components/SpiceSupply/lib/feePreview.d.ts +1 -0
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/useIsUserWhitelisted.d.ts +12 -12
- package/dist/hooks/useSupplyAssets.d.ts +8 -0
- package/dist/index.cjs.js +11 -11
- package/dist/index.js +13 -13
- package/dist/{privy-BX0ShdbI.js → privy-BIH6VVaM.js} +1 -1
- package/dist/types/supply.d.ts +1 -1
- package/dist/utils/fees.d.ts +7 -0
- package/package.json +4 -1
package/dist/auth-privy.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{P as g}from"./privy-
|
|
2
|
+
import{P as g}from"./privy-BIH6VVaM.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};
|
|
@@ -7,6 +7,7 @@ import type { ResolvedExactOutputSwap } from "../../../utils/swapQuotes";
|
|
|
7
7
|
import type { ExecutionOptions } from "../../../hooks/useSpiceExecution";
|
|
8
8
|
import type { FeeEstimateSummary } from "@spicenet-io/spiceflow-core";
|
|
9
9
|
type EstimateFn = (chainBatches: ChainBatch[], tokenAddress: string, tokenTransferAmount: bigint, options?: ExecutionOptions) => Promise<FeeEstimateSummary>;
|
|
10
|
+
export declare function isExternalInPlacePaySource(selectedAsset: SelectedAsset | null, isNon7702: boolean, resolvedChainId: number): boolean;
|
|
10
11
|
export declare function stripSpicenetFundingBatches(batches: ChainBatch[]): ChainBatch[];
|
|
11
12
|
export declare function scaleTokenAmount(amount: bigint, fromDecimals: number, toDecimals: number): bigint;
|
|
12
13
|
export interface BatchBuilderContext {
|
|
@@ -26,6 +27,7 @@ export interface BatchBuilderContext {
|
|
|
26
27
|
selectedAsset: SelectedAsset | null;
|
|
27
28
|
needsSwap: boolean;
|
|
28
29
|
resolvedSwap: ResolvedSwap | null;
|
|
30
|
+
resolveInputSwap?: (amountIn: bigint) => Promise<ResolvedSwap>;
|
|
29
31
|
exactOutputSwap: ResolvedExactOutputSwap | null;
|
|
30
32
|
quoteAmountOut: bigint | null;
|
|
31
33
|
resolvedTokenIn: Address | null;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { useSpiceAssets } from "./useSpiceAssets";
|
|
|
7
7
|
export type { UseSpiceAssetsConfig, UseSpiceAssetsReturn, } from "./useSpiceAssets";
|
|
8
8
|
export { useSpiceExecution } from "./useSpiceExecution";
|
|
9
9
|
export { useDirectWithdraw as useSpiceDirectWithdraw } from "./useDirectWithdraw";
|
|
10
|
-
export type { DirectWithdrawParams, DirectWithdrawState } from "./useDirectWithdraw";
|
|
10
|
+
export type { DirectWithdrawParams, DirectWithdrawState, } from "./useDirectWithdraw";
|
|
11
11
|
export type { ExecutionProgress, ExecutionStep, ExecutionOptions, OnProgress, } from "./useSpiceExecution";
|
|
12
12
|
export { useLockDuration } from "./useLockDuration";
|
|
13
13
|
export type { UseLockDurationReturn } from "./useLockDuration";
|
|
@@ -43,8 +43,8 @@ export declare function useIsUserWhitelisted({ walletAddress, campaignId, campai
|
|
|
43
43
|
isRefetching: boolean;
|
|
44
44
|
isStale: boolean;
|
|
45
45
|
isEnabled: boolean;
|
|
46
|
-
refetch: (options?: import("@tanstack/query
|
|
47
|
-
fetchStatus: import("@tanstack/query
|
|
46
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<PartnerWhitelistCheckResponse, Error>>;
|
|
47
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
48
48
|
promise: Promise<PartnerWhitelistCheckResponse>;
|
|
49
49
|
isWhitelisted: boolean;
|
|
50
50
|
whitelistCheck: PartnerWhitelistCheckResponse | undefined;
|
|
@@ -82,8 +82,8 @@ export declare function useIsUserWhitelisted({ walletAddress, campaignId, campai
|
|
|
82
82
|
isRefetching: boolean;
|
|
83
83
|
isStale: boolean;
|
|
84
84
|
isEnabled: boolean;
|
|
85
|
-
refetch: (options?: import("@tanstack/query
|
|
86
|
-
fetchStatus: import("@tanstack/query
|
|
85
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<PartnerWhitelistCheckResponse, Error>>;
|
|
86
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
87
87
|
promise: Promise<PartnerWhitelistCheckResponse>;
|
|
88
88
|
isWhitelisted: boolean;
|
|
89
89
|
whitelistCheck: PartnerWhitelistCheckResponse | undefined;
|
|
@@ -121,8 +121,8 @@ export declare function useIsUserWhitelisted({ walletAddress, campaignId, campai
|
|
|
121
121
|
isRefetching: boolean;
|
|
122
122
|
isStale: boolean;
|
|
123
123
|
isEnabled: boolean;
|
|
124
|
-
refetch: (options?: import("@tanstack/query
|
|
125
|
-
fetchStatus: import("@tanstack/query
|
|
124
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<PartnerWhitelistCheckResponse, Error>>;
|
|
125
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
126
126
|
promise: Promise<PartnerWhitelistCheckResponse>;
|
|
127
127
|
isWhitelisted: boolean;
|
|
128
128
|
whitelistCheck: PartnerWhitelistCheckResponse | undefined;
|
|
@@ -160,8 +160,8 @@ export declare function useIsUserWhitelisted({ walletAddress, campaignId, campai
|
|
|
160
160
|
isRefetching: boolean;
|
|
161
161
|
isStale: boolean;
|
|
162
162
|
isEnabled: boolean;
|
|
163
|
-
refetch: (options?: import("@tanstack/query
|
|
164
|
-
fetchStatus: import("@tanstack/query
|
|
163
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<PartnerWhitelistCheckResponse, Error>>;
|
|
164
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
165
165
|
promise: Promise<PartnerWhitelistCheckResponse>;
|
|
166
166
|
isWhitelisted: boolean;
|
|
167
167
|
whitelistCheck: PartnerWhitelistCheckResponse | undefined;
|
|
@@ -199,8 +199,8 @@ export declare function useIsUserWhitelisted({ walletAddress, campaignId, campai
|
|
|
199
199
|
isRefetching: boolean;
|
|
200
200
|
isStale: boolean;
|
|
201
201
|
isEnabled: boolean;
|
|
202
|
-
refetch: (options?: import("@tanstack/query
|
|
203
|
-
fetchStatus: import("@tanstack/query
|
|
202
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<PartnerWhitelistCheckResponse, Error>>;
|
|
203
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
204
204
|
promise: Promise<PartnerWhitelistCheckResponse>;
|
|
205
205
|
isWhitelisted: boolean;
|
|
206
206
|
whitelistCheck: PartnerWhitelistCheckResponse | undefined;
|
|
@@ -238,8 +238,8 @@ export declare function useIsUserWhitelisted({ walletAddress, campaignId, campai
|
|
|
238
238
|
isRefetching: boolean;
|
|
239
239
|
isStale: boolean;
|
|
240
240
|
isEnabled: boolean;
|
|
241
|
-
refetch: (options?: import("@tanstack/query
|
|
242
|
-
fetchStatus: import("@tanstack/query
|
|
241
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<PartnerWhitelistCheckResponse, Error>>;
|
|
242
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
243
243
|
promise: Promise<PartnerWhitelistCheckResponse>;
|
|
244
244
|
isWhitelisted: boolean;
|
|
245
245
|
whitelistCheck: PartnerWhitelistCheckResponse | undefined;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { type Address } from "viem";
|
|
2
2
|
import type { Asset } from "../types/assets";
|
|
3
|
+
export declare function compareSupplyAssets(a: Asset & {
|
|
4
|
+
_source?: string;
|
|
5
|
+
}, b: Asset & {
|
|
6
|
+
_source?: string;
|
|
7
|
+
}, destToken: string, destChain: number): number;
|
|
3
8
|
export declare function isSupportedSupplyAsset(asset: Pick<Asset, "address" | "chainTokens">, supportedSourceAssets?: string[]): boolean;
|
|
4
9
|
export declare function isSpendableSupplyAsset(asset: Pick<Asset, "address" | "chainTokens" | "chainId"> & {
|
|
5
10
|
_source?: string;
|
|
6
11
|
}, destinationChainId: number, supportedSourceAssets?: string[]): boolean;
|
|
12
|
+
export declare function isSpendableExternalAsset(asset: Pick<Asset, "address" | "chainTokens" | "chainId"> & {
|
|
13
|
+
_source?: string;
|
|
14
|
+
}, destinationToken: Pick<DestinationToken, "address" | "chainId">, supportedSourceAssets?: string[]): boolean;
|
|
7
15
|
type DestinationToken = {
|
|
8
16
|
address: Address;
|
|
9
17
|
decimals: number;
|