mirror of https://github.com/status-im/bip39.git
Merge pull request #25 from dabura667/warnreadme
Add checksum warning to readme
This commit is contained in:
commit
e2641c608b
|
@ -6,6 +6,14 @@ BIP39
|
|||
|
||||
JavaScript implementation of [Bitcoin BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki): Mnemonic code for generating deterministic keys
|
||||
|
||||
## Reminder for developers
|
||||
|
||||
***Please remember to allow recovery from mnemonic phrases that have invalid checksums (or that you don't have the wordlist)***
|
||||
|
||||
When a checksum is invalid, warn the user that the phrase is not something generated by your app, and ask if they would like to use it anyway. This way, your app only needs to hold the wordlists for your supported languages, but you can recover phrases made by other apps in other languages.
|
||||
|
||||
However, there should be other checks in place, such as checking to make sure the user is inputting 12 words or more separated by a space. ie. `phrase.trim().split(/\s+/g).length >= 12`
|
||||
|
||||
## Usage
|
||||
|
||||
`npm install bip39`
|
||||
|
|
Loading…
Reference in New Issue