@xchainjs/xchain-thorchain 0.28.0 → 0.28.2

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import cosmosclient from '@cosmos-client/core';
2
- import { Balance, BaseXChainClient, Fees, Network, Tx, TxHash, TxHistoryParams, TxParams, TxsPage, XChainClient, XChainClientParams } from '@xchainjs/xchain-client';
2
+ import { AssetInfo, 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 { Address, Asset } from '@xchainjs/xchain-util';
5
5
  import BigNumber from 'bignumber.js';
@@ -150,6 +150,11 @@ declare class Client extends BaseXChainClient implements ThorchainClient, XChain
150
150
  * @returns {Balance[]} The balance of the address.
151
151
  */
152
152
  getBalance(address: Address, assets?: Asset[]): Promise<Balance[]>;
153
+ /**
154
+ *
155
+ * @returns asset info
156
+ */
157
+ getAssetInfo(): AssetInfo;
153
158
  /**
154
159
  * Get transaction history of a given address with pagination options.
155
160
  * By default it will return the transaction history of the current wallet.
@@ -160,13 +165,19 @@ declare class Client extends BaseXChainClient implements ThorchainClient, XChain
160
165
  getTransactions: (params?: (TxHistoryParams & {
161
166
  filterFn?: ((tx: RPCTxResult) => boolean) | undefined;
162
167
  }) | undefined) => Promise<TxsPage>;
168
+ /**
169
+ *
170
+ * @param txId - tx hash
171
+ * @returns txResponse
172
+ */
173
+ fetchTransaction(txId: string): Promise<import("@xchainjs/xchain-cosmos").TxResponse | null>;
163
174
  /**
164
175
  * Get the transaction details of a given transaction id.
165
176
  *
166
177
  * @param {string} txId The transaction id.
167
178
  * @returns {Tx} The transaction details of the given transaction id.
168
179
  */
169
- getTransactionData(txId: string, address: Address): Promise<Tx>;
180
+ getTransactionData(txId: string, address?: Address): Promise<Tx>;
170
181
  /** This function is used when in bound or outbound tx is not of thorchain
171
182
  *
172
183
  * @param txId - transaction hash
package/lib/const.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Asset } from '@xchainjs/xchain-util/lib';
2
2
  import { ExplorerUrls } from './types';
3
- export declare const DECIMAL = 8;
3
+ export declare const RUNE_DECIMAL = 8;
4
4
  export declare const DEFAULT_GAS_ADJUSTMENT = 2;
5
5
  export declare const DEFAULT_GAS_LIMIT_VALUE = "4000000";
6
6
  export declare const DEPOSIT_GAS_LIMIT_VALUE = "600000000";
@@ -49,3 +49,20 @@ export declare const AssetRuneERC20: Asset;
49
49
  * @see https://gitlab.com/thorchain/thornode/-/blob/master/common/asset.go#L12-24
50
50
  */
51
51
  export declare const AssetRuneERC20Testnet: Asset;
52
+ /**
53
+ * Fall back node's and rpc's
54
+ */
55
+ export declare const FallBackUrls: {
56
+ testnet: {
57
+ node: string[];
58
+ rpc: string[];
59
+ };
60
+ stagenet: {
61
+ node: string[];
62
+ rpc: string[];
63
+ };
64
+ mainnet: {
65
+ node: string[];
66
+ rpc: string[];
67
+ };
68
+ }[];