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) 698 B
"use strict";require("./numerics-WtCLBFmj.cjs");var r=require("@ethersproject/bignumber");const e=(()=>{try{return self}catch{try{return window}catch{return global}}})();const o=void 0!==e&&Number(e.CARBON_DEFI_SDK_VERBOSITY)||0;const t=console.log;function s(e){return e instanceof r.BigNumber?e.toString():Array.isArray(e)?e.map(s):"object"==typeof e?Object.fromEntries(Object.entries(e).map((([r,e])=>[r,s(e)]))):e}o>=2&&(console.debug=(...r)=>{const e=r.map(s);t.apply(console,e)});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)}};