Vana SDK - v0.1.0
    Preparing search index...

    Function convertIpfsUrl

    • Convert an IPFS URL to an HTTP gateway URL

      Parameters

      • url: string

        The IPFS URL to convert (e.g., "ipfs://QmHash...")

      • gateway: string = DEFAULT_IPFS_GATEWAY

        Optional gateway URL (defaults to DEFAULT_IPFS_GATEWAY)

      Returns string

      The HTTP gateway URL or original URL if not an IPFS URL

      convertIpfsUrl("ipfs://QmHash123")
      // Returns: "https://ipfs.io/ipfs/QmHash123"

      convertIpfsUrl("ipfs://QmHash123", "https://gateway.pinata.cloud/ipfs/")
      // Returns: "https://gateway.pinata.cloud/ipfs/QmHash123"