@privateid/ultra-web-sdk-alpha
Version:
CryptoNets WebAssembly SDK
34 lines • 1.02 kB
JavaScript
/* eslint-disable default-param-last */
/* eslint-disable import/no-mutable-exports */
export let apiUrl;
export let orchestrationAPIUrl;
export let orchestrationApiKey;
export let apiKey;
export let wasmUrl;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore /* eslint-disable */
export let cacheConfig;
export const setEnvVariables = (api_key, api_url = null, api_orchestration_url = null, wasm_url = null, cache_config, api_orchestration_api_key = null) => {
if (api_key) {
apiKey = api_key;
}
if (api_url) {
apiUrl = api_url;
}
if (api_orchestration_url) {
orchestrationAPIUrl = api_orchestration_url;
}
if (wasm_url) {
wasmUrl = wasm_url;
}
else if (!wasm_url && !wasmUrl && apiUrl) {
wasmUrl = apiUrl;
}
if (cache_config) {
cacheConfig = cache_config;
}
if (api_orchestration_api_key) {
orchestrationApiKey = api_orchestration_api_key;
}
};
//# sourceMappingURL=envUtils.js.map