I'm looking for a script/pseudocode/utility (preferably, code in javascript/c++ or a secure, verified and open-source rpc client) that can convert a given xpriv to xpub.
Only one I've found (but not tried yet) is this one : https://github.com/sarchar/brainwallet.github.com/tree/bip32
or I know electrum wallet client can do it. I would prefer to read through the code of a standalone script though and/or create my own script