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) 356 B
import{ChainCache as a}from"./ChainCache/index.js";import{ChainSync as n}from"./ChainSync/index.js";const t=(t,e,r,i,c)=>{let s;e&&(s=a.fromSerialized(e)),s||(s=new a);const o=new n(t,s,r,i,c);return s.setCacheMissHandler(o.syncPairData.bind(o)),{cache:s,startDataSync:o.startDataSync.bind(o)}};export{a as ChainCache,n as ChainSync,t as initSyncedCache};