@xchainjs/xchain-thorchain-query 1.0.12 → 2.0.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.esm.js +5 -2
- package/lib/index.js +4 -1
- package/package.json +6 -6
- package/lib/index.esm.js.map +0 -1
- package/lib/index.js.map +0 -1
package/lib/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { assetFromString, baseAmount, assetFromStringEx, assetToString, CryptoAmount, isSynthAsset, AssetCryptoAmount, eqAsset, CachedValue, isTradeAsset, isSecuredAsset, assetToBase, assetAmount, TRADE_ASSET_DELIMITER, SYNTH_ASSET_DELIMITER, TOKEN_ASSET_DELIMITER } from '@xchainjs/xchain-util';
|
|
1
|
+
import { assetFromString, baseAmount, assetFromStringEx, assetToString, CryptoAmount, isSynthAsset, AssetCryptoAmount, eqAsset, CachedValue, isTradeAsset, isSecuredAsset, assetToBase, assetAmount, TRADE_ASSET_DELIMITER, SYNTH_ASSET_DELIMITER, SECURED_ASSET_DELIMITER, TOKEN_ASSET_DELIMITER } from '@xchainjs/xchain-util';
|
|
2
2
|
import { BigNumber } from 'bignumber.js';
|
|
3
3
|
import { MidgardQuery } from '@xchainjs/xchain-midgard-query';
|
|
4
4
|
import { Network } from '@xchainjs/xchain-client';
|
|
@@ -2567,6 +2567,7 @@ class ThorchainQuery {
|
|
|
2567
2567
|
['c', 'BCH.BCH'],
|
|
2568
2568
|
['a', 'AVAX.AVAX'],
|
|
2569
2569
|
['s', 'BSC.BNB'],
|
|
2570
|
+
['f', 'BASE.ETH'],
|
|
2570
2571
|
]);
|
|
2571
2572
|
const nativeAsset = nativeAlias.get(alias.toLowerCase());
|
|
2572
2573
|
if (nativeAsset)
|
|
@@ -2578,6 +2579,9 @@ class ThorchainQuery {
|
|
|
2578
2579
|
else if (alias.includes(SYNTH_ASSET_DELIMITER)) {
|
|
2579
2580
|
delimiter = SYNTH_ASSET_DELIMITER;
|
|
2580
2581
|
}
|
|
2582
|
+
else if (alias.includes(SECURED_ASSET_DELIMITER)) {
|
|
2583
|
+
delimiter = SECURED_ASSET_DELIMITER;
|
|
2584
|
+
}
|
|
2581
2585
|
const splitedAlias = alias.split(delimiter);
|
|
2582
2586
|
const poolId = Object.keys(pools).find((pool) => pool === `${splitedAlias[0]}.${splitedAlias[1].split('-')[0]}`);
|
|
2583
2587
|
if (poolId)
|
|
@@ -3152,4 +3156,3 @@ class TransactionStage {
|
|
|
3152
3156
|
}
|
|
3153
3157
|
|
|
3154
3158
|
export { AVAXChain, AddLpStatus, AddSaverStatus, AssetATOM, AssetAVAX, AssetBASE, AssetBCH, AssetBNB, AssetBSC, AssetBTC, AssetDOGE, AssetETH, AssetLTC, AssetMAYA, AssetRuneNative, BASEChain, BCHChain, BNBChain, BSCChain, BTCChain, DOGEChain, DefaultChainAttributes, ETHChain, GAIAChain, InboundStatus, LTCChain, LiquidityPool, MAYAChain, RefundStatus, SwapStatus, THORCHAIN_DECIMAL, THORChain, ThorchainCache, ThorchainQuery, Thornode, TransactionStage, TxType, WithdrawStatus, assetUSDC, calcNetworkFee, getCryptoAmountWithNotation, getLiquidityProtectionData, getLiquidityUnits, getPoolShare, getSlipOnLiquidity, isAssetRuneNative };
|
|
3155
|
-
//# sourceMappingURL=index.esm.js.map
|
package/lib/index.js
CHANGED
|
@@ -2574,6 +2574,7 @@ class ThorchainQuery {
|
|
|
2574
2574
|
['c', 'BCH.BCH'],
|
|
2575
2575
|
['a', 'AVAX.AVAX'],
|
|
2576
2576
|
['s', 'BSC.BNB'],
|
|
2577
|
+
['f', 'BASE.ETH'],
|
|
2577
2578
|
]);
|
|
2578
2579
|
const nativeAsset = nativeAlias.get(alias.toLowerCase());
|
|
2579
2580
|
if (nativeAsset)
|
|
@@ -2585,6 +2586,9 @@ class ThorchainQuery {
|
|
|
2585
2586
|
else if (alias.includes(xchainUtil.SYNTH_ASSET_DELIMITER)) {
|
|
2586
2587
|
delimiter = xchainUtil.SYNTH_ASSET_DELIMITER;
|
|
2587
2588
|
}
|
|
2589
|
+
else if (alias.includes(xchainUtil.SECURED_ASSET_DELIMITER)) {
|
|
2590
|
+
delimiter = xchainUtil.SECURED_ASSET_DELIMITER;
|
|
2591
|
+
}
|
|
2588
2592
|
const splitedAlias = alias.split(delimiter);
|
|
2589
2593
|
const poolId = Object.keys(pools).find((pool) => pool === `${splitedAlias[0]}.${splitedAlias[1].split('-')[0]}`);
|
|
2590
2594
|
if (poolId)
|
|
@@ -3197,4 +3201,3 @@ exports.getLiquidityUnits = getLiquidityUnits;
|
|
|
3197
3201
|
exports.getPoolShare = getPoolShare;
|
|
3198
3202
|
exports.getSlipOnLiquidity = getSlipOnLiquidity;
|
|
3199
3203
|
exports.isAssetRuneNative = isAssetRuneNative;
|
|
3200
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-thorchain-query",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Thorchain query module that is responsible for estimating swap calculations and add/remove liquidity for thorchain ",
|
|
6
6
|
"keywords": [
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"postversion": "git push --follow-tags"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@xchainjs/xchain-client": "
|
|
37
|
-
"@xchainjs/xchain-midgard-query": "
|
|
38
|
-
"@xchainjs/xchain-thornode": "0.
|
|
39
|
-
"@xchainjs/xchain-util": "
|
|
40
|
-
"axios": "1.
|
|
36
|
+
"@xchainjs/xchain-client": "2.0.0",
|
|
37
|
+
"@xchainjs/xchain-midgard-query": "2.0.0",
|
|
38
|
+
"@xchainjs/xchain-thornode": "1.0.0",
|
|
39
|
+
"@xchainjs/xchain-util": "2.0.0",
|
|
40
|
+
"axios": "1.8.4",
|
|
41
41
|
"axios-retry": "3.2.5",
|
|
42
42
|
"bignumber.js": "9.0.0"
|
|
43
43
|
},
|