UNPKG

@btc-vision/bsi-common

Version:

Common library for OP_NET.

32 lines (31 loc) 990 B
BigInt.prototype.toJSON = function () { return this.toString(); }; global.BigInt = BigInt; export class Globals { static register() { process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; process.on('uncaughtException', (err) => { if (!err.stack) return; if (err.stack.includes('invalid address')) return; if (err.stack.includes('null: value out of range')) return; console.log('Thread Caught exception: ', err.stack); }); process.emitWarning = (warning, ...args) => { if (typeof args[0] === 'string' && args[0] === 'ExperimentalWarning') { return; } if (typeof args[0] === 'object' && args[0] !== null && args[0].type === 'ExperimentalWarning') { return; } else { console.log(warning); } }; } }