Caravan Documentation
    Preparing search index...

    Function validatePrefix

    • Validate whether or not a string is a valid extended public key prefix

      Parameters

      • prefix:
            | "xpub"
            | "ypub"
            | "zpub"
            | "tpub"
            | "upub"
            | "vpub"
            | "Ypub"
            | "Zpub"
            | "Upub"
            | "Vpub"

        string to be tested

      Returns null

      returns null if valid

      Error with message indicating the invalid prefix.