Let me repeat, I’m not a programmer. But sometimes I have to resolve tasks, related to programming, when it comes to quite simple things to do. Here is one of them.
You have an Extended Public Key of your bitcoin wallet. How do you generate receive addresses from them with PHP? Here is the short code I had to write to perform this task.
First of all, you need the Extended Public Key. Depending on the wallet type, it can be named xpub (if addresses in your wallet are starting with “1”), ypub for addresses, starting with “3” and zpub for bc1 addresses.
The easiest way to get an Extended Public Key for testing purposes is to generate it here. Then copy the contents of
Please, see your Bitcoin wallet documentation to find out how to extract the Extended Public Key (it’s a common functionality for hardware, software and mobile wallets). Now you can create as many addresses as you like!
Thanks!