let bip32 = require('bip32'); let bip39 = require('bip39'); let { bech32, bech32m } = require('bech32') const seed = bip39.mnemonicToSeedSync('rural catch say tooth tell soul road pilot fee board goose wedding'); // ^randomly generated for this question const node = bip32.fromSeed(seed, bitcoin.networks.testnet); //legacy account extended private key console.log("LEGACY: " + node.derivePath("m/44'/0/0").toBase58()); //tprv8giQNMeV5drQbXzAxSaVDj5Q1rAuTDZdGWoSx5oaLfuk9rupqVZXoziLgJSpkuauCToZw7BepygJjJaDBWKx5xQLimyg4KFtKnU2E7b99YH //segwit account extended private key //how do I take the same inputs, and get a segwit extended private key / zprv
This is how I’m getting my xprv, I’d like to also test out getting a zprv but I’m having trouble finding the documentation for this. I’m assuming it’s going to be something using bech32.