Constructors

Properties

provider: string
providers: { [x: string]: (path: string) => string }

Methods

  • Set the current provider to the fastest provider found by getFastestProvider.

    Parameters

    • Optionaltimeout: number
    • Optionalpath: string

    Returns Promise<string>

  • Get the fastest provider name. If none of the providers returns a valid response within timeout, an error will be thrown.

    Parameters

    • Optionaltimeout: number
    • Optionalpath: string

    Returns Promise<string>

  • Parameters

    • path: string
    • Optionalprovider: string

    Returns string

  • Parameters

    • name: string
    • factory: null | (path: string) => string

    Returns void