gakonst / ethers-rs

Complete Ethereum & Celo library and wallet implementation in Rust. https://docs.rs/ethers
Apache License 2.0
2.5k stars 795 forks source link

More helper traits for wallets and extensive documentation #2382

Open ameya-deshmukh opened 1 year ago

ameya-deshmukh commented 1 year ago

Is your feature request related to a problem? Please describe. Yes. I am currently working on a project which involves generating Ethereum-compatible wallets, as well as Solana-compatible wallets. We found that working with the Solana SDK + BIP39 was an absolute breeze, but unfortunately this was not the case with ethers-rs, where there is a limited set of functionalities on wallet generation, importing, key export, etc. The lack of documentation on both crates.io and the main website only added to the woes.

Describe the solution you'd like Extensive documentation on the website, along with these helper traits added, which will make playing around with wallets much easier with ethers-rs. Would love to take this up if you'd like @gakonst.

Describe alternatives you've considered Alternatives are implementing the primitives natively (keccak hashing, file export etc.) - which should ideally be present in something like ethers-rs

gakonst commented 1 year ago

Always supportive of more docs! Would want to hear more on what you're thinking in terms of helper traits.

ameya-deshmukh commented 1 year ago

In terms of helper traits, some obvious ones would be (assuming usage in tandem with tiny-bip39)

Keypair export: Export a wallet keypair and (ideally) the wallet address to a separate json file every time it a wallet is imported/generated. This is an alternate implementation to new_keystore which is a bit unsafe due to no encryption but that tradeoff can be made for local wallet generation. Can provide the option of encryption later on.

Ability to extract public key/(private key, public key) keypair from LocalWallet.