@spicenet-io/spiceflow-ui 3.3.85 → 4.0.1
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.cjs.js +1 -1
- package/dist/auth-privy.js +1 -1
- package/dist/components/ProviderLogins/index.d.ts +0 -2
- package/dist/components/SpiceLock/lib/executors.d.ts +6 -1
- package/dist/components/SpiceLock/parts/LabeledInfoRow.d.ts +5 -0
- package/dist/components/SpiceSupply/lib/buildBatches.d.ts +3 -3
- package/dist/components/SpiceSupply/lib/executors.d.ts +5 -5
- package/dist/components/SpiceSupply/lib/feePreview.d.ts +5 -5
- package/dist/components/SpiceWithdraw/lib/executors.d.ts +4 -4
- package/dist/components/SpiceWithdraw/lib/feePreview.d.ts +2 -2
- package/dist/components/index.d.ts +0 -1
- package/dist/components/ui/index.d.ts +0 -1
- package/dist/execution/batchHashes.d.ts +2 -0
- package/dist/execution/fundEmbeddedWallet.d.ts +10 -0
- package/dist/execution/intentStatus.d.ts +31 -0
- package/dist/execution/pollIntentStep.d.ts +10 -0
- package/dist/execution/runner.d.ts +7 -0
- package/dist/execution/stripFeeCalls.d.ts +3 -0
- package/dist/execution/switchChain.d.ts +5 -0
- package/dist/hooks/index.d.ts +3 -7
- package/dist/hooks/useDirectWithdraw.d.ts +2 -2
- package/dist/hooks/useSpiceExecution.d.ts +12 -7
- package/dist/hooks/useSupplyAssets.d.ts +9 -7
- package/dist/hooks/{useWallet/index.d.ts → useWallet.d.ts} +2 -2
- package/dist/index.cjs.js +12 -12
- package/dist/index.d.ts +3 -15
- package/dist/index.js +12 -12
- package/dist/privy-2vbGci0p.js +0 -0
- package/dist/privy-BdHp5Owr.js +0 -0
- package/dist/providers/SpiceFlowProvider.d.ts +5 -3
- package/dist/types/lock.d.ts +3 -9
- package/dist/types/theme.d.ts +15 -13
- package/dist/types/wallet.d.ts +0 -11
- package/dist/utils/crossChainRouter/executeSwapThenAction.d.ts +4 -4
- package/dist/{hooks/directWithdrawPlan.d.ts → utils/directWithdraw.d.ts} +4 -0
- package/dist/utils/fees.d.ts +3 -1
- package/dist/utils/providerWallet.d.ts +2 -17
- package/dist/utils/relayer/index.d.ts +1 -0
- package/dist/utils/sleep.d.ts +1 -0
- package/dist/utils/theme.d.ts +2 -14
- package/dist/utils/tokenMetadata.d.ts +14 -0
- package/package.json +1 -23
- package/dist/Button-BtGAHwBv.js +0 -0
- package/dist/Button-bcAB126C.js +0 -0
- package/dist/auth-dynamic.cjs.js +0 -2
- package/dist/auth-dynamic.js +0 -2
- package/dist/components/ExportWallet/ExportWalletButton.d.ts +0 -4
- package/dist/components/ExportWallet/index.d.ts +0 -2
- package/dist/components/ProviderLogins/parts/DynamicLogin.d.ts +0 -4
- package/dist/components/SdkErrorBoundary/SdkErrorBoundary.d.ts +0 -21
- package/dist/components/SdkErrorBoundary/index.d.ts +0 -1
- package/dist/components/SpiceBalance/SpiceBalance.d.ts +0 -3
- package/dist/components/SpiceBalance/index.d.ts +0 -4
- package/dist/components/SpiceBalance/parts/AccountItem.d.ts +0 -11
- package/dist/components/SpiceBalance/parts/BalanceSection.d.ts +0 -10
- package/dist/components/SpiceBalance/types.d.ts +0 -66
- package/dist/components/SpiceLock/parts/LockExpiryRow.d.ts +0 -4
- package/dist/components/SpiceLock/parts/VotingPowerRow.d.ts +0 -4
- package/dist/components/SpicePay/SpicePay.d.ts +0 -14
- package/dist/components/SpicePay/index.d.ts +0 -1
- package/dist/components/SpiceWalletNotice/SpiceWalletNotice.d.ts +0 -35
- package/dist/components/SpiceWalletNotice/index.d.ts +0 -2
- package/dist/components/ui/Modal.d.ts +0 -3
- package/dist/execution/gasless.d.ts +0 -7
- package/dist/hooks/directWithdrawGate.d.ts +0 -4
- package/dist/hooks/useEmbeddedWalletAddress.d.ts +0 -2
- package/dist/hooks/useSpiceAction.d.ts +0 -55
- package/dist/hooks/useStatus.d.ts +0 -27
- package/dist/hooks/useWallet/useDynamicWallet.d.ts +0 -2
- package/dist/providers/dynamic.d.ts +0 -3
- package/dist/providers/whitelistGate.d.ts +0 -33
- package/dist/utils/portal/index.d.ts +0 -14
- package/dist/utils/rebalancing/index.d.ts +0 -70
- package/dist/utils/retry/index.d.ts +0 -1
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { IntentStatus, SwapStep } from "../types/status";
|
|
2
|
-
export interface UseStatusConfig {
|
|
3
|
-
checkStepStatus: (intentId: string, stepId: number) => Promise<{
|
|
4
|
-
success: boolean;
|
|
5
|
-
data: {
|
|
6
|
-
status: "created" | "executing" | "success" | "reverted" | "error";
|
|
7
|
-
transactionHash?: string;
|
|
8
|
-
error?: string;
|
|
9
|
-
};
|
|
10
|
-
}>;
|
|
11
|
-
pollingInterval?: number;
|
|
12
|
-
retryStep?: (intentId: string, stepId: number) => Promise<void>;
|
|
13
|
-
maxRetries?: number;
|
|
14
|
-
pollTimeoutMs?: number;
|
|
15
|
-
}
|
|
16
|
-
export interface UseStatusReturn {
|
|
17
|
-
intentStatus: IntentStatus | null;
|
|
18
|
-
startStatusPolling: (intentId: string, steps: SwapStep[]) => void;
|
|
19
|
-
stopStatusPolling: () => void;
|
|
20
|
-
clearStatus: () => void;
|
|
21
|
-
}
|
|
22
|
-
export declare function shouldExpirePoll(args: {
|
|
23
|
-
now: number;
|
|
24
|
-
lastProgressAt: number;
|
|
25
|
-
pollTimeoutMs: number;
|
|
26
|
-
}): boolean;
|
|
27
|
-
export declare const useStatus: ({ checkStepStatus, pollingInterval, retryStep, maxRetries, pollTimeoutMs, }: UseStatusConfig) => UseStatusReturn;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export interface WhitelistGateInputs {
|
|
2
|
-
isWhitelistConfigured: boolean;
|
|
3
|
-
isWhitelistCheckEnabled: boolean;
|
|
4
|
-
isSuccess: boolean;
|
|
5
|
-
isWhitelisted: boolean;
|
|
6
|
-
isLoading: boolean;
|
|
7
|
-
isFetching: boolean;
|
|
8
|
-
hasResolvedData: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface WhitelistGateState {
|
|
11
|
-
isWhitelistGateActive: boolean;
|
|
12
|
-
isWhitelistChecking: boolean;
|
|
13
|
-
isUserWhitelisted: boolean | null;
|
|
14
|
-
hasWhitelistResponse: boolean;
|
|
15
|
-
}
|
|
16
|
-
export declare function resolveWhitelistGate(inputs: WhitelistGateInputs): WhitelistGateState;
|
|
17
|
-
export declare const BLOCKED_ALLOWED_TOKENS: string[];
|
|
18
|
-
export declare function gatedContextOverrides<M>(args: {
|
|
19
|
-
isWhitelistGateActive: boolean;
|
|
20
|
-
isWhitelistChecking: boolean;
|
|
21
|
-
isUserWhitelisted: boolean | null;
|
|
22
|
-
isWhitelistConfigured: boolean;
|
|
23
|
-
baseMode: M;
|
|
24
|
-
ondemandMode: M;
|
|
25
|
-
baseAllowedTokens: string[] | undefined;
|
|
26
|
-
}): {
|
|
27
|
-
mode: M;
|
|
28
|
-
allowedTokens: string[] | undefined;
|
|
29
|
-
isUserWhitelisted: boolean | null;
|
|
30
|
-
isWhitelistChecking: boolean;
|
|
31
|
-
isWhitelistGateActive: boolean;
|
|
32
|
-
isWhitelistConfigured: boolean;
|
|
33
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const PORTAL_MAINNET_API_URL = "https://portal-api.spicenet.io/api/v1/portal/mainnet";
|
|
2
|
-
export interface LinkWalletRequest {
|
|
3
|
-
partnerId: string;
|
|
4
|
-
campaignId?: string;
|
|
5
|
-
campaignGroup?: string;
|
|
6
|
-
embeddedWalletAddress: string;
|
|
7
|
-
externalWalletAddress: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function linkWallet(token: string, request: LinkWalletRequest, baseUrl?: string): Promise<unknown>;
|
|
10
|
-
export interface EnsureWalletLinkParams extends LinkWalletRequest {
|
|
11
|
-
token: string;
|
|
12
|
-
baseUrl?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare function ensureWalletLink({ partnerId, campaignId, campaignGroup, embeddedWalletAddress, externalWalletAddress, token, baseUrl, }: EnsureWalletLinkParams): Promise<void>;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import type { ChainBatch } from "../../types/authorization";
|
|
3
|
-
import type { Asset } from "../../types/assets";
|
|
4
|
-
export declare const DEFAULT_BRIDGE_FEE_BUFFER_BPS = 1500;
|
|
5
|
-
export declare const DEFAULT_SQUID_INTEGRATOR_ID = "spiceflow-75f053db-70ab-4f37-83cc-abf68cb5b70d";
|
|
6
|
-
export type BridgeProvider = "cctp" | "squid";
|
|
7
|
-
export type CctpTransferMode = "fast" | "standard";
|
|
8
|
-
export interface BridgeFeeQuote {
|
|
9
|
-
provider: BridgeProvider;
|
|
10
|
-
sourceChainId: number;
|
|
11
|
-
destinationChainId: number;
|
|
12
|
-
tokenIn: Address;
|
|
13
|
-
tokenOut: Address;
|
|
14
|
-
amountIn: bigint;
|
|
15
|
-
estimatedAmountOut: bigint;
|
|
16
|
-
quotedBridgeFee: bigint;
|
|
17
|
-
bufferedBridgeFee: bigint;
|
|
18
|
-
bufferBps: number;
|
|
19
|
-
quoteId?: string;
|
|
20
|
-
route?: string;
|
|
21
|
-
minFinalityThreshold?: 1000 | 2000;
|
|
22
|
-
metadata?: Record<string, unknown>;
|
|
23
|
-
}
|
|
24
|
-
export interface SquidQuoteParams {
|
|
25
|
-
sourceChainId: number;
|
|
26
|
-
destinationChainId: number;
|
|
27
|
-
tokenIn: Address;
|
|
28
|
-
tokenOut: Address;
|
|
29
|
-
amountIn: bigint;
|
|
30
|
-
fromAddress: Address;
|
|
31
|
-
toAddress: Address;
|
|
32
|
-
integratorId?: string;
|
|
33
|
-
slippage?: number;
|
|
34
|
-
bufferBps?: number;
|
|
35
|
-
quoteOnly?: boolean;
|
|
36
|
-
baseUrl?: string;
|
|
37
|
-
fetchImpl?: typeof fetch;
|
|
38
|
-
}
|
|
39
|
-
export interface RebalancingRequestParams {
|
|
40
|
-
spicenetChainId: number;
|
|
41
|
-
recipient: Address;
|
|
42
|
-
fromChainId: number;
|
|
43
|
-
fromToken: Address;
|
|
44
|
-
fromAmount: bigint;
|
|
45
|
-
toChainId: number;
|
|
46
|
-
toToken: Address;
|
|
47
|
-
toAmountMin: bigint;
|
|
48
|
-
metadata?: Record<string, unknown>;
|
|
49
|
-
nbf?: bigint;
|
|
50
|
-
exp?: bigint;
|
|
51
|
-
idempotenceKey?: `0x${string}`;
|
|
52
|
-
}
|
|
53
|
-
export declare function quoteCctpFee(params: {
|
|
54
|
-
sourceChainId: number;
|
|
55
|
-
destinationChainId: number;
|
|
56
|
-
tokenIn: Address;
|
|
57
|
-
tokenOut: Address;
|
|
58
|
-
amountIn: bigint;
|
|
59
|
-
transferMode?: CctpTransferMode;
|
|
60
|
-
bufferBps?: number;
|
|
61
|
-
fetchImpl?: typeof fetch;
|
|
62
|
-
}): Promise<BridgeFeeQuote>;
|
|
63
|
-
export declare function quoteSquidFee(params: SquidQuoteParams): Promise<BridgeFeeQuote>;
|
|
64
|
-
export declare function buildRebalancingMetadata(params: {
|
|
65
|
-
bridgeQuote: BridgeFeeQuote;
|
|
66
|
-
sourceAsset?: Pick<Asset, "symbol" | "chainId" | "address" | "decimals">;
|
|
67
|
-
reason?: string;
|
|
68
|
-
extra?: Record<string, unknown>;
|
|
69
|
-
}): Record<string, unknown>;
|
|
70
|
-
export declare function buildRebalancingBatch(params: RebalancingRequestParams): ChainBatch;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function withRetry<T>(fn: () => Promise<T>, maxRetries?: number, delayMs?: number): Promise<T>;
|