If I'm a mobile developer who wants to integrate bitcoin cash in an app, how can I generate Bitcoin Cash addresses programmatically, without relying on a 3rd party service, like Coinbase?

  • You can use the exact same method used to generate Bitcoin addresses. There is one parameter to change, as far as I know, and that is the part of the "path" that identifies the type of cryptocurrency the address is for. – Dave Scotese May 25 '18 at 17:47
  • mobile developer? which language? there are many libraries to generate bitcoin addresses. – Adam May 26 '18 at 12:30
  • @Adam: iOS, Swift would be preferable. – p3scobar May 27 '18 at 19:23
  • @DaveScotese: The exact method being.....? – p3scobar May 27 '18 at 19:26
  • @p3scobar HD Protocol, HD Wallet, BIP32, which is described at bitcoin.org/en/glossary/hd-protocol with links to some helpful resources. – Dave Scotese Jun 11 '18 at 0:09

You can use the following library to generate bitcoin address using Swfit on IOS


Please note that the legacy bitcoin cash and bitcoin address is the same the only difference is the network.

if you're looking for cashAddr (qq address) format, take a look on these open source libraries:

https://github.com/bitcoincashjs/cashaddrjs (javascript) https://cashaddr.bitcoincash.org/ https://github.com/schancel/cashaddr-converter

Original cashAddr algorithm (C++)


it's pretty easy to read and understand, you can translate it to any language.

| improve this answer | |
  • 1
    I believe OP may be asking for a way to generate cashaddr addresses. – Pieter Wuille May 27 '18 at 22:31
  • Thanks for mention that, I've edited my question by adding more details. – Adam May 27 '18 at 22:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.