@xchainjs/xchain-thorchain-amm 0.8.8 → 0.8.10

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 CHANGED
@@ -3,7 +3,7 @@ import { Client as Client$5, BNBChain } from '@xchainjs/xchain-binance';
3
3
  import { Client as Client$1, defaultBTCParams, BTCChain } from '@xchainjs/xchain-bitcoin';
4
4
  import { Client, defaultBchParams, BCHChain } from '@xchainjs/xchain-bitcoincash';
5
5
  import { Client as Client$a, defaultBscParams, BSCChain } from '@xchainjs/xchain-bsc';
6
- import { FeeOption, Protocol as Protocol$1 } from '@xchainjs/xchain-client';
6
+ import { Protocol, FeeOption } from '@xchainjs/xchain-client';
7
7
  import { Client as Client$6, GAIAChain } from '@xchainjs/xchain-cosmos';
8
8
  import { Client as Client$2, defaultDogeParams, DOGEChain } from '@xchainjs/xchain-doge';
9
9
  import { Client as Client$8, defaultEthParams, ETHChain } from '@xchainjs/xchain-ethereum';
@@ -11,7 +11,7 @@ import { Client as Client$3, defaultLtcParams, LTCChain } from '@xchainjs/xchain
11
11
  import { Client as Client$7, MAYAChain } from '@xchainjs/xchain-mayachain';
12
12
  import { Client as Client$4, THORChain } from '@xchainjs/xchain-thorchain';
13
13
  import { eqAsset, getContractAddressFromAsset, baseAmount, assetFromString } from '@xchainjs/xchain-util';
14
- import { Protocol, abi, MAX_APPROVAL } from '@xchainjs/xchain-evm';
14
+ import { abi, MAX_APPROVAL } from '@xchainjs/xchain-evm';
15
15
  import { ethers } from 'ethers';
16
16
  import { ThorchainQuery } from '@xchainjs/xchain-thorchain-query';
17
17
 
@@ -400,7 +400,7 @@ class Wallet {
400
400
  return { hash, url: assetClient.getExplorerTxUrl(hash) };
401
401
  }
402
402
  else if (this.isUTXOChain(assetAmount.asset)) {
403
- const feeRates = yield assetClient.getFeeRates(Protocol$1.THORCHAIN);
403
+ const feeRates = yield assetClient.getFeeRates(Protocol.THORCHAIN);
404
404
  const addParams = {
405
405
  wallIndex: 0,
406
406
  asset: assetAmount.asset,
@@ -460,7 +460,7 @@ class Wallet {
460
460
  return { hash, url: assetClient.getExplorerTxUrl(hash) };
461
461
  }
462
462
  else if (this.isUTXOChain(assetAmount.asset)) {
463
- const feeRates = yield assetClient.getFeeRates(Protocol$1.THORCHAIN);
463
+ const feeRates = yield assetClient.getFeeRates(Protocol.THORCHAIN);
464
464
  const addParams = {
465
465
  wallIndex: 0,
466
466
  asset: assetAmount.asset,
@@ -513,7 +513,7 @@ class Wallet {
513
513
  return { hash, url: assetClient.getExplorerTxUrl(hash) };
514
514
  }
515
515
  else if (this.isUTXOChain(params.amount.asset)) {
516
- const feeRates = yield assetClient.getFeeRates(Protocol$1.THORCHAIN);
516
+ const feeRates = yield assetClient.getFeeRates(Protocol.THORCHAIN);
517
517
  const addParams = {
518
518
  wallIndex: 0,
519
519
  asset: params.amount.asset,
@@ -566,7 +566,7 @@ class Wallet {
566
566
  return { hash, url: assetClient.getExplorerTxUrl(hash) };
567
567
  }
568
568
  else if (this.isUTXOChain(params.amount.asset)) {
569
- const feeRates = yield assetClient.getFeeRates(Protocol$1.THORCHAIN);
569
+ const feeRates = yield assetClient.getFeeRates(Protocol.THORCHAIN);
570
570
  const addParams = {
571
571
  wallIndex: 0,
572
572
  asset: params.amount.asset,
@@ -688,7 +688,7 @@ class Wallet {
688
688
  return { hash, url: assetClient.getExplorerTxUrl(hash) };
689
689
  }
690
690
  else if (this.isUTXOChain(params.asset.asset)) {
691
- const feeRates = yield assetClient.getFeeRates(Protocol$1.THORCHAIN);
691
+ const feeRates = yield assetClient.getFeeRates(Protocol.THORCHAIN);
692
692
  const addParams = {
693
693
  wallIndex: 0,
694
694
  asset: params.asset.asset,
@@ -749,7 +749,7 @@ class Wallet {
749
749
  return { hash, url: assetClient.getExplorerTxUrl(hash) };
750
750
  }
751
751
  else if (this.isUTXOChain(params.assetFee.asset)) {
752
- const feeRates = yield assetClient.getFeeRates(Protocol$1.THORCHAIN);
752
+ const feeRates = yield assetClient.getFeeRates(Protocol.THORCHAIN);
753
753
  const withdrawParams = {
754
754
  wallIndex: 0,
755
755
  asset: params.assetFee.asset,
package/lib/index.js CHANGED
@@ -72,7 +72,7 @@ class EvmHelper {
72
72
  throw new Error('Vault address is not defined');
73
73
  }
74
74
  const address = yield this.client.getAddressAsync(params.walletIndex);
75
- const gasPrice = yield this.evmClient.estimateGasPrices(xchainEvm.Protocol.THORCHAIN);
75
+ const gasPrice = yield this.evmClient.estimateGasPrices(xchainClient.Protocol.THORCHAIN);
76
76
  if (xchainUtil.eqAsset(params.asset, this.evmClient.config.gasAsset)) {
77
77
  // simple transfer
78
78
  return yield this.evmClient.transfer({
package/lib/wallet.d.ts CHANGED
@@ -3,7 +3,7 @@ import { BNBChain } from '@xchainjs/xchain-binance';
3
3
  import { BTCChain } from '@xchainjs/xchain-bitcoin';
4
4
  import { BCHChain } from '@xchainjs/xchain-bitcoincash';
5
5
  import { BSCChain } from '@xchainjs/xchain-bsc';
6
- import { Network, UtxoClientParams, XChainClient, XChainClientParams } from '@xchainjs/xchain-client';
6
+ import { Network, XChainClient, XChainClientParams } from '@xchainjs/xchain-client';
7
7
  import { GAIAChain } from '@xchainjs/xchain-cosmos';
8
8
  import { DOGEChain } from '@xchainjs/xchain-doge';
9
9
  import { ETHChain } from '@xchainjs/xchain-ethereum';
@@ -13,6 +13,7 @@ import { MAYAChain, MayachainClientParams } from '@xchainjs/xchain-mayachain';
13
13
  import { THORChain, ThorchainClientParams } from '@xchainjs/xchain-thorchain';
14
14
  import { CryptoAmount, ThorchainQuery } from '@xchainjs/xchain-thorchain-query';
15
15
  import { Address } from '@xchainjs/xchain-util';
16
+ import { UtxoClientParams } from '@xchainjs/xchain-utxo';
16
17
  import { AddLiquidity, AllBalances, ExecuteSwap, LoanCloseParams, LoanOpenParams, RegisterThornameParams, TxSubmitted, UpdateThornameParams, WithdrawLiquidity } from './types';
17
18
  import { EvmHelper } from './utils/evm-helper';
18
19
  export type NodeUrls = Record<Network, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xchainjs/xchain-thorchain-amm",
3
- "version": "0.8.8",
3
+ "version": "0.8.10",
4
4
  "description": "module that exposes estimating & swappping cryptocurrency assets on thorchain",
5
5
  "keywords": [
6
6
  "THORChain",
@@ -39,25 +39,25 @@
39
39
  "@binance-chain/javascript-sdk": "^4.2.0",
40
40
  "@cosmos-client/core": "0.46.1",
41
41
  "@psf/bitcoincashjs-lib": "^4.0.3",
42
- "@xchainjs/xchain-avax": "^0.4.1",
43
- "@xchainjs/xchain-binance": "^5.7.6",
44
- "@xchainjs/xchain-bitcoin": "^0.23.7",
45
- "@xchainjs/xchain-bitcoincash": "^0.17.5",
46
- "@xchainjs/xchain-client": "^0.15.5",
47
- "@xchainjs/xchain-cosmos": "^0.21.7",
48
- "@xchainjs/xchain-bsc": "^0.4.2",
42
+ "@xchainjs/xchain-avax": "^0.4.3",
43
+ "@xchainjs/xchain-binance": "^5.7.8",
44
+ "@xchainjs/xchain-bitcoin": "^0.23.9",
45
+ "@xchainjs/xchain-bitcoincash": "^0.17.7",
46
+ "@xchainjs/xchain-client": "^0.16.0",
47
+ "@xchainjs/xchain-cosmos": "^0.21.9",
48
+ "@xchainjs/xchain-bsc": "^0.4.4",
49
49
  "@xchainjs/xchain-crypto": "^0.3.0",
50
- "@xchainjs/xchain-doge": "^0.7.7",
51
- "@xchainjs/xchain-ethereum": "^0.31.1",
50
+ "@xchainjs/xchain-doge": "^0.7.9",
51
+ "@xchainjs/xchain-ethereum": "^0.31.3",
52
52
  "@xchainjs/xchain-thornode": "^0.3.8",
53
- "@xchainjs/xchain-thorchain-query": "^0.6.13",
54
- "@xchainjs/xchain-evm": "^0.4.1",
55
- "@xchainjs/xchain-litecoin": "^0.13.6",
56
- "@xchainjs/xchain-mayachain": "^0.2.10",
53
+ "@xchainjs/xchain-thorchain-query": "^0.6.15",
54
+ "@xchainjs/xchain-evm": "^0.4.3",
55
+ "@xchainjs/xchain-litecoin": "^0.13.8",
56
+ "@xchainjs/xchain-mayachain": "^0.2.13",
57
57
  "@xchainjs/xchain-midgard": "^0.5.2",
58
- "@xchainjs/xchain-thorchain": "^0.28.14",
58
+ "@xchainjs/xchain-thorchain": "^0.28.16",
59
59
  "@xchainjs/xchain-util": "^0.13.1",
60
- "@xchainjs/xchain-utxo-providers": "^0.2.8",
60
+ "@xchainjs/xchain-utxo-providers": "^0.2.10",
61
61
  "axios": "^1.3.6",
62
62
  "axios-retry": "^3.2.5",
63
63
  "bchaddrjs": "^0.5.2",
@@ -75,25 +75,25 @@
75
75
  "@binance-chain/javascript-sdk": "^4.2.0",
76
76
  "@cosmos-client/core": "0.46.1",
77
77
  "@psf/bitcoincashjs-lib": "^4.0.3",
78
- "@xchainjs/xchain-avax": "^0.4.1",
79
- "@xchainjs/xchain-binance": "^5.7.6",
80
- "@xchainjs/xchain-bitcoin": "^0.23.7",
81
- "@xchainjs/xchain-bitcoincash": "^0.17.5",
82
- "@xchainjs/xchain-client": "^0.15.5",
83
- "@xchainjs/xchain-cosmos": "^0.21.7",
84
- "@xchainjs/xchain-bsc": "^0.4.2",
78
+ "@xchainjs/xchain-avax": "^0.4.3",
79
+ "@xchainjs/xchain-binance": "^5.7.8",
80
+ "@xchainjs/xchain-bitcoin": "^0.23.9",
81
+ "@xchainjs/xchain-bitcoincash": "^0.17.7",
82
+ "@xchainjs/xchain-client": "^0.16.0",
83
+ "@xchainjs/xchain-cosmos": "^0.21.9",
84
+ "@xchainjs/xchain-bsc": "^0.4.4",
85
85
  "@xchainjs/xchain-crypto": "^0.3.0",
86
- "@xchainjs/xchain-doge": "^0.7.7",
87
- "@xchainjs/xchain-ethereum": "^0.31.1",
86
+ "@xchainjs/xchain-doge": "^0.7.9",
87
+ "@xchainjs/xchain-ethereum": "^0.31.3",
88
88
  "@xchainjs/xchain-thornode": "^0.3.8",
89
- "@xchainjs/xchain-thorchain-query": "^0.6.13",
90
- "@xchainjs/xchain-evm": "^0.4.1",
91
- "@xchainjs/xchain-litecoin": "^0.13.6",
92
- "@xchainjs/xchain-mayachain": "^0.2.10",
89
+ "@xchainjs/xchain-thorchain-query": "^0.6.15",
90
+ "@xchainjs/xchain-evm": "^0.4.3",
91
+ "@xchainjs/xchain-litecoin": "^0.13.8",
92
+ "@xchainjs/xchain-mayachain": "^0.2.13",
93
93
  "@xchainjs/xchain-midgard": "^0.5.2",
94
- "@xchainjs/xchain-thorchain": "^0.28.14",
94
+ "@xchainjs/xchain-thorchain": "^0.28.16",
95
95
  "@xchainjs/xchain-util": "^0.13.1",
96
- "@xchainjs/xchain-utxo-providers": "^0.2.8",
96
+ "@xchainjs/xchain-utxo-providers": "^0.2.10",
97
97
  "axios": "^1.3.6",
98
98
  "axios-retry": "^3.2.5",
99
99
  "bchaddrjs": "^0.5.2",