Currently there are package level variables holding the wordlist to use. This is not ideal because it makes using the library with multiple languages difficult.
I've started an attempt at a v2 of this lib that creates an Encoder type that encapsulates the wordlist. Encoders for each built-in language are provided. Package-root level functions that proxy to the English Encoder are provided.
Currently there are package level variables holding the wordlist to use. This is not ideal because it makes using the library with multiple languages difficult.
I've started an attempt at a v2 of this lib that creates an
Encoder
type that encapsulates the wordlist.Encoder
s for each built-in language are provided. Package-root level functions that proxy to the EnglishEncoder
are provided.https://github.com/tyler-smith/go-bip39/tree/TS_v2
Please give feedback/thoughts on this approach.