{"version":3,"sources":["webpack:///./node_modules/sscjs/lib/ssc.js"],"names":["global","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","inModule","module","runtime","regeneratorRuntime","exports","wrap","ContinueSentinel","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","call","Gp","GeneratorFunctionPrototype","Generator","create","GeneratorFunction","constructor","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","arg","__await","defineIteratorMethods","AsyncIterator","async","innerFn","outerFn","self","tryLocsList","iter","next","then","result","done","value","toString","keys","object","key","push","reverse","length","pop","Context","reset","skipTempReset","prev","sent","_sent","undefined","delegate","method","tryEntries","forEach","resetTryEntry","charAt","isNaN","slice","stop","rootRecord","completion","type","rval","dispatchException","exception","context","handle","loc","caught","record","i","entry","tryLoc","hasCatch","hasFinally","catchLoc","finallyLoc","Error","abrupt","finallyEntry","complete","afterLoc","finish","thrown","delegateYield","iterable","resultName","nextLoc","protoGenerator","generator","_invoke","state","doneResult","delegateResult","maybeInvokeDelegate","tryCatch","makeInvokeMethod","fn","obj","err","previousPromise","callInvokeWithMethodAndArg","Promise","resolve","reject","invoke","unwrapped","return","TypeError","info","pushTryEntry","locs","iteratorMethod","Function","ex","axios","asyncToGenerator","gen","apply","arguments","step","error","classCallCheck","instance","Constructor","createClass","defineProperties","target","props","descriptor","enumerable","configurable","writable","defineProperty","protoProps","staticProps","_extends","assign","source","SSC","rpcNodeUrl","timeout","baseURL","headers","id","_ref2","_ref","endpoint","request","callback","sendWithCallback","sendWithPromise","postData","jsonrpc","post","response","data","catch","_this","send","contract","table","query","limit","offset","indexes","blockNumber","txid","_callee","startBlock","res","nextBlock","endBlock","_this2","pollingTime","_context","getBlockInfo","setTimeout","streamFromTo","t0","_x13","_callee2","_ref3","_context2","getLatestBlockInfo","_x15"],"mappings":"iFAOC,SAAUA,GACT,aAEA,I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AQC,EAAUxI,KAClBuH,EAAcgB,EAAMhB,YAGpBvK,KAAKmL,aAAaZ,EAAa,KAAMjB,EAAUyB,GAEjD,KAAK,EACL,IAAK,MACH,OAAOS,EAAU7H,UAGtB2H,EAAUtL,UAGf,SAAgB0L,GACd,OAAOxC,EAAM3B,MAAMvH,KAAMwH,gBAMxBoB,EA7VC,GAgWVnJ,EAAOG,QAAUgJ","file":"vendor.sscjs~694c4a89.a4815d84f19550a9cfe5.chunk.js","sourcesContent":["/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n!(function(global) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n var inModule = typeof module === \"object\";\n var runtime = global.regeneratorRuntime;\n if (runtime) {\n if (inModule) {\n // If regeneratorRuntime is defined globally and we're in a module,\n // make the exports object identical to regeneratorRuntime.\n module.exports = runtime;\n }\n // Don't bother evaluating the rest of this file if the runtime was\n // already defined globally.\n return;\n }\n\n // Define the runtime globally (as expected by generated code) as either\n // module.exports (if we're in a module) or a new, empty object.\n runtime = global.regeneratorRuntime = inModule ? module.exports : {};\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n runtime.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n runtime.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n runtime.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n runtime.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return Promise.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration. If the Promise is rejected, however, the\n // result for this iteration will be rejected with the same\n // reason. Note that rejections of yielded Promises are not\n // thrown back into the generator function, as is the case\n // when an awaited Promise is rejected. This difference in\n // behavior between yield and await is important, because it\n // allows the consumer to decide what to do with the yielded\n // rejection (swallow it and continue, manually .throw it back\n // into the generator, abandon iteration, whatever). With\n // await, by contrast, there is no opportunity to examine the\n // rejection reason outside the generator function, so the\n // only option is to throw it from the await expression, and\n // let the generator function handle the exception.\n result.value = unwrapped;\n resolve(result);\n }, reject);\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n runtime.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n runtime.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return runtime.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n if (delegate.iterator.return) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n runtime.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n runtime.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n})(\n // In sloppy mode, unbound `this` refers to the global object, fallback to\n // Function constructor if we're in global strict mode. That is sadly a form\n // of indirect eval which violates Content Security Policy.\n (function() { return this })() || Function(\"return this\")()\n);\n\n'use strict';\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar axios = _interopDefault(require('axios'));\n\nvar asyncToGenerator = function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step(\"next\", value);\n }, function (err) {\n step(\"throw\", err);\n });\n }\n }\n\n return step(\"next\");\n });\n };\n};\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar BLOCKCHAIN_API = 'blockchain';\nvar CONTRACTAPI = 'contracts';\n\nvar SSC = function () {\n /**\n * send a JSON RPC request\n * @param {String} rpcNodeUrl the url of the JSON RPC node\n * @param {Number} timeout timeout after which the request is aborted, default 15 secs\n */\n function SSC(rpcNodeUrl) {\n var timeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 15000;\n classCallCheck(this, SSC);\n\n this.axios = axios.create({\n baseURL: rpcNodeUrl,\n timeout: timeout,\n headers: {\n 'Content-Type': 'application/json',\n 'Access-Control-Allow-Origin': '*'\n }\n });\n\n this.id = 1;\n }\n\n /**\n * send a JSON RPC request\n * @param {String} endpoint endpoint\n * @param {JSON} request request\n * @param {Function} callback callback called after the request is sent if passed (a promise is returned otherwise)\n */\n\n\n createClass(SSC, [{\n key: 'send',\n value: function send(endpoint, request, callback) {\n\n if (callback) {\n this.sendWithCallback(endpoint, request, callback);\n }\n\n return this.sendWithPromise(endpoint, request);\n }\n\n /**\n * send a JSON RPC request with callback\n * @param {String} endpoint endpoint\n * @param {JSON} request request\n * @param {Function} callback callback called after the request is sent\n */\n\n }, {\n key: 'sendWithCallback',\n value: function sendWithCallback(endpoint, request, callback) {\n var postData = _extends({\n jsonrpc: '2.0',\n id: this.id\n }, request);\n\n this.id += 1;\n\n this.axios.post(endpoint, postData).then(function (response) {\n callback(null, response.data.result);\n }).catch(function (error) {\n callback(error, null);\n });\n }\n\n /**\n * send a JSON RPC request, return a promise\n * @param {String} endpoint endpoint\n * @param {JSON} request request\n * @returns {Promise} returns a promise\n */\n\n }, {\n key: 'sendWithPromise',\n value: function sendWithPromise(endpoint, request) {\n var _this = this;\n\n var postData = _extends({\n jsonrpc: '2.0',\n id: this.id\n }, request);\n\n this.id += 1;\n\n return new Promise(function (resolve, reject) {\n _this.axios.post(endpoint, postData).then(function (response) {\n resolve(response.data.result);\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n\n /**\n * Get the information of a contract (owner, source code, etc...)\n * @param {String} name contract name\n * @param {Function} callback callback called if passed\n * @returns {Promise} returns a promise if no callback passed\n */\n\n }, {\n key: 'getContractInfo',\n value: function getContractInfo(name) {\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n var request = {\n 'method': 'getContract',\n 'params': {\n name: name\n }\n };\n\n return this.send(CONTRACTAPI, request, callback);\n }\n\n /**\n * retrieve a record from the table of a contract\n * @param {String} contract contract name\n * @param {String} table table name\n * @param {JSON} query query to perform on the table\n * @param {Function} callback callback called if passed\n * @returns {Promise} returns a promise if no callback passed\n */\n\n }, {\n key: 'findOne',\n value: function findOne(contract, table, query) {\n var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n var request = {\n 'method': 'findOne',\n 'params': {\n contract: contract,\n table: table,\n query: query\n }\n };\n\n return this.send(CONTRACTAPI, request, callback);\n }\n\n /**\n * retrieve records from the table of a contract\n * @param {String} contract contract name\n * @param {String} table table name\n * @param {JSON} query query to perform on the table\n * @param {Integer} limit limit the number of records to retrieve\n * @param {Integer} offset offset applied to the records set\n * @param {Array} indexes array of index definitions { index: string, descending: boolean }\n * @param {Function} callback callback called if passed\n * @returns {Promise} returns a promise if no callback passed\n */\n\n }, {\n key: 'find',\n value: function find(contract, table, query) {\n var limit = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1000;\n var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n var indexes = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];\n var callback = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;\n\n var request = {\n 'method': 'find',\n 'params': {\n contract: contract,\n table: table,\n query: query,\n limit: limit,\n offset: offset,\n indexes: indexes\n }\n };\n\n return this.send(CONTRACTAPI, request, callback);\n }\n\n /**\n * retrieve the latest block info of the sidechain\n * @param {Function} callback callback called if passed\n * @returns {Promise} returns a promise if no callback passed\n */\n\n }, {\n key: 'getLatestBlockInfo',\n value: function getLatestBlockInfo() {\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n var request = {\n 'method': 'getLatestBlockInfo'\n };\n\n return this.send(BLOCKCHAIN_API, request, callback);\n }\n\n /**\n * retrieve the specified block info of the sidechain\n * @param {Number} blockNumber block number\n * @param {Function} callback callback called if passed\n * @returns {Promise} returns a promise if no callback passed\n */\n\n }, {\n key: 'getBlockInfo',\n value: function getBlockInfo(blockNumber) {\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n var request = {\n 'method': 'getBlockInfo',\n 'params': {\n blockNumber: blockNumber\n }\n };\n\n return this.send(BLOCKCHAIN_API, request, callback);\n }\n\n /**\n * retrieve the specified transaction info of the sidechain\n * @param {String} txid transaction id\n * @param {Function} callback callback called if passed\n * @returns {Promise} returns a promise if no callback passed\n */\n\n }, {\n key: 'getTransactionInfo',\n value: function getTransactionInfo(txid) {\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n var request = {\n 'method': 'getTransactionInfo',\n 'params': {\n txid: txid\n }\n };\n\n return this.send(BLOCKCHAIN_API, request, callback);\n }\n\n /**\n * stream part of the sidechain\n * @param {Number} startBlock the first block to retrieve\n * @param {Number} endBlock if passed the stream will stop after the block is retrieved\n * @param {Function} callback callback called everytime a block is retrieved\n * @param {Number} pollingTime polling time, default 1 sec\n */\n\n }, {\n key: 'streamFromTo',\n value: function () {\n var _ref = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(startBlock) {\n var endBlock = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n var _this2 = this;\n\n var callback = arguments[2];\n var pollingTime = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1000;\n var res, nextBlock;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.prev = 0;\n _context.next = 3;\n return this.getBlockInfo(startBlock);\n\n case 3:\n res = _context.sent;\n nextBlock = startBlock;\n\n if (res !== null) {\n callback(null, res);\n nextBlock += 1;\n }\n\n if (endBlock === null || endBlock && nextBlock <= endBlock) {\n setTimeout(function () {\n _this2.streamFromTo(nextBlock, endBlock, callback, pollingTime);\n }, pollingTime);\n }\n _context.next = 13;\n break;\n\n case 9:\n _context.prev = 9;\n _context.t0 = _context['catch'](0);\n\n callback(_context.t0, null);\n setTimeout(function () {\n _this2.streamFromTo(startBlock, endBlock, callback, pollingTime);\n }, pollingTime);\n\n case 13:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this, [[0, 9]]);\n }));\n\n function streamFromTo(_x13) {\n return _ref.apply(this, arguments);\n }\n\n return streamFromTo;\n }()\n\n /**\n * stream the sidechain (starting from the latest block produced)\n * @param {Function} callback callback called everytime a block is retrieved\n * @param {Number} pollingTime polling time, default 1 sec\n */\n\n }, {\n key: 'stream',\n value: function () {\n var _ref2 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(callback) {\n var pollingTime = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;\n\n var _ref3, blockNumber;\n\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return this.getLatestBlockInfo();\n\n case 2:\n _ref3 = _context2.sent;\n blockNumber = _ref3.blockNumber;\n\n\n this.streamFromTo(blockNumber, null, callback, pollingTime);\n\n case 5:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function stream(_x15) {\n return _ref2.apply(this, arguments);\n }\n\n return stream;\n }()\n }]);\n return SSC;\n}();\n\nmodule.exports = SSC;\n"],"sourceRoot":""}