This repository was archived by the owner on Mar 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,12 @@ export type IClientConfig = {
1111 passPhrase : string ;
1212} ;
1313
14+ // Init
15+ export type INewWalletResponse = {
16+ seedphrase : string ,
17+ masterKey : IMasterKeyEncrypted ,
18+ }
19+
1420/* -------------------------------------------------------------------------- */
1521/* Internal Interfaces */
1622/* -------------------------------------------------------------------------- */
Original file line number Diff line number Diff line change @@ -239,4 +239,4 @@ export type IPendingRbTxDetails = {
239239export type IMakeRbPaymentResponse = {
240240 druid : string ;
241241 encryptedTx : ICreateTransactionEncrypted ;
242- } ;
242+ } ;
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ export class ABlockWallet {
9898 status : 'success' ,
9999 reason : ISuccessInternal . ClientInitialized ,
100100 content : {
101- initNewResponse : initIResult . value ,
101+ ... initIResult . value ,
102102 } ,
103103 } as IClientResponse ;
104104 }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
1313 IKeypairEncrypted ,
1414 IMasterKey ,
1515 IMasterKeyEncrypted ,
16+ INewWalletResponse ,
1617 IResult ,
1718} from '../interfaces' ;
1819import {
@@ -60,7 +61,7 @@ export class mgmtClient {
6061 * @return {* } {IResult<[string, IMasterKeyEncrypted]>}
6162 * @memberof mgmtClient
6263 */
63- public initNew ( passphraseKey : string ) : IResult < [ string , IMasterKeyEncrypted ] > {
64+ public initNew ( passphraseKey : string ) : IResult < INewWalletResponse > {
6465 const passphrase = getPassphraseBuffer ( passphraseKey ) ;
6566 if ( passphrase . isErr ( ) ) return err ( passphrase . error ) ;
6667 this . passphraseKey = passphrase . value ;
@@ -73,7 +74,7 @@ export class mgmtClient {
7374 const saveIResult = this . encryptMasterKey ( newMasterKey . value , passphrase . value ) ;
7475 if ( saveIResult && saveIResult . isErr ( ) ) return err ( saveIResult . error ) ;
7576 this . seedPhrase = generatedSeed . value ;
76- return ok ( [ generatedSeed . value , saveIResult . value ] ) ;
77+ return ok ( { seedphrase : generatedSeed . value , masterKey : saveIResult . value } ) ;
7778 }
7879
7980 /**
You can’t perform that action at this time.
0 commit comments