Caravan Documentation
    Preparing search index...

    Function isValidChildPubKey

    • When you have a global xpub from a PSBT, it's useful to make sure that a child pubkey can be derived from that psbt. Sometimes the pubkey derivation comes from a masked and/or blinded xpub. So we need to combine the child derivation with the global and confirm that the pubkey can be derived from that source

      Parameters

      • derivation: Bip32Derivation

        {Bip32Derivation} - derivation to validate. This type is from the bitcoinjs-lib bip174 package

      • globalXpub: KeyOrigin

        {KeyOrigin} - global xpub from the psbt

      • network: Network = Network.MAINNET

        {Network}

      Returns boolean

      whether the child pubkey can be derived from the global xpub