@@ -12,7 +12,7 @@ Audited & minimal JS implementation of [BIP39 mnemonic phrases](https://github.c
12
12
Check out [ scure-bip32] ( https://github.com/paulmillr/scure-bip32 ) if you need
13
13
hierarchical deterministic wallets ("HD Wallets").
14
14
15
- ### This library belongs to * scure *
15
+ ### This library belongs to _ scure _
16
16
17
17
> ** scure** — audited micro-libraries.
18
18
@@ -32,7 +32,7 @@ hierarchical deterministic wallets ("HD Wallets").
32
32
33
33
> ` deno add jsr:@scure/bip39 `
34
34
35
- > ` deno doc jsr:@scure/bip39 ` # command-line documentation
35
+ > ` deno doc jsr:@scure/bip39 ` # command-line documentation
36
36
37
37
We don't provide source maps.
38
38
Wordlists are large, including source maps would double package size.
@@ -46,7 +46,7 @@ const mn = bip39.generateMnemonic(wordlist);
46
46
console .log (mn);
47
47
48
48
// Reversible: Converts mnemonic string to raw entropy in form of byte array.
49
- const ent = bip39 .mnemonicToEntropy (mn, wordlist)
49
+ const ent = bip39 .mnemonicToEntropy (mn, wordlist);
50
50
51
51
// Reversible: Converts raw entropy in form of byte array to mnemonic string.
52
52
bip39 .entropyToMnemonic (ent, wordlist);
@@ -101,6 +101,29 @@ At commit [ae00e6d7](https://github.com/ethereum/js-ethereum-cryptography/commit
101
101
it was extracted to a separate package called ` micro-bip39 ` .
102
102
After the audit we've decided to use ` @scure ` NPM namespace for security.
103
103
104
+ ### Supply chain security
105
+
106
+ - ** Commits** are signed with PGP keys, to prevent forgery. Make sure to verify commit signatures
107
+ - ** Releases** are transparent and built on GitHub CI. Make sure to verify [ provenance] ( https://docs.npmjs.com/generating-provenance-statements ) logs
108
+ - ** Rare releasing** is followed to ensure less re-audit need for end-users
109
+ - ** Dependencies** are minimized and locked-down: any dependency could get hacked and users will be downloading malware with every install.
110
+ - We make sure to use as few dependencies as possible
111
+ - Automatic dep updates are prevented by locking-down version ranges; diffs are checked with ` npm-diff `
112
+ - ** Dev Dependencies** are disabled for end-users; they are only used to develop / build the source code
113
+
114
+ For this package, there are 2 dependencies; and a few dev dependencies:
115
+
116
+ - [ noble-hashes] ( https://github.com/paulmillr/noble-hashes ) provides cryptographic hashing functionality
117
+ - [ scure-base] ( https://github.com/paulmillr/scure-base ) provides low-level wordlist utilities
118
+ - micro-bmark, micro-should and jsbt are used for benchmarking / testing / build tooling and developed by the same author
119
+ - prettier, fast-check and typescript are used for code quality / test generation / ts compilation. It's hard to audit their source code thoroughly and fully because of their size
120
+
121
+ ## Contributing & testing
122
+
123
+ - ` npm install && npm run build && npm test ` will build the code and run tests.
124
+ - ` npm run lint ` / ` npm run format ` will run linter / fix linter issues.
125
+ - ` npm run build:release ` will build single file
126
+
104
127
## License
105
128
106
129
[ MIT License] ( ./LICENSE )
0 commit comments