@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.
@@ -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 };
@@ -1,37 +1,37 @@
1
- import { Asset, AssetAmount, BaseAmount } from '@xchainjs/xchain-util';
2
- import { BigNumber } from 'bignumber.js';
3
- declare 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 {};
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';