Bitcoin Forum
May 05, 2024, 10:25:30 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What is an derived Public Key?  (Read 406 times)
XizT (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
June 02, 2017, 12:05:26 PM
 #1

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
Code:
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 Cheesy
BitcoinCleanup.com: Learn why Bitcoin isn't bad for the environment
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714947930
Hero Member
*
Offline Offline

Posts: 1714947930

View Profile Personal Message (Offline)

Ignore
1714947930
Reply with quote  #2

1714947930
Report to moderator
1714947930
Hero Member
*
Offline Offline

Posts: 1714947930

View Profile Personal Message (Offline)

Ignore
1714947930
Reply with quote  #2

1714947930
Report to moderator
1714947930
Hero Member
*
Offline Offline

Posts: 1714947930

View Profile Personal Message (Offline)

Ignore
1714947930
Reply with quote  #2

1714947930
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4166


View Profile
June 02, 2017, 12:25:39 PM
 #2

The derived public key you are referring to here is the master public key(xpub). It is linked with the master private key (xpriv) and it can be used to generate addresses that can also be generated from xpriv.

The xpub can be taken from Electrum by going to wallet>Master public key if the wallet is generated from a seed.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!