@xchainjs/xchain-thorchain-amm 0.2.0 → 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/index.esm.js CHANGED
@@ -1,14 +1,13 @@
1
- import { Client as Client$9, defaultAvaxParams } from '@xchainjs/xchain-avax';
2
- import { Client as Client$7 } from '@xchainjs/xchain-binance';
1
+ import { Client as Client$8, defaultAvaxParams } from '@xchainjs/xchain-avax';
2
+ import { Client as Client$6 } from '@xchainjs/xchain-binance';
3
3
  import { Client as Client$1 } from '@xchainjs/xchain-bitcoin';
4
4
  import { Client } from '@xchainjs/xchain-bitcoincash';
5
5
  import { Network, FeeOption } from '@xchainjs/xchain-client';
6
- import { Client as Client$8 } from '@xchainjs/xchain-cosmos';
6
+ import { Client as Client$7 } from '@xchainjs/xchain-cosmos';
7
7
  import { Client as Client$2 } from '@xchainjs/xchain-doge';
8
- import { MAX_APPROVAL, ETH_DECIMAL, Client as Client$4 } from '@xchainjs/xchain-ethereum';
9
- import { Client as Client$6 } from '@xchainjs/xchain-litecoin';
10
- import { Client as Client$3 } from '@xchainjs/xchain-terra';
11
- import { Client as Client$5 } from '@xchainjs/xchain-thorchain';
8
+ import { MAX_APPROVAL, ETH_DECIMAL, Client as Client$3 } from '@xchainjs/xchain-ethereum';
9
+ import { Client as Client$5 } from '@xchainjs/xchain-litecoin';
10
+ import { Client as Client$4 } from '@xchainjs/xchain-thorchain';
12
11
  import { eqAsset, AssetETH, getContractAddressFromAsset, baseAmount, Chain, assetToString, AssetBTC } from '@xchainjs/xchain-util';
13
12
  import { ethers } from 'ethers';
14
13
  import { MAX_APPROVAL as MAX_APPROVAL$1 } from '@xchainjs/xchain-evm';
@@ -594,7 +593,21 @@ class EvmHelper {
594
593
  const chainIds = {
595
594
  [Network.Mainnet]: 'thorchain-mainnet-v1',
596
595
  [Network.Stagenet]: 'chain-id-stagenet',
597
- [Network.Testnet]: 'thorchain-testnet-v2',
596
+ [Network.Testnet]: 'deprecated',
597
+ };
598
+ const clientUrl = {
599
+ [Network.Stagenet]: {
600
+ node: 'https://stagenet-thornode.ninerealms.com',
601
+ rpc: 'https://stagenet-rpc.ninerealms.com',
602
+ },
603
+ [Network.Mainnet]: {
604
+ node: 'https://thornode.ninerealms.com',
605
+ rpc: 'https://rpc.ninerealms.com',
606
+ },
607
+ [Network.Testnet]: {
608
+ node: 'deprecated',
609
+ rpc: 'deprecated',
610
+ },
598
611
  };
599
612
  /**
600
613
  * Wallet Class for managing all xchain-* wallets with a mnemonic seed.
@@ -614,13 +627,12 @@ class Wallet {
614
627
  BCH: new Client(settings),
615
628
  BTC: new Client$1(settings),
616
629
  DOGE: new Client$2(settings),
617
- TERRA: new Client$3(settings),
618
- ETH: new Client$4(settings),
619
- THOR: new Client$5(Object.assign(Object.assign({}, settings), { chainIds })),
620
- LTC: new Client$6(settings),
621
- BNB: new Client$7(settings),
622
- GAIA: new Client$8(settings),
623
- AVAX: new Client$9(Object.assign(Object.assign({}, defaultAvaxParams), { network: settings.network, phrase })),
630
+ ETH: new Client$3(settings),
631
+ THOR: new Client$4(Object.assign(Object.assign({}, settings), { chainIds, clientUrl })),
632
+ LTC: new Client$5(settings),
633
+ BNB: new Client$6(settings),
634
+ GAIA: new Client$7(settings),
635
+ AVAX: new Client$8(Object.assign(Object.assign({}, defaultAvaxParams), { network: settings.network, phrase })),
624
636
  };
625
637
  this.ethHelper = new EthHelper(this.clients.ETH, this.thorchainQuery.thorchainCache);
626
638
  }
package/lib/index.js CHANGED
@@ -11,7 +11,6 @@ var xchainCosmos = require('@xchainjs/xchain-cosmos');
11
11
  var xchainDoge = require('@xchainjs/xchain-doge');
12
12
  var xchainEthereum = require('@xchainjs/xchain-ethereum');
13
13
  var xchainLitecoin = require('@xchainjs/xchain-litecoin');
14
- var xchainTerra = require('@xchainjs/xchain-terra');
15
14
  var xchainThorchain = require('@xchainjs/xchain-thorchain');
16
15
  var xchainUtil = require('@xchainjs/xchain-util');
17
16
  var ethers = require('ethers');
@@ -598,7 +597,21 @@ class EvmHelper {
598
597
  const chainIds = {
599
598
  [xchainClient.Network.Mainnet]: 'thorchain-mainnet-v1',
600
599
  [xchainClient.Network.Stagenet]: 'chain-id-stagenet',
601
- [xchainClient.Network.Testnet]: 'thorchain-testnet-v2',
600
+ [xchainClient.Network.Testnet]: 'deprecated',
601
+ };
602
+ const clientUrl = {
603
+ [xchainClient.Network.Stagenet]: {
604
+ node: 'https://stagenet-thornode.ninerealms.com',
605
+ rpc: 'https://stagenet-rpc.ninerealms.com',
606
+ },
607
+ [xchainClient.Network.Mainnet]: {
608
+ node: 'https://thornode.ninerealms.com',
609
+ rpc: 'https://rpc.ninerealms.com',
610
+ },
611
+ [xchainClient.Network.Testnet]: {
612
+ node: 'deprecated',
613
+ rpc: 'deprecated',
614
+ },
602
615
  };
603
616
  /**
604
617
  * Wallet Class for managing all xchain-* wallets with a mnemonic seed.
@@ -618,9 +631,8 @@ class Wallet {
618
631
  BCH: new xchainBitcoincash.Client(settings),
619
632
  BTC: new xchainBitcoin.Client(settings),
620
633
  DOGE: new xchainDoge.Client(settings),
621
- TERRA: new xchainTerra.Client(settings),
622
634
  ETH: new xchainEthereum.Client(settings),
623
- THOR: new xchainThorchain.Client(Object.assign(Object.assign({}, settings), { chainIds })),
635
+ THOR: new xchainThorchain.Client(Object.assign(Object.assign({}, settings), { chainIds, clientUrl })),
624
636
  LTC: new xchainLitecoin.Client(settings),
625
637
  BNB: new xchainBinance.Client(settings),
626
638
  GAIA: new xchainCosmos.Client(settings),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xchainjs/xchain-thorchain-amm",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "module that exposes estimating & swappping cryptocurrency assets on thorchain",
5
5
  "keywords": [
6
6
  "THORChain",
@@ -43,7 +43,7 @@
43
43
  "@xchainjs/xchain-binance": "^5.6.0",
44
44
  "@xchainjs/xchain-bitcoin": "^0.20.0",
45
45
  "@xchainjs/xchain-bitcoincash": "^0.15.0",
46
- "@xchainjs/xchain-client": "^0.13.1",
46
+ "@xchainjs/xchain-client": "^0.13.2",
47
47
  "@xchainjs/xchain-cosmos": "^0.20.0",
48
48
  "@xchainjs/xchain-crypto": "^0.2.6",
49
49
  "@xchainjs/xchain-doge": "^0.5.0",
@@ -52,11 +52,10 @@
52
52
  "@xchainjs/xchain-avax": "^0.1.0-alpha3",
53
53
  "@xchainjs/xchain-litecoin": "^0.10.0",
54
54
  "@xchainjs/xchain-midgard": "0.1.0",
55
- "@xchainjs/xchain-terra": "^0.3.0",
56
- "@xchainjs/xchain-thorchain": "^0.26.0",
55
+ "@xchainjs/xchain-thorchain": "^0.27.0",
57
56
  "@xchainjs/xchain-thorchain-query": "^0.1.0",
58
57
  "@xchainjs/xchain-thornode": "^0.1.0",
59
- "@xchainjs/xchain-util": "^0.10.0",
58
+ "@xchainjs/xchain-util": "^0.11.0",
60
59
  "axios": "^0.25.0",
61
60
  "axios-retry": "^3.2.5",
62
61
  "bchaddrjs": "^0.5.2",
@@ -78,7 +77,7 @@
78
77
  "@xchainjs/xchain-binance": "^5.6.0",
79
78
  "@xchainjs/xchain-bitcoin": "^0.20.0",
80
79
  "@xchainjs/xchain-bitcoincash": "^0.15.0",
81
- "@xchainjs/xchain-client": "^0.13.1",
80
+ "@xchainjs/xchain-client": "^0.13.2",
82
81
  "@xchainjs/xchain-cosmos": "^0.20.0",
83
82
  "@xchainjs/xchain-crypto": "^0.2.6",
84
83
  "@xchainjs/xchain-doge": "^0.5.0",
@@ -88,10 +87,9 @@
88
87
  "@xchainjs/xchain-litecoin": "^0.10.0",
89
88
  "@xchainjs/xchain-midgard": "0.1.0",
90
89
  "@xchainjs/xchain-thornode": "^0.1.0",
91
- "@xchainjs/xchain-terra": "^0.3.0",
92
90
  "@xchainjs/xchain-thorchain": "^0.26.0",
93
91
  "@xchainjs/xchain-thorchain-query": "^0.1.0",
94
- "@xchainjs/xchain-util": "^0.10.0",
92
+ "@xchainjs/xchain-util": "^0.11.0",
95
93
  "axios": "^0.25.0",
96
94
  "axios-retry": "^3.2.5",
97
95
  "bchaddrjs": "^0.5.2",