Author

Topic: REWARD $200: Funds not visible after using XPub to receive money in my store (Read 418 times)

legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
Bro I thought you literally tipped them 25 BTC each. I had a jaw drop moment for a second.
Lol Cheesy

@0xwork: thanks for following through Smiley
copper member
Activity: 1386
Merit: 1481
Bitcoin Bottom was at $15.4k
bc1quh9elty2g3v6h5pg6kq987vcd7flv4kdg007kt 25BTC  bitmover
Code:
https://www.blockchain.com/btc/tx/d2e42bb06f3c51894a511538c0018b8de82a68c7d78aa6e81618dcfeca4b9121



39sE1m1HRGkFHvNRa89uTcoxU8mLQ97LkL 25BTC  LoyceV


Code:
https://www.blockchain.com/btc/tx/1d99c2e808f264003ceeaea342a9203acc5d76504cbb01cbc8914a218bb1df24


bc1q08eknhc9zexhs78rtwzttzys9xq9fvw7f5xsxl  25BTC  tenant48

Code:
https://www.blockchain.com/btc/tx/a7ce8e9e7dc74394c3d5f83217af69d03756460e667f9bbdcf6db6dcc2024e1f




Bro I thought you literally tipped them 25 BTC each. I had a jaw drop moment for a second.
copper member
Activity: 12
Merit: 51
bc1quh9elty2g3v6h5pg6kq987vcd7flv4kdg007kt 25BTC  bitmover
Code:
https://www.blockchain.com/btc/tx/d2e42bb06f3c51894a511538c0018b8de82a68c7d78aa6e81618dcfeca4b9121



39sE1m1HRGkFHvNRa89uTcoxU8mLQ97LkL 25BTC  LoyceV


Code:
https://www.blockchain.com/btc/tx/1d99c2e808f264003ceeaea342a9203acc5d76504cbb01cbc8914a218bb1df24


bc1q08eknhc9zexhs78rtwzttzys9xq9fvw7f5xsxl  25BTC  tenant48

Code:
https://www.blockchain.com/btc/tx/a7ce8e9e7dc74394c3d5f83217af69d03756460e667f9bbdcf6db6dcc2024e1f


legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet



Each time you change the derivation path after the third level you will get a new xpub. This is why electrum is showing a different xpub.
 You can see it in action here: https://iancoleman.io/bip39/


you also mentioned  iancoleman.io/bip39  .
Please give me btc address here i will send  25$

Thanks a lot. I am happy to help you.
Here is my address

Code:
bc1quh9elty2g3v6h5pg6kq987vcd7flv4kdg007kt

I syrongly suggest that you use https://btcpayserver.org in your next payments. Good luck in your online store.
full member
Activity: 336
Merit: 161

Thanks for everyone try to help me.$


Glad you got it all working.

If you manage to create a full-fledged service with monitoring of incoming funds to addresses and their automatic enrollment to a database with users (such as I described above: https://www.blockchain.com/en/api/api_receive) but on a Trezor wallet, write here.

BTC address is in my profile.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
i find my money
Congrats!

When using https://iancoleman.io/bip39/ with the seed words from your hardware wallet, taking your computer offline is not enough: it should never go online again!
Get a Linux LIVE DVD, boot from it, don't give it internet access, close the curtains, copy IanColeman's site on a USB stick, don't give it access to any hard drives, run from RAM only, and play around with it until you have the private keys you need. Then turn off the PC and wipe it's memory.
thanks  for Security advance , that help me

Please give me btc address here i will send  25$
You're welcome Smiley
My addy is in my profile.



Does this mean you've now manually copied 500+ private keys using Ian Coleman's Mnemonic Code Converter? In that case, you may want to read how to Consolidate your small inputs without overpaying in fees. Consolidating 500 legacy inputs gives a 75,000 transaction, setting 1 sat/byte costs you 0.00075BTC minimum, but if you don't pay attention to the fee your wallet may make you pay many times more.



Last suggestion: Don't consolidate 500 inputs in one transaction, and don't copy all your private keys to a hot wallet at once! Reduce the risk by sending small amounts at a time to your hardware wallet, or use offline signing.
copper member
Activity: 12
Merit: 51

Thanks for everyone try to help me.
you are great
i find my money
i wish i can pay Everyone . 


i try to search  here :
https://blockpath.com/wallets/local/101?action=appxpub


i find my btc :






now how i can make electrum  generate the same path ?


t

The screenshot makes it easier then, you can do this;

1. Go to electrum, in the derivation path, tick legacy and put m/clientid (m/489) underneath or

2. Use iancoleman.io/bip39 listed above(beware, using this may compromise your seed)


put the seed in the mnemonic box and change the derivation path to bip32, select custom path and put m/client id (m/489).




you are first one mentioned using my seed on iancoleman.io/bip39
and that works after i change the External / Internal 

Please give me btc address here i will send  50$








Each time you change the derivation path after the third level you will get a new xpub. This is why electrum is showing a different xpub.
 You can see it in action here: https://iancoleman.io/bip39/


you also mentioned  iancoleman.io/bip39  .
Please give me btc address here i will send  25$



When using https://iancoleman.io/bip39/ with the seed words from your hardware wallet, taking your computer offline is not enough: it should never go online again!
Get a Linux LIVE DVD, boot from it, don't give it internet access, close the curtains, copy IanColeman's site on a USB stick, don't give it access to any hard drives, run from RAM only, and play around with it until you have the private keys you need. Then turn off the PC and wipe it's memory.

thanks  for Security advance , that help me

Please give me btc address here i will send  25$




BIP44 derivation path has five levels:

m / purpose' / coin_type' / account' / change / address_index

.....

thanks  for trying hard to help me

Please give me btc address here i will send  25$



Coins are found along the following derivation paths:

м/44'/0'/0'/526/0
м/44'/0'/0'/527/0
м/44'/0'/0'/528/0


you give me the right path , but not working in electrum  , thanx

Please give me btc address here i will send  25$


full member
Activity: 336
Merit: 161

i think i find my addresses When i use iancoleman and edit The
External / Internal  to 5
i see the address i search for

i will try on my real seed and back

I ran your test seed in the converter and also got the desired address: 1B4G662QFKQNsj3EwqP1PWi8HUUDHrVmn7

As I wrote above, your coins are located in the following ways:
м/44'/0'/0'/526/0
м/44'/0'/0'/527/0
м/44'/0'/0'/528/0
......
legendary
Activity: 2268
Merit: 18509
-snip-
In the example you gave, the xpub is generated is m/44'/0'/0'. Because of this, there is absolutely no point changing these numbers, since whatever your code is doing it is starting from this derivation path and deriving further. You should therefore always start with m/44'/0'/0'.

The test mnemonic you gave generates the address you were looking for at m/44'/0'/0'/5/0.

Based on this, your coins should be at m/44'/0'/0'/x/0, but you said you tried this and couldn't find anything? Are you sure the test mnemonic/xpub/address you gave above was generated with the exact same code as your real wallet?
legendary
Activity: 2310
Merit: 4313
🔐BitcoinMessage.Tools🔑
It won't be that easy to find a derivation path your coins have gotten into because, like I said in my previous post, the error occurred because of incorrect use of quotation marks in PHP scripting language.

Check your script once again:

Code:
require_once('./HD.php');

$xpub = 'xpub......';
$path = $client_id.'/0';
$hd = new HD();
$hd->set_xpub($xpub);
$address = $hd->address_from_master_pub($path);

$path is PHP variable that should be assigned with literalal string value put in double quotation marks ($path = ''$client_id/0'')

Your variant $path = $client_id.'/0'; is also correct but works in a different way than expected.

By putting quotation marks between $client_id. and /0, you are concatenating these strings and assigning the result to $path variable.

I am not a programmer, so I have no idea what the result of all these manipulations and concatenations should be and how it can be applied to BIP44 derivation algorithm, but you can check the article where I get this information from: https://www.experts-exchange.com/articles/12241/Quotation-Marks-in-PHP.html

but I try everything

Code:
m/44'/0'/0'/489'/0
m/44'/0'/0'/489'/0'
m/44'/0'/0'/489/0
m/44'/489'/0'
m/49'/0'/489'
m/489
m/489/0

You didn't try m/44'/0'/0'/0/489, which implies inserting your seed phrase in whatever tools you are using to find addresses and looking for 490th address.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
copper member
Activity: 12
Merit: 51
Thanks for everyone trying to help me.

but I try everything

Code:
m/44'/0'/0'/489'/0
m/44'/0'/0'/489'/0'
m/44'/0'/0'/489/0
m/44'/489'/0'
m/49'/0'/489'
m/489
m/489/0
..
..



and nothing works

.
I try my seed on   https://iancoleman.io/bip39/ but I can not find my addresses.



I make a test wallet for everyone who wants to help .

BIP39 Mnemonic :
Code:
smile oven assist forward parade horror limb mango journey glass grant deer inquiry leave menu


xpub :
Code:
xpub6CVSgdHRncHHCh2EoXPo6VS8Q1JrhrhfaYfELjD94tkfskKDbxZF9vHQ5x8t17yvYcBAPycTRjsAnq11cURoQb6UBGYEzqvnDaDAdjxSqz7

i use this xpub to generate this address from my php code:
Code:
1B4G662QFKQNsj3EwqP1PWi8HUUDHrVmn7

the php code i use to generate this address  :

Code:
require_once('./HD.php');

$xpub 'xpub6CVSgdHRncHHCh2EoXPo6VS8Q1JrhrhfaYfELjD94tkfskKDbxZF9vHQ5x8t17yvYcBAPycTRjsAnq11cURoQb6UBGYEzqvnDaDAdjxSqz7';
$path '5/0'// 1st receiving address


$hd = new HD();
$hd->set_xpub($xpub);
$address $hd->address_from_master_pub($path);

echo 
$address;



now how i can show this address in https://iancoleman.io/bip39/


and i make the REWARD  200$




i think i find my addresses When i use iancoleman and edit The
External / Internal  to 5
i see the address i search for

i will try on my real seed and back
copper member
Activity: 12
Merit: 51
Thanks for everyone trying to help me.

but I try everything

Code:
m/44'/0'/0'/489'/0
m/44'/0'/0'/489'/0'
m/44'/0'/0'/489/0
m/44'/489'/0'
m/49'/0'/489'
m/489
m/489/0
..
..



and nothing works

.
I try my seed on   https://iancoleman.io/bip39/ but I can not find my addresses.



I make a test wallet for everyone who wants to help .

BIP39 Mnemonic :
Code:
smile oven assist forward parade horror limb mango journey glass grant deer inquiry leave menu


xpub :
Code:
xpub6CVSgdHRncHHCh2EoXPo6VS8Q1JrhrhfaYfELjD94tkfskKDbxZF9vHQ5x8t17yvYcBAPycTRjsAnq11cURoQb6UBGYEzqvnDaDAdjxSqz7

i use this xpub to generate this address from my php code:
Code:
1B4G662QFKQNsj3EwqP1PWi8HUUDHrVmn7

the php code i use to generate this address  :

Code:
require_once('./HD.php');

$xpub 'xpub6CVSgdHRncHHCh2EoXPo6VS8Q1JrhrhfaYfELjD94tkfskKDbxZF9vHQ5x8t17yvYcBAPycTRjsAnq11cURoQb6UBGYEzqvnDaDAdjxSqz7';
$path '5/0'// 1st receiving address


$hd = new HD();
$hd->set_xpub($xpub);
$address $hd->address_from_master_pub($path);

echo 
$address;



now how i can show this address in https://iancoleman.io/bip39/


and i make the REWARD  200$
full member
Activity: 336
Merit: 161
Coins are found along the following derivation paths:

м/44'/0'/0'/526/0
м/44'/0'/0'/527/0
м/44'/0'/0'/528/0
....

While I see a solution to pick up a wallet in which you can register a custom derivation path, enter the seed from Trezor into it and insert the derivation path into it one by one and check for balance and, if available, withdraw funds to another wallet.
hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
Well, the OP programmed a non-standard derivation path which doesn't follow any standard HD wallet rules. His setup isn't properly tested, for sure. There is for sure a proper way to implement this with BIP44 rules, but that's not what the OP did and it doesn't help him now to reclaim his received payment.

If you instruct Electrum to use a custom derivation path you don't have to worry about which coin would be designated by standard BIP44 rules and other nitpicking.

I haven't tested this properly with my PiTrezor yet. As far as I remember you get a XPub from Trezor with is the Master Extended Public Key m and from there you should be able to construct the derivation path as found by blockpath.com by the user itself.

What I don't yet understand is the user's talking of always changing XPub when he changes the derivation path. It depends on what you take for the Extended Public Key, but I would assume he should stick to the XPub that his Trezor uses. I'm slightly confused...
full member
Activity: 336
Merit: 161
If you suggest using other software instead of trezor suite, which can scan different accounts and addresses with different indexes. How do you imagine that?

This is very simple. Trezor and ledger and basically any hardware wallet supports other (and better wallets) such as electrum.

You can read the official trezor guide here:
https://blog.trezor.io/using-trezor-with-electrum-v3-a0b9bcffe26e#:~:text=Electrum%20handles%20TREZOR%20accounts%20as,%2C%20select%20'Standard%20wallet'.

The OP is already using electrum with trezor, since his first post:

i try electrum  wallet ,

i open trezor in electrum  like this :
Create a new wallet
Select Standard wallet
select  hardware device
Choose derivation path m/44'/0'/0' .

To use Trezor with electrum with different accounts, you will have to constantly write derivation paths in electrum for each new account:
m/49'/0'/0' (first account)
m/49'/0'/1' (second account)
m/49'/0'/2' (third account)
...

In addition, keep in mind that not everyone will send funds to the requested addresses.
legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet
If you suggest using other software instead of trezor suite, which can scan different accounts and addresses with different indexes. How do you imagine that?

This is very simple. Trezor and ledger and basically any hardware wallet supports other (and better wallets) such as electrum.

You can read the official trezor guide here:
https://blog.trezor.io/using-trezor-with-electrum-v3-a0b9bcffe26e#:~:text=Electrum%20handles%20TREZOR%20accounts%20as,%2C%20select%20'Standard%20wallet'.

The OP is already using electrum with trezor, since his first post:

i try electrum  wallet ,

i open trezor in electrum  like this :
Create a new wallet
Select Standard wallet
select  hardware device
Choose derivation path m/44'/0'/0' .

Native wallets such as trezor suite are not very good. They do not allow good control over private keys, so it is much better to use electrum.


The account system should be used if you want to always issue a new payment address to the same customers, but even large exchanges do not do this and usually issue the same replenishment addresses to their customers.

This is exactly what large exchanges do. They create an account inside their wallet for each customer.
The correct way of doing this is to add the account/client numer in the forth level of the derivation path
full member
Activity: 336
Merit: 161
The topic starter indicated that he took XPub from Trezor (see first post), and Trezor has a limit (10) on the number of account creation: https://wiki.trezor.io/Account
So this method will not work for him. Or you will have to use non-native software.

Like other hierarchical deterministic wallets, Trezor uses account structure to organize transactions. The number of accounts supported by Trezor is not limited, but in Trezor Suite, the number of accounts per cryptocurrency is limited to 10.

That simply means that Trezor Suite is not suitable for purposes of serving more than 10 customers, but not that I am wrong. As long as the software allows you to track an unlimited number of accounts, you're fine; even if you're keeping funds on a hardware wallet like Trezor and others.




As far as I understand, the task of 0xwork is to automatically accept payments and see the balance on your wallet. If you suggest using other software instead of trezor suite, which can scan different accounts and addresses with different indexes. How do you imagine that?
The account system should be used if you want to always issue a new payment address to the same customers, but even large exchanges do not do this and usually issue the same replenishment addresses to their customers.
legendary
Activity: 2310
Merit: 4313
🔐BitcoinMessage.Tools🔑
The topic starter indicated that he took XPub from Trezor (see first post), and Trezor has a limit (10) on the number of account creation: https://wiki.trezor.io/Account
So this method will not work for him. Or you will have to use non-native software.

Like other hierarchical deterministic wallets, Trezor uses account structure to organize transactions. The number of accounts supported by Trezor is not limited, but in Trezor Suite, the number of accounts per cryptocurrency is limited to 10.

That simply means that Trezor Suite is not suitable for purposes of serving more than 10 customers, but not that I am wrong. As long as the software allows you to track an unlimited number of accounts, you're fine; even if you're keeping funds on a hardware wallet like Trezor and others.


full member
Activity: 336
Merit: 161
The chief point is that you must use a different account for each customer if you want to keep them completely separated from each other.
The topic starter indicated that he took XPub from Trezor (see first post), and Trezor has a limit (10) on the number of account creation: https://wiki.trezor.io/Account
So this method will not work for him. Or you will have to use non-native software.
legendary
Activity: 2310
Merit: 4313
🔐BitcoinMessage.Tools🔑
If you insert a variable ($client_id) in place of account, then the XPub key will change all the time. To keep XPub unchanged, you can change only the last two fields (change and address_index).
It all depends on which branch's xpub you are taking to derive addresses. For example, you can use xpub of m / 44' / 0' branch to derive as many accounts as you want, or you can use the master public key to derive all public keys from all branches.

The chief point is that you must use a different account for each customer if you want to keep them completely separated from each other.
full member
Activity: 336
Merit: 161
BIP44 derivation path has five levels:

m / purpose' / coin_type' / account' / change / address_index


But it should be this:

m / 44' / 0' / $client_id.' / 0 / 0 for receive addresses

m / 44' / 0' / $client_id.' / 1 / 0 for change addresses



If you insert a variable ($client_id) in place of account, then the XPub key will change all the time. To keep XPub unchanged, you can change only the last two fields (change and address_index).

I previously accepted BTC payments through the blockchain.com service.
https://www.blockchain.com/en/api/api_receive
There you need to give a request for an API key for your site: https://www.blockchain.com/api/request
There are also examples of PHP scripts to insert into your site.
legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet
Get a Linux LIVE DVD, boot from it, don't give it internet access, close the curtains, copy IanColeman's site on a USB stick, don't give it access to any hard drives, run from RAM only, and play around with it until you have the private keys you need. Then turn off the PC and wipe it's memory.

Or just move the bitcoins to a fresh new wallet with a new after if you are successful in recovering the private keys.

Consider your seed exposed and create a new wallet after inserting private keys in any computer.
legendary
Activity: 2310
Merit: 4313
🔐BitcoinMessage.Tools🔑
BIP44 derivation path has five levels:

m / purpose' / coin_type' / account' / change / address_index

In your case the derivation path is the following:

m / 44' / 0' / 0' / $client_id.' / 0

or

m / 44' / 0' / 0' / $client_id.' / 0'

But it should be this:

m / 44' / 0' / $client_id.' / 0 / 0 for receive addresses

m / 44' / 0' / $client_id.' / 1 / 0 for change addresses

The code you have presented in the OP is not suitable for changing an "account" part of the BIP44 derivation path, it only generates receive and change addresses (albeit with non-standard derivation paths) for one account.

Try changing it to something like this, but I am not sure it will work out:

Code:
require_once('./HD.php');

$xpub = 'xpub......';
$path = '$client_id.'/0/0';
$hd = new HD();
$hd->set_xpub($xpub);
$address = $hd->address_from_master_pub($path);


Also try the following paths to find your coins:

m / 44' / 0' / 0' / 526' / 0
m / 44' / 0' / 0' / 527' / 0
m / 44' / 0' / 0' / 528' / 0
m / 44' / 0' / 0' / 526' / 0'
m / 44' / 0' / 0' / 527' / 0'
m / 44' / 0' / 0' / 528' / 0'
These are all non-standard derivation paths since you used hardened derivation on "change" and "address_index" levels, whereas they should be non-hardened (without ').



I guess I found the error (pay attention to quotation marks):


require_once('./HD.php');

$xpub = 'xpub661MyMwAqRbcGYcu6n1FmV1TbE8EwnSKecRZLvKAMyj4qLf15qXsoNryiKNvCkRq3z5kBCeZG81 15jj28eVqmeKBJZPqjAfwRD3TGx1w5hY';
$path = '0/0'; // 1st receiving address
// $path = '0/2'; // 3rd receiving address
// $path = '1/0'; // 1st change address
// $path = '1/1'; // 2nd change address

$hd = new HD();
$hd->set_xpub($xpub);
$address = $hd->address_from_master_pub($path);

echo $address;




Your code:

Quote
require_once('./HD.php');

$xpub = 'xpub......';
$path = $client_id.'/0';
$hd = new HD();
$hd->set_xpub($xpub);
$address = $hd->address_from_master_pub($path);
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
When using https://iancoleman.io/bip39/ with the seed words from your hardware wallet, taking your computer offline is not enough: it should never go online again!
Get a Linux LIVE DVD, boot from it, don't give it internet access, close the curtains, copy IanColeman's site on a USB stick, don't give it access to any hard drives, run from RAM only, and play around with it until you have the private keys you need. Then turn off the PC and wipe it's memory.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
Since m/44'/0'/0' worked and the code you gave above, I think it goes:
m/44'/client_id'/0'
(either that or m/44'/0'/clientid'/0' -but that may be less likely)

How do you know the addresses generated have actually been funded though? I think you need a script thst goes through and checks from an api (such as a block explorer) as to whether an address you control has been funded or not.

The problem is that m/44/2 is litecoin
The third level will go to different altcoins. I don't know how to handle that (an altcoin path) in a bitcoin wallet.

Just take a look at iancoleman and you will see.

It's just replay protection and there are tools to convert litecoin public keys to bitcoin ones and vice versa (they just add an offset to the public key to make it different - the private key will be the same).

legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet
Since m/44'/0'/0' worked and the code you gave above, I think it goes:
m/44'/client_id'/0'
(either that or m/44'/0'/clientid'/0' -but that may be less likely)

How do you know the addresses generated have actually been funded though? I think you need a script thst goes through and checks from an api (such as a block explorer) as to whether an address you control has been funded or not.

The problem is that m/44/2 is litecoin
The third level will go to different altcoins. I don't know how to handle that (an altcoin path) in a bitcoin wallet.

Just take a look at iancoleman and you will see.


is iancoleman safe ?
Does iancoleman  have offline copy ?

Yes
 You can download it and run offline. It is safe.
jr. member
Activity: 107
Merit: 8
Yes, you can use it offline..
copper member
Activity: 12
Merit: 51
It seems like Electrum is treating each 'client id' as a change path. Your best bet may be to use the seed to manually recover the coins using iancoleman.
thanx

is iancoleman safe ?
Does iancoleman  have offline copy ?
jr. member
Activity: 107
Merit: 8
It seems like Electrum is treating each 'client id' as a change path. Your best bet may be to use the seed to manually recover the coins using iancoleman.
copper member
Activity: 12
Merit: 51
i try to search  here :
https://blockpath.com/wallets/local/101?action=appxpub


i find my btc :






now how i can make electrum  generate the same path ?


t

The screenshot makes it easier then, you can do this;

1. Go to electrum, in the derivation path, tick legacy and put m/clientid (m/489) underneath or

2. Use iancoleman.io/bip39 listed above(beware, using this may compromise your seed)


put the seed in the mnemonic box and change the derivation path to bip32, select custom path and put m/client id (m/489).



i try it , gave me different addresses and no btc







jr. member
Activity: 107
Merit: 8
i try to search  here :
https://blockpath.com/wallets/local/101?action=appxpub


i find my btc :






now how i can make electrum  generate the same path ?


t

The screenshot makes it easier then, you can do this;

1. Go to electrum, in the derivation path, tick legacy and put m/clientid (m/489) underneath or

2. Use iancoleman.io/bip39 listed above(beware, using this may compromise your seed)


put the seed in the mnemonic box and change the derivation path to bip32, select custom path and put m/client id (m/489).

copper member
Activity: 12
Merit: 51
Your xpub should be the extended master public key. Why do you believe that your derivation path is formed according to BIP44?
Why do you believe that your provided per user path is hardened (like you tried with m/44'/client_id'/0' and m/44'/0'/clientid'/0')? I don't see any clue for that in your code. Is that somewhere implicitly used in the modules of that Bit-Wasp/bitcoin-phpLibrary?

Probably you'd need to dig in the code there further. You will have to find out what full derivation path for a client user address is used.

To narrow it down, print some log line for $pubPrefix, $config and add some log lines for function derivePath(), maybe you can see there how the derivation path is assembled.


here is the log when i use 0/0 in my script :


$config :

Code:
BitWasp\Bitcoin\Key\Deterministic\HdPrefix\GlobalPrefixConfig Object
(
    [networkConfigs:BitWasp\Bitcoin\Key\Deterministic\HdPrefix\GlobalPrefixConfig:private] => Array
        (
            [BitWasp\Bitcoin\Network\Networks\Bitcoin] => BitWasp\Bitcoin\Key\Deterministic\HdPrefix\NetworkConfig Object
                (
                    [network:BitWasp\Bitcoin\Key\Deterministic\HdPrefix\NetworkConfig:private] => BitWasp\Bitcoin\Network\Networks\Bitcoin Object
                        (
                            [base58PrefixMap:protected] => Array
                                (
                                    [p2pkh] => 00
                                    [p2sh] => 05
                                    [wif] => 80
                                )

                            [bech32PrefixMap:protected] => Array
                                (
                                    [segwit] => bc
                                )

                            [bip32PrefixMap:protected] => Array
                                (
                                    [xpub] => 0488b21e
                                    [xprv] => 0488ade4
                                )

                            [bip32ScriptTypeMap:protected] => Array
                                (
                                    [xpub] => pubkeyhash
                                    [xprv] => pubkeyhash
                                )

                            [signedMessagePrefix:protected] => Bitcoin Signed Message
                            [p2pMagic:protected] => d9b4bef9
                        )

                    [scriptPrefixMap:BitWasp\Bitcoin\Key\Deterministic\HdPrefix\NetworkConfig:private] => Array
                        (
                            [0488ade4] => BitWasp\Bitcoin\Key\Deterministic\HdPrefix\ScriptPrefix Object
                                (
                                    [privatePrefix:BitWasp\Bitcoin\Key\Deterministic\HdPrefix\ScriptPrefix:private] => 0488ade4
                                    [publicPrefix:BitWasp\Bitcoin\Key\Deterministic\HdPrefix\ScriptPrefix:private] => 0488b21e
                                    [scriptDataFactory:BitWasp\Bitcoin\Key\Deterministic\HdPrefix\ScriptPrefix:private] => BitWasp\Bitcoin\Key\KeyToScript\Factory\P2pkhScriptDataFactory Object
                                        (
                                            [pubKeySerializer:protected] => BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Serializer\Key\PublicKeySerializer Object
                                                (
                                                    [ecAdapter:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Serializer\Key\PublicKeySerializer:private] => BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter Object
                                                        (
                                                            [math:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter:private] => BitWasp\Bitcoin\Math\Math Object
                                                                (
                                                                )

                                                            [generator:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter:private] => Mdanter\Ecc\Primitives\GeneratorPoint Object
                                                                (
                                                                    [x] => 55066263022277343669578718895168534326250603453777594175500187360389116729240
                                                                    [y] => 32670510020758816978083085130507043184471273380659243275938904335757337482424
                                                                    [z] => 115792089237316195423570985008687907852837564279074904382605163141518161494337
                                                                    [curve] => Mdanter\Ecc\Curves\NamedCurveFp Object
                                                                        (
                                                                            [a] => 0
                                                                            [b] => 7
                                                                            [prime] => 115792089237316195423570985008687907853269984665640564039457584007908834671663
                                                                        )

                                                                )

                                                        )

                                                )

                                        )

                                )

                            [0488b21e] => BitWasp\Bitcoin\Key\Deterministic\HdPrefix\ScriptPrefix Object
                                (
                                    [privatePrefix:BitWasp\Bitcoin\Key\Deterministic\HdPrefix\ScriptPrefix:private] => 0488ade4
                                    [publicPrefix:BitWasp\Bitcoin\Key\Deterministic\HdPrefix\ScriptPrefix:private] => 0488b21e
                                    [scriptDataFactory:BitWasp\Bitcoin\Key\Deterministic\HdPrefix\ScriptPrefix:private] => BitWasp\Bitcoin\Key\KeyToScript\Factory\P2pkhScriptDataFactory Object
                                        (
                                            [pubKeySerializer:protected] => BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Serializer\Key\PublicKeySerializer Object
                                                (
                                                    [ecAdapter:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Serializer\Key\PublicKeySerializer:private] => BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter Object
                                                        (
                                                            [math:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter:private] => BitWasp\Bitcoin\Math\Math Object
                                                                (
                                                                )

                                                            [generator:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter:private] => Mdanter\Ecc\Primitives\GeneratorPoint Object
                                                                (
                                                                    [x] => 55066263022277343669578718895168534326250603453777594175500187360389116729240
                                                                    [y] => 32670510020758816978083085130507043184471273380659243275938904335757337482424
                                                                    [z] => 115792089237316195423570985008687907852837564279074904382605163141518161494337
                                                                    [curve] => Mdanter\Ecc\Curves\NamedCurveFp Object
                                                                        (
                                                                            [a] => 0
                                                                            [b] => 7
                                                                            [prime] => 115792089237316195423570985008687907853269984665640564039457584007908834671663
                                                                        )

                                                                )

                                                        )

                                                )

                                        )

                                )

                        )

                    [scriptTypeMap:BitWasp\Bitcoin\Key\Deterministic\HdPrefix\NetworkConfig:private] => Array
                        (
                            [pubkeyhash] => BitWasp\Bitcoin\Key\Deterministic\HdPrefix\ScriptPrefix Object
                                (
                                    [privatePrefix:BitWasp\Bitcoin\Key\Deterministic\HdPrefix\ScriptPrefix:private] => 0488ade4
                                    [publicPrefix:BitWasp\Bitcoin\Key\Deterministic\HdPrefix\ScriptPrefix:private] => 0488b21e
                                    [scriptDataFactory:BitWasp\Bitcoin\Key\Deterministic\HdPrefix\ScriptPrefix:private] => BitWasp\Bitcoin\Key\KeyToScript\Factory\P2pkhScriptDataFactory Object
                                        (
                                            [pubKeySerializer:protected] => BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Serializer\Key\PublicKeySerializer Object
                                                (
                                                    [ecAdapter:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Serializer\Key\PublicKeySerializer:private] => BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter Object
                                                        (
                                                            [math:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter:private] => BitWasp\Bitcoin\Math\Math Object
                                                                (
                                                                )

                                                            [generator:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter:private] => Mdanter\Ecc\Primitives\GeneratorPoint Object
                                                                (
                                                                    [x] => 55066263022277343669578718895168534326250603453777594175500187360389116729240
                                                                    [y] => 32670510020758816978083085130507043184471273380659243275938904335757337482424
                                                                    [z] => 115792089237316195423570985008687907852837564279074904382605163141518161494337
                                                                    [curve] => Mdanter\Ecc\Curves\NamedCurveFp Object
                                                                        (
                                                                            [a] => 0
                                                                            [b] => 7
                                                                            [prime] => 115792089237316195423570985008687907853269984665640564039457584007908834671663
                                                                        )

                                                                )

                                                        )

                                                )

                                        )

                                )

                        )

                )

        )

)


derivePath() /$child_key :

Code:
BitWasp\Bitcoin\Key\Deterministic\HierarchicalKey Object
(
    [ecAdapter:protected] => BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter Object
        (
            [math:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter:private] => BitWasp\Bitcoin\Math\Math Object
                (
                )

            [generator:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter:private] => Mdanter\Ecc\Primitives\GeneratorPoint Object
                (
                    [x] => 55066263022277343669578718895168534326250603453777594175500187360389116729240
                    [y] => 32670510020758816978083085130507043184471273380659243275938904335757337482424
                    [z] => 115792089237316195423570985008687907852837564279074904382605163141518161494337
                    [curve] => Mdanter\Ecc\Curves\NamedCurveFp Object
                        (
                            [a] => 0
                            [b] => 7
                            [prime] => 115792089237316195423570985008687907853269984665640564039457584007908834671663
                        )

                )

        )

    [depth:BitWasp\Bitcoin\Key\Deterministic\HierarchicalKey:private] => 5
    [parentFingerprint:BitWasp\Bitcoin\Key\Deterministic\HierarchicalKey:private] => 723835999
    [sequence:BitWasp\Bitcoin\Key\Deterministic\HierarchicalKey:private] => 0
    [chainCode:BitWasp\Bitcoin\Key\Deterministic\HierarchicalKey:private] => BitWasp\Buffertools\Buffer Object
        (
            [size] => 32
            [buffer] => 0xfb02983db7403c801564ac0282bec2be39722325968b530fc3505898e3b346da
        )

    [key:BitWasp\Bitcoin\Key\Deterministic\HierarchicalKey:private] => BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Key\PublicKey Object
        (
            [ecAdapter:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Key\PublicKey:private] => BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter Object
                (
                    [math:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter:private] => BitWasp\Bitcoin\Math\Math Object
                        (
                        )

                    [generator:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter:private] => Mdanter\Ecc\Primitives\GeneratorPoint Object
                        (
                            [x] => 55066263022277343669578718895168534326250603453777594175500187360389116729240
                            [y] => 32670510020758816978083085130507043184471273380659243275938904335757337482424
                            [z] => 115792089237316195423570985008687907852837564279074904382605163141518161494337
                            [curve] => Mdanter\Ecc\Curves\NamedCurveFp Object
                                (
                                    [a] => 0
                                    [b] => 7
                                    [prime] => 115792089237316195423570985008687907853269984665640564039457584007908834671663
                                )

                        )

                )

            [point:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Key\PublicKey:private] => Mdanter\Ecc\Primitives\Point Object
                (
                    [x] => 109756113754416006883068144059295232931743649784206556207715924624422608984554
                    [y] => 30336686192482416354579004682961920948817072959615255523669782145222377339335
                    [z] => 0
                    [curve] => Mdanter\Ecc\Curves\NamedCurveFp Object
                        (
                            [a] => 0
                            [b] => 7
                            [prime] => 115792089237316195423570985008687907853269984665640564039457584007908834671663
                        )

                )

            [prefix:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Key\PublicKey:private] =>
            [compressed:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Key\PublicKey:private] => 1
            [pubKeyHash:protected] =>
        )

    [scriptDataFactory:BitWasp\Bitcoin\Key\Deterministic\HierarchicalKey:private] => BitWasp\Bitcoin\Key\KeyToScript\Factory\P2pkhScriptDataFactory Object
        (
            [pubKeySerializer:protected] => BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Serializer\Key\PublicKeySerializer Object
                (
                    [ecAdapter:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Serializer\Key\PublicKeySerializer:private] => BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter Object
                        (
                            [math:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter:private] => BitWasp\Bitcoin\Math\Math Object
                                (
                                )

                            [generator:BitWasp\Bitcoin\Crypto\EcAdapter\Impl\PhpEcc\Adapter\EcAdapter:private] => Mdanter\Ecc\Primitives\GeneratorPoint Object
                                (
                                    [x] => 55066263022277343669578718895168534326250603453777594175500187360389116729240
                                    [y] => 32670510020758816978083085130507043184471273380659243275938904335757337482424
                                    [z] => 115792089237316195423570985008687907852837564279074904382605163141518161494337
                                    [curve] => Mdanter\Ecc\Curves\NamedCurveFp Object
                                        (
                                            [a] => 0
                                            [b] => 7
                                            [prime] => 115792089237316195423570985008687907853269984665640564039457584007908834671663
                                        )

                                )

                        )

                )

        )

    [scriptAndSignData:BitWasp\Bitcoin\Key\Deterministic\HierarchicalKey:private] =>
)
hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
Your xpub should be the extended master public key. Why do you believe that your derivation path is formed according to BIP44?
Why do you believe that your provided per user path is hardened (like you tried with m/44'/client_id'/0' and m/44'/0'/clientid'/0')? I don't see any clue for that in your code. Is that somewhere implicitly used in the modules of that Bit-Wasp/bitcoin-phpLibrary?

Probably you'd need to dig in the code there further. You will have to find out what full derivation path for a client user address is used.

To narrow it down, print some log line for $pubPrefix, $config and add some log lines for function derivePath(), maybe you can see there how the derivation path is assembled.
copper member
Activity: 12
Merit: 51
Code:
$path = $client_id.'/0';

Since m/44'/0'/0' worked and the code you gave above, I think it goes:
m/44'/client_id'/0'
(either that or m/44'/0'/clientid'/0' -but that may be less likely)



i try m/44'/client_id'/0' and m/44'/0'/clientid'/0' not working

 
Code:
How do you know the addresses generated have actually been funded though? .
i see the money on btc explorer
copper member
Activity: 12
Merit: 51

but that not helping me because the path is different .

when i try login to electrum  with  different path it will give me another XPub
i try those paths :
Code:
m/44'/0'/0'
m/44'/0'/1'
m/44'/1'/0'
m/44'/0'/0'/0'
...

You made quite a mess here.

The third level of the derivation path is the coin type. (Details here: https://www.oreilly.com/library/view/mastering-bitcoin/9781491902639/ch04.html)
For example, m/44/1 is a test network branch

Your script should be creating a new account for each user, then it ahould be m/44/0/username


Quote
the only one give me right XPub is m/44'/0'/0'

now how i can make electrum  generate  addresses with the same path i use in my php script

Code:

527/0
528/0
.
.


Each time you change the derivation path after the third level you will get a new xpub. This is why electrum is showing a different xpub.
 You can see it in action here: https://iancoleman.io/bip39/

You can change de derivation path and see how the xpub changes.

An xpub will derive all public keys in that branch.
I think that as you generated an xpub in the top level, it contains all those child ones. You are just getting an xpub of child branches.  You have those keys in your xpub.

You just need to figure out in which derivation path they are.

Can you give us more information about this script you made?



In your next payments, you should definitely use a professional solution like btcpayserver.org
They have hardware wallet integration and it is free to use

https://docs.btcpayserver.org/HardwareWalletIntegration/

thanks for explaining

about the script :
 i install Bit-Wasp/bitcoin-phpLibrary
Code:
composer require bitwasp/bitcoin


and i make new file HD.php :
link for HD.php :
https://gist.githubusercontent.com/mariodian/5b67a1f315a74a7753a6f23d0198ec48/raw/2742a7909dd2621381de53209e85348a078df470/HD.php
OR

Code:

require_once('vendor/autoload.php');

use 
BitWasp\Bitcoin\Bitcoin;
use 
BitWasp\Bitcoin\Address\AddressCreator;
use 
BitWasp\Bitcoin\Key\Deterministic\HdPrefix\GlobalPrefixConfig;
use 
BitWasp\Bitcoin\Key\Deterministic\HdPrefix\NetworkConfig;
use 
BitWasp\Bitcoin\Network\Slip132\BitcoinRegistry;
use 
BitWasp\Bitcoin\Key\Deterministic\Slip132\Slip132;
use 
BitWasp\Bitcoin\Key\KeyToScript\KeyToScriptHelper;
use 
BitWasp\Bitcoin\Key\Deterministic\HierarchicalKeyFactory;
use 
BitWasp\Bitcoin\Key\Deterministic\HierarchicalKeySequence;
use 
BitWasp\Bitcoin\Key\Deterministic\MultisigHD;
use 
BitWasp\Bitcoin\Network\NetworkFactory;
use 
BitWasp\Bitcoin\Serializer\Key\HierarchicalKey\Base58ExtendedKeySerializer;
use 
BitWasp\Bitcoin\Serializer\Key\HierarchicalKey\ExtendedKeySerializer;

class 
HD {
  private 
$network NULL;
  private 
$xpub NULL;
  private 
$ypub NULL;
  private 
$zpub NULL;
  private 
$multisig_xpubs NULL;

  public function 
__construct($network 'bitcoin') {
    if (
version_compare(PHP_VERSION'5.3') >= 0) {
      
$this->network NetworkFactory::$network();
    } elseif (
version_compare(PHP_VERSION'5.2.3') >= 0) {
      
$this->network call_user_func("NetworkFactory::$network");
    } else {
      
$this->network call_user_func('NetworkFactory'$network);
    }
  }

  public function 
set_xpub($xpub) {
    
$this->xpub $xpub;
  }

  public function 
set_ypub($ypub) {
    
$this->ypub $ypub;
  }

  public function 
set_zpub($zpub) {
    
$this->zpub $zpub;
  }

  public function 
set_multisig_xpubs($xpubs) {
    
$this->multisig_xpubs $xpubs;
  }

  public function 
address_from_master_pub($path '0/0') {
    if (
$this->xpub === NULL && $this->ypub === NULL && $this->zpub === NULL) {
      throw new 
Exception("XPUB, YPUB or ZPUB key is not present!");
    }

    
$adapter Bitcoin::getEcAdapter();
    
$slip132 = new Slip132(new KeyToScriptHelper($adapter));
    
$bitcoin_prefixes = new BitcoinRegistry();

    if (
$this->xpub !== NULL) {
      
$pubPrefix $slip132->p2pkh($bitcoin_prefixes);
      
$pub $this->xpub;
    } else if (
$this->ypub !== NULL) {
      
$pubPrefix $slip132->p2shP2wpkh($bitcoin_prefixes);
      
$pub $this->ypub;
    } else if (
$this->zpub !== NULL) {
      
$pubPrefix $slip132->p2wpkh($bitcoin_prefixes);
      
$pub $this->zpub;
    }

    
$config = new GlobalPrefixConfig([
      new 
NetworkConfig($this->network, [
        
$pubPrefix,
      ])
    ]);

    
$serializer = new Base58ExtendedKeySerializer(
      new 
ExtendedKeySerializer($adapter$config)
    );

    
$key $serializer->parse($this->network$pub);
    
$child_key $key->derivePath($path);

    return 
$child_key->getAddress(new AddressCreator())->getAddress();
  }

  public function 
multisig_address_from_xpub($m$path '0/0') {
    if (
count($this->multisig_xpubs) < 2) {
      throw new 
Exception("XPUB keys are not present!");
    }

    
$keys = array();

    foreach (
$this->multisig_xpubs as $xpub) {
      
$keys[] = HierarchicalKeyFactory::fromExtended($xpub$this->network);
    }

    
$sequences = new HierarchicalKeySequence();
    
$hd = new MultisigHD($m'm'$keys$sequencesTRUE);

    
$child_key $hd->derivePath($path);

    return 
$child_key->getAddress()->getAddress($this->network);
  }
}


after that i include HD.php in my project like this :

Code:
require_once('./HD.php');

$xpub = 'xpub......';
$path = $client_id.'/0';
$hd = new HD();
$hd->set_xpub($xpub);
$address = $hd->address_from_master_pub($path);

where $client_id is client id  number


copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
Code:
$path = $client_id.'/0';

Since m/44'/0'/0' worked and the code you gave above, I think it goes:
m/44'/client_id'/0'
(either that or m/44'/0'/clientid'/0' -but that may be less likely)

How do you know the addresses generated have actually been funded though? I think you need a script thst goes through and checks from an api (such as a block explorer) as to whether an address you control has been funded or not.
legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet

but that not helping me because the path is different .

when i try login to electrum  with  different path it will give me another XPub
i try those paths :
Code:
m/44'/0'/0'
m/44'/0'/1'
m/44'/1'/0'
m/44'/0'/0'/0'
...

You made quite a mess here.

The third level of the derivation path is the coin type. (Details here: https://www.oreilly.com/library/view/mastering-bitcoin/9781491902639/ch04.html)
For example, m/44/1 is a test network branch

Your script should be creating a new account for each user, then it ahould be m/44/0/username


Quote
the only one give me right XPub is m/44'/0'/0'

now how i can make electrum  generate  addresses with the same path i use in my php script

Code:

527/0
528/0
.
.


Each time you change the derivation path after the third level you will get a new xpub. This is why electrum is showing a different xpub.
 You can see it in action here: https://iancoleman.io/bip39/

You can change de derivation path and see how the xpub changes.

An xpub will derive all public keys in that branch.
I think that as you generated an xpub in the top level, it contains all those child ones. You are just getting an xpub of child branches.  You have those keys in your xpub.

You just need to figure out in which derivation path they are.

Can you give us more information about this script you made?



In your next payments, you should definitely use a professional solution like btcpayserver.org
They have hardware wallet integration and it is free to use

https://docs.btcpayserver.org/HardwareWalletIntegration/
copper member
Activity: 12
Merit: 51
use m/44'/0'/client id', try that first and see if you'd get the address.

same thing electrum  gave me different XPub
any change  to this path 

Code:
m/44'/0'/0'

electrum   will gave me different XPub
jr. member
Activity: 107
Merit: 8
use m/44'/0'/client id', try that first and see if you'd get the address.
copper member
Activity: 12
Merit: 51
i open trezor in electrum  like this :
Create a new wallet
Select Standard wallet
select  hardware device
Choose derivation path m/44'/0'/0' .

What happens if you choose derivation paths like m/44'/528'/0' or m/44'/0'/528' ? I think that the funds from customer 528 should be there.


i just try it , and not working
electrum  gave me different XPub
legendary
Activity: 3500
Merit: 6205
Looking for campaign manager? Contact icopress!
i open trezor in electrum  like this :
Create a new wallet
Select Standard wallet
select  hardware device
Choose derivation path m/44'/0'/0' .

What happens if you choose derivation paths like m/44'/528'/0' or m/44'/0'/528' ? I think that the funds from customer 528 should be there.
copper member
Activity: 12
Merit: 51
i have big problem   Sad

i start accepting btc in my website .

what i do :

i get my XPub from my  trezor wallet .
and from that  XPub  i start generate btc aaddresses for clients.

i do that using this method :

https://developpaper.com/generating-bitcoin-wallet-address-from-extended-public-key-using-php/


and the code i use in my script to generate btc addresses is this :

Code:
require_once('./HD.php');

$xpub = 'xpub......';
$path = $client_id.'/0';
$hd = new HD();
$hd->set_xpub($xpub);
$address = $hd->address_from_master_pub($path);


 where $client_id is number  like :

Code:
526
527
528
....



and after using this method for hundreds of payments, i open my trezor wallet and i dont find anything , even i see the money on btc explorer .

i find my problem is in my code , here:

$path = $client_id.'/0';

i use different  derivation path for each client.

 what i try to solve this :

 i try electrum  wallet ,

i open trezor in electrum  like this :
Create a new wallet
Select Standard wallet
select  hardware device
Choose derivation path m/44'/0'/0' .

when its open and see the addresses, its gets first address right ,but the second and  third and ... its different than  addresses generated from my php script .


i try console tab in electrum , to load more addresses :

Code:
wallet.change_gap_limit ( 2000 )

but that not helping me because the path is different .

when i try login to electrum  with  different path it will give me another XPub
i try those paths :
Code:
m/44'/0'/0'
m/44'/0'/1'
m/44'/1'/0'
m/44'/0'/0'/0'
...


the only one give me right XPub is m/44'/0'/0'

now how i can make electrum  generate  addresses with the same path i use in my php script

Code:

527/0
528/0
.
.



the REWARD $50 will be in BNB  
 
Jump to: