Cashu-TS - v4.12.0
    Preparing search index...

    Function normalizeMintUrl

    • Parses and normalizes a mint URL: validates the scheme (http/https only), rejects credentials, query parameters, fragments, and percent-encoded characters in the path, and strips any trailing slashes.

      Parameters

      • url: string

      Returns string

      normalizeMintUrl('https://Mint.Example.COM/'); // 'https://mint.example.com'
      

      CTSError if the URL is invalid, non-http(s), or contains credentials, query, fragment, or percent-encoded characters in the path.