@spicenet-io/spiceflow-ui 1.9.40 → 1.10.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/components/DepositWidget/index.d.ts +0 -2
- package/dist/components/{DepositWidget/DepositStatusPanel.d.ts → StatusDisplay/StatusPanel.d.ts} +7 -6
- package/dist/components/WithdrawWidget/WithdrawWidget.d.ts +3 -0
- package/dist/components/WithdrawWidget/WithdrawWidgetModal.d.ts +10 -0
- package/dist/components/WithdrawWidget/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/useAssetInput/index.d.ts +5 -0
- package/dist/index.cjs.js +16 -16
- package/dist/index.d.ts +5 -2
- package/dist/index.js +16 -16
- package/dist/types/deposit.d.ts +3 -3
- package/dist/types/withdraw.d.ts +33 -1
- package/package.json +1 -1
- package/dist/hooks/useDepositInput/index.d.ts +0 -5
package/dist/types/deposit.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Asset } from "./assets";
|
|
2
2
|
import { CustomStyles, ThemeMode } from "./theme";
|
|
3
|
-
import {
|
|
3
|
+
import { UseAssetInputReturn } from "../hooks/useAssetInput";
|
|
4
4
|
import { Address } from "viem";
|
|
5
5
|
import { ChainBatch } from ".";
|
|
6
6
|
export interface SpiceDepositRequest {
|
|
@@ -26,7 +26,7 @@ export interface DepositWidgetProps {
|
|
|
26
26
|
theme?: ThemeMode;
|
|
27
27
|
styles?: CustomStyles;
|
|
28
28
|
className?: string;
|
|
29
|
-
depositInputHook?:
|
|
29
|
+
depositInputHook?: UseAssetInputReturn;
|
|
30
30
|
onDepositSuccess?: (intentId: string) => void;
|
|
31
31
|
onDepositError?: (error: string) => void;
|
|
32
32
|
onTopUp?: () => void;
|
|
@@ -40,7 +40,7 @@ export interface DepositModalProps {
|
|
|
40
40
|
styles?: CustomStyles;
|
|
41
41
|
className?: string;
|
|
42
42
|
onDepositAssetChange?: (asset: Asset | null) => void;
|
|
43
|
-
|
|
43
|
+
assetInputHook?: UseAssetInputReturn;
|
|
44
44
|
externalWalletAddress?: Address;
|
|
45
45
|
allowedTokens?: string[];
|
|
46
46
|
onDepositAmountChange?: (amount: string) => void;
|
package/dist/types/withdraw.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { CustomStyles } from "./theme";
|
|
1
|
+
import { CustomStyles, ThemeMode } from "./theme";
|
|
2
2
|
import { Address } from "viem";
|
|
3
3
|
import { ChainBatch } from ".";
|
|
4
|
+
import { UseAssetInputReturn } from "../hooks/useAssetInput";
|
|
5
|
+
import { Asset } from "./assets";
|
|
4
6
|
export interface WithdrawAsset {
|
|
5
7
|
id: string;
|
|
6
8
|
chainId: number;
|
|
@@ -11,6 +13,34 @@ export interface WithdrawAsset {
|
|
|
11
13
|
balance: number;
|
|
12
14
|
selected: boolean;
|
|
13
15
|
}
|
|
16
|
+
export type WithdrawMode = "external" | "embedded";
|
|
17
|
+
export interface TokenConfig {
|
|
18
|
+
address: Address;
|
|
19
|
+
symbol: string;
|
|
20
|
+
name: string;
|
|
21
|
+
decimals: number;
|
|
22
|
+
chainId: number;
|
|
23
|
+
logoURI?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface WithdrawWidgetProps {
|
|
26
|
+
withdrawBatches: ChainBatch[];
|
|
27
|
+
externalWithdrawBatches?: ChainBatch[];
|
|
28
|
+
enableSpiceBalanceUpdate?: boolean;
|
|
29
|
+
tokens?: TokenConfig[];
|
|
30
|
+
supportedTokens?: string[];
|
|
31
|
+
theme?: ThemeMode;
|
|
32
|
+
styles?: CustomStyles;
|
|
33
|
+
className?: string;
|
|
34
|
+
withdrawInputHook?: UseAssetInputReturn;
|
|
35
|
+
defaultSelectedAsset?: Asset;
|
|
36
|
+
filterChains?: number[];
|
|
37
|
+
withdrawMode?: WithdrawMode;
|
|
38
|
+
onWithdrawModeChange?: (mode: WithdrawMode) => void;
|
|
39
|
+
externalWalletAddress?: Address;
|
|
40
|
+
embeddedWalletAddress?: Address;
|
|
41
|
+
onWithdrawSuccess?: (intentId: string) => void;
|
|
42
|
+
onWithdrawError?: (error: string) => void;
|
|
43
|
+
}
|
|
14
44
|
export interface SpiceWithdrawRequest {
|
|
15
45
|
user: string;
|
|
16
46
|
txHash: string;
|
|
@@ -39,4 +69,6 @@ export interface WithdrawModalProps {
|
|
|
39
69
|
fetchVaultBalance?: () => Promise<number>;
|
|
40
70
|
destinationChainId?: number;
|
|
41
71
|
destinationTokenAddress?: string;
|
|
72
|
+
filterChainIds?: number[];
|
|
73
|
+
preSelectedTokens?: string[];
|
|
42
74
|
}
|
package/package.json
CHANGED