UNPKG

bitcore-wallet-service

Version:
227 lines 6.91 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const lodash_1 = __importDefault(require("lodash")); const logger_1 = require("./lib/logger"); const Config = () => { let defaultConfig = { basePath: '/bws/api', disableLogs: false, port: 3232, storageOpts: { mongoDb: { uri: 'mongodb://0.0.0.0:27017/bws', dbname: 'bws' } }, messageBrokerOpts: { messageBrokerServer: { url: 'http://localhost:3380' } }, blockchainExplorerOpts: { btc: { livenet: { url: 'https://api.bitcore.io' }, testnet3: { url: 'https://api.bitcore.io' }, testnet4: { url: 'https://api.bitcore.io' } }, bch: { livenet: { url: 'https://api.bitcore.io' }, testnet3: { url: 'https://api.bitcore.io' }, testnet4: { url: 'https://api.bitcore.io' }, scalenet: { url: 'https://api.bitcore.io' }, chipnet: { url: 'https://api.bitcore.io' } }, doge: { livenet: { url: 'https://api.bitcore.io' }, testnet3: { url: 'https://api.bitcore.io' } }, ltc: { livenet: { url: 'https://api.bitcore.io' }, testnet4: { url: 'https://api.bitcore.io' } }, xrp: { livenet: { url: 'https://api-xrp.bitcore.io' }, testnet: { url: 'https://api-xrp.bitcore.io' } }, eth: { livenet: { url: 'https://api-eth.bitcore.io' }, sepolia: { url: 'https://api-eth.bitcore.io' } }, matic: { livenet: { url: 'https://api-matic.bitcore.io' }, amoy: { url: 'https://api-matic.bitcore.io' } }, arb: { livenet: { url: 'https://api-eth.bitcore.io' }, sepolia: { url: 'https://api-eth.bitcore.io' } }, base: { livenet: { url: 'https://api-eth.bitcore.io' }, sepolia: { url: 'https://api-eth.bitcore.io' } }, op: { livenet: { url: 'https://api-eth.bitcore.io' }, sepolia: { url: 'https://api-eth.bitcore.io' } }, sol: { livenet: { url: 'https://api-sol.bitcore.io' }, testnet: { url: 'https://api-sol.bitcore.io' }, devnet: { url: 'https://api-sol.bitcore.io' } }, socketApiKey: 'socketApiKey' }, pushNotificationsOpts: { templatePath: 'templates', defaultLanguage: 'en', defaultUnit: 'btc', subjectPrefix: '', pushServerUrl: 'https://fcm.googleapis.com/fcm', pushServerUrlBraze: 'https://rest.iad-05.braze.com', authorizationKey: 'You_have_to_put_something_here', authorizationKeyBraze: 'You_have_to_put_something_here' }, fiatRateServiceOpts: { defaultProvider: 'BitPay', fetchInterval: 5 }, maintenanceOpts: { maintenanceMode: false }, emailOpts: { mailer: 'sendgrid', sendGridApiKey: process.env.SENDGRID_API_KEY, mailerSendApiKey: process.env.MAILERSEND_API_KEY, from: 'override me in bws.config.js', }, services: { buyCrypto: { disabled: false, banxa: { disabled: false, removed: false }, moonpay: { disabled: false, removed: false }, ramp: { disabled: false, removed: false }, sardine: { disabled: false, removed: false }, simplex: { disabled: false, removed: false }, transak: { disabled: false, removed: false }, wyre: { disabled: false, removed: false } }, sellCrypto: { disabled: false, moonpay: { disabled: false, removed: false }, simplex: { disabled: false, removed: false } }, swapCrypto: { disabled: false, changelly: { disabled: false, removed: false }, thorswap: { disabled: false, removed: false, } }, }, suspendedChains: [], staticRoot: '/tmp/static', }; try { const bwsConfig = require('../bws.config'); defaultConfig = lodash_1.default.merge(defaultConfig, bwsConfig); } catch { logger_1.logger.info('bws.config.js not found, using default configuration values'); } if (process.env.SENDGRID_API_KEY) { defaultConfig.emailOpts.sendGridApiKey = process.env.SENDGRID_API_KEY; } if (process.env.MAILERSEND_API_KEY) { defaultConfig.emailOpts.mailerSendApiKey = process.env.MAILERSEND_API_KEY; } return defaultConfig; }; exports.default = Config(); //# sourceMappingURL=config.js.map