@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 +10 -1
- package/lib/client.d.ts +10 -4
- package/lib/index.esm.js +2926 -34
- package/lib/index.js +2926 -34
- package/lib/types/client-types.d.ts +3 -0
- package/lib/util.d.ts +8 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { cosmosclient } from '@cosmos-client/core';
|
|
2
2
|
import { Network, Tx, TxParams } from '@xchainjs/xchain-client';
|
|
3
3
|
import { Asset, BaseAmount } from '@xchainjs/xchain-util';
|
|
4
|
+
import BigNumber from 'bignumber.js';
|
|
4
5
|
export declare type NodeUrl = {
|
|
5
6
|
node: string;
|
|
6
7
|
rpc: string;
|
|
@@ -24,6 +25,7 @@ export declare type DepositParam = {
|
|
|
24
25
|
asset?: Asset;
|
|
25
26
|
amount: BaseAmount;
|
|
26
27
|
memo: string;
|
|
28
|
+
gasLimit?: BigNumber;
|
|
27
29
|
};
|
|
28
30
|
export declare type TxData = Pick<Tx, 'from' | 'to' | 'type'>;
|
|
29
31
|
export declare type TxOfflineParams = TxParams & {
|
|
@@ -38,6 +40,7 @@ export declare type TxOfflineParams = TxParams & {
|
|
|
38
40
|
fromAssetBalance?: BaseAmount;
|
|
39
41
|
fromAccountNumber: cosmosclient.Long.Long;
|
|
40
42
|
fromSequence: cosmosclient.Long.Long;
|
|
43
|
+
gasLimit?: BigNumber;
|
|
41
44
|
};
|
|
42
45
|
/**
|
|
43
46
|
* Response from `thorchain/constants` endpoint
|
package/lib/util.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { MsgNativeTx } from './types/messages';
|
|
|
7
7
|
export declare const DECIMAL = 8;
|
|
8
8
|
export declare const DEFAULT_GAS_ADJUSTMENT = 2;
|
|
9
9
|
export declare const DEFAULT_GAS_LIMIT_VALUE = "4000000";
|
|
10
|
-
export declare const DEPOSIT_GAS_LIMIT_VALUE = "
|
|
10
|
+
export declare const DEPOSIT_GAS_LIMIT_VALUE = "600000000";
|
|
11
11
|
export declare const MAX_TX_COUNT = 100;
|
|
12
12
|
/**
|
|
13
13
|
* Checks whether an asset is `AssetRuneNative`
|
|
@@ -102,6 +102,13 @@ export declare const buildUnsignedTx: ({ cosmosSdk, txBody, signerPubkey, sequen
|
|
|
102
102
|
sequence: cosmosclient.Long.Long;
|
|
103
103
|
gasLimit?: cosmosclient.Long.Long | undefined;
|
|
104
104
|
}) => cosmosclient.TxBuilder;
|
|
105
|
+
/**
|
|
106
|
+
* Estimates usage of gas
|
|
107
|
+
*
|
|
108
|
+
* Note: Be careful by using this helper function,
|
|
109
|
+
* it's still experimental and result might be incorrect.
|
|
110
|
+
* Change `multiplier` to get a valid estimation of gas.
|
|
111
|
+
*/
|
|
105
112
|
export declare const getEstimatedGas: ({ cosmosSDKClient, txBody, privKey, accountNumber, accountSequence, multiplier, }: {
|
|
106
113
|
cosmosSDKClient: CosmosSDKClient;
|
|
107
114
|
txBody: proto.cosmos.tx.v1beta1.TxBody;
|