@aurigami/sdk 1.18.3 → 1.18.5
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/consts/constants.d.ts +2 -0
- package/dist/helpers/kyber-aggregator-api.d.ts +5 -0
- package/dist/helpers/one-inch-aggregator-api.d.ts +21 -0
- package/dist/helpers/priceFetcher.d.ts +7 -0
- package/dist/sdk.cjs.development.js +398 -215
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +404 -226
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/consts/constants.ts +4 -0
- package/src/helpers/kyber-aggregator-api.ts +37 -0
- package/src/helpers/one-inch-aggregator-api.ts +45 -0
- package/src/helpers/priceFetcher.ts +55 -9
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare function getQuoteOneInch(fromTokenAddress: string, toTokenAddress: string, amount: string): Promise<OneInchApiResponse>;
|
|
2
|
+
export declare type OneInchApiResponse = {
|
|
3
|
+
fromToken: {
|
|
4
|
+
symbol: string;
|
|
5
|
+
name: string;
|
|
6
|
+
decimals: number;
|
|
7
|
+
address: string;
|
|
8
|
+
logoURI: string;
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
toToken: {
|
|
12
|
+
symbol: string;
|
|
13
|
+
name: string;
|
|
14
|
+
decimals: number;
|
|
15
|
+
address: string;
|
|
16
|
+
logoURI: string;
|
|
17
|
+
tags: string[];
|
|
18
|
+
};
|
|
19
|
+
toTokenAmount: string;
|
|
20
|
+
fromTokenAmount: string;
|
|
21
|
+
};
|
|
@@ -2,6 +2,13 @@ import BigNumber from 'bignumber.js';
|
|
|
2
2
|
import { BigNumber as BN, providers } from 'ethers';
|
|
3
3
|
import { TokenAmount } from '../entities/tokenAmount';
|
|
4
4
|
import { Address, TokenValuation } from '../types';
|
|
5
|
+
export declare function prepareParamsAggregator(address: string, provider: providers.Provider): Promise<{
|
|
6
|
+
tokenInQuantity: string;
|
|
7
|
+
usdtAddress: string;
|
|
8
|
+
usdtDecimal: number;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function fetchPriceFromOneInch(address: string, provider: providers.Provider): Promise<BigNumber>;
|
|
11
|
+
export declare function fetchPriceFromKyberSwap(address: string, provider: providers.Provider, onAurora?: boolean): Promise<BigNumber>;
|
|
5
12
|
export declare function fetchPriceFromDefiLlamaAPI(id: string): Promise<BigNumber>;
|
|
6
13
|
export declare function fetchPriceFromCoingeckoAPI(id: string): Promise<BigNumber>;
|
|
7
14
|
export declare function fetchPriceFromDefiLlama(id: Address): Promise<BigNumber>;
|