@xchainjs/xchain-thorchain 0.27.11 → 0.28.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 +228 -223
- package/lib/const.d.ts +51 -51
- package/lib/index.d.ts +4 -4
- package/lib/index.esm.js +4987 -4907
- package/lib/index.esm.js.map +1 -0
- package/lib/index.js +4997 -4898
- package/lib/index.js.map +1 -0
- package/lib/types/client-types.d.ts +92 -92
- package/lib/types/index.d.ts +2 -2
- package/lib/types/messages.d.ts +63 -63
- package/lib/utils.d.ts +196 -196
- package/package.json +12 -12
package/lib/client.d.ts
CHANGED
|
@@ -1,223 +1,228 @@
|
|
|
1
|
-
import cosmosclient from '@cosmos-client/core';
|
|
2
|
-
import { Balance, BaseXChainClient, Fees, Network, Tx, TxHash, TxHistoryParams, TxParams, TxsPage, XChainClient, XChainClientParams } from '@xchainjs/xchain-client';
|
|
3
|
-
import { CosmosSDKClient, RPCTxResult } from '@xchainjs/xchain-cosmos';
|
|
4
|
-
import { Address, Asset } from '@xchainjs/xchain-util';
|
|
5
|
-
import BigNumber from 'bignumber.js';
|
|
6
|
-
import { ChainId, ClientUrl, DepositParam, ExplorerUrls, NodeUrl, ThorchainClientParams, TxOfflineParams } from './types';
|
|
7
|
-
/**
|
|
8
|
-
* Interface for custom Thorchain client
|
|
9
|
-
*/
|
|
10
|
-
export interface ThorchainClient {
|
|
11
|
-
setClientUrl(clientUrl: ClientUrl): void;
|
|
12
|
-
getClientUrl(): NodeUrl;
|
|
13
|
-
setExplorerUrls(explorerUrls: ExplorerUrls): void;
|
|
14
|
-
getCosmosClient(): CosmosSDKClient;
|
|
15
|
-
deposit(params: DepositParam): Promise<TxHash>;
|
|
16
|
-
transferOffline(params: TxOfflineParams): Promise<string>;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Custom Thorchain Client
|
|
20
|
-
*/
|
|
21
|
-
declare class Client extends BaseXChainClient implements ThorchainClient, XChainClient {
|
|
22
|
-
private clientUrl;
|
|
23
|
-
private explorerUrls;
|
|
24
|
-
private chainIds;
|
|
25
|
-
private cosmosClient;
|
|
26
|
-
/**
|
|
27
|
-
* Constructor
|
|
28
|
-
*
|
|
29
|
-
* Client has to be initialised with network type and phrase.
|
|
30
|
-
* It will throw an error if an invalid phrase has been passed.
|
|
31
|
-
*
|
|
32
|
-
* @param {XChainClientParams} params
|
|
33
|
-
*
|
|
34
|
-
* @throws {"Invalid phrase"} Thrown if the given phase is invalid.
|
|
35
|
-
*/
|
|
36
|
-
constructor({ network, phrase, clientUrl, explorerUrls, rootDerivationPaths, chainIds, }: XChainClientParams & ThorchainClientParams);
|
|
37
|
-
/**
|
|
38
|
-
* Set/update the current network.
|
|
39
|
-
*
|
|
40
|
-
* @param {Network} network
|
|
41
|
-
* @returns {void}
|
|
42
|
-
*
|
|
43
|
-
* @throws {"Network must be provided"}
|
|
44
|
-
* Thrown if network has not been set before.
|
|
45
|
-
*/
|
|
46
|
-
setNetwork(network: Network): void;
|
|
47
|
-
/**
|
|
48
|
-
* Set/update the client URL.
|
|
49
|
-
*
|
|
50
|
-
* @param {ClientUrl} clientUrl The client url to be set.
|
|
51
|
-
* @returns {void}
|
|
52
|
-
*/
|
|
53
|
-
setClientUrl(clientUrl: ClientUrl): void;
|
|
54
|
-
/**
|
|
55
|
-
* Get the client url.
|
|
56
|
-
*
|
|
57
|
-
* @returns {NodeUrl} The client url for thorchain based on the current network.
|
|
58
|
-
*/
|
|
59
|
-
getClientUrl(): NodeUrl;
|
|
60
|
-
/**
|
|
61
|
-
* Set/update the explorer URLs.
|
|
62
|
-
*
|
|
63
|
-
* @param {ExplorerUrls} urls The explorer urls to be set.
|
|
64
|
-
* @returns {void}
|
|
65
|
-
*/
|
|
66
|
-
setExplorerUrls(urls: ExplorerUrls): void;
|
|
67
|
-
/**
|
|
68
|
-
* Get the explorer url.
|
|
69
|
-
*
|
|
70
|
-
* @returns {string} The explorer url for thorchain based on the current network.
|
|
71
|
-
*/
|
|
72
|
-
getExplorerUrl(): string;
|
|
73
|
-
/**
|
|
74
|
-
* Sets chain id
|
|
75
|
-
*
|
|
76
|
-
* @param {ChainId} chainId Chain id to update
|
|
77
|
-
* @param {Network} network (optional) Network for given chainId. If `network`not set, current network of the client is used
|
|
78
|
-
*
|
|
79
|
-
* @returns {void}
|
|
80
|
-
*/
|
|
81
|
-
setChainId(chainId: ChainId, network?: Network): void;
|
|
82
|
-
/**
|
|
83
|
-
* Gets chain id
|
|
84
|
-
*
|
|
85
|
-
* @param {Network} network (optional) Network to get chain id from. If `network`not set, current network of the client is used
|
|
86
|
-
*
|
|
87
|
-
* @returns {ChainId} Chain id based on the current network.
|
|
88
|
-
*/
|
|
89
|
-
getChainId(network?: Network): ChainId;
|
|
90
|
-
/**
|
|
91
|
-
* Get cosmos client
|
|
92
|
-
* @returns {CosmosSDKClient} current cosmos client
|
|
93
|
-
*/
|
|
94
|
-
getCosmosClient(): CosmosSDKClient;
|
|
95
|
-
/**
|
|
96
|
-
* Get the explorer url for the given address.
|
|
97
|
-
*
|
|
98
|
-
* @param {Address} address
|
|
99
|
-
* @returns {string} The explorer url for the given address.
|
|
100
|
-
*/
|
|
101
|
-
getExplorerAddressUrl(address: Address): string;
|
|
102
|
-
/**
|
|
103
|
-
* Get the explorer url for the given transaction id.
|
|
104
|
-
*
|
|
105
|
-
* @param {string} txID
|
|
106
|
-
* @returns {string} The explorer url for the given transaction id.
|
|
107
|
-
*/
|
|
108
|
-
getExplorerTxUrl(txID: string): string;
|
|
109
|
-
/**
|
|
110
|
-
* Get private key
|
|
111
|
-
*
|
|
112
|
-
* @param {number} index the HD wallet index (optional)
|
|
113
|
-
* @returns {PrivKey} The private key generated from the given phrase
|
|
114
|
-
*
|
|
115
|
-
* @throws {"Phrase not set"}
|
|
116
|
-
* Throws an error if phrase has not been set before
|
|
117
|
-
* */
|
|
118
|
-
getPrivateKey(index?: number): cosmosclient.proto.cosmos.crypto.secp256k1.PrivKey;
|
|
119
|
-
/**
|
|
120
|
-
* Get public key
|
|
121
|
-
*
|
|
122
|
-
* @param {number} index the HD wallet index (optional)
|
|
123
|
-
*
|
|
124
|
-
* @returns {PubKey} The public key generated from the given phrase
|
|
125
|
-
*
|
|
126
|
-
* @throws {"Phrase not set"}
|
|
127
|
-
* Throws an error if phrase has not been set before
|
|
128
|
-
**/
|
|
129
|
-
getPubKey(index?: number): cosmosclient.PubKey;
|
|
130
|
-
/**
|
|
131
|
-
* Get the current address.
|
|
132
|
-
*
|
|
133
|
-
* @returns {Address} The current address.
|
|
134
|
-
*
|
|
135
|
-
* @throws {Error} Thrown if phrase has not been set before. A phrase is needed to create a wallet and to derive an address from it.
|
|
136
|
-
*/
|
|
137
|
-
getAddress(index?: number): string;
|
|
138
|
-
/**
|
|
139
|
-
* Validate the given address.
|
|
140
|
-
*
|
|
141
|
-
* @param {Address} address
|
|
142
|
-
* @returns {boolean} `true` or `false`
|
|
143
|
-
*/
|
|
144
|
-
validateAddress(address: Address): boolean;
|
|
145
|
-
/**
|
|
146
|
-
* Get the balance of a given address.
|
|
147
|
-
*
|
|
148
|
-
* @param {Address} address By default, it will return the balance of the current wallet. (optional)
|
|
149
|
-
* @param {Asset} asset If not set, it will return all assets available. (optional)
|
|
150
|
-
* @returns {Balance[]} The balance of the address.
|
|
151
|
-
*/
|
|
152
|
-
getBalance(address: Address, assets?: Asset[]): Promise<Balance[]>;
|
|
153
|
-
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
*
|
|
172
|
-
* @
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
*
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
1
|
+
import cosmosclient from '@cosmos-client/core';
|
|
2
|
+
import { AssetInfo, Balance, BaseXChainClient, Fees, Network, Tx, TxHash, TxHistoryParams, TxParams, TxsPage, XChainClient, XChainClientParams } from '@xchainjs/xchain-client';
|
|
3
|
+
import { CosmosSDKClient, RPCTxResult } from '@xchainjs/xchain-cosmos';
|
|
4
|
+
import { Address, Asset } from '@xchainjs/xchain-util';
|
|
5
|
+
import BigNumber from 'bignumber.js';
|
|
6
|
+
import { ChainId, ClientUrl, DepositParam, ExplorerUrls, NodeUrl, ThorchainClientParams, TxOfflineParams } from './types';
|
|
7
|
+
/**
|
|
8
|
+
* Interface for custom Thorchain client
|
|
9
|
+
*/
|
|
10
|
+
export interface ThorchainClient {
|
|
11
|
+
setClientUrl(clientUrl: ClientUrl): void;
|
|
12
|
+
getClientUrl(): NodeUrl;
|
|
13
|
+
setExplorerUrls(explorerUrls: ExplorerUrls): void;
|
|
14
|
+
getCosmosClient(): CosmosSDKClient;
|
|
15
|
+
deposit(params: DepositParam): Promise<TxHash>;
|
|
16
|
+
transferOffline(params: TxOfflineParams): Promise<string>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Custom Thorchain Client
|
|
20
|
+
*/
|
|
21
|
+
declare class Client extends BaseXChainClient implements ThorchainClient, XChainClient {
|
|
22
|
+
private clientUrl;
|
|
23
|
+
private explorerUrls;
|
|
24
|
+
private chainIds;
|
|
25
|
+
private cosmosClient;
|
|
26
|
+
/**
|
|
27
|
+
* Constructor
|
|
28
|
+
*
|
|
29
|
+
* Client has to be initialised with network type and phrase.
|
|
30
|
+
* It will throw an error if an invalid phrase has been passed.
|
|
31
|
+
*
|
|
32
|
+
* @param {XChainClientParams} params
|
|
33
|
+
*
|
|
34
|
+
* @throws {"Invalid phrase"} Thrown if the given phase is invalid.
|
|
35
|
+
*/
|
|
36
|
+
constructor({ network, phrase, clientUrl, explorerUrls, rootDerivationPaths, chainIds, }: XChainClientParams & ThorchainClientParams);
|
|
37
|
+
/**
|
|
38
|
+
* Set/update the current network.
|
|
39
|
+
*
|
|
40
|
+
* @param {Network} network
|
|
41
|
+
* @returns {void}
|
|
42
|
+
*
|
|
43
|
+
* @throws {"Network must be provided"}
|
|
44
|
+
* Thrown if network has not been set before.
|
|
45
|
+
*/
|
|
46
|
+
setNetwork(network: Network): void;
|
|
47
|
+
/**
|
|
48
|
+
* Set/update the client URL.
|
|
49
|
+
*
|
|
50
|
+
* @param {ClientUrl} clientUrl The client url to be set.
|
|
51
|
+
* @returns {void}
|
|
52
|
+
*/
|
|
53
|
+
setClientUrl(clientUrl: ClientUrl): void;
|
|
54
|
+
/**
|
|
55
|
+
* Get the client url.
|
|
56
|
+
*
|
|
57
|
+
* @returns {NodeUrl} The client url for thorchain based on the current network.
|
|
58
|
+
*/
|
|
59
|
+
getClientUrl(): NodeUrl;
|
|
60
|
+
/**
|
|
61
|
+
* Set/update the explorer URLs.
|
|
62
|
+
*
|
|
63
|
+
* @param {ExplorerUrls} urls The explorer urls to be set.
|
|
64
|
+
* @returns {void}
|
|
65
|
+
*/
|
|
66
|
+
setExplorerUrls(urls: ExplorerUrls): void;
|
|
67
|
+
/**
|
|
68
|
+
* Get the explorer url.
|
|
69
|
+
*
|
|
70
|
+
* @returns {string} The explorer url for thorchain based on the current network.
|
|
71
|
+
*/
|
|
72
|
+
getExplorerUrl(): string;
|
|
73
|
+
/**
|
|
74
|
+
* Sets chain id
|
|
75
|
+
*
|
|
76
|
+
* @param {ChainId} chainId Chain id to update
|
|
77
|
+
* @param {Network} network (optional) Network for given chainId. If `network`not set, current network of the client is used
|
|
78
|
+
*
|
|
79
|
+
* @returns {void}
|
|
80
|
+
*/
|
|
81
|
+
setChainId(chainId: ChainId, network?: Network): void;
|
|
82
|
+
/**
|
|
83
|
+
* Gets chain id
|
|
84
|
+
*
|
|
85
|
+
* @param {Network} network (optional) Network to get chain id from. If `network`not set, current network of the client is used
|
|
86
|
+
*
|
|
87
|
+
* @returns {ChainId} Chain id based on the current network.
|
|
88
|
+
*/
|
|
89
|
+
getChainId(network?: Network): ChainId;
|
|
90
|
+
/**
|
|
91
|
+
* Get cosmos client
|
|
92
|
+
* @returns {CosmosSDKClient} current cosmos client
|
|
93
|
+
*/
|
|
94
|
+
getCosmosClient(): CosmosSDKClient;
|
|
95
|
+
/**
|
|
96
|
+
* Get the explorer url for the given address.
|
|
97
|
+
*
|
|
98
|
+
* @param {Address} address
|
|
99
|
+
* @returns {string} The explorer url for the given address.
|
|
100
|
+
*/
|
|
101
|
+
getExplorerAddressUrl(address: Address): string;
|
|
102
|
+
/**
|
|
103
|
+
* Get the explorer url for the given transaction id.
|
|
104
|
+
*
|
|
105
|
+
* @param {string} txID
|
|
106
|
+
* @returns {string} The explorer url for the given transaction id.
|
|
107
|
+
*/
|
|
108
|
+
getExplorerTxUrl(txID: string): string;
|
|
109
|
+
/**
|
|
110
|
+
* Get private key
|
|
111
|
+
*
|
|
112
|
+
* @param {number} index the HD wallet index (optional)
|
|
113
|
+
* @returns {PrivKey} The private key generated from the given phrase
|
|
114
|
+
*
|
|
115
|
+
* @throws {"Phrase not set"}
|
|
116
|
+
* Throws an error if phrase has not been set before
|
|
117
|
+
* */
|
|
118
|
+
getPrivateKey(index?: number): cosmosclient.proto.cosmos.crypto.secp256k1.PrivKey;
|
|
119
|
+
/**
|
|
120
|
+
* Get public key
|
|
121
|
+
*
|
|
122
|
+
* @param {number} index the HD wallet index (optional)
|
|
123
|
+
*
|
|
124
|
+
* @returns {PubKey} The public key generated from the given phrase
|
|
125
|
+
*
|
|
126
|
+
* @throws {"Phrase not set"}
|
|
127
|
+
* Throws an error if phrase has not been set before
|
|
128
|
+
**/
|
|
129
|
+
getPubKey(index?: number): cosmosclient.PubKey;
|
|
130
|
+
/**
|
|
131
|
+
* Get the current address.
|
|
132
|
+
*
|
|
133
|
+
* @returns {Address} The current address.
|
|
134
|
+
*
|
|
135
|
+
* @throws {Error} Thrown if phrase has not been set before. A phrase is needed to create a wallet and to derive an address from it.
|
|
136
|
+
*/
|
|
137
|
+
getAddress(index?: number): string;
|
|
138
|
+
/**
|
|
139
|
+
* Validate the given address.
|
|
140
|
+
*
|
|
141
|
+
* @param {Address} address
|
|
142
|
+
* @returns {boolean} `true` or `false`
|
|
143
|
+
*/
|
|
144
|
+
validateAddress(address: Address): boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Get the balance of a given address.
|
|
147
|
+
*
|
|
148
|
+
* @param {Address} address By default, it will return the balance of the current wallet. (optional)
|
|
149
|
+
* @param {Asset} asset If not set, it will return all assets available. (optional)
|
|
150
|
+
* @returns {Balance[]} The balance of the address.
|
|
151
|
+
*/
|
|
152
|
+
getBalance(address: Address, assets?: Asset[]): Promise<Balance[]>;
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* @returns asset info
|
|
156
|
+
*/
|
|
157
|
+
getAssetInfo(): AssetInfo;
|
|
158
|
+
/**
|
|
159
|
+
* Get transaction history of a given address with pagination options.
|
|
160
|
+
* By default it will return the transaction history of the current wallet.
|
|
161
|
+
*
|
|
162
|
+
* @param {TxHistoryParams} params The options to get transaction history. (optional)
|
|
163
|
+
* @returns {TxsPage} The transaction history.
|
|
164
|
+
*/
|
|
165
|
+
getTransactions: (params?: (TxHistoryParams & {
|
|
166
|
+
filterFn?: ((tx: RPCTxResult) => boolean) | undefined;
|
|
167
|
+
}) | undefined) => Promise<TxsPage>;
|
|
168
|
+
/**
|
|
169
|
+
* Get the transaction details of a given transaction id.
|
|
170
|
+
*
|
|
171
|
+
* @param {string} txId The transaction id.
|
|
172
|
+
* @returns {Tx} The transaction details of the given transaction id.
|
|
173
|
+
*/
|
|
174
|
+
getTransactionData(txId: string, address: Address): Promise<Tx>;
|
|
175
|
+
/** This function is used when in bound or outbound tx is not of thorchain
|
|
176
|
+
*
|
|
177
|
+
* @param txId - transaction hash
|
|
178
|
+
* @returns - Tx object
|
|
179
|
+
*/
|
|
180
|
+
private getTransactionDataThornode;
|
|
181
|
+
/**
|
|
182
|
+
* Get the transaction details of a given transaction id. (from /thorchain/txs/hash)
|
|
183
|
+
*
|
|
184
|
+
* Node: /thorchain/txs/hash response doesn't have timestamp field.
|
|
185
|
+
*
|
|
186
|
+
* @param {string} txId The transaction id.
|
|
187
|
+
* @returns {Tx} The transaction details of the given transaction id.
|
|
188
|
+
*/
|
|
189
|
+
getDepositTransaction(txId: string): Promise<Omit<Tx, 'date'>>;
|
|
190
|
+
/**
|
|
191
|
+
* Transaction with MsgNativeTx.
|
|
192
|
+
*
|
|
193
|
+
* @param {DepositParam} params The transaction options.
|
|
194
|
+
* @returns {TxHash} The transaction hash.
|
|
195
|
+
*
|
|
196
|
+
* @throws {"insufficient funds"} Thrown if the wallet has insufficient funds.
|
|
197
|
+
* @throws {"Invalid transaction hash"} Thrown by missing tx hash
|
|
198
|
+
*/
|
|
199
|
+
deposit({ walletIndex, asset, amount, memo, gasLimit, sequence, }: DepositParam): Promise<TxHash>;
|
|
200
|
+
/**
|
|
201
|
+
* Transfer balances with MsgSend
|
|
202
|
+
*
|
|
203
|
+
* @param {TxParams} params The transfer options.
|
|
204
|
+
* @returns {TxHash} The transaction hash.
|
|
205
|
+
*
|
|
206
|
+
* @throws {"insufficient funds"} Thrown if the wallet has insufficient funds.
|
|
207
|
+
* @throws {"Invalid transaction hash"} Thrown by missing tx hash
|
|
208
|
+
*/
|
|
209
|
+
transfer({ walletIndex, asset, amount, recipient, memo, gasLimit, sequence, }: TxParams & {
|
|
210
|
+
gasLimit?: BigNumber;
|
|
211
|
+
sequence?: number;
|
|
212
|
+
}): Promise<TxHash>;
|
|
213
|
+
broadcastTx(txHex: string): Promise<TxHash>;
|
|
214
|
+
/**
|
|
215
|
+
* Transfer without broadcast balances with MsgSend
|
|
216
|
+
*
|
|
217
|
+
* @param {TxOfflineParams} params The transfer offline options.
|
|
218
|
+
* @returns {string} The signed transaction bytes.
|
|
219
|
+
*/
|
|
220
|
+
transferOffline({ walletIndex, asset, amount, recipient, memo, fromRuneBalance: from_rune_balance, fromAssetBalance: from_asset_balance, fromAccountNumber, fromSequence, gasLimit, }: TxOfflineParams): Promise<string>;
|
|
221
|
+
/**
|
|
222
|
+
* Gets fees from Node
|
|
223
|
+
*
|
|
224
|
+
* @returns {Fees}
|
|
225
|
+
*/
|
|
226
|
+
getFees(): Promise<Fees>;
|
|
227
|
+
}
|
|
228
|
+
export { Client };
|
package/lib/const.d.ts
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { Asset } from '@xchainjs/xchain-util/lib';
|
|
2
|
-
import { ExplorerUrls } from './types';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const DEFAULT_GAS_ADJUSTMENT = 2;
|
|
5
|
-
export declare const DEFAULT_GAS_LIMIT_VALUE = "4000000";
|
|
6
|
-
export declare const DEPOSIT_GAS_LIMIT_VALUE = "600000000";
|
|
7
|
-
export declare const MAX_TX_COUNT_PER_PAGE = 100;
|
|
8
|
-
export declare const MAX_TX_COUNT_PER_FUNCTION_CALL = 500;
|
|
9
|
-
export declare const MAX_PAGES_PER_FUNCTION_CALL = 15;
|
|
10
|
-
export declare const RUNE_SYMBOL = "\u16B1";
|
|
11
|
-
export declare const defaultExplorerUrls: ExplorerUrls;
|
|
12
|
-
/**
|
|
13
|
-
* Chain identifier for Thorchain
|
|
14
|
-
*
|
|
15
|
-
*/
|
|
16
|
-
export declare const THORChain: "THOR";
|
|
17
|
-
/**
|
|
18
|
-
* Base "chain" asset for RUNE-67C on Binance test net.
|
|
19
|
-
*
|
|
20
|
-
* Based on definition in Thorchain `common`
|
|
21
|
-
* @see https://gitlab.com/thorchain/thornode/-/blob/master/common/asset.go#L12-24
|
|
22
|
-
*/
|
|
23
|
-
export declare const AssetRune67C: Asset;
|
|
24
|
-
/**
|
|
25
|
-
* Base "chain" asset for RUNE-B1A on Binance main net.
|
|
26
|
-
*
|
|
27
|
-
* Based on definition in Thorchain `common`
|
|
28
|
-
* @see https://gitlab.com/thorchain/thornode/-/blob/master/common/asset.go#L12-24
|
|
29
|
-
*/
|
|
30
|
-
export declare const AssetRuneB1A: Asset;
|
|
31
|
-
/**
|
|
32
|
-
* Base "chain" asset on thorchain main net.
|
|
33
|
-
*
|
|
34
|
-
* Based on definition in Thorchain `common`
|
|
35
|
-
* @see https://gitlab.com/thorchain/thornode/-/blob/master/common/asset.go#L12-24
|
|
36
|
-
*/
|
|
37
|
-
export declare const AssetRuneNative: Asset;
|
|
38
|
-
/**
|
|
39
|
-
* Base "chain" asset for RUNE on ethereum main net.
|
|
40
|
-
*
|
|
41
|
-
* Based on definition in Thorchain `common`
|
|
42
|
-
* @see https://gitlab.com/thorchain/thornode/-/blob/master/common/asset.go#L12-24
|
|
43
|
-
*/
|
|
44
|
-
export declare const AssetRuneERC20: Asset;
|
|
45
|
-
/**
|
|
46
|
-
* Base "chain" asset for RUNE on ethereum main net.
|
|
47
|
-
*
|
|
48
|
-
* Based on definition in Thorchain `common`
|
|
49
|
-
* @see https://gitlab.com/thorchain/thornode/-/blob/master/common/asset.go#L12-24
|
|
50
|
-
*/
|
|
51
|
-
export declare const AssetRuneERC20Testnet: Asset;
|
|
1
|
+
import { Asset } from '@xchainjs/xchain-util/lib';
|
|
2
|
+
import { ExplorerUrls } from './types';
|
|
3
|
+
export declare const RUNE_DECIMAL = 8;
|
|
4
|
+
export declare const DEFAULT_GAS_ADJUSTMENT = 2;
|
|
5
|
+
export declare const DEFAULT_GAS_LIMIT_VALUE = "4000000";
|
|
6
|
+
export declare const DEPOSIT_GAS_LIMIT_VALUE = "600000000";
|
|
7
|
+
export declare const MAX_TX_COUNT_PER_PAGE = 100;
|
|
8
|
+
export declare const MAX_TX_COUNT_PER_FUNCTION_CALL = 500;
|
|
9
|
+
export declare const MAX_PAGES_PER_FUNCTION_CALL = 15;
|
|
10
|
+
export declare const RUNE_SYMBOL = "\u16B1";
|
|
11
|
+
export declare const defaultExplorerUrls: ExplorerUrls;
|
|
12
|
+
/**
|
|
13
|
+
* Chain identifier for Thorchain
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
export declare const THORChain: "THOR";
|
|
17
|
+
/**
|
|
18
|
+
* Base "chain" asset for RUNE-67C on Binance test net.
|
|
19
|
+
*
|
|
20
|
+
* Based on definition in Thorchain `common`
|
|
21
|
+
* @see https://gitlab.com/thorchain/thornode/-/blob/master/common/asset.go#L12-24
|
|
22
|
+
*/
|
|
23
|
+
export declare const AssetRune67C: Asset;
|
|
24
|
+
/**
|
|
25
|
+
* Base "chain" asset for RUNE-B1A on Binance main net.
|
|
26
|
+
*
|
|
27
|
+
* Based on definition in Thorchain `common`
|
|
28
|
+
* @see https://gitlab.com/thorchain/thornode/-/blob/master/common/asset.go#L12-24
|
|
29
|
+
*/
|
|
30
|
+
export declare const AssetRuneB1A: Asset;
|
|
31
|
+
/**
|
|
32
|
+
* Base "chain" asset on thorchain main net.
|
|
33
|
+
*
|
|
34
|
+
* Based on definition in Thorchain `common`
|
|
35
|
+
* @see https://gitlab.com/thorchain/thornode/-/blob/master/common/asset.go#L12-24
|
|
36
|
+
*/
|
|
37
|
+
export declare const AssetRuneNative: Asset;
|
|
38
|
+
/**
|
|
39
|
+
* Base "chain" asset for RUNE on ethereum main net.
|
|
40
|
+
*
|
|
41
|
+
* Based on definition in Thorchain `common`
|
|
42
|
+
* @see https://gitlab.com/thorchain/thornode/-/blob/master/common/asset.go#L12-24
|
|
43
|
+
*/
|
|
44
|
+
export declare const AssetRuneERC20: Asset;
|
|
45
|
+
/**
|
|
46
|
+
* Base "chain" asset for RUNE on ethereum main net.
|
|
47
|
+
*
|
|
48
|
+
* Based on definition in Thorchain `common`
|
|
49
|
+
* @see https://gitlab.com/thorchain/thornode/-/blob/master/common/asset.go#L12-24
|
|
50
|
+
*/
|
|
51
|
+
export declare const AssetRuneERC20Testnet: Asset;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './client';
|
|
2
|
-
export * from './types';
|
|
3
|
-
export * from './utils';
|
|
4
|
-
export * from './const';
|
|
1
|
+
export * from './client';
|
|
2
|
+
export * from './types';
|
|
3
|
+
export * from './utils';
|
|
4
|
+
export * from './const';
|