Search content
Sort by

Showing 13 of 13 results by 0xwork
Post
Topic
Board Hardware wallets
Merits 3 from 2 users
Re: REWARD $200: Funds not visible after using XPub to receive money in my store
by
0xwork
on 14/07/2022, 17:33:01 UTC
⭐ Merited by vapourminer (2) ,bitmover (1)
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


Post
Topic
Board Hardware wallets
Merits 13 from 4 users
Re: REWARD $50: Funds not visible after using XPub to receive money in my store
by
0xwork
on 13/07/2022, 21:53:07 UTC
⭐ Merited by vapourminer (4) ,o_e_l_e_o (4) ,bitmover (4) ,NeuroticFish (1)

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




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$


Post
Topic
Board Hardware wallets
Re: REWARD $50: Funds not visible after using XPub to receive money in my store
by
0xwork
on 12/07/2022, 22:29:22 UTC
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:
<?php
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
Post
Topic
Board Hardware wallets
Re: REWARD $50: Funds not visible after using XPub to receive money in my store
by
0xwork
on 12/07/2022, 21:39:56 UTC
Thanks for everyone trying to help me.

but I try everything and nothing works.
I try  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:
<?php
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$
Post
Topic
Board Hardware wallets
Re: REWARD $50: Funds not visible after using XPub to receive money in my store
by
0xwork
on 06/07/2022, 23:18:43 UTC
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 ?
Post
Topic
Board Hardware wallets
Re: REWARD $50: Funds not visible after using XPub to receive money in my store
by
0xwork
on 06/07/2022, 22:53:18 UTC


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

https://i.postimg.cc/fRPpqDs1/1.png

https://i.postimg.cc/W4rW9ZXJ/2.png

https://i.postimg.cc/nVTdwpYT/3.png

Post
Topic
Board Hardware wallets
Merits 2 from 1 user
Re: REWARD $50: Funds not visible after using XPub to receive money in my store
by
0xwork
on 06/07/2022, 22:14:53 UTC
⭐ Merited by vapourminer (2)
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] =>
)
Post
Topic
Board Hardware wallets
Re: REWARD $50: Funds not visible after using XPub to receive money in my store
by
0xwork
on 06/07/2022, 21:48:43 UTC
Post
Topic
Board Hardware wallets
Re: REWARD $50: Funds not visible after using XPub to receive money in my store
by
0xwork
on 06/07/2022, 19:38:08 UTC
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
Post
Topic
Board Hardware wallets
Merits 2 from 1 user
Re: REWARD $50: Funds not visible after using XPub to receive money in my store
by
0xwork
on 06/07/2022, 19:24:14 UTC
⭐ Merited by vapourminer (2)

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:
<?php

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


Post
Topic
Board Hardware wallets
Re: REWARD $50: Funds not visible after using XPub to receive money in my store
by
0xwork
on 06/07/2022, 18:04:58 UTC
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
Post
Topic
Board Hardware wallets
Re: REWARD $50: Funds not visible after using XPub to receive money in my store
by
0xwork
on 06/07/2022, 17:00:17 UTC
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
Post
Topic
Board Hardware wallets
Merits 31 from 11 users
Topic OP
REWARD $50: Funds not visible after using XPub to receive money in my store
by
0xwork
on 06/07/2022, 16:35:20 UTC
⭐ Merited by LoyceV (6) ,vapourminer (6) ,Welsh (4) ,o_e_l_e_o (4) ,NeuroticFish (3) ,bitmover (2) ,dkbit98 (2) ,RickDeckard (1) ,DireWolfM14 (1) ,Pmalek (1) ,DdmrDdmr (1)
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