@spicenet-io/spiceflow-ui 4.7.9 → 4.7.10-swapper.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.cjs.js +1 -1
- package/dist/auth-privy.js +1 -1
- package/dist/components/SpiceDeposit/lib/swapper.d.ts +35 -0
- package/dist/components/SpiceDeposit/steps/SelectSourceModal.d.ts +3 -0
- package/dist/components/SpiceDeposit/steps/SwapperDepositModal.d.ts +3 -0
- package/dist/hooks/useSwapperEmbed.d.ts +23 -0
- package/dist/index.cjs.js +7 -7
- package/dist/index.d.ts +3 -2
- package/dist/index.js +7 -7
- package/dist/{privy-DZ_C2soZ.js → privy-BFQ0n18x.js} +1 -1
- package/dist/privy-BXdQgePJ.js +2 -0
- package/dist/providers/SpiceFlowProvider.d.ts +3 -0
- package/dist/types/deposit.d.ts +51 -1
- package/dist/utils/crossChainRouter/liquidityVenues.d.ts +10 -0
- package/dist/utils/crossChainRouter/uniV3.d.ts +4 -0
- package/package.json +2 -1
- package/dist/privy-3XxHklEV.js +0 -2
package/dist/auth-privy.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";const r=require("./privy-
|
|
2
|
+
"use strict";const r=require("./privy-BXdQgePJ.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;
|
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-BFQ0n18x.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};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type Address } from "viem";
|
|
2
|
+
import type { SupportedDepositOption, SwapperEmbedOptions, SwapperStyles } from "@swapper-finance/deposit-sdk";
|
|
3
|
+
import { type Token } from "@spicenet-io/spiceflow-core";
|
|
4
|
+
import type { DepositSource, SpiceSwapperConfig, SwapperEmbedFactory } from "../../../types/deposit";
|
|
5
|
+
import type { ResolvedDarkPalette } from "../../../utils/theme";
|
|
6
|
+
export declare const DEFAULT_SWAPPER_INTEGRATOR_ID = "692fb8af264069ca12a9";
|
|
7
|
+
export declare const SWAPPER_FALLBACK_DESTINATION_CHAIN_ID = 42161;
|
|
8
|
+
export declare const SWAPPER_SUPPORTED_DESTINATION_CHAIN_IDS: readonly number[];
|
|
9
|
+
export declare function resolveSwapperDestinationChainId(params: {
|
|
10
|
+
targetKind: "external" | "embedded";
|
|
11
|
+
appChainId?: number;
|
|
12
|
+
}): number;
|
|
13
|
+
export declare function getSwapperDestinationToken(chainId?: number): Token | undefined;
|
|
14
|
+
export declare function resolveSwapperConfig(config?: SpiceSwapperConfig): {
|
|
15
|
+
integratorId: string;
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
embedFactory?: SwapperEmbedFactory;
|
|
18
|
+
};
|
|
19
|
+
export declare const defaultSwapperEmbedFactory: SwapperEmbedFactory;
|
|
20
|
+
export declare function buildSwapperStyles(dk: ResolvedDarkPalette, dark: boolean, primaryColor: string): SwapperStyles;
|
|
21
|
+
export declare function getSupportedDepositOptions(source: Exclude<DepositSource, "wallet"> | null): SupportedDepositOption[];
|
|
22
|
+
export declare function buildSwapperOptions(params: {
|
|
23
|
+
integratorId: string;
|
|
24
|
+
depositWalletAddress: Address;
|
|
25
|
+
source: Exclude<DepositSource, "wallet"> | null;
|
|
26
|
+
styles: SwapperStyles;
|
|
27
|
+
destinationChainId?: number;
|
|
28
|
+
}): SwapperEmbedOptions;
|
|
29
|
+
export declare function readSwapperUsdcBalance(targetAddress: Address, chainId?: number): Promise<bigint>;
|
|
30
|
+
export declare function waitForUsdcArrival(targetAddress: Address, baseline: bigint, options?: {
|
|
31
|
+
timeoutMs?: number;
|
|
32
|
+
intervalMs?: number;
|
|
33
|
+
signal?: AbortSignal;
|
|
34
|
+
chainId?: number;
|
|
35
|
+
}): Promise<bigint | null>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
import type { DepositSource, SwapperEmbedFactory, SwapperTransactionSuccessEvent } from "../types/deposit";
|
|
3
|
+
import type { ResolvedDarkPalette } from "../utils/theme";
|
|
4
|
+
type WidgetSource = Exclude<DepositSource, "wallet">;
|
|
5
|
+
interface UseSwapperEmbedParams {
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
integratorId: string;
|
|
8
|
+
depositWalletAddress?: Address;
|
|
9
|
+
destinationChainId?: number;
|
|
10
|
+
brand: {
|
|
11
|
+
dk: ResolvedDarkPalette;
|
|
12
|
+
dark: boolean;
|
|
13
|
+
primaryColor: string;
|
|
14
|
+
};
|
|
15
|
+
embedFactory?: SwapperEmbedFactory;
|
|
16
|
+
onTransactionSuccess: (event?: SwapperTransactionSuccessEvent) => void;
|
|
17
|
+
onCloseRequest: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function useSwapperEmbed({ enabled, integratorId, depositWalletAddress, destinationChainId, brand, embedFactory, onTransactionSuccess, onCloseRequest, }: UseSwapperEmbedParams): {
|
|
20
|
+
showWidget: (placeholder: HTMLElement, source: WidgetSource) => void;
|
|
21
|
+
hideWidget: () => void;
|
|
22
|
+
};
|
|
23
|
+
export {};
|