@xchainjs/xchain-thorchain-query 0.2.6 → 0.3.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/chain-defaults.d.ts +4 -4
- package/lib/crypto-amount.d.ts +37 -37
- package/lib/index.d.ts +7 -7
- package/lib/index.esm.js +2800 -2799
- package/lib/index.esm.js.map +1 -0
- package/lib/index.js +2799 -2791
- package/lib/index.js.map +1 -0
- package/lib/liquidity-pool.d.ts +19 -19
- package/lib/thorchain-cache.d.ts +109 -109
- package/lib/thorchain-checktx.d.ts +150 -150
- package/lib/thorchain-query.d.ts +157 -157
- package/lib/types.d.ts +228 -228
- package/lib/utils/const.d.ts +24 -24
- package/lib/utils/index.d.ts +5 -5
- package/lib/utils/liquidity.d.ts +39 -39
- package/lib/utils/midgard.d.ts +44 -44
- package/lib/utils/swap.d.ts +88 -88
- package/lib/utils/thornode.d.ts +144 -144
- package/package.json +13 -13
package/lib/chain-defaults.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Chain } from '@xchainjs/xchain-util';
|
|
2
|
-
import { ChainAttributes } from './types';
|
|
3
|
-
declare const DefaultChainAttributes: Record<Chain, ChainAttributes>;
|
|
4
|
-
export { DefaultChainAttributes };
|
|
1
|
+
import { Chain } from '@xchainjs/xchain-util';
|
|
2
|
+
import { ChainAttributes } from './types';
|
|
3
|
+
declare const DefaultChainAttributes: Record<Chain, ChainAttributes>;
|
|
4
|
+
export { DefaultChainAttributes };
|
package/lib/crypto-amount.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { Asset, AssetAmount, BaseAmount } from '@xchainjs/xchain-util';
|
|
2
|
-
import { BigNumber } from 'bignumber.js';
|
|
3
|
-
|
|
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 {};
|
|
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 {};
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './thorchain-query';
|
|
2
|
-
export * from './thorchain-checktx';
|
|
3
|
-
export * from './thorchain-cache';
|
|
4
|
-
export * from './liquidity-pool';
|
|
5
|
-
export * from './crypto-amount';
|
|
6
|
-
export * from './types';
|
|
7
|
-
export * from './utils';
|
|
1
|
+
export * from './thorchain-query';
|
|
2
|
+
export * from './thorchain-checktx';
|
|
3
|
+
export * from './thorchain-cache';
|
|
4
|
+
export * from './liquidity-pool';
|
|
5
|
+
export * from './crypto-amount';
|
|
6
|
+
export * from './types';
|
|
7
|
+
export * from './utils';
|