@@ -25,7 +25,7 @@ export class LumWallet {
25
25
* @param publicKey wallet public key (secp256k1)
26
26
* @param addressPrefix prefix to use to derive the address from the public key (ex: lum)
27
27
*/
28
- constructor ( privateKey : Uint8Array , publicKey : Uint8Array , addressPrefix = constants . LumAddressPrefix ) {
28
+ constructor ( privateKey : Uint8Array , publicKey : Uint8Array , addressPrefix = constants . LumBech32PrefixAccAddr ) {
29
29
this . publicKey = publicKey ;
30
30
this . privateKey = privateKey ;
31
31
this . address = utils . getAddressFromPublicKey ( publicKey , addressPrefix ) ;
@@ -37,7 +37,7 @@ export class LumWallet {
37
37
* @param privateKey wallet private key (secp256k1)
38
38
* @param addressPrefix prefix to use to derive the address from the public key (ex: lum)
39
39
*/
40
- static fromPrivateKey = async ( privateKey : Uint8Array , addressPrefix = constants . LumAddressPrefix ) => {
40
+ static fromPrivateKey = async ( privateKey : Uint8Array , addressPrefix = constants . LumBech32PrefixAccAddr ) => {
41
41
const publicKey = await utils . getPublicKeyFromPrivateKey ( privateKey ) ;
42
42
return new LumWallet ( privateKey , publicKey , addressPrefix ) ;
43
43
} ;
@@ -49,7 +49,7 @@ export class LumWallet {
49
49
* @param hdPath BIP44 derivation path
50
50
* @param addressPrefix prefix to use to derive the address from the public key (ex: lum)
51
51
*/
52
- static fromMnemonic = async ( mnemonic : string , hdPath = constants . getLumHdPath ( 0 ) , addressPrefix = constants . LumAddressPrefix ) => {
52
+ static fromMnemonic = async ( mnemonic : string , hdPath = constants . getLumHdPath ( 0 ) , addressPrefix = constants . LumBech32PrefixAccAddr ) => {
53
53
const privateKey = await utils . getPrivateKeyFromMnemonic ( mnemonic , hdPath ) ;
54
54
return LumWallet . fromPrivateKey ( privateKey , addressPrefix ) ;
55
55
} ;
@@ -61,7 +61,7 @@ export class LumWallet {
61
61
* @param password keystore password
62
62
* @param addressPrefix prefix to use to derive the address from the public key (ex: lum)
63
63
*/
64
- static fromKeyStore = async ( keystore : string | utils . KeyStore , password : string , addressPrefix = constants . LumAddressPrefix ) => {
64
+ static fromKeyStore = async ( keystore : string | utils . KeyStore , password : string , addressPrefix = constants . LumBech32PrefixAccAddr ) => {
65
65
const privateKey = utils . getPrivateKeyFromKeystore ( keystore , password ) ;
66
66
return LumWallet . fromPrivateKey ( privateKey , addressPrefix ) ;
67
67
} ;
0 commit comments