@xchainjs/xchain-thorchain-query 0.6.13 → 0.7.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/lib/index.d.ts +0 -1
- package/lib/index.esm.js +2 -96
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +95 -190
- package/lib/index.js.map +1 -1
- package/lib/thorchain-cache.d.ts +1 -2
- package/lib/thorchain-checktx.d.ts +1 -2
- package/lib/thorchain-query.d.ts +1 -2
- package/lib/types.d.ts +1 -2
- package/lib/utils/utils.d.ts +1 -2
- package/package.json +6 -6
- package/lib/crypto-amount.d.ts +0 -37
package/lib/thorchain-cache.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MidgardQuery } from '@xchainjs/xchain-midgard-query';
|
|
2
|
-
import { Address, Asset, Chain } from '@xchainjs/xchain-util';
|
|
2
|
+
import { Address, Asset, Chain, CryptoAmount } from '@xchainjs/xchain-util';
|
|
3
3
|
import { BigNumber } from 'bignumber.js';
|
|
4
|
-
import { CryptoAmount } from './crypto-amount';
|
|
5
4
|
import { LiquidityPool } from './liquidity-pool';
|
|
6
5
|
import { InboundDetail } from './types';
|
|
7
6
|
import { Thornode } from './utils/thornode';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Saver } from '@xchainjs/xchain-thornode';
|
|
2
|
-
import { Asset } from '@xchainjs/xchain-util';
|
|
3
|
-
import { CryptoAmount } from './crypto-amount';
|
|
2
|
+
import { Asset, CryptoAmount } from '@xchainjs/xchain-util';
|
|
4
3
|
import { ThorchainCache } from './thorchain-cache';
|
|
5
4
|
import { ChainAttributes } from './types';
|
|
6
5
|
export declare enum TxType {
|
package/lib/thorchain-query.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Asset } from '@xchainjs/xchain-util';
|
|
2
|
-
import { CryptoAmount } from './crypto-amount';
|
|
1
|
+
import { Asset, CryptoAmount } from '@xchainjs/xchain-util';
|
|
3
2
|
import { ThorchainCache } from './thorchain-cache';
|
|
4
3
|
import { AddliquidityPosition, ChainAttributes, EstimateAddLP, EstimateAddSaver, EstimateWithdrawLP, EstimateWithdrawSaver, LiquidityPosition, LoanCloseParams, LoanCloseQuote, LoanOpenParams, LoanOpenQuote, PoolRatios, QuoteSwapParams, QuoteThornameParams, SaversPosition, SaversWithdraw, ThornameDetails, TotalFees, TxDetails, WithdrawLiquidityPosition, getSaver } from './types';
|
|
5
4
|
/**
|
package/lib/types.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { FeeOption } from '@xchainjs/xchain-client';
|
|
2
2
|
import { LiquidityProviderSummary } from '@xchainjs/xchain-thornode';
|
|
3
|
-
import { Address, Asset, BaseAmount, Chain } from '@xchainjs/xchain-util';
|
|
3
|
+
import { Address, Asset, BaseAmount, Chain, CryptoAmount } from '@xchainjs/xchain-util';
|
|
4
4
|
import { BigNumber } from 'bignumber.js';
|
|
5
|
-
import { CryptoAmount } from './crypto-amount';
|
|
6
5
|
export type TotalFees = {
|
|
7
6
|
asset: Asset;
|
|
8
7
|
affiliateFee: CryptoAmount;
|
package/lib/utils/utils.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Asset, Chain } from '@xchainjs/xchain-util';
|
|
1
|
+
import { Asset, Chain, CryptoAmount } from '@xchainjs/xchain-util';
|
|
2
2
|
import { BigNumber } from 'bignumber.js';
|
|
3
|
-
import { CryptoAmount } from '../crypto-amount';
|
|
4
3
|
import { InboundDetail } from '../types';
|
|
5
4
|
export declare const getBaseAmountWithDiffDecimals: (inputAmount: CryptoAmount, outDecimals: number) => BigNumber;
|
|
6
5
|
/**
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-thorchain-query",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"description": "Thorchain query module that is
|
|
5
|
+
"description": "Thorchain query module that is responsible for estimating swap calculations and add/remove liquidity for thorchain ",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"XChain",
|
|
8
8
|
"Thorchain-query"
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
"postversion": "git push --follow-tags"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@xchainjs/xchain-client": "^0.
|
|
36
|
+
"@xchainjs/xchain-client": "^0.16.0",
|
|
37
37
|
"@xchainjs/xchain-thornode": "^0.3.8",
|
|
38
|
-
"@xchainjs/xchain-midgard-query": "^0.1.
|
|
38
|
+
"@xchainjs/xchain-midgard-query": "^0.1.9",
|
|
39
39
|
"@xchainjs/xchain-util": "^0.13.1",
|
|
40
40
|
"axios": "^1.3.6",
|
|
41
41
|
"axios-retry": "^3.2.5",
|
|
42
42
|
"bignumber.js": "^9.0.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@xchainjs/xchain-client": "^0.
|
|
45
|
+
"@xchainjs/xchain-client": "^0.16.0",
|
|
46
46
|
"@xchainjs/xchain-thornode": "^0.3.8",
|
|
47
|
-
"@xchainjs/xchain-midgard-query": "^0.1.
|
|
47
|
+
"@xchainjs/xchain-midgard-query": "^0.1.9",
|
|
48
48
|
"@xchainjs/xchain-util": "^0.13.1",
|
|
49
49
|
"axios": "^1.3.6",
|
|
50
50
|
"axios-retry": "^3.2.5",
|
package/lib/crypto-amount.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Asset, AssetAmount, BaseAmount } from '@xchainjs/xchain-util';
|
|
2
|
-
import { BigNumber } from 'bignumber.js';
|
|
3
|
-
type CryptoNumeric = CryptoAmount | number | BigNumber;
|
|
4
|
-
/**
|
|
5
|
-
* Utility Class to combine an amount (asset/base) with the Asset
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export declare class CryptoAmount {
|
|
9
|
-
baseAmount: BaseAmount;
|
|
10
|
-
readonly asset: Asset;
|
|
11
|
-
constructor(amount: BaseAmount, asset: Asset);
|
|
12
|
-
plus(v: CryptoAmount): CryptoAmount;
|
|
13
|
-
minus(v: CryptoAmount): CryptoAmount;
|
|
14
|
-
times(v: CryptoNumeric): CryptoAmount;
|
|
15
|
-
div(v: CryptoNumeric): CryptoAmount;
|
|
16
|
-
lt(v: CryptoAmount): boolean;
|
|
17
|
-
lte(v: CryptoAmount): boolean;
|
|
18
|
-
gt(v: CryptoAmount): boolean;
|
|
19
|
-
gte(v: CryptoAmount): boolean;
|
|
20
|
-
eq(v: CryptoAmount): boolean;
|
|
21
|
-
formatedAssetString(): string;
|
|
22
|
-
assetAmountFixedString(): string;
|
|
23
|
-
get assetAmount(): AssetAmount;
|
|
24
|
-
/**
|
|
25
|
-
* This guard protects against trying to perform math with different assets
|
|
26
|
-
*
|
|
27
|
-
* Example.
|
|
28
|
-
* const x = new CryptoAmount(assetAmount(1),AssetBTC)
|
|
29
|
-
* const y = new CryptoAmount(assetAmount(1),AssetETH)
|
|
30
|
-
*
|
|
31
|
-
* x.plus(y) <- will throw error "cannot perform math on 2 diff assets BTC.BTC ETH.ETH
|
|
32
|
-
*
|
|
33
|
-
* @param v - CryptoNumeric
|
|
34
|
-
*/
|
|
35
|
-
private check;
|
|
36
|
-
}
|
|
37
|
-
export {};
|