Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Commit 8da82b1

Browse files
committed
Fixed inversed properties for init functions
1 parent b1129ff commit 8da82b1

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@a-block/a-blockjs",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "API wrapper to access the ABlock network",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

src/services/ablock.service.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,9 @@ export class ABlockWallet {
107107
/**
108108
* Initialize an instance of the client with a provided master key
109109
*
110-
* @param {IClientConfig} config - Additional configuration parameters
111110
* @param {IMasterKeyEncrypted} masterKey - Master key
111+
* @param {IClientConfig} config - Additional configuration parameters
112112
* @param initOffline - Optionally initialize the client without initializing network settings
113-
*
114113
* @return {*} {IClientResponse}
115114
* @memberof ABlockWallet
116115
*/
@@ -144,11 +143,10 @@ export class ABlockWallet {
144143
/**
145144
* Initialize an instance of the wallet with a provided seed phrase
146145
*
147-
* @param {IClientConfig} config - Additional configuration parameters
148146
* @param {string} seedPhrase - Seed phrase
147+
* @param {IClientConfig} config - Additional configuration parameters
148+
* @param initOffline - Optionally initialize the client without initializing network settings
149149
* @return {*} {IClientResponse}
150-
* @param initOffline - Optionally initialize the client without initializing network settings
151-
*
152150
* @memberof ABlockWallet
153151
*/
154152
public async fromSeed(
@@ -157,7 +155,7 @@ export class ABlockWallet {
157155
initOffline = false,
158156
): Promise<IClientResponse> {
159157
this.keyMgmt = new mgmtClient();
160-
const initIResult = this.keyMgmt.fromSeed(config.passphrase, seedPhrase);
158+
const initIResult = this.keyMgmt.fromSeed(seedPhrase, config.passphrase);
161159
if (!initOffline) {
162160
const initNetworkIResult = await this.initNetwork(config);
163161
if (initNetworkIResult.status === 'error') {
@@ -184,7 +182,7 @@ export class ABlockWallet {
184182
* Common network initialization (retrieval of PoW list for compute and storage)
185183
*
186184
* @param {IClientConfig} config - Configuration parameters
187-
*
185+
* @return {*} {IClientResponse}
188186
* @memberof ABlockWallet
189187
*/
190188
public async initNetwork(config: IClientConfig): Promise<IClientResponse> {
@@ -239,6 +237,7 @@ export class ABlockWallet {
239237
*
240238
* @private
241239
* @param {IClientConfig} config - Additional configuration parameters
240+
* @return {*} {IClientResponse}
242241
* @memberof ABlockWallet
243242
*/
244243
private async initNetworkForHost(

src/services/mgmt.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ export class mgmtClient {
8080
/**
8181
* Init the client with a provided master key
8282
*
83-
* @param {string} passphraseKey
8483
* @param {IMasterKeyEncrypted} masterKey
84+
* @param {string} passphraseKey
8585
* @return {*} {IResult<void>}
8686
* @memberof mgmtClient
8787
*/
@@ -99,8 +99,8 @@ export class mgmtClient {
9999
/**
100100
* Init the client with a provided seed phrase
101101
*
102-
* @param {string} passphraseKey
103102
* @param {string} seedPhrase
103+
* @param {string} passphraseKey
104104
* @return {*} {IResult<IMasterKeyEncrypted>}
105105
* @memberof mgmtClient
106106
*/

0 commit comments

Comments
 (0)