@ref-finance/ref-sdk 1.3.7 → 1.3.9
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/ref-sdk.cjs.development.js +161 -89
- package/dist/ref-sdk.cjs.development.js.map +1 -1
- package/dist/ref-sdk.cjs.production.min.js +1 -1
- package/dist/ref-sdk.cjs.production.min.js.map +1 -1
- package/dist/ref-sdk.esm.js +162 -90
- package/dist/ref-sdk.esm.js.map +1 -1
- package/dist/ref-sdk.umd.development.js +161 -89
- package/dist/ref-sdk.umd.development.js.map +1 -1
- package/dist/ref-sdk.umd.production.min.js +1 -1
- package/dist/ref-sdk.umd.production.min.js.map +1 -1
- package/dist/swap-widget/state.d.ts +6 -2
- package/dist/swap-widget/types.d.ts +4 -1
- package/dist/v1-swap/pool.d.ts +1 -5
- package/package.json +1 -1
|
@@ -39,12 +39,16 @@ export declare const useSwap: (params: {
|
|
|
39
39
|
} & {
|
|
40
40
|
slippageTolerance: number;
|
|
41
41
|
refreshTrigger: boolean;
|
|
42
|
-
onSwap: (transactionsRef: Transaction[]) => void
|
|
42
|
+
onSwap: (transactionsRef: Transaction[]) => Promise<void>;
|
|
43
43
|
AccountId?: string | undefined;
|
|
44
44
|
poolFetchingState?: "loading" | "end" | undefined;
|
|
45
45
|
referralId?: string | undefined;
|
|
46
|
+
tokens: TokenMetadata[];
|
|
46
47
|
}) => SwapOutParams;
|
|
47
48
|
export declare const TokenPriceContext: React.Context<Record<string, any> | null>;
|
|
48
49
|
export declare const useTokenPriceList: () => Record<string, any>;
|
|
49
50
|
export declare const TokenPriceContextProvider: React.FC;
|
|
50
|
-
export declare const
|
|
51
|
+
export declare const useTokenBalances: (tokens: TokenMetadata[], AccountId?: string | undefined) => {
|
|
52
|
+
balances: Record<string, string>;
|
|
53
|
+
updateTokenBalance: (tokenIds: string[], AccountId: string) => Promise<void>;
|
|
54
|
+
};
|
|
@@ -5,7 +5,7 @@ import { Theme } from './constant';
|
|
|
5
5
|
export interface SwapWidgetProps {
|
|
6
6
|
theme?: Theme;
|
|
7
7
|
defaultTokenList?: TokenMetadata[];
|
|
8
|
-
onSwap: (transactionsRef: Transaction[]) => void
|
|
8
|
+
onSwap: (transactionsRef: Transaction[]) => Promise<void>;
|
|
9
9
|
onDisConnect: () => void;
|
|
10
10
|
width: string;
|
|
11
11
|
height?: string;
|
|
@@ -30,6 +30,9 @@ export interface SwapWidgetProps {
|
|
|
30
30
|
export interface SwapOutParams {
|
|
31
31
|
amountOut: string;
|
|
32
32
|
minAmountOut: string;
|
|
33
|
+
tokenInBalance: string;
|
|
34
|
+
tokenOutBalance: string;
|
|
35
|
+
balances: Record<string, string>;
|
|
33
36
|
rate: string;
|
|
34
37
|
fee: number;
|
|
35
38
|
estimates: EstimateSwapView[];
|
package/dist/v1-swap/pool.d.ts
CHANGED
|
@@ -9,8 +9,4 @@ export declare const getStablePools: (stablePools: Pool[]) => Promise<any[]>;
|
|
|
9
9
|
export declare const getPool: (id: number) => Promise<Pool>;
|
|
10
10
|
export declare const getPoolByIds: (ids: number[]) => Promise<Pool[]>;
|
|
11
11
|
export declare const getRefPools: (page?: number, perPage?: number) => Promise<Pool[]>;
|
|
12
|
-
export declare const fetchAllPools: (perPage?: number | undefined) => Promise<
|
|
13
|
-
simplePools: Pool[];
|
|
14
|
-
unRatedPools: Pool[];
|
|
15
|
-
ratedPools: Pool[];
|
|
16
|
-
}>;
|
|
12
|
+
export declare const fetchAllPools: (perPage?: number | undefined) => Promise<any>;
|
package/package.json
CHANGED