@xchainjs/xchain-thorchain-amm 0.3.14 → 0.3.16
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 +9 -9
- package/lib/index.js +4 -4
- package/lib/wallet.d.ts +1 -1
- package/package.json +9 -9
package/lib/index.esm.js
CHANGED
|
@@ -5,9 +5,9 @@ import { Client } from '@xchainjs/xchain-bitcoincash';
|
|
|
5
5
|
import { FeeOption } from '@xchainjs/xchain-client';
|
|
6
6
|
import { Client as Client$7 } from '@xchainjs/xchain-cosmos';
|
|
7
7
|
import { Client as Client$2 } from '@xchainjs/xchain-doge';
|
|
8
|
-
import { AssetETH, abi, MAX_APPROVAL, ETH_DECIMAL, Client as Client$
|
|
9
|
-
import { Client as Client$
|
|
10
|
-
import { Client as Client$
|
|
8
|
+
import { AssetETH, abi, MAX_APPROVAL, ETH_DECIMAL, Client as Client$4, ETHChain } from '@xchainjs/xchain-ethereum';
|
|
9
|
+
import { Client as Client$3 } from '@xchainjs/xchain-litecoin';
|
|
10
|
+
import { Client as Client$5, THORChain } from '@xchainjs/xchain-thorchain';
|
|
11
11
|
import { eqAsset, getContractAddressFromAsset, baseAmount } from '@xchainjs/xchain-util';
|
|
12
12
|
import { ethers } from 'ethers';
|
|
13
13
|
import { abi as abi$1, MAX_APPROVAL as MAX_APPROVAL$1 } from '@xchainjs/xchain-evm';
|
|
@@ -245,16 +245,16 @@ class Wallet {
|
|
|
245
245
|
* @param thorchainCache - an instance of the ThorchainCache (could be pointing to stagenet,testnet,mainnet)
|
|
246
246
|
* @returns Wallet
|
|
247
247
|
*/
|
|
248
|
-
constructor(phrase, thorchainQuery) {
|
|
248
|
+
constructor(phrase, thorchainQuery, sochainApiKey) {
|
|
249
249
|
this.thorchainQuery = thorchainQuery;
|
|
250
250
|
const settings = { network: thorchainQuery.thorchainCache.midgard.network, phrase };
|
|
251
251
|
this.clients = {
|
|
252
252
|
BCH: new Client(settings),
|
|
253
|
-
BTC: new Client$1(settings),
|
|
254
|
-
DOGE: new Client$2(settings),
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
253
|
+
BTC: new Client$1(Object.assign(Object.assign({}, settings), { sochainApiKey })),
|
|
254
|
+
DOGE: new Client$2(Object.assign(Object.assign({}, settings), { sochainApiKey })),
|
|
255
|
+
LTC: new Client$3(Object.assign(Object.assign({}, settings), { sochainApiKey })),
|
|
256
|
+
ETH: new Client$4(settings),
|
|
257
|
+
THOR: new Client$5(settings),
|
|
258
258
|
BNB: new Client$6(settings),
|
|
259
259
|
GAIA: new Client$7(settings),
|
|
260
260
|
AVAX: new Client$8(Object.assign(Object.assign({}, defaultAvaxParams), { network: settings.network, phrase })),
|
package/lib/index.js
CHANGED
|
@@ -249,16 +249,16 @@ class Wallet {
|
|
|
249
249
|
* @param thorchainCache - an instance of the ThorchainCache (could be pointing to stagenet,testnet,mainnet)
|
|
250
250
|
* @returns Wallet
|
|
251
251
|
*/
|
|
252
|
-
constructor(phrase, thorchainQuery) {
|
|
252
|
+
constructor(phrase, thorchainQuery, sochainApiKey) {
|
|
253
253
|
this.thorchainQuery = thorchainQuery;
|
|
254
254
|
const settings = { network: thorchainQuery.thorchainCache.midgard.network, phrase };
|
|
255
255
|
this.clients = {
|
|
256
256
|
BCH: new xchainBitcoincash.Client(settings),
|
|
257
|
-
BTC: new xchainBitcoin.Client(settings),
|
|
258
|
-
DOGE: new xchainDoge.Client(settings),
|
|
257
|
+
BTC: new xchainBitcoin.Client(Object.assign(Object.assign({}, settings), { sochainApiKey })),
|
|
258
|
+
DOGE: new xchainDoge.Client(Object.assign(Object.assign({}, settings), { sochainApiKey })),
|
|
259
|
+
LTC: new xchainLitecoin.Client(Object.assign(Object.assign({}, settings), { sochainApiKey })),
|
|
259
260
|
ETH: new xchainEthereum.Client(settings),
|
|
260
261
|
THOR: new xchainThorchain.Client(settings),
|
|
261
|
-
LTC: new xchainLitecoin.Client(settings),
|
|
262
262
|
BNB: new xchainBinance.Client(settings),
|
|
263
263
|
GAIA: new xchainCosmos.Client(settings),
|
|
264
264
|
AVAX: new xchainAvax.Client(Object.assign(Object.assign({}, xchainAvax.defaultAvaxParams), { network: settings.network, phrase })),
|
package/lib/wallet.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare class Wallet {
|
|
|
21
21
|
* @param thorchainCache - an instance of the ThorchainCache (could be pointing to stagenet,testnet,mainnet)
|
|
22
22
|
* @returns Wallet
|
|
23
23
|
*/
|
|
24
|
-
constructor(phrase: string, thorchainQuery: ThorchainQuery);
|
|
24
|
+
constructor(phrase: string, thorchainQuery: ThorchainQuery, sochainApiKey: string);
|
|
25
25
|
/**
|
|
26
26
|
* Fetch balances for all wallets
|
|
27
27
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-thorchain-amm",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.16",
|
|
4
4
|
"description": "module that exposes estimating & swappping cryptocurrency assets on thorchain",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"THORChain",
|
|
@@ -41,18 +41,18 @@
|
|
|
41
41
|
"@psf/bitcoincashjs-lib": "^4.0.2",
|
|
42
42
|
"@xchainjs/xchain-avax": "^0.1.4",
|
|
43
43
|
"@xchainjs/xchain-binance": "^5.6.7",
|
|
44
|
-
"@xchainjs/xchain-bitcoin": "^0.20.
|
|
44
|
+
"@xchainjs/xchain-bitcoin": "^0.20.9",
|
|
45
45
|
"@xchainjs/xchain-bitcoincash": "^0.15.7",
|
|
46
46
|
"@xchainjs/xchain-client": "^0.13.5",
|
|
47
47
|
"@xchainjs/xchain-cosmos": "^0.20.8",
|
|
48
48
|
"@xchainjs/xchain-crypto": "^0.2.6",
|
|
49
|
-
"@xchainjs/xchain-doge": "^0.5.
|
|
49
|
+
"@xchainjs/xchain-doge": "^0.5.8",
|
|
50
50
|
"@xchainjs/xchain-ethereum": "^0.27.7",
|
|
51
51
|
"@xchainjs/xchain-evm": "^0.1.3",
|
|
52
|
-
"@xchainjs/xchain-litecoin": "^0.10.
|
|
52
|
+
"@xchainjs/xchain-litecoin": "^0.10.10",
|
|
53
53
|
"@xchainjs/xchain-midgard": "0.4.2",
|
|
54
54
|
"@xchainjs/xchain-thorchain": "^0.27.7",
|
|
55
|
-
"@xchainjs/xchain-thorchain-query": "^0.1.
|
|
55
|
+
"@xchainjs/xchain-thorchain-query": "^0.1.17",
|
|
56
56
|
"@xchainjs/xchain-thornode": "^0.2.0",
|
|
57
57
|
"@xchainjs/xchain-util": "^0.12.0",
|
|
58
58
|
"axios": "^0.25.0",
|
|
@@ -74,18 +74,18 @@
|
|
|
74
74
|
"@psf/bitcoincashjs-lib": "^4.0.2",
|
|
75
75
|
"@xchainjs/xchain-avax": "^0.1.4",
|
|
76
76
|
"@xchainjs/xchain-binance": "^5.6.7",
|
|
77
|
-
"@xchainjs/xchain-bitcoin": "^0.20.
|
|
77
|
+
"@xchainjs/xchain-bitcoin": "^0.20.9",
|
|
78
78
|
"@xchainjs/xchain-bitcoincash": "^0.15.7",
|
|
79
79
|
"@xchainjs/xchain-client": "^0.13.5",
|
|
80
80
|
"@xchainjs/xchain-cosmos": "^0.20.7",
|
|
81
81
|
"@xchainjs/xchain-crypto": "^0.2.6",
|
|
82
|
-
"@xchainjs/xchain-doge": "^0.5.
|
|
82
|
+
"@xchainjs/xchain-doge": "^0.5.8",
|
|
83
83
|
"@xchainjs/xchain-ethereum": "^0.27.7",
|
|
84
84
|
"@xchainjs/xchain-evm": "^0.1.3",
|
|
85
|
-
"@xchainjs/xchain-litecoin": "^0.10.
|
|
85
|
+
"@xchainjs/xchain-litecoin": "^0.10.10",
|
|
86
86
|
"@xchainjs/xchain-midgard": "0.4.2",
|
|
87
87
|
"@xchainjs/xchain-thorchain": "^0.27.7",
|
|
88
|
-
"@xchainjs/xchain-thorchain-query": "^0.1.
|
|
88
|
+
"@xchainjs/xchain-thorchain-query": "^0.1.17",
|
|
89
89
|
"@xchainjs/xchain-thornode": "^0.2.0",
|
|
90
90
|
"@xchainjs/xchain-util": "^0.12.0",
|
|
91
91
|
"axios": "^0.25.0",
|