@@ -80,23 +80,17 @@ export class ErgoHDKey {
8080 return this . #address;
8181 }
8282
83- static async fromMnemonic (
84- mnemonic : string ,
85- options ?: FromMnemonicOptions ,
86- ) : Promise < ErgoHDKey > {
83+ static async fromMnemonic ( mnemonic : string , options ?: FromMnemonicOptions ) : Promise < ErgoHDKey > {
8784 return ErgoHDKey . fromMasterSeed (
8885 await mnemonicToSeed ( mnemonic , options ?. passphrase ) ,
89- options ?. path ,
86+ options ?. path
9087 ) ;
9188 }
9289
93- static fromMnemonicSync (
94- mnemonic : string ,
95- options ?: FromMnemonicOptions ,
96- ) : ErgoHDKey {
90+ static fromMnemonicSync ( mnemonic : string , options ?: FromMnemonicOptions ) : ErgoHDKey {
9791 return ErgoHDKey . fromMasterSeed (
9892 mnemonicToSeedSync ( mnemonic , options ?. passphrase ) ,
99- options ?. path ,
93+ options ?. path
10094 ) ;
10195 }
10296
@@ -117,16 +111,12 @@ export class ErgoHDKey {
117111 /** @deprecated use the default constructor instead */
118112 static fromExtendedKey ( options : PublicKeyOptions ) : ErgoHDKey ;
119113 /** @deprecated use the default constructor instead */
120- static fromExtendedKey (
121- keyOrOptions : string | PrivateKeyOptions | PublicKeyOptions ,
122- ) : ErgoHDKey {
114+ static fromExtendedKey ( keyOrOptions : string | PrivateKeyOptions | PublicKeyOptions ) : ErgoHDKey {
123115 if ( typeof keyOrOptions !== "string" ) {
124116 return new ErgoHDKey ( keyOrOptions ) ;
125117 }
126118
127- const xKey = isHex ( keyOrOptions )
128- ? base58check . encode ( hex . decode ( keyOrOptions ) )
129- : keyOrOptions ;
119+ const xKey = isHex ( keyOrOptions ) ? base58check . encode ( hex . decode ( keyOrOptions ) ) : keyOrOptions ;
130120 return new ErgoHDKey ( HDKey . fromExtendedKey ( xKey ) ) ;
131121 }
132122
0 commit comments