Hello,
I have a BTC Depositor, basically a nodejs script for payment in bitcoin, apparently you can create Bitcoin Adresses, that "belong" to you, by generating them with your Public Key, or am I missunderstanding something?
And where do I find my derived Public Key
Little Code snippet
var derivedPubKey = 'xpub6AK3Pskqnn12yJmiAA313sFBE5EABrqH1Ldb2WNUmXYxbQGW481hSCEQFvwdQoHkw7NuYbyN3*****************************';
if (!derivedPubKey)
throw new Error('Must set env var BIP32_DERIVED_KEY');
var hdNode = bitcoinjs.HDNode.fromBase58(derivedPubKey);
exports.deriveAddress = function(index) {
return hdNode.derive(index).pubKey.getAddress().toString();
};
And this code doesnt work anymore, I had a friend that gave me his, and I gave him the Adress that it spit out, he said that the command "bitcoin-client validateadress <adress>" said that the Wallet exists, but it doesnt belong to him
Please help me