graphsense / graphsense-REST

A REST service for accessing cryptocurrency data stored in Apache Cassandra.
MIT License
10 stars 8 forks source link

Support BCH cashaddress format #84

Open soad003 opened 1 year ago

soad003 commented 1 year ago

Bitcoin cash introduced a CashAddrs in 2018. Its a new encoding (only userfacing) for their addresses to avoid mistakes (by introducing checksums and better distinguishability from BTC addresses) (ref 1, ref 2)

Our backend only knows legacy addresses thus entering a CashAddr yields no results. Since it is only an encoding cash addresses can be converted to the legacy format.

I propose to convert CashAddr entered in the search field and other queries on the REST level to support CashAddrs.

Code for the conversion can taken from this tagpack-tool issue.

soad003 commented 11 months ago

regarding the convertion to the legacy format, recently bch introduced a new address format (P2SH32) which is not yet supported by the cashaddress library. We introduced a quick and dirty fix in the gslib (https://github.com/graphsense/graphsense-lib/commit/17c6b3f24245730b7b47bcd8263effb29c36425a) which is probably also relevant for this issue.