cosmos / cosmjs

The Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers.
https://cosmos.github.io/cosmjs/
Apache License 2.0
645 stars 330 forks source link

Remove wallet encryption features and ed25519 crypto #1479

Open webmaster128 opened 11 months ago

webmaster128 commented 11 months ago

CosmJS was designed to be used for secure key storage required by wallets, but I am not aware of a user who uses CosmJS for that. Removing the following features would reduce maintenance cost and bundle size:

This affects {Direct,}Secp256k1{Hd,}Wallet.{serialize,deserialize}. Users of those features would need to implement secure key storage on their own.

As a result, we don't need the libsodium-wrappers-sumo dependency anymore (big Wasm blob) and remove a lot of code to maintain.

Closes

paulmillr commented 11 months ago

maybe you can just remove useless stuff like: bn.js, elliptic, libsodium-wrappers, and replace it with noble/{curves,ciphers}, which would allow to keep all the features, reduce bundle size massively, switch from wasm to js, and implement zip215 support