@xchainjs/xchain-thorchain 0.25.3 → 0.26.1
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/client.d.ts +2 -2
- package/lib/index.esm.js +2 -9
- package/lib/index.js +6 -14
- package/lib/util.d.ts +2 -9
- package/package.json +10 -10
- package/CHANGELOG.md +0 -514
package/lib/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cosmosclient, proto } from '@cosmos-client/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Balance, BaseXChainClient, Fees, Network, Tx, TxHash, TxHistoryParams, TxParams, TxsPage, XChainClient, XChainClientParams } from '@xchainjs/xchain-client';
|
|
3
3
|
import { CosmosSDKClient, RPCTxResult } from '@xchainjs/xchain-cosmos';
|
|
4
|
-
import { Asset } from '@xchainjs/xchain-util';
|
|
4
|
+
import { Address, Asset } from '@xchainjs/xchain-util';
|
|
5
5
|
import BigNumber from 'bignumber.js';
|
|
6
6
|
import { ChainId, ClientUrl, DepositParam, ExplorerUrls, NodeUrl, ThorchainClientParams, TxOfflineParams } from './types';
|
|
7
7
|
/**
|
package/lib/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cosmosclient, proto, rest } from '@cosmos-client/core';
|
|
2
2
|
import { Network, TxType, singleFee, FeeType, BaseXChainClient } from '@xchainjs/xchain-client';
|
|
3
3
|
import { CosmosSDKClient } from '@xchainjs/xchain-cosmos';
|
|
4
|
-
import { assetToString, AssetRuneNative,
|
|
4
|
+
import { isAssetRuneNative, isSynthAsset, assetToString, AssetRuneNative, assetFromString, baseAmount, assetToBase, assetAmount, Chain } from '@xchainjs/xchain-util';
|
|
5
5
|
import axios from 'axios';
|
|
6
6
|
import { decode } from 'bech32-buffer';
|
|
7
7
|
|
|
@@ -9604,13 +9604,6 @@ const DEFAULT_GAS_ADJUSTMENT = 2;
|
|
|
9604
9604
|
const DEFAULT_GAS_LIMIT_VALUE = '4000000';
|
|
9605
9605
|
const DEPOSIT_GAS_LIMIT_VALUE = '600000000';
|
|
9606
9606
|
const MAX_TX_COUNT = 100;
|
|
9607
|
-
/**
|
|
9608
|
-
* Checks whether an asset is `AssetRuneNative`
|
|
9609
|
-
*
|
|
9610
|
-
* @param {Asset} asset
|
|
9611
|
-
* @returns {boolean} `true` or `false`
|
|
9612
|
-
*/
|
|
9613
|
-
const isAssetRuneNative = (asset) => assetToString(asset) === assetToString(AssetRuneNative);
|
|
9614
9607
|
const DENOM_RUNE_NATIVE = 'rune';
|
|
9615
9608
|
/**
|
|
9616
9609
|
* Get denomination from Asset
|
|
@@ -10494,4 +10487,4 @@ const msgNativeTxFromJson = (value) => {
|
|
|
10494
10487
|
return new MsgNativeTx(value.coins, value.memo, cosmosclient.AccAddress.fromString(value.signer));
|
|
10495
10488
|
};
|
|
10496
10489
|
|
|
10497
|
-
export { Client, DECIMAL, DEFAULT_GAS_ADJUSTMENT, DEFAULT_GAS_LIMIT_VALUE, DEPOSIT_GAS_LIMIT_VALUE, MAX_TX_COUNT, MsgNativeTx, assetFromDenom, buildDepositTx, buildTransferTx, buildUnsignedTx, getBalance, getChainId, getChainIds, getDefaultClientUrl, getDefaultExplorerUrls, getDefaultFees, getDenom, getDepositTxDataFromLogs, getEstimatedGas, getExplorerAddressUrl, getExplorerTxUrl, getExplorerUrl, getPrefix, getTxType,
|
|
10490
|
+
export { Client, DECIMAL, DEFAULT_GAS_ADJUSTMENT, DEFAULT_GAS_LIMIT_VALUE, DEPOSIT_GAS_LIMIT_VALUE, MAX_TX_COUNT, MsgNativeTx, assetFromDenom, buildDepositTx, buildTransferTx, buildUnsignedTx, getBalance, getChainId, getChainIds, getDefaultClientUrl, getDefaultExplorerUrls, getDefaultFees, getDenom, getDepositTxDataFromLogs, getEstimatedGas, getExplorerAddressUrl, getExplorerTxUrl, getExplorerUrl, getPrefix, getTxType, isBroadcastSuccess, msgNativeTxFromJson, registerDepositCodecs, registerSendCodecs };
|
package/lib/index.js
CHANGED
|
@@ -9612,13 +9612,6 @@ const DEFAULT_GAS_ADJUSTMENT = 2;
|
|
|
9612
9612
|
const DEFAULT_GAS_LIMIT_VALUE = '4000000';
|
|
9613
9613
|
const DEPOSIT_GAS_LIMIT_VALUE = '600000000';
|
|
9614
9614
|
const MAX_TX_COUNT = 100;
|
|
9615
|
-
/**
|
|
9616
|
-
* Checks whether an asset is `AssetRuneNative`
|
|
9617
|
-
*
|
|
9618
|
-
* @param {Asset} asset
|
|
9619
|
-
* @returns {boolean} `true` or `false`
|
|
9620
|
-
*/
|
|
9621
|
-
const isAssetRuneNative = (asset) => xchainUtil.assetToString(asset) === xchainUtil.assetToString(xchainUtil.AssetRuneNative);
|
|
9622
9615
|
const DENOM_RUNE_NATIVE = 'rune';
|
|
9623
9616
|
/**
|
|
9624
9617
|
* Get denomination from Asset
|
|
@@ -9627,7 +9620,7 @@ const DENOM_RUNE_NATIVE = 'rune';
|
|
|
9627
9620
|
* @returns {string} The denomination of the given asset.
|
|
9628
9621
|
*/
|
|
9629
9622
|
const getDenom = (asset) => {
|
|
9630
|
-
if (isAssetRuneNative(asset))
|
|
9623
|
+
if (xchainUtil.isAssetRuneNative(asset))
|
|
9631
9624
|
return DENOM_RUNE_NATIVE;
|
|
9632
9625
|
if (xchainUtil.isSynthAsset(asset))
|
|
9633
9626
|
return xchainUtil.assetToString(asset).toLowerCase();
|
|
@@ -10312,10 +10305,10 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
10312
10305
|
var _a, _b, _c, _d;
|
|
10313
10306
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10314
10307
|
const balances = yield this.getBalance(this.getAddress(walletIndex));
|
|
10315
|
-
const runeBalance = (_b = (_a = balances.filter(({ asset }) => isAssetRuneNative(asset))[0]) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : xchainUtil.baseAmount(0, DECIMAL);
|
|
10308
|
+
const runeBalance = (_b = (_a = balances.filter(({ asset }) => xchainUtil.isAssetRuneNative(asset))[0]) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : xchainUtil.baseAmount(0, DECIMAL);
|
|
10316
10309
|
const assetBalance = (_d = (_c = balances.filter(({ asset: assetInList }) => xchainUtil.assetToString(assetInList) === xchainUtil.assetToString(asset))[0]) === null || _c === void 0 ? void 0 : _c.amount) !== null && _d !== void 0 ? _d : xchainUtil.baseAmount(0, DECIMAL);
|
|
10317
10310
|
const { average: fee } = yield this.getFees();
|
|
10318
|
-
if (isAssetRuneNative(asset)) {
|
|
10311
|
+
if (xchainUtil.isAssetRuneNative(asset)) {
|
|
10319
10312
|
// amount + fee < runeBalance
|
|
10320
10313
|
if (runeBalance.lt(amount.plus(fee))) {
|
|
10321
10314
|
throw new Error('insufficient funds');
|
|
@@ -10375,10 +10368,10 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
10375
10368
|
var _a, _b, _c, _d;
|
|
10376
10369
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10377
10370
|
const balances = yield this.getBalance(this.getAddress(walletIndex));
|
|
10378
|
-
const runeBalance = (_b = (_a = balances.filter(({ asset }) => isAssetRuneNative(asset))[0]) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : xchainUtil.baseAmount(0, DECIMAL);
|
|
10371
|
+
const runeBalance = (_b = (_a = balances.filter(({ asset }) => xchainUtil.isAssetRuneNative(asset))[0]) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : xchainUtil.baseAmount(0, DECIMAL);
|
|
10379
10372
|
const assetBalance = (_d = (_c = balances.filter(({ asset: assetInList }) => xchainUtil.assetToString(assetInList) === xchainUtil.assetToString(asset))[0]) === null || _c === void 0 ? void 0 : _c.amount) !== null && _d !== void 0 ? _d : xchainUtil.baseAmount(0, DECIMAL);
|
|
10380
10373
|
const fee = (yield this.getFees()).average;
|
|
10381
|
-
if (isAssetRuneNative(asset)) {
|
|
10374
|
+
if (xchainUtil.isAssetRuneNative(asset)) {
|
|
10382
10375
|
// amount + fee < runeBalance
|
|
10383
10376
|
if (runeBalance.lt(amount.plus(fee))) {
|
|
10384
10377
|
throw new Error('insufficient funds');
|
|
@@ -10430,7 +10423,7 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
10430
10423
|
transferOffline({ walletIndex = 0, asset = xchainUtil.AssetRuneNative, amount, recipient, memo, fromRuneBalance: from_rune_balance, fromAssetBalance: from_asset_balance = xchainUtil.baseAmount(0, DECIMAL), fromAccountNumber = long_1.ZERO, fromSequence = long_1.ZERO, gasLimit = new bignumber(DEFAULT_GAS_LIMIT_VALUE), }) {
|
|
10431
10424
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10432
10425
|
const fee = (yield this.getFees()).average;
|
|
10433
|
-
if (isAssetRuneNative(asset)) {
|
|
10426
|
+
if (xchainUtil.isAssetRuneNative(asset)) {
|
|
10434
10427
|
// amount + fee < runeBalance
|
|
10435
10428
|
if (from_rune_balance.lt(amount.plus(fee))) {
|
|
10436
10429
|
throw new Error('insufficient funds');
|
|
@@ -10527,7 +10520,6 @@ exports.getExplorerTxUrl = getExplorerTxUrl;
|
|
|
10527
10520
|
exports.getExplorerUrl = getExplorerUrl;
|
|
10528
10521
|
exports.getPrefix = getPrefix;
|
|
10529
10522
|
exports.getTxType = getTxType;
|
|
10530
|
-
exports.isAssetRuneNative = isAssetRuneNative;
|
|
10531
10523
|
exports.isBroadcastSuccess = isBroadcastSuccess;
|
|
10532
10524
|
exports.msgNativeTxFromJson = msgNativeTxFromJson;
|
|
10533
10525
|
exports.registerDepositCodecs = registerDepositCodecs;
|
package/lib/util.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cosmosclient, proto } from '@cosmos-client/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Balance, Fees, Network, TxHash } from '@xchainjs/xchain-client';
|
|
3
3
|
import { CosmosSDKClient, TxLog } from '@xchainjs/xchain-cosmos';
|
|
4
|
-
import { Asset, BaseAmount } from '@xchainjs/xchain-util';
|
|
4
|
+
import { Address, Asset, BaseAmount } from '@xchainjs/xchain-util';
|
|
5
5
|
import Long from 'long';
|
|
6
6
|
import { ChainId, ChainIds, ClientUrl, ExplorerUrls, TxData } from './types';
|
|
7
7
|
import { MsgNativeTx } from './types/messages';
|
|
@@ -10,13 +10,6 @@ export declare const DEFAULT_GAS_ADJUSTMENT = 2;
|
|
|
10
10
|
export declare const DEFAULT_GAS_LIMIT_VALUE = "4000000";
|
|
11
11
|
export declare const DEPOSIT_GAS_LIMIT_VALUE = "600000000";
|
|
12
12
|
export declare const MAX_TX_COUNT = 100;
|
|
13
|
-
/**
|
|
14
|
-
* Checks whether an asset is `AssetRuneNative`
|
|
15
|
-
*
|
|
16
|
-
* @param {Asset} asset
|
|
17
|
-
* @returns {boolean} `true` or `false`
|
|
18
|
-
*/
|
|
19
|
-
export declare const isAssetRuneNative: (asset: Asset) => boolean;
|
|
20
13
|
/**
|
|
21
14
|
* Get denomination from Asset
|
|
22
15
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-thorchain",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.1",
|
|
4
4
|
"description": "Custom Thorchain client and utilities used by XChainJS clients",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"THORChain",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"generate:ThorchainMsgs": "./genMsgs.sh"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@cosmos-client/core": "
|
|
37
|
+
"@cosmos-client/core": "0.45.13",
|
|
38
38
|
"@types/big.js": "^6.0.0",
|
|
39
|
-
"@xchainjs/xchain-client": "^0.
|
|
40
|
-
"@xchainjs/xchain-cosmos": "^0.
|
|
41
|
-
"@xchainjs/xchain-crypto": "^0.2.
|
|
42
|
-
"@xchainjs/xchain-util": "^0.
|
|
39
|
+
"@xchainjs/xchain-client": "^0.13.1",
|
|
40
|
+
"@xchainjs/xchain-cosmos": "^0.20.0",
|
|
41
|
+
"@xchainjs/xchain-crypto": "^0.2.6",
|
|
42
|
+
"@xchainjs/xchain-util": "^0.10.0",
|
|
43
43
|
"axios": "^0.25.0",
|
|
44
44
|
"bech32-buffer": "^0.2.0",
|
|
45
45
|
"nock": "^13.0.5"
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@cosmos-client/core": "
|
|
52
|
-
"@xchainjs/xchain-client": "^0.
|
|
51
|
+
"@cosmos-client/core": "0.45.13",
|
|
52
|
+
"@xchainjs/xchain-client": "^0.13.1",
|
|
53
53
|
"@xchainjs/xchain-cosmos": "^0.19.0",
|
|
54
|
-
"@xchainjs/xchain-crypto": "^0.2.
|
|
55
|
-
"@xchainjs/xchain-util": "^0.
|
|
54
|
+
"@xchainjs/xchain-crypto": "^0.2.6",
|
|
55
|
+
"@xchainjs/xchain-util": "^0.10.0",
|
|
56
56
|
"axios": "^0.25.0",
|
|
57
57
|
"bech32-buffer": "^0.2.0"
|
|
58
58
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,514 +0,0 @@
|
|
|
1
|
-
# v0.25.3 (2022-07-01)
|
|
2
|
-
|
|
3
|
-
## Update
|
|
4
|
-
|
|
5
|
-
- Latest "xchain-cosmos@0.19.0"
|
|
6
|
-
|
|
7
|
-
# v0.25.2 (2022-06-22)
|
|
8
|
-
|
|
9
|
-
## Update
|
|
10
|
-
|
|
11
|
-
- Latest `@cosmos-client/core@0.45.10`
|
|
12
|
-
- Latest "xchain-cosmos@0.18.0"
|
|
13
|
-
|
|
14
|
-
## Fix
|
|
15
|
-
|
|
16
|
-
- Fix `setNetwork` to create new instance of SDK client
|
|
17
|
-
|
|
18
|
-
# v0.25.1 (2022-06-17)
|
|
19
|
-
|
|
20
|
-
## Fix
|
|
21
|
-
|
|
22
|
-
- Remove estimation of gas in `transfer` and `deposit` (introduced by #564) in favour of using `DEFAULT_GAS_LIMIT_VALUE` or `DEPOSIT_GAS_LIMIT_VALUE` (both can be overridden by users in `transfer` or `deposit`)
|
|
23
|
-
- Increase `DEPOSIT_GAS_LIMIT_VALUE` to `600000000` (before `500000000`)
|
|
24
|
-
|
|
25
|
-
# v0.25.0 (2022-06-16)
|
|
26
|
-
|
|
27
|
-
## Fix
|
|
28
|
-
|
|
29
|
-
- Before sending a transaction, gas limits are estimated
|
|
30
|
-
- Helper `getEstimatedGas`
|
|
31
|
-
|
|
32
|
-
## Breaking changes
|
|
33
|
-
|
|
34
|
-
- Client's `transferOffline` requires `fromAccountNumber` and `fromSequence`
|
|
35
|
-
- Rename parameters in `transferOffline` to keep names in camel case (not snake case)
|
|
36
|
-
- Rename `DEFAULT_GAS_VALUE` to `DEFAULT_GAS_LIMIT_VALUE`
|
|
37
|
-
- Rename `DEPOSIT_GAS_VALUE` to `DEPOSIT_GAS_LIMIT_VALUE`
|
|
38
|
-
|
|
39
|
-
# v0.24.1 (2022-04-23)
|
|
40
|
-
|
|
41
|
-
## Fix
|
|
42
|
-
|
|
43
|
-
- Increase `DEFAULT_GAS_VALUE` to `4000000` (before `3000000`)
|
|
44
|
-
|
|
45
|
-
# v0.24.0 (2022-03-23)
|
|
46
|
-
|
|
47
|
-
## Update
|
|
48
|
-
|
|
49
|
-
- upgraded to "@cosmos-client/core": "0.45.1"
|
|
50
|
-
- client now extend BaseXChainClient
|
|
51
|
-
|
|
52
|
-
## Breaking Changes
|
|
53
|
-
|
|
54
|
-
- `buildDepositTx` now returns `proto.cosmos.tx.v1beta1.TxBody` from `@cosmos-client/core`
|
|
55
|
-
|
|
56
|
-
# v0.23.0 (2022-03-08)
|
|
57
|
-
|
|
58
|
-
## Add
|
|
59
|
-
|
|
60
|
-
- Helpers `getChainId` + `getChainIds`
|
|
61
|
-
|
|
62
|
-
## Breaking change
|
|
63
|
-
|
|
64
|
-
- `chainIds: ChainIds` is required to initialize `Client`
|
|
65
|
-
|
|
66
|
-
## Fix
|
|
67
|
-
|
|
68
|
-
- Request fees from THORChain and use `defaultFees` in case of server errors only
|
|
69
|
-
- Fix `defaultFees` to be 0.02 RUNE
|
|
70
|
-
|
|
71
|
-
# v0.22.2 (2022-02-17)
|
|
72
|
-
|
|
73
|
-
## Fix
|
|
74
|
-
|
|
75
|
-
- Request fees from THORChain and use `defaultFees` in case of server errors only
|
|
76
|
-
- Fix `defaultFees` to be 0.02 RUNE
|
|
77
|
-
|
|
78
|
-
# v0.22.1 (2022-02-16)
|
|
79
|
-
|
|
80
|
-
## Fix
|
|
81
|
-
|
|
82
|
-
- Increase limit for `DEFAULT_GAS_VALUE` from 2000000 to 3000000 to accommodate recent increases in gas used that go above the old limit
|
|
83
|
-
|
|
84
|
-
# v0.22.0 (2022-02-06)
|
|
85
|
-
|
|
86
|
-
## Add
|
|
87
|
-
|
|
88
|
-
- Option to pass `ChainIds` into constructor
|
|
89
|
-
- getter / setter for `chainId` in `Client`
|
|
90
|
-
|
|
91
|
-
## Breaking change
|
|
92
|
-
|
|
93
|
-
- `buildDepositTx` needs `chainId` to be passed - all params are set as object
|
|
94
|
-
- Remove `enum ChainId` + `getChainId` + `isChainId` from `utils`
|
|
95
|
-
|
|
96
|
-
# v0.21.2 (2022-02-04)
|
|
97
|
-
|
|
98
|
-
## Fix
|
|
99
|
-
|
|
100
|
-
- Use latest axios@0.25.0
|
|
101
|
-
- xchain-client@0.11.1
|
|
102
|
-
- @xchainjs/xchain-util@0.5.1
|
|
103
|
-
- @xchainjs/xchain-cosmos@0.16.1
|
|
104
|
-
|
|
105
|
-
# v.0.21.1 (2022-02-04)
|
|
106
|
-
|
|
107
|
-
## Fix
|
|
108
|
-
|
|
109
|
-
- Fix chain id for `testnet` #477
|
|
110
|
-
|
|
111
|
-
## Add
|
|
112
|
-
|
|
113
|
-
- Helper `isChainId`
|
|
114
|
-
- `enum ChainId`
|
|
115
|
-
|
|
116
|
-
# v.0.21.0 (2022-02-02)
|
|
117
|
-
|
|
118
|
-
## Breaking change
|
|
119
|
-
|
|
120
|
-
- Remove `getDenomWithChain`
|
|
121
|
-
- Rename `getAsset` -> `assetFromDenom` (incl. fix to get synth asset properly)
|
|
122
|
-
|
|
123
|
-
## Update
|
|
124
|
-
|
|
125
|
-
- xchain-util@0.5.0
|
|
126
|
-
- xchain-cosmos@0.16.0
|
|
127
|
-
|
|
128
|
-
## Add
|
|
129
|
-
|
|
130
|
-
- `isAssetNativeRune` helper
|
|
131
|
-
- Add `TxOfflineParams` type
|
|
132
|
-
|
|
133
|
-
## Fix
|
|
134
|
-
|
|
135
|
-
- Fix synth notation in `transfer|transferOffline|deposit` #473
|
|
136
|
-
|
|
137
|
-
# v0.20.1 (2022-01-11)
|
|
138
|
-
|
|
139
|
-
## Fix
|
|
140
|
-
|
|
141
|
-
- Get chain ID from THORNode before posting to deposit handler.
|
|
142
|
-
|
|
143
|
-
# v.0.20.0 (2021-12-29)
|
|
144
|
-
|
|
145
|
-
## Breaking change
|
|
146
|
-
|
|
147
|
-
- Add stagenet environment handling for `Network` and `BaseXChainClient` to client
|
|
148
|
-
|
|
149
|
-
# v.0.19.5 (2021-11-22)
|
|
150
|
-
|
|
151
|
-
## Add
|
|
152
|
-
|
|
153
|
-
- Provide `transferOffline` method
|
|
154
|
-
|
|
155
|
-
# v.0.19.4 (2021-11-22)
|
|
156
|
-
|
|
157
|
-
## Add
|
|
158
|
-
|
|
159
|
-
- Provide `getPubKey` method to access public key
|
|
160
|
-
|
|
161
|
-
## Change
|
|
162
|
-
|
|
163
|
-
- Make `getPrivKey` method `public` to access private key
|
|
164
|
-
|
|
165
|
-
# v.0.19.3 (2021-10-31)
|
|
166
|
-
|
|
167
|
-
## Update
|
|
168
|
-
|
|
169
|
-
- Use latest `xchain-cosmos@0.13.8` to use `sync` mode for broadcasting txs
|
|
170
|
-
|
|
171
|
-
# v.0.19.2 (2021-09-27)
|
|
172
|
-
|
|
173
|
-
## Fix
|
|
174
|
-
|
|
175
|
-
- Increase `gas` to `500,000,000` (five hundred million)
|
|
176
|
-
|
|
177
|
-
# v.0.19.1 (2021-09-26)
|
|
178
|
-
|
|
179
|
-
## Fix
|
|
180
|
-
|
|
181
|
-
- Increase `gas` to `30,000,000` (thirty million)
|
|
182
|
-
|
|
183
|
-
# v.0.19.0 (2021-09-10)
|
|
184
|
-
|
|
185
|
-
## Breaking change
|
|
186
|
-
|
|
187
|
-
- Extract `buildDepositTx` from `Client` into `utils`
|
|
188
|
-
|
|
189
|
-
## Add
|
|
190
|
-
|
|
191
|
-
- Add `getBalance` to `utils`
|
|
192
|
-
|
|
193
|
-
# v.0.18.0 (2021-09-08)
|
|
194
|
-
|
|
195
|
-
## Add
|
|
196
|
-
|
|
197
|
-
- Make `buildDepositTx` public and overrides its fee
|
|
198
|
-
- Add `DEPOSIT_GAS_VALUE`
|
|
199
|
-
|
|
200
|
-
## Breaking change
|
|
201
|
-
|
|
202
|
-
- Remove `AssetRune` in favour of using `AssetRuneNative` of `xchain-util` only
|
|
203
|
-
- Extract `getChainId` into `util` module
|
|
204
|
-
|
|
205
|
-
# v.0.17.7 (2021-07-20)
|
|
206
|
-
|
|
207
|
-
## Fix
|
|
208
|
-
|
|
209
|
-
- cosmos 0.42.x has too many breaking changes that wren't caught in the last version, downgrade "cosmos-client": "0.39.2"
|
|
210
|
-
|
|
211
|
-
# v.0.17.6 (2021-07-19)
|
|
212
|
-
|
|
213
|
-
## Update
|
|
214
|
-
|
|
215
|
-
- bumping peer dependency "cosmos-client": "0.39.2" -> "cosmos-client": "^0.42.7"
|
|
216
|
-
|
|
217
|
-
# v.0.17.5 (2021-07-18)
|
|
218
|
-
|
|
219
|
-
## Update
|
|
220
|
-
|
|
221
|
-
- Updated rollupjs to include axios to enlable usage on node
|
|
222
|
-
|
|
223
|
-
# v.0.17.4 (2021-07-14)
|
|
224
|
-
|
|
225
|
-
### Fix
|
|
226
|
-
|
|
227
|
-
- Bump `fee.gas to `25000000` (twenty five million) to try to avoid failing withdraw txs
|
|
228
|
-
|
|
229
|
-
# v.0.17.3 (2021-07-07)
|
|
230
|
-
|
|
231
|
-
## Update
|
|
232
|
-
|
|
233
|
-
- Use latest `xchain-client@0.10.1` + `xchain-util@0.3.0`
|
|
234
|
-
|
|
235
|
-
# v.0.17.2 (2021-07-05)
|
|
236
|
-
|
|
237
|
-
## Fix
|
|
238
|
-
|
|
239
|
-
- refactored client methods to use regular method syntax (not fat arrow) in order for bcall to super.xxx() to work properly
|
|
240
|
-
|
|
241
|
-
# v.0.17.1 (2021-06-29)
|
|
242
|
-
|
|
243
|
-
### Fix
|
|
244
|
-
|
|
245
|
-
- Stick with `cosmos-client@0.39.2`
|
|
246
|
-
|
|
247
|
-
### Add
|
|
248
|
-
|
|
249
|
-
- Add examples to README
|
|
250
|
-
|
|
251
|
-
# v.0.17.0 (2021-06-21)
|
|
252
|
-
|
|
253
|
-
### Fix
|
|
254
|
-
|
|
255
|
-
- Fix `to` / `from` addresses by parsing tx data from event logs
|
|
256
|
-
|
|
257
|
-
### Breaking change
|
|
258
|
-
|
|
259
|
-
- Remove deprecated `getTxDataFromResponse` helper
|
|
260
|
-
|
|
261
|
-
# v.0.16.1 (2021-06-14)
|
|
262
|
-
|
|
263
|
-
### Fix
|
|
264
|
-
|
|
265
|
-
- Double `fee.gas to `20000000` (twenty million) to avoid failing withdraw transactions
|
|
266
|
-
|
|
267
|
-
# v.0.16.0 (2021-06-08)
|
|
268
|
-
|
|
269
|
-
### Breaking change
|
|
270
|
-
|
|
271
|
-
- Use `viewblock` as default explorer
|
|
272
|
-
- [types] Refactored structure of explorer urls (via `type ExplorerUrls`)
|
|
273
|
-
- [types] Refactored `ExplorerUrl`
|
|
274
|
-
- [client] Constructor accepts `ExplorerUrls`
|
|
275
|
-
- [client] Removed `getExplorerNodeUrl` (use `getExplorerAddressUrl` instead)
|
|
276
|
-
- [client] Extract `getDefaultClientUrl` into `utils`
|
|
277
|
-
- [utils] Renamed `getDefaultExplorerUrlByNetwork` -> `getDefaultExplorerUrl`
|
|
278
|
-
- [utils] Removed `getDefaultExplorerAddressUrl`, `getDefaultExplorerNodeUrl`, `getDefaultExplorerTxUrl`
|
|
279
|
-
- [utils] Added `getExplorerTxUrl`, `getExplorerAddressUrl`, `getExplorerUrl` helpers
|
|
280
|
-
|
|
281
|
-
# v.0.15.2 (2021-06-01)
|
|
282
|
-
|
|
283
|
-
### Update
|
|
284
|
-
|
|
285
|
-
- updated peer deps
|
|
286
|
-
|
|
287
|
-
# v.0.15.0 (2021-05-17)
|
|
288
|
-
|
|
289
|
-
### Breaking change
|
|
290
|
-
|
|
291
|
-
- added support for HD wallets
|
|
292
|
-
|
|
293
|
-
# v.0.14.0 (2021-05-05)
|
|
294
|
-
|
|
295
|
-
### Breaking change
|
|
296
|
-
|
|
297
|
-
- Latest @xchainjs/xchain-client@0.8.0
|
|
298
|
-
- Latest @xchainjs/xchain-util@0.2.7
|
|
299
|
-
|
|
300
|
-
# v.0.13.7 (2021-04-21)
|
|
301
|
-
|
|
302
|
-
### Update
|
|
303
|
-
|
|
304
|
-
- Export `MSG_SEND` `MSG_DEPOSIT` `MAX_COUNT`
|
|
305
|
-
- Added `getCosmosClient()`
|
|
306
|
-
- Extend `getTransactions` parameters with an optional `filterFn`
|
|
307
|
-
|
|
308
|
-
# v.0.13.6 (2021-04-16)
|
|
309
|
-
|
|
310
|
-
### Update
|
|
311
|
-
|
|
312
|
-
- Set `fee.gas` to `10000000` (ten million) in `deposit` due to failing withdraw transactions
|
|
313
|
-
|
|
314
|
-
# v.0.13.5 (2021-04-16)
|
|
315
|
-
|
|
316
|
-
### Update
|
|
317
|
-
|
|
318
|
-
- Set `fee.gas` to `1000000` (one million) in `deposit`
|
|
319
|
-
|
|
320
|
-
# v.0.13.4 (2021-04-16)
|
|
321
|
-
|
|
322
|
-
### Update
|
|
323
|
-
|
|
324
|
-
- Set `fee.gas` to `auto` in `deposit`
|
|
325
|
-
- Try sending `deposit` tx up to 3x
|
|
326
|
-
- Updates `DEFAULT_GAS_VALUE` to `2000000`
|
|
327
|
-
|
|
328
|
-
# v.0.13.3 (2021-04-12)
|
|
329
|
-
|
|
330
|
-
### Breaking changes
|
|
331
|
-
|
|
332
|
-
- Change `/addresses` to `/address` for explorer url.
|
|
333
|
-
|
|
334
|
-
### Update
|
|
335
|
-
|
|
336
|
-
- Add util helpers for explorer urls.
|
|
337
|
-
|
|
338
|
-
# v.0.13.2 (2021-04-01)
|
|
339
|
-
|
|
340
|
-
### Update
|
|
341
|
-
|
|
342
|
-
- Updates `getDefaultClientUrl` to use new mainnet endpoints
|
|
343
|
-
|
|
344
|
-
# v.0.13.1 (2021-03-18)
|
|
345
|
-
|
|
346
|
-
### Fix
|
|
347
|
-
|
|
348
|
-
- Changed `getDefaultExplorerUrl` to return valid urls
|
|
349
|
-
|
|
350
|
-
# v.0.13.0 (2021-03-02)
|
|
351
|
-
|
|
352
|
-
### Breaking change
|
|
353
|
-
|
|
354
|
-
- replace `find`, `findIndex`
|
|
355
|
-
- Update @xchainjs/xchain-client package to 0.7.0
|
|
356
|
-
- Update @xchainjs/xchain-cosmos package to 0.11.0
|
|
357
|
-
|
|
358
|
-
# v.0.12.0 (2021-02-24)
|
|
359
|
-
|
|
360
|
-
### Breaking change
|
|
361
|
-
|
|
362
|
-
- Update @xchainjs/xchain-client package to 0.6.0
|
|
363
|
-
- Update @xchainjs/xchain-cosmos package to 0.10.0
|
|
364
|
-
- Update `getBalance`
|
|
365
|
-
|
|
366
|
-
# v.0.11.1 (2021-02-24)
|
|
367
|
-
|
|
368
|
-
### Breaking change
|
|
369
|
-
|
|
370
|
-
- Update @xchainjs/xchain-cosmos package to 0.9.0
|
|
371
|
-
|
|
372
|
-
### Fix
|
|
373
|
-
|
|
374
|
-
- Fix `getTransactions` - sort transactions from latest
|
|
375
|
-
- Fix `DECIMAL`
|
|
376
|
-
|
|
377
|
-
# v.0.11.0 (2021-02-19)
|
|
378
|
-
|
|
379
|
-
### Breaking change
|
|
380
|
-
|
|
381
|
-
- Update @xchainjs/xchain-client package to 0.5.0
|
|
382
|
-
|
|
383
|
-
### Update
|
|
384
|
-
|
|
385
|
-
- Add `Service Providers` section in README.md
|
|
386
|
-
|
|
387
|
-
### Fix
|
|
388
|
-
|
|
389
|
-
- Fix `peerDependencies`
|
|
390
|
-
|
|
391
|
-
# v.0.10.1 (2021-02-05)
|
|
392
|
-
|
|
393
|
-
### Update
|
|
394
|
-
|
|
395
|
-
- Update `getTransactions` to support incoming transactions
|
|
396
|
-
|
|
397
|
-
### Breaking change
|
|
398
|
-
|
|
399
|
-
- Update @xchainjs/xchain-client package to 0.4.0
|
|
400
|
-
- Update @xchainjs/xchain-crypto package to 0.2.3
|
|
401
|
-
|
|
402
|
-
# v.0.10.0 (2021-02-03)
|
|
403
|
-
|
|
404
|
-
### Breaking changes
|
|
405
|
-
|
|
406
|
-
- Change `getTransactions` to use tendermint rpc. (transaction query from the latest ones.)
|
|
407
|
-
|
|
408
|
-
# v.0.9.3 (2021-02-02)
|
|
409
|
-
|
|
410
|
-
### Update
|
|
411
|
-
|
|
412
|
-
- Add `getExplorerNodeUrl`
|
|
413
|
-
|
|
414
|
-
# v.0.9.2 (2021-01-30)
|
|
415
|
-
|
|
416
|
-
- Clear lib folder on build
|
|
417
|
-
|
|
418
|
-
# v.0.9.1 (2021-01-26)
|
|
419
|
-
|
|
420
|
-
### Fix
|
|
421
|
-
|
|
422
|
-
- Fix `deposit`. Use `/thorchain/deposit` to build a deposit transaction.
|
|
423
|
-
|
|
424
|
-
# v.0.9.0 (2021-01-15)
|
|
425
|
-
|
|
426
|
-
### Breaking change
|
|
427
|
-
|
|
428
|
-
- Move `getPrefix` to util
|
|
429
|
-
|
|
430
|
-
# v.0.8.0 (2021-01-13)
|
|
431
|
-
|
|
432
|
-
### Breaking change
|
|
433
|
-
|
|
434
|
-
- change MsgNativeTx.fromJson
|
|
435
|
-
|
|
436
|
-
# v.0.7.1 (2021-01-06)
|
|
437
|
-
|
|
438
|
-
### Fix
|
|
439
|
-
|
|
440
|
-
- Fix getTransactions pagination issue #168
|
|
441
|
-
|
|
442
|
-
### Update
|
|
443
|
-
|
|
444
|
-
- Update comments for documentation
|
|
445
|
-
|
|
446
|
-
# v.0.7.0 (2020-12-28)
|
|
447
|
-
|
|
448
|
-
### Breaking change
|
|
449
|
-
|
|
450
|
-
- Extract `getDefaultFees` from `Client` to `utils` #157
|
|
451
|
-
|
|
452
|
-
# v.0.6.2 (2020-12-23)
|
|
453
|
-
|
|
454
|
-
### Update
|
|
455
|
-
|
|
456
|
-
- Use latest xchain-client@0.2.1
|
|
457
|
-
|
|
458
|
-
### Fix
|
|
459
|
-
|
|
460
|
-
- Fix invalid assets comparison #151
|
|
461
|
-
|
|
462
|
-
### Breaking change
|
|
463
|
-
|
|
464
|
-
- Remove `validateAddress` from `ThorchainClient` #149
|
|
465
|
-
|
|
466
|
-
# v.0.6.1 (2020-12-18)
|
|
467
|
-
|
|
468
|
-
### Update
|
|
469
|
-
|
|
470
|
-
- Add `setClientUrl`
|
|
471
|
-
- Add `getDefaultClientUrl`
|
|
472
|
-
- Add `getClientUrlByNetwork`
|
|
473
|
-
|
|
474
|
-
### Fix
|
|
475
|
-
|
|
476
|
-
- Fix client url for multichain testnet (`https://testnet.thornode.thorchain.info`)
|
|
477
|
-
|
|
478
|
-
# v.0.6.0 (2020-12-16)
|
|
479
|
-
|
|
480
|
-
### Update
|
|
481
|
-
|
|
482
|
-
- Set the latest multi-chain node
|
|
483
|
-
- Update `getTransactionData`, `getTransactions`
|
|
484
|
-
- Update `transfer` (for `MsgSend`)
|
|
485
|
-
- Update `deposit` (for `MsgNativeTx`)
|
|
486
|
-
|
|
487
|
-
# v.0.5.0 (2020-12-11)
|
|
488
|
-
|
|
489
|
-
### Update
|
|
490
|
-
|
|
491
|
-
- Update dependencies
|
|
492
|
-
- Add `getDefaultFees`
|
|
493
|
-
|
|
494
|
-
# v.0.4.2 (2020-11-23)
|
|
495
|
-
|
|
496
|
-
### Fix
|
|
497
|
-
|
|
498
|
-
- Fix import of `cosmos/codec`
|
|
499
|
-
|
|
500
|
-
### Update
|
|
501
|
-
|
|
502
|
-
- Use latest `@xchainjs/cosmos@0.4.2`
|
|
503
|
-
|
|
504
|
-
# v.0.4.1 (2020-11-23)
|
|
505
|
-
|
|
506
|
-
### Update
|
|
507
|
-
|
|
508
|
-
- Update to latest `@xchainjs/*` packages and other dependencies
|
|
509
|
-
|
|
510
|
-
# v.0.4.0 (2020-11-20)
|
|
511
|
-
|
|
512
|
-
### Breaking change
|
|
513
|
-
|
|
514
|
-
- Update @xchainjs/xchain-crypto package to 0.2.0, deprecating old keystores
|