2021-09-15 01:47:24 +04:00
|
|
|
import config from '../../config';
|
2022-03-15 14:44:31 +01:00
|
|
|
const bitcoin = require('../../rpc-api/index');
|
2021-09-15 01:47:24 +04:00
|
|
|
import { BitcoinRpcCredentials } from './bitcoin-api-abstract-factory';
|
|
|
|
|
|
|
|
const nodeRpcCredentials: BitcoinRpcCredentials = {
|
|
|
|
host: config.SECOND_CORE_RPC.HOST,
|
|
|
|
port: config.SECOND_CORE_RPC.PORT,
|
|
|
|
user: config.SECOND_CORE_RPC.USERNAME,
|
|
|
|
pass: config.SECOND_CORE_RPC.PASSWORD,
|
2023-03-20 16:15:40 +09:00
|
|
|
timeout: config.SECOND_CORE_RPC.TIMEOUT,
|
2023-03-27 21:28:45 +02:00
|
|
|
cookie: config.SECOND_CORE_RPC.COOKIE ? config.SECOND_CORE_RPC.COOKIE_PATH : undefined,
|
2021-09-15 01:47:24 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
export default new bitcoin.Client(nodeRpcCredentials);
|