RealityRipple / php-bitcoin-cashaddr

💱️ PHP routines for converting bitcoin cash addresses to and from legacy addresses with GMP or BC Math (yes, BC is slow)
The Unlicense
1 stars 2 forks source link

why do you even use the eliptic curve at all? #1

Closed kropple closed 4 years ago

kropple commented 4 years ago

why do you use the maths at all? converting a 1... or 3... bitcoin address to a cashaddr is simply decoding the b58 and encoding bech32-cashaddr. and converting a bc1... address is not really needed or is it?

RealityRipple commented 4 years ago

phpecc is included specifically to make use of the /classes/util/bcmath_Utils.php and /classes/util/gmp_Utils.php files. This is done for efficiency sake as it's assumed that anyone using cashaddr may also end up wanting to use the ec components. If you don't like the dependency, just copy the used functions from those two classes to the bigint.php file.