ebellocchia / bip_utils

Generation of mnemonics, seeds, private/public keys and addresses for different types of cryptocurrencies
MIT License
324 stars 86 forks source link

scalecodec comes with requests as a dependency #66

Closed damascene closed 2 years ago

damascene commented 2 years ago

bip_utils doesn't connect to network however scalecodec which is related to Palkdot is installing requests library. It's included in requirements.txt

Hopefully there would be a way to make scalecodec as an optional dependency. Seems like bip_utils comes with about 20 dependencies. Would you consider documenting which libraries is needed for which functionality.

thank you.

$ poetry show --tree py-crypto-hd-wallet
py-crypto-hd-wallet 1.1.0 HD (Hierarchical Deterministic) wallet for cryptocurrencies based on bip_utils library
└── bip-utils >=2.3,<3.0
    ├── coincurve >=15.0.1,<18.0.0 
    │   ├── asn1crypto * 
    │   └── cffi >=1.3.0 
    │       └── pycparser * 
    ├── crcmod >=1.7,<2.0 
    ├── ecdsa >=0.15,<1.0 
    │   └── six >=1.9.0 
    ├── ed25519-blake2b >=1.4,<2.0 
    ├── py-sr25519-bindings >=0.1.3,<2.0.0 
    ├── pycryptodome >=3.6,<4.0 
    ├── pynacl >=1.1,<2.0 
    │   └── cffi >=1.4.1 (circular dependency aborted here)
    ├── scalecodec >=1.0,<2.0 
    │   ├── base58 >=2.0.1 
    │   ├── more-itertools * 
    │   └── requests >=2.24.0 
    │       ├── certifi >=2017.4.17 
    │       ├── charset-normalizer >=2.0.0,<2.1.0 
    │       ├── idna >=2.5,<4 
    │       └── urllib3 >=1.21.1,<1.27 
    └── six >=1.12.0 (circular dependency aborted here)
ebellocchia commented 2 years ago

Hi, the list of dependencies is listed at the beginning of the readme with the related explanation:

I don't think there is anything useless. Beside scalecodec, it's all stuff needed for cryptography. I implemented most of the stuff by myself just to minimize the usage of external libraries (e.g. base58, bech32, ss58, all the mnemonic parts). Anyway, yes I could implement the SCALE encoding by myself as well, since I only need a small subset of it. I'll consider doing it.

Regards, Emanuele