Author

Topic: How to create addresses with XPub (Read 158 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
August 03, 2023, 05:24:20 AM
#8
I think this is sort of the problem with Bitcoin (and crypto at large) libraries today, you have well-written implementations only in one or two languages, and the rest of the implementations in other languages are mediocre and/or do not work or are a security hazard. So you'd either have to settle with the mediocre implementation or try to port it yourself, which can also be hazardous.

You also could also wrap/bind existing well-written library, which should be easier than port it yourself.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
August 03, 2023, 02:14:36 AM
#7
I think this is sort of the problem with Bitcoin (and crypto at large) libraries today, you have well-written implementations only in one or two languages, and the rest of the implementations in other languages are mediocre and/or do not work or are a security hazard. So you'd either have to settle with the mediocre implementation or try to port it yourself, which can also be hazardous.

But assuming you have those multi-language skills, the porting part shouldn't be too difficult. You only need native dependencies for secp256k1, SHA256 and HMAC-SHA512 (native is important, in order to avoid various timing and side-channel attacks).
sr. member
Activity: 616
Merit: 291
Bitcoin in Niger State💯
August 03, 2023, 01:58:00 AM
#6
Hello,

I want to create child bitcoin address. (for payment)
How to i create payment address with php -no javascript-


Bitcoin wallets are just pairs of private/public keys. Your "password" is your private key, and your "address" for receiving currency is your public key. So to protect my privacy and security, i will use distinct addresses for each transaction. Nonetheless, the number of keys we have to carry around would keep increasing to the point that it just wouldn’t be practical. Again, that's reason why the HD wallets were introduced.

Try something like this codes below, it will be your best of friend on this one.
https://gist.githubusercontent.com/gunar/86c05f67e2a862f148bda1fc4f0a82f3/raw/8456458b11f72289519ef581560f06c3caf7b798/p2pkhFromXpub.js
legendary
Activity: 3472
Merit: 10611
August 02, 2023, 11:17:41 PM
#5
No offense but if you have to ask something this basic, you can't call yourself a "developer" and you definitely should not attempt at creating something security critical unless you are just playing around in which case just visit github and search for a library written in PHP that supports BIP32.
Something like this search: https://github.com/search?q=bip32+language%3APHP&type=repositories&l=PHP
Then either use one of the ready to use tools or get the code from there to write a tool around that. But as I said if you don't know what you are doing, the result will not be secure.
full member
Activity: 728
Merit: 151
Defend Bitcoin and its PoW: bitcoincleanup.com
August 01, 2023, 09:34:44 PM
#4
Before I want to try to received payment using bitcoin, for example my website for my service payment, but i would have spend more time researching since I'm not a programmer, I also search google and find this they say you can just edit their codes,
https://www.tutorialswebsite.com/integrate-blockonomics-bitcoin-payment-gateway-in-php/, hope this can help you.
legendary
Activity: 2352
Merit: 6089
bitcoindata.science
August 01, 2023, 01:40:03 PM
#3
Hello,

I want to create child bitcoin address. (for payment)
How to i create payment address with php -no javascript-


well, i just googled and found this

This blogs makes a step by step how to, using BitWasp PHP library
https://freedomnode.com/blog/generate-bitcoin-wallet-addresses-from-extended-public-key-with-php/


legendary
Activity: 3472
Merit: 3217
Playbet.io - Crypto Casino and Sportsbook
August 01, 2023, 12:12:22 PM
#2
What exactly do you want to achieve?
Are you planning to create a payment gateway where you can accept payment directly to your wallet?

You can host this https://btcpayserver.org/ in your server and it is ready to use and it only requires xPub of your wallet.
newbie
Activity: 10
Merit: 0
August 01, 2023, 06:08:40 AM
#1
Hello,

I want to create child bitcoin address. (for payment)
How to i create payment address with php -no javascript-
Jump to: