@xchainjs/xchain-thorchain 1.1.1 → 2.0.0

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
@@ -4,8 +4,8 @@
4
4
  import { StdFee } from '@cosmjs/amino';
5
5
  import { AssetInfo, Network, PreparedTx, TxHash, TxParams } from '@xchainjs/xchain-client';
6
6
  import { Client as CosmosSDKClient, CosmosSdkClientParams, MsgTypes } from '@xchainjs/xchain-cosmos-sdk';
7
- import { Address, Asset } from '@xchainjs/xchain-util';
8
- import { DepositParam, DepositTx, TxOfflineParams } from './types';
7
+ import { Address } from '@xchainjs/xchain-util';
8
+ import { CompatibleAsset, DepositParam, DepositTx, TxOfflineParams } from './types';
9
9
  /**
10
10
  * Interface for custom Thorchain client
11
11
  */
@@ -43,10 +43,10 @@ export declare abstract class Client extends CosmosSDKClient implements Thorchai
43
43
  /**
44
44
  * Returns the number of the decimals of known assets
45
45
  *
46
- * @param {Asset} asset - Asset of which return the number of decimals
46
+ * @param {CompatibleAsset} asset - Asset of which return the number of decimals
47
47
  * @returns {number} the number of decimals of the assets
48
48
  */
49
- getAssetDecimals(asset: Asset): number;
49
+ getAssetDecimals(asset: CompatibleAsset): number;
50
50
  /**
51
51
  * Get the explorer url.
52
52
  *
@@ -71,16 +71,16 @@ export declare abstract class Client extends CosmosSDKClient implements Thorchai
71
71
  * Get Asset from denomination
72
72
  *
73
73
  * @param {string} denom The denomination for which to get the asset.
74
- * @returns {Asset|null} The asset of the given denomination.
74
+ * @returns {CompatibleAsset|null} The asset of the given denomination.
75
75
  */
76
- assetFromDenom(denom: string): Asset | null;
76
+ assetFromDenom(denom: string): CompatibleAsset | null;
77
77
  /**
78
78
  * Get denomination from Asset
79
79
  *
80
- * @param {Asset} asset The asset for which to get the denomination.
80
+ * @param {CompatibleAsset} asset The asset for which to get the denomination.
81
81
  * @returns {string} The denomination of the given asset.
82
82
  */
83
- getDenom(asset: Asset): string | null;
83
+ getDenom(asset: CompatibleAsset): string | null;
84
84
  /**
85
85
  * Prepare transfer transaction.
86
86
  *
@@ -1,7 +1,6 @@
1
- import { TxParams } from '@xchainjs/xchain-client';
2
1
  import { BigNumber } from 'bignumber.js';
3
2
  import { Client } from './client';
4
- import { DepositParam, TxOfflineParams } from './types';
3
+ import { DepositParam, TxOfflineParams, TxParams } from './types';
5
4
  /**
6
5
  * Thorchain Keystore client
7
6
  */
@@ -40,7 +39,7 @@ export declare class ClientKeystore extends Client {
40
39
  *
41
40
  * @param {number} param.walletIndex Optional - The index to use to generate the address from the transaction will be done.
42
41
  * If it is not set, address associated with index 0 will be used
43
- * @param {Asset} param.asset Optional - The asset that will be deposit. If it is not set, Thorchain native asset will be
42
+ * @param {CompatibleAsset} param.asset Optional - The asset that will be deposit. If it is not set, Thorchain native asset will be
44
43
  * used
45
44
  * @param {BaseAmount} param.amount The amount that will be deposit
46
45
  * @param {string} param.memo Optional - The memo associated with the deposit
@@ -90,7 +89,7 @@ export declare class ClientKeystore extends Client {
90
89
  * @param {BigNumber} gasLimit Gas limit for the transaction
91
90
  * @param {BaseAmount} amount Amount to deposit
92
91
  * @param {string} memo Deposit memo
93
- * @param {Asset} asset Asset to deposit
92
+ * @param {CompatibleAsset} asset Asset to deposit
94
93
  * @returns {DeliverTxResponse} The transaction broadcasted
95
94
  */
96
95
  private roundRobinSignAndBroadcastDeposit;
@@ -1,7 +1,6 @@
1
1
  import Transport from '@ledgerhq/hw-transport';
2
- import { TxParams } from '@xchainjs/xchain-client';
3
2
  import { Client, ThorchainClientParams } from './client';
4
- import { DepositParam } from './types';
3
+ import { DepositParam, TxParams } from './types';
5
4
  /**
6
5
  * Thorchain Ledger client
7
6
  */