bitpay / bitcore

A full stack for bitcoin and blockchain-based applications
https://bitcore.io/
MIT License
4.83k stars 2.08k forks source link

Adding support for legacy addresses on BCH #2807

Open HostFat opened 4 years ago

HostFat commented 4 years ago

The address isn't mine :)

https://api.bitcore.io/api/BCH/mainnet/address/qzs02v05l7qs5s24srqju498qu55dwuj0cx5ehjm2c/?unspent=true

https://api.bitcore.io/api/BCH/mainnet/address/1Fg4r9iDrEkCcDmHTy2T79EusNfhyQpu7W/?unspent=true

Only the first one gives results, so I guess that legacy addresses aren't currenly supported. Is it a big issue on adding support for them?

junzhli commented 4 years ago

cash address is a wrapper for legacy address which is originated from its ancestor 'bitcoin'. maybe you can convert every legacy to cash format to query with bitcore

HostFat commented 4 years ago

I need to make it working with this fork of coinbin https://github.com/dabura667/coinbin/tree/bitcoincash

This is where I'll need to change blockexplorer.com to api.bitcore.io, but as I see bitcore doesn't support legacy addresses: https://github.com/dabura667/coinbin/commit/9d87b401788845e6c72b5ef244d0353e241cf30a