Interface ConfigLoadOptions

interface ConfigLoadOptions {
    dnsServers?: string[];
    fetchCidContent?: (cid: string, path?: string) => Promise<null | Blob>;
    fromCid?: string;
    fromDns?: string | boolean;
    fromLocalStorage?: boolean;
    fromUrlParam?: string | boolean;
    fromUrls?: boolean;
    ipfsGatewayServers?: (cid: string) => string[];
    order?: ConfigLoadMethod[];
    schema?: AnySchema;
    static?: Record<string, any>;
    strategy?: ConfigLoadingStrategy;
    url?: string | string[] | (environment: Environment) => string | string[];
}

Properties

dnsServers?: string[]
fetchCidContent?: (cid: string, path?: string) => Promise<null | Blob>
fromCid?: string

Load additional configuration directly from the given Content Identifier (CID). This takes precedence over fromDns if both are provided.

fromDns?: string | boolean

Load additional configuration based on a CID found in a DNS TXT record. If true, uses location.hostname. If a string, uses that domain.

fromLocalStorage?: boolean
fromUrlParam?: string | boolean
fromUrls?: boolean
ipfsGatewayServers?: (cid: string) => string[]

Defines the order and subset of config sources to load. If not specified, defaults to: [FROM_URLS, FROM_LOCAL_STORAGE, FROM_URL_PARAM, FROM_CID]

Note: static config is always merged first, and Overwrites are always merged last. Note: fromDns is not a source itself - it resolves the CID for FROM_CID.

schema?: AnySchema
static?: Record<string, any>

static config values

url?: string | string[] | (environment: Environment) => string | string[]