@xchainjs/xchain-thorchain 0.25.0 → 0.25.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/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
- # v0.25.0 (2022-05-10)
1
+ # v0.25.1 (2022-06-17)
2
+
3
+ ## Fix
4
+
5
+ - 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`)
6
+ - Increase `DEPOSIT_GAS_LIMIT_VALUE` to `600000000` (before `500000000`)
7
+
8
+ # v0.25.0 (2022-06-16)
2
9
 
3
10
  ## Fix
4
11
 
@@ -9,6 +16,8 @@
9
16
 
10
17
  - Client's `transferOffline` requires `fromAccountNumber` and `fromSequence`
11
18
  - Rename parameters in `transferOffline` to keep names in camel case (not snake case)
19
+ - Rename `DEFAULT_GAS_VALUE` to `DEFAULT_GAS_LIMIT_VALUE`
20
+ - Rename `DEPOSIT_GAS_VALUE` to `DEPOSIT_GAS_LIMIT_VALUE`
12
21
 
13
22
  # v0.24.1 (2022-04-23)
14
23
 
package/lib/client.d.ts CHANGED
@@ -2,6 +2,7 @@ import { cosmosclient, proto } from '@cosmos-client/core';
2
2
  import { Address, 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
4
  import { Asset } from '@xchainjs/xchain-util';
5
+ import BigNumber from 'bignumber.js';
5
6
  import { ChainId, ClientUrl, DepositParam, ExplorerUrls, NodeUrl, ThorchainClientParams, TxOfflineParams } from './types';
6
7
  /**
7
8
  * Interface for custom Thorchain client
@@ -182,23 +183,28 @@ declare class Client extends BaseXChainClient implements ThorchainClient, XChain
182
183
  * @returns {TxHash} The transaction hash.
183
184
  *
184
185
  * @throws {"insufficient funds"} Thrown if the wallet has insufficient funds.
185
- * @throws {"failed to broadcast transaction"} Thrown if failed to broadcast transaction.
186
+ * @throws {"Invalid transaction hash"} Thrown by missing tx hash
186
187
  */
187
- deposit({ walletIndex, asset, amount, memo }: DepositParam): Promise<TxHash>;
188
+ deposit({ walletIndex, asset, amount, memo, gasLimit, }: DepositParam): Promise<TxHash>;
188
189
  /**
189
190
  * Transfer balances with MsgSend
190
191
  *
191
192
  * @param {TxParams} params The transfer options.
192
193
  * @returns {TxHash} The transaction hash.
194
+ *
195
+ * @throws {"insufficient funds"} Thrown if the wallet has insufficient funds.
196
+ * @throws {"Invalid transaction hash"} Thrown by missing tx hash
193
197
  */
194
- transfer({ walletIndex, asset, amount, recipient, memo }: TxParams): Promise<TxHash>;
198
+ transfer({ walletIndex, asset, amount, recipient, memo, gasLimit, }: TxParams & {
199
+ gasLimit?: BigNumber;
200
+ }): Promise<TxHash>;
195
201
  /**
196
202
  * Transfer without broadcast balances with MsgSend
197
203
  *
198
204
  * @param {TxOfflineParams} params The transfer offline options.
199
205
  * @returns {string} The signed transaction bytes.
200
206
  */
201
- transferOffline({ walletIndex, asset, amount, recipient, memo, fromRuneBalance: from_rune_balance, fromAssetBalance: from_asset_balance, fromAccountNumber, fromSequence, }: TxOfflineParams): Promise<string>;
207
+ transferOffline({ walletIndex, asset, amount, recipient, memo, fromRuneBalance: from_rune_balance, fromAssetBalance: from_asset_balance, fromAccountNumber, fromSequence, gasLimit, }: TxOfflineParams): Promise<string>;
202
208
  /**
203
209
  * Gets fees from Node
204
210
  *