Function resolveAssetURL

  • Resolves a full asset download URL from an asset hash.

    Example

    An example of getting this.

    // Fetch the asset index
    const assetIndex = await getAssetIndex(version);

    // Get the asset URL
    const assetUrl = resolveAssetURL(assetIndex.objects[Object.keys(assetIndex.objects)[0]].hash);

    Returns

    The full asset URL.

    Parameters

    • hash: string

      The asset's hash, found in it's object metadata in the asset index.

    Returns string

Generated using TypeDoc