Hierarchy

  • DappStoreRegistry

Constructors

Properties

cachedRegistry: undefined | DAppStoreSchema
githubOwner: "merokudao" = "merokudao"
githubRepo: "dapp-store-registry" = "dapp-store-registry"
initialized: boolean = false
lastRegistryCheckedAt: undefined | Date
registryRemoteUrl: string = ...
searchEngine: undefined | MiniSearch<any>
strategy: RegistryStrategy
TTL: number = ...

Methods

  • Returns Promise<void>

  • Returns the list of dApps that are listed in the registry. You can optionally filter the results.

    Returns

    The list of dApps that are listed in the registry

    Parameters

    • filterOpts: FilterOptions = ...

      The filter options. Defaults to { isListed: true}

    Returns Promise<DAppSchema[]>

  • Returns {
        category: string;
        subCategory: string[];
    }[]

  • Returns Promise<number>

  • Gets all the featured sections defined in the registry. Along with the dApps. If no featured section is defined, returns undefined

    Returns

    The list of featured sections and the dApps in that section

    Returns Promise<undefined | FeaturedSection[]>

  • Returns

    The title of the registry

    Returns Promise<string>

  • Initializes the registry. This is required before you can use the registry. It builds the search Index and caches the registry. Specifically it performs the following steps

    1. If there's no cached Registry or the cached registry is stale, it fetches the registry from the remote URL
    2. It builds the search index

    If the strategy is Static, then the first load will always happen from local registry.json file. Any subsequent calls after TTL will fetch the registry from the remote URL (if static is stale) & rebuild the search index.

    Returns

    A promise that resolves when the registry is initialized

    Returns Promise<void>

  • Parameters

    • remoteFile: string

    Returns Promise<DAppStoreSchema>

  • Performs search & filter on the dApps in the registry. This always returns the dApps that are listed.

    Returns

    The filtered & sorted list of dApps

    Parameters

    • queryTxt: string

      The text to search for

    • filterOpts: FilterOptions = ...

      The filter options. Defaults to { isListed: true}

    Returns DAppSchema[]

  • search by dapp id

    Returns

    if matches return dappInfo

    Parameters

    • queryTxt: string

      dappId

    Returns DAppSchema[]

  • Parameters

    Returns (string | boolean)[]

Generated using TypeDoc