Convert an extended public key between formats
the extended public key to convert
the target format to convert to
converted extended public key or error object with the failed key and error message
import {convertExtendedPublicKey} from "@caravan/bitcoin";const tpub = convertExtendedPublicKey("xpub6CCH...", "tpub");console.log(tpub.extendedPublicKey, tpub.message)// tpubDCZv... Copy
import {convertExtendedPublicKey} from "@caravan/bitcoin";const tpub = convertExtendedPublicKey("xpub6CCH...", "tpub");console.log(tpub.extendedPublicKey, tpub.message)// tpubDCZv...
Convert an extended public key between formats