Libbitcoin How to generate addresses on demand from xpub? Well, I am really new to this. Just installed libbitcoin and I am reading trough the wiki and everything.
Could someone really quick hint me how to generate addresses whenever I want from xpub that was exported from Electrum wallet? And/or Ledger wallet - if someone knows?
I know that it can be done in bitcoin core, however I would like to give libbitcoin a try.
Thank you very much.
Did you try this section from their documentation?
https://github.com/libbitcoin/libbitcoin-system/wiki/Addresses-and-HD-Wallets
// Load mnemonic sentence into word list
std::string my_sentence = &quot;market parent marriage drive umbrella custom leisure fury recipe steak have enable&quot;;
auto my_word_list = split(my_sentence, &quot; &quot;, true);

// Create an optional secret passphrase
std::string my_passphrase = &quot;my secret passphrase&quot;;

// Create 512bit seed (without optional secret passphrase)
auto hd_seed = decode_mnemonic(my_word_list);
data_chunk seed_chunk(to_chunk(hd_seed));
hd_private m(seed_chunk, hd_private::mainnet);

// Derivation of master public key M
hd_public M = m.to_public();

// Derive public children of master key M
auto M0 = M.derive_public(0); //Depth 1, Index 0
auto M1 = M.derive_public(1); //Depth 1, Index 1
auto M2 = M.derive_public(2); //Depth 1, Index 2

// Derive further public children
auto M10 = M1.derive_public(0); //Depth 2, Index 0
auto M11 = M1.derive_public(1); //Depth 2, Index 1