i have big problem
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 :
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 :
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 :
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 :
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
527/0
528/0
.
.
the REWARD $50 will be in BNB