@@ -80,17 +80,23 @@ export class ErgoHDKey {
8080 return this . #address;
8181 }
8282
83- static async fromMnemonic ( mnemonic : string , options ?: FromMnemonicOptions ) : Promise < ErgoHDKey > {
83+ static async fromMnemonic (
84+ mnemonic : string ,
85+ options ?: FromMnemonicOptions ,
86+ ) : Promise < ErgoHDKey > {
8487 return ErgoHDKey . fromMasterSeed (
8588 await mnemonicToSeed ( mnemonic , options ?. passphrase ) ,
86- options ?. path
89+ options ?. path ,
8790 ) ;
8891 }
8992
90- static fromMnemonicSync ( mnemonic : string , options ?: FromMnemonicOptions ) : ErgoHDKey {
93+ static fromMnemonicSync (
94+ mnemonic : string ,
95+ options ?: FromMnemonicOptions ,
96+ ) : ErgoHDKey {
9197 return ErgoHDKey . fromMasterSeed (
9298 mnemonicToSeedSync ( mnemonic , options ?. passphrase ) ,
93- options ?. path
99+ options ?. path ,
94100 ) ;
95101 }
96102
@@ -111,12 +117,16 @@ export class ErgoHDKey {
111117 /** @deprecated use the default constructor instead */
112118 static fromExtendedKey ( options : PublicKeyOptions ) : ErgoHDKey ;
113119 /** @deprecated use the default constructor instead */
114- static fromExtendedKey ( keyOrOptions : string | PrivateKeyOptions | PublicKeyOptions ) : ErgoHDKey {
120+ static fromExtendedKey (
121+ keyOrOptions : string | PrivateKeyOptions | PublicKeyOptions ,
122+ ) : ErgoHDKey {
115123 if ( typeof keyOrOptions !== "string" ) {
116124 return new ErgoHDKey ( keyOrOptions ) ;
117125 }
118126
119- const xKey = isHex ( keyOrOptions ) ? base58check . encode ( hex . decode ( keyOrOptions ) ) : keyOrOptions ;
127+ const xKey = isHex ( keyOrOptions )
128+ ? base58check . encode ( hex . decode ( keyOrOptions ) )
129+ : keyOrOptions ;
120130 return new ErgoHDKey ( HDKey . fromExtendedKey ( xKey ) ) ;
121131 }
122132
0 commit comments