File tree 6 files changed +2306
-2258
lines changed
6 files changed +2306
-2258
lines changed Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ format : [
3
+ // 'group',
4
+ 'repo' ,
5
+ 'ownerChanged' ,
6
+ ] ,
7
+ reject : [
8
+ // breaking change
9
+ 'ethereum-cryptography' ,
10
+ // https://github.com/jsdom/jsdom/issues/3395
11
+ 'jest-environment-jsdom' ,
12
+ ] ,
13
+ } ;
Original file line number Diff line number Diff line change
1
+ # 6.2.0 - 2022-08-31
2
+ - add ` path ` option to generate wallets from mnemonic by specified BIP-0044 HD paths
3
+
1
4
## 6.1.0 - 2021-03-24
2
5
- add ` walletFromMnemonicAsync ` , use it to get better performance in browser
3
6
Original file line number Diff line number Diff line change @@ -42,23 +42,24 @@ const wallet3 = await minterWallet.walletFromMnemonicAsync('...');
42
42
## Wallet API
43
43
44
44
### Construction methods:
45
+ Mnemonic wallets are generated by a [ BIP-0044 ] ( https://en.bitcoin.it/wiki/BIP_0044 ) path, Ethereum path is used by default "m/44'/60'/0'/0/0"
45
46
46
- #### ` generateWallet() `
47
+ #### ` generateWallet(path ) `
47
48
Generates wallet from a random BIP39 mnemonic phrase (uses ` bip39.generateMnemonic() ` under the hood).
48
49
``` js
49
50
import {generateWallet } from ' minterjs-wallet' ;
50
51
const wallet = generateWallet ();
51
52
```
52
53
53
- #### ` walletFromMnemonic(mnemonic) `
54
+ #### ` walletFromMnemonic(mnemonic, path ) `
54
55
Create a wallet instance based on BIP39 12 words mnemonic phrase
55
56
``` js
56
57
import {walletFromMnemonic } from ' minterjs-wallet' ;
57
58
const wallet = walletFromMnemonic (' surround tape away million into program organ tonight write prefer inform cool' );
58
59
```
59
60
60
- #### ` walletFromMnemonicAsync(mnemonic) `
61
- Same as ` walletFromMnemonic ` but async and has better performance in browser, beacause it uses ` window.crypto.subtle ` under hood
61
+ #### ` walletFromMnemonicAsync(mnemonic, path ) `
62
+ Same as ` walletFromMnemonic ` but async and has better performance in browser, because it uses ` window.crypto.subtle ` under hood
62
63
``` js
63
64
import {walletFromMnemonicAsync } from ' minterjs-wallet' ;
64
65
const wallet = await walletFromMnemonicAsync (' surround tape away million into program organ tonight write prefer inform cool' );
You can’t perform that action at this time.
0 commit comments