UNPKG

3.57 kBJavaScriptView Raw
1'use strict';
2
3var config = {
4 basePath: '/ws/api',
5 port: 3232,
6 ignoreRateLimiter: false,
7
8 // Log levels; debug, warn, info, error
9 log: {
10 disable: false,
11 level: 'debug'
12 },
13
14 // Uncomment to make wallet-service a forking server
15 // cluster: true,
16
17 // Uncomment to set the number or process (will use the nr of availalbe CPUs by default)
18 // clusterInstances: 4,
19
20 // https: true,
21 // privateKeyFile: 'private.pem',
22 // certificateFile: 'cert.pem',
23 ////// The following is only for certs which are not
24 ////// trusted by nodejs 'https' by default
25 ////// CAs like Verisign do not require this
26 // CAinter1: '', // ex. 'COMODORSADomainValidationSecureServerCA.crt'
27 // CAinter2: '', // ex. 'COMODORSAAddTrustCA.crt'
28 // CAroot: '', // ex. 'AddTrustExternalCARoot.crt'
29
30 storageOpts: {
31 mongoDb: {
32 uri: 'mongodb://localhost:27017/ws'
33 }
34 },
35
36 lockOpts: {
37 lockerServer: {
38 host: 'localhost',
39 port: 3231
40 }
41 },
42
43 messageBrokerOpts: {
44 port: 3380,
45 // If using a remote service.
46 // messageBrokerServer: {
47 // url: 'http://remotehost:3380'
48 // }
49 },
50
51 emailOpts: {
52 transport: {
53 host: 'localhost',
54 port: 25,
55 ignoreTLS: true
56 },
57 defaultLanguage: 'en',
58 subjectPrefix: '[Wallet Service]',
59 from: 'wallet-service@owstack.com',
60 templatePath: '../base-service/lib/templates',
61 publicTxUrlTemplate: {
62 livenet: 'http://explorer.owstack.org/explorer/tx/{{txid}}',
63 // testnet: 'http://explorer.owstack.org/explorer/tx/{{txid}}'
64 }
65 },
66
67 // Sendgrid.
68 // const sgMail = require('@sendgrid/mail');
69 // sgMail.setApiKey(process.env.SENDGRID_API_KEY);
70 //
71 // Add config:
72 // mailer: sgMail,
73
74 pushNotificationsOpts: {
75 templatePath: './lib/templates',
76 defaultLanguage: 'en',
77 subjectPrefix: '',
78 pushServerUrl: 'https://fcm.googleapis.com/fcm',
79 authorizationKey: ''
80 },
81
82 fiatRateServiceOpts: {
83 provider: 'OpenWalletStack',
84 fetchInterval: 60 // in minutes
85 },
86
87 // Each server (by coin network) has it's own configuration. Where the same services
88 // run for each coin network the url's must be unique across all coin networks.
89
90 BTC: {
91 blockchainExplorerOpts: {
92 defaultProvider: 'explorer',
93 explorer: {
94 // Multiple servers (in priority order)
95 // url: ['http://a.b.c', 'https://test-explorer.owstack.com:443'],
96 livenet: {
97 url: 'http://btc.livenet.explorer-api.owstack.org',
98 apiPrefix: '/explorer-api'
99 },
100 testnet: {
101 url: 'https://test-insight.bitpay.com',
102 apiPrefix: '/api'
103 }
104 }
105 }
106 },
107
108 BCH: {
109 blockchainExplorerOpts: {
110 defaultProvider: 'explorer',
111 explorer: {
112 // Multiple servers (in priority order)
113 // url: ['http://a.b.c', 'https://test-explorer.owstack.com:443'],
114 livenet: {
115 url: 'http://bch.livenet.explorer-api.owstack.org',
116 apiPrefix: '/explorer-api'
117 },
118 /*testnet: {
119 url: '',
120 apiPrefix: ''
121 }*/
122 }
123 }
124 },
125
126 LTC: {
127 blockchainExplorerOpts: {
128 defaultProvider: 'explorer',
129 explorer: {
130 // Multiple servers (in priority order)
131 // url: ['http://a.b.c', 'https://test-explorer.owstack.com:443'],
132 livenet: {
133 url: 'http://ltc.livenet.explorer-api.owstack.org',
134 apiPrefix: '/explorer-api'
135 },
136 /*testnet: {
137 url: '',
138 apiPrefix: ''
139 }*/
140 }
141 }
142 }
143
144};
145
146module.exports = config;