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()); 

//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.

Asked question