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) 625 B
"use strict";const r=(()=>{try{return self}catch{try{return window}catch{return global}}})();const o=void 0!==r&&Number(r.CARBON_DEFI_SDK_VERBOSITY)||0;const e=console.log;function t(r){return null==r?r:"bigint"==typeof r?r.toString():Array.isArray(r)?r.map(t):"object"==typeof r?Object.fromEntries(Object.entries(r).map((([r,o])=>[r,t(o)]))):r}o>=2&&(console.debug=(...r)=>{const o=r.map(t);e.apply(console,o)});exports.Logger=class{_prefix;constructor(r){this._prefix=`[SDK][${r}]:`}error(...r){console.error(this._prefix,...r)}log(...r){console.log(this._prefix,...r)}debug(...r){o>=1&&console.debug(this._prefix,...r)}};