@xchainjs/xchain-thorchain 2.0.12 → 2.0.14
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/clientKeystore.d.ts +7 -0
- package/lib/index.esm.js +11 -0
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +11 -0
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
package/lib/clientKeystore.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Account } from '@cosmjs/stargate';
|
|
1
2
|
import { BigNumber } from 'bignumber.js';
|
|
2
3
|
import { Client } from './client';
|
|
3
4
|
import { DepositParam, TxOfflineParams, TxParams } from './types';
|
|
@@ -17,6 +18,12 @@ export declare class ClientKeystore extends Client {
|
|
|
17
18
|
* @returns {string} The user address at the specified walletIndex.
|
|
18
19
|
*/
|
|
19
20
|
getAddress(walletIndex?: number): string;
|
|
21
|
+
/**
|
|
22
|
+
* Get the Account frmom Address.
|
|
23
|
+
* @param {number | undefined} walletIndex The index of the address derivation path. Default is 0.
|
|
24
|
+
* @returns {Account} The Account holder details or error if account does not exist
|
|
25
|
+
*/
|
|
26
|
+
getAccountDetails(walletIndex?: number): Promise<Account>;
|
|
20
27
|
/**
|
|
21
28
|
* Returns the private key associated with an index
|
|
22
29
|
*
|
package/lib/index.esm.js
CHANGED
|
@@ -131051,6 +131051,17 @@ class ClientKeystore extends Client {
|
|
|
131051
131051
|
const address = encode(this.prefix, words);
|
|
131052
131052
|
return address;
|
|
131053
131053
|
}
|
|
131054
|
+
/**
|
|
131055
|
+
* Get the Account frmom Address.
|
|
131056
|
+
* @param {number | undefined} walletIndex The index of the address derivation path. Default is 0.
|
|
131057
|
+
* @returns {Account} The Account holder details or error if account does not exist
|
|
131058
|
+
*/
|
|
131059
|
+
getAccountDetails(walletIndex) {
|
|
131060
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
131061
|
+
const account = yield this.getAccount(this.getAddress(walletIndex));
|
|
131062
|
+
return account;
|
|
131063
|
+
});
|
|
131064
|
+
}
|
|
131054
131065
|
/**
|
|
131055
131066
|
* Returns the private key associated with an index
|
|
131056
131067
|
*
|