UNPKG

@bancor/carbon-sdk

Version:

The SDK is a READ-ONLY tool, intended to facilitate working with Carbon contracts. It's a convenient wrapper around our matching algorithm, allowing programs and users get a ready to use transaction data that will allow them to manage strategies and fulfi

2 lines (1 loc) 574 B
import{getRuntimeConfig as o}from"../../runtime-config/index.js";const e=o().logVerbosityLevel;const r=console.log;function t(o){return null==o?o:"bigint"==typeof o?o.toString():Array.isArray(o)?o.map(t):"object"==typeof o?Object.fromEntries(Object.entries(o).map((([o,e])=>[o,t(e)]))):o}e>=2&&(console.debug=(...o)=>{const e=o.map(t);r.apply(console,e)});class i{_prefix;constructor(o){this._prefix=`[SDK][${o}]:`}error(...o){console.error(this._prefix,...o)}log(...o){console.log(this._prefix,...o)}debug(...o){e>=1&&console.debug(this._prefix,...o)}}export{i as Logger};