UNPKG

@chainlink/renvm-address-set

Version:
25 lines 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.logConfig = exports.getConfig = exports.DEFAULT_TOKEN_OR_CONTRACT = exports.DEFAULT_NETWORK = exports.ENV_API_ENDPOINT = exports.ENV_NETWORK = void 0; const external_adapter_1 = require("@chainlink/external-adapter"); const ea_bootstrap_1 = require("@chainlink/ea-bootstrap"); const interfaces_1 = require("@renproject/interfaces"); exports.ENV_NETWORK = 'NETWORK'; exports.ENV_API_ENDPOINT = 'API_ENDPOINT'; exports.DEFAULT_NETWORK = 'testnet'; exports.DEFAULT_TOKEN_OR_CONTRACT = 'BTC'; exports.getConfig = (prefix = '') => { const network = ea_bootstrap_1.util.getEnv(exports.ENV_NETWORK, prefix); if (network && !interfaces_1.isRenNetwork(network)) throw Error(`Unknown Ren network: ${network}`); return { network: network, api: { baseURL: ea_bootstrap_1.util.getEnv(exports.ENV_API_ENDPOINT, prefix), }, }; }; exports.logConfig = (config) => { external_adapter_1.logger.debug('Adapter configuration:', { config }); }; //# sourceMappingURL=config.js.map