polkascan / py-substrate-interface

Python Substrate Interface
https://polkascan.github.io/py-substrate-interface/
Apache License 2.0
240 stars 114 forks source link

Multi-language bip39 mnemonic support #197

Closed vtexier closed 2 years ago

vtexier commented 2 years ago

Last version v0.1.9 of py-bip39-bindings now support multi-language for bip39 mnemonics.

Could it be possible to support it also in this API ?

I can try to propose a PR if it helps.

arjanz commented 2 years ago

You are fast, I released this an hour ago :) (and still need to compile the aarch64 wheels)

But sure, any help would be appreciated

vtexier commented 2 years ago

You were faster than me! Sorry, I was on holidays.

arjanz commented 2 years ago

No sweat, I'm sure there will be more opportunities to contribute in the future :)

vtexier commented 2 years ago

Oops.There is an error in the comments. Japanese language code "jap" raise an error. Code "ja" works fine. So Japanese language code should be "ja".

arjanz commented 2 years ago

Indeed.. sharp observation, fixed! I will make a new release probably somewhere end of the week

vtexier commented 2 years ago

To help on language selection, may be we should had a MnemonicLanguageCode class with predefined constants like KeypairType. If you are Ok with that, I will make a PR.

arjanz commented 2 years ago

Yes that sounds like a good idea!