Sailias / bitcoin_payable

A rails bitcoin payment processing gem
MIT License
121 stars 31 forks source link

How to consolidate payments? #48

Closed FromOopsToOps closed 3 years ago

FromOopsToOps commented 3 years ago

We are using this gem + http://bip32.org/ to generate the address. On bip32 website I set the node path to Simple: m/i, wrote a passphrase on the top of the page, let it fill the information on the page.

We put on config: config.testnet = true to config.testnet = false # btc_config.node_path = '' to btc_config.node_path = 'm/0/' and set btc_config.master_public_key to the xpub in the Derived Public Key line of the bip32 website since on read me it says it should start with xpub and that's the only xpub line on page.

We tried to generate an address, it worked. I transferred funds to that address, transfer worked. I added that address to my wallet app (BlueWallet, android), I can see the funds there.

How do I retrieve those funds back? I want to be able to transfer those funds to somewhere. For testing purposes I intend to send it back to Binance, from where I made the initial payment.

I can't move those funds, add all the other addresses on my BlueWallet app doesn't show any amount.

Thanks in advance, but seems no one is able to help me.

Sailias commented 3 years ago

@FromOopsToOps this is not a bitcoin_payable issue as you are asking about how to use your wallet software. However you derived your master public key, you should have the master private key xprv which you can add to your wallet. I’m assuming all you did was add the derived address to the wallet to be monitored, and didn’t add the private key.

Hopefully that sets you on the right track, moving forward please post these types of questions on a help website or a forum for your wallet.

FromOopsToOps commented 3 years ago

Hey man, really thank you for the response! I didn't add the xpriv anywhere, and when I tried it said it was not possible, so I'll have to research about that that. Thanks for the pointer anyway!

Sailias commented 3 years ago

@FromOopsToOps yes a lot of wallets don’t support HD because the list of addresses is infinite. Here is a list of resources to help you.

https://en.bitcoin.it/wiki/Deterministic_wallet_tools

FromOopsToOps commented 3 years ago

I tried using one of these and they seem to not find the derived address anywhere. Can you confirm if I did it right? I used the Derived Public Key line from bip32.org, and set node path as m/0, while I set on bip32.org Simple: m/i.

Sorry if I'm bothering, I'm just a bit lost on how this works.

Sailias commented 3 years ago

@FromOopsToOps did you figure it out? Also, you can import the xprv into Electrum, it supports deterministic wallets and has a good UI.

To ensure all your payments are scanned into Electrum you can play with the gap_limit. Set it to 100 or 1000 or something.

https://electrum.readthedocs.io/en/latest/faq.html#what-is-the-gap-limit

FromOopsToOps commented 3 years ago

Hey @Sailias I ended up losing the BTC. Any of the addresses I tried (xpriv, xpub, whatever) to try to sweep in Electrum wallet didn't work. Unfortunately lost 70 USD there.