rango-sdk-basic 0.1.48 → 0.1.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,345 +2,340 @@ import uuid from 'uuid-random';
2
2
  import { getMessageFromCode } from 'eth-rpc-errors';
3
3
  import axios from 'axios';
4
4
 
5
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
6
+ try {
7
+ var i = n[a](c),
8
+ u = i.value;
9
+ } catch (n) {
10
+ return void e(n);
11
+ }
12
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
13
+ }
14
+ function _asyncToGenerator(n) {
15
+ return function () {
16
+ var t = this,
17
+ e = arguments;
18
+ return new Promise(function (r, o) {
19
+ var a = n.apply(t, e);
20
+ function _next(n) {
21
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
22
+ }
23
+ function _throw(n) {
24
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
25
+ }
26
+ _next(void 0);
27
+ });
28
+ };
29
+ }
30
+ function _extends() {
31
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
32
+ for (var e = 1; e < arguments.length; e++) {
33
+ var t = arguments[e];
34
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
35
+ }
36
+ return n;
37
+ }, _extends.apply(null, arguments);
38
+ }
5
39
  function _regeneratorRuntime() {
6
40
  _regeneratorRuntime = function () {
7
- return exports;
41
+ return e;
8
42
  };
9
- var exports = {},
10
- Op = Object.prototype,
11
- hasOwn = Op.hasOwnProperty,
12
- defineProperty = Object.defineProperty || function (obj, key, desc) {
13
- obj[key] = desc.value;
43
+ var t,
44
+ e = {},
45
+ r = Object.prototype,
46
+ n = r.hasOwnProperty,
47
+ o = Object.defineProperty || function (t, e, r) {
48
+ t[e] = r.value;
14
49
  },
15
- $Symbol = "function" == typeof Symbol ? Symbol : {},
16
- iteratorSymbol = $Symbol.iterator || "@@iterator",
17
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
18
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
19
- function define(obj, key, value) {
20
- return Object.defineProperty(obj, key, {
21
- value: value,
50
+ i = "function" == typeof Symbol ? Symbol : {},
51
+ a = i.iterator || "@@iterator",
52
+ c = i.asyncIterator || "@@asyncIterator",
53
+ u = i.toStringTag || "@@toStringTag";
54
+ function define(t, e, r) {
55
+ return Object.defineProperty(t, e, {
56
+ value: r,
22
57
  enumerable: !0,
23
58
  configurable: !0,
24
59
  writable: !0
25
- }), obj[key];
60
+ }), t[e];
26
61
  }
27
62
  try {
28
63
  define({}, "");
29
- } catch (err) {
30
- define = function (obj, key, value) {
31
- return obj[key] = value;
64
+ } catch (t) {
65
+ define = function (t, e, r) {
66
+ return t[e] = r;
32
67
  };
33
68
  }
34
- function wrap(innerFn, outerFn, self, tryLocsList) {
35
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
36
- generator = Object.create(protoGenerator.prototype),
37
- context = new Context(tryLocsList || []);
38
- return defineProperty(generator, "_invoke", {
39
- value: makeInvokeMethod(innerFn, self, context)
40
- }), generator;
69
+ function wrap(t, e, r, n) {
70
+ var i = e && e.prototype instanceof Generator ? e : Generator,
71
+ a = Object.create(i.prototype),
72
+ c = new Context(n || []);
73
+ return o(a, "_invoke", {
74
+ value: makeInvokeMethod(t, r, c)
75
+ }), a;
41
76
  }
42
- function tryCatch(fn, obj, arg) {
77
+ function tryCatch(t, e, r) {
43
78
  try {
44
79
  return {
45
80
  type: "normal",
46
- arg: fn.call(obj, arg)
81
+ arg: t.call(e, r)
47
82
  };
48
- } catch (err) {
83
+ } catch (t) {
49
84
  return {
50
85
  type: "throw",
51
- arg: err
86
+ arg: t
52
87
  };
53
88
  }
54
89
  }
55
- exports.wrap = wrap;
56
- var ContinueSentinel = {};
90
+ e.wrap = wrap;
91
+ var h = "suspendedStart",
92
+ l = "suspendedYield",
93
+ f = "executing",
94
+ s = "completed",
95
+ y = {};
57
96
  function Generator() {}
58
97
  function GeneratorFunction() {}
59
98
  function GeneratorFunctionPrototype() {}
60
- var IteratorPrototype = {};
61
- define(IteratorPrototype, iteratorSymbol, function () {
99
+ var p = {};
100
+ define(p, a, function () {
62
101
  return this;
63
102
  });
64
- var getProto = Object.getPrototypeOf,
65
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
66
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
67
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
68
- function defineIteratorMethods(prototype) {
69
- ["next", "throw", "return"].forEach(function (method) {
70
- define(prototype, method, function (arg) {
71
- return this._invoke(method, arg);
103
+ var d = Object.getPrototypeOf,
104
+ v = d && d(d(values([])));
105
+ v && v !== r && n.call(v, a) && (p = v);
106
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
107
+ function defineIteratorMethods(t) {
108
+ ["next", "throw", "return"].forEach(function (e) {
109
+ define(t, e, function (t) {
110
+ return this._invoke(e, t);
72
111
  });
73
112
  });
74
113
  }
75
- function AsyncIterator(generator, PromiseImpl) {
76
- function invoke(method, arg, resolve, reject) {
77
- var record = tryCatch(generator[method], generator, arg);
78
- if ("throw" !== record.type) {
79
- var result = record.arg,
80
- value = result.value;
81
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
82
- invoke("next", value, resolve, reject);
83
- }, function (err) {
84
- invoke("throw", err, resolve, reject);
85
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
86
- result.value = unwrapped, resolve(result);
87
- }, function (error) {
88
- return invoke("throw", error, resolve, reject);
114
+ function AsyncIterator(t, e) {
115
+ function invoke(r, o, i, a) {
116
+ var c = tryCatch(t[r], t, o);
117
+ if ("throw" !== c.type) {
118
+ var u = c.arg,
119
+ h = u.value;
120
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
121
+ invoke("next", t, i, a);
122
+ }, function (t) {
123
+ invoke("throw", t, i, a);
124
+ }) : e.resolve(h).then(function (t) {
125
+ u.value = t, i(u);
126
+ }, function (t) {
127
+ return invoke("throw", t, i, a);
89
128
  });
90
129
  }
91
- reject(record.arg);
130
+ a(c.arg);
92
131
  }
93
- var previousPromise;
94
- defineProperty(this, "_invoke", {
95
- value: function (method, arg) {
132
+ var r;
133
+ o(this, "_invoke", {
134
+ value: function (t, n) {
96
135
  function callInvokeWithMethodAndArg() {
97
- return new PromiseImpl(function (resolve, reject) {
98
- invoke(method, arg, resolve, reject);
136
+ return new e(function (e, r) {
137
+ invoke(t, n, e, r);
99
138
  });
100
139
  }
101
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
140
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
102
141
  }
103
142
  });
104
143
  }
105
- function makeInvokeMethod(innerFn, self, context) {
106
- var state = "suspendedStart";
107
- return function (method, arg) {
108
- if ("executing" === state) throw new Error("Generator is already running");
109
- if ("completed" === state) {
110
- if ("throw" === method) throw arg;
144
+ function makeInvokeMethod(e, r, n) {
145
+ var o = h;
146
+ return function (i, a) {
147
+ if (o === f) throw Error("Generator is already running");
148
+ if (o === s) {
149
+ if ("throw" === i) throw a;
111
150
  return {
112
- value: void 0,
151
+ value: t,
113
152
  done: !0
114
153
  };
115
154
  }
116
- for (context.method = method, context.arg = arg;;) {
117
- var delegate = context.delegate;
118
- if (delegate) {
119
- var delegateResult = maybeInvokeDelegate(delegate, context);
120
- if (delegateResult) {
121
- if (delegateResult === ContinueSentinel) continue;
122
- return delegateResult;
155
+ for (n.method = i, n.arg = a;;) {
156
+ var c = n.delegate;
157
+ if (c) {
158
+ var u = maybeInvokeDelegate(c, n);
159
+ if (u) {
160
+ if (u === y) continue;
161
+ return u;
123
162
  }
124
163
  }
125
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
126
- if ("suspendedStart" === state) throw state = "completed", context.arg;
127
- context.dispatchException(context.arg);
128
- } else "return" === context.method && context.abrupt("return", context.arg);
129
- state = "executing";
130
- var record = tryCatch(innerFn, self, context);
131
- if ("normal" === record.type) {
132
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
164
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
165
+ if (o === h) throw o = s, n.arg;
166
+ n.dispatchException(n.arg);
167
+ } else "return" === n.method && n.abrupt("return", n.arg);
168
+ o = f;
169
+ var p = tryCatch(e, r, n);
170
+ if ("normal" === p.type) {
171
+ if (o = n.done ? s : l, p.arg === y) continue;
133
172
  return {
134
- value: record.arg,
135
- done: context.done
173
+ value: p.arg,
174
+ done: n.done
136
175
  };
137
176
  }
138
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
177
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
139
178
  }
140
179
  };
141
180
  }
142
- function maybeInvokeDelegate(delegate, context) {
143
- var methodName = context.method,
144
- method = delegate.iterator[methodName];
145
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
146
- var record = tryCatch(method, delegate.iterator, context.arg);
147
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
148
- var info = record.arg;
149
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
181
+ function maybeInvokeDelegate(e, r) {
182
+ var n = r.method,
183
+ o = e.iterator[n];
184
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
185
+ var i = tryCatch(o, e.iterator, r.arg);
186
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
187
+ var a = i.arg;
188
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
150
189
  }
151
- function pushTryEntry(locs) {
152
- var entry = {
153
- tryLoc: locs[0]
190
+ function pushTryEntry(t) {
191
+ var e = {
192
+ tryLoc: t[0]
154
193
  };
155
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
194
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
156
195
  }
157
- function resetTryEntry(entry) {
158
- var record = entry.completion || {};
159
- record.type = "normal", delete record.arg, entry.completion = record;
196
+ function resetTryEntry(t) {
197
+ var e = t.completion || {};
198
+ e.type = "normal", delete e.arg, t.completion = e;
160
199
  }
161
- function Context(tryLocsList) {
200
+ function Context(t) {
162
201
  this.tryEntries = [{
163
202
  tryLoc: "root"
164
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
203
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
165
204
  }
166
- function values(iterable) {
167
- if (iterable || "" === iterable) {
168
- var iteratorMethod = iterable[iteratorSymbol];
169
- if (iteratorMethod) return iteratorMethod.call(iterable);
170
- if ("function" == typeof iterable.next) return iterable;
171
- if (!isNaN(iterable.length)) {
172
- var i = -1,
173
- next = function next() {
174
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
175
- return next.value = undefined, next.done = !0, next;
205
+ function values(e) {
206
+ if (e || "" === e) {
207
+ var r = e[a];
208
+ if (r) return r.call(e);
209
+ if ("function" == typeof e.next) return e;
210
+ if (!isNaN(e.length)) {
211
+ var o = -1,
212
+ i = function next() {
213
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
214
+ return next.value = t, next.done = !0, next;
176
215
  };
177
- return next.next = next;
216
+ return i.next = i;
178
217
  }
179
218
  }
180
- throw new TypeError(typeof iterable + " is not iterable");
219
+ throw new TypeError(typeof e + " is not iterable");
181
220
  }
182
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
221
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
183
222
  value: GeneratorFunctionPrototype,
184
223
  configurable: !0
185
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
224
+ }), o(GeneratorFunctionPrototype, "constructor", {
186
225
  value: GeneratorFunction,
187
226
  configurable: !0
188
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
189
- var ctor = "function" == typeof genFun && genFun.constructor;
190
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
191
- }, exports.mark = function (genFun) {
192
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
193
- }, exports.awrap = function (arg) {
227
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
228
+ var e = "function" == typeof t && t.constructor;
229
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
230
+ }, e.mark = function (t) {
231
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
232
+ }, e.awrap = function (t) {
194
233
  return {
195
- __await: arg
234
+ __await: t
196
235
  };
197
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
236
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
198
237
  return this;
199
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
200
- void 0 === PromiseImpl && (PromiseImpl = Promise);
201
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
202
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
203
- return result.done ? result.value : iter.next();
238
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
239
+ void 0 === i && (i = Promise);
240
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
241
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
242
+ return t.done ? t.value : a.next();
204
243
  });
205
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
244
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
206
245
  return this;
207
- }), define(Gp, "toString", function () {
246
+ }), define(g, "toString", function () {
208
247
  return "[object Generator]";
209
- }), exports.keys = function (val) {
210
- var object = Object(val),
211
- keys = [];
212
- for (var key in object) keys.push(key);
213
- return keys.reverse(), function next() {
214
- for (; keys.length;) {
215
- var key = keys.pop();
216
- if (key in object) return next.value = key, next.done = !1, next;
248
+ }), e.keys = function (t) {
249
+ var e = Object(t),
250
+ r = [];
251
+ for (var n in e) r.push(n);
252
+ return r.reverse(), function next() {
253
+ for (; r.length;) {
254
+ var t = r.pop();
255
+ if (t in e) return next.value = t, next.done = !1, next;
217
256
  }
218
257
  return next.done = !0, next;
219
258
  };
220
- }, exports.values = values, Context.prototype = {
259
+ }, e.values = values, Context.prototype = {
221
260
  constructor: Context,
222
- reset: function (skipTempReset) {
223
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
261
+ reset: function (e) {
262
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
224
263
  },
225
264
  stop: function () {
226
265
  this.done = !0;
227
- var rootRecord = this.tryEntries[0].completion;
228
- if ("throw" === rootRecord.type) throw rootRecord.arg;
266
+ var t = this.tryEntries[0].completion;
267
+ if ("throw" === t.type) throw t.arg;
229
268
  return this.rval;
230
269
  },
231
- dispatchException: function (exception) {
232
- if (this.done) throw exception;
233
- var context = this;
234
- function handle(loc, caught) {
235
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
270
+ dispatchException: function (e) {
271
+ if (this.done) throw e;
272
+ var r = this;
273
+ function handle(n, o) {
274
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
236
275
  }
237
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
238
- var entry = this.tryEntries[i],
239
- record = entry.completion;
240
- if ("root" === entry.tryLoc) return handle("end");
241
- if (entry.tryLoc <= this.prev) {
242
- var hasCatch = hasOwn.call(entry, "catchLoc"),
243
- hasFinally = hasOwn.call(entry, "finallyLoc");
244
- if (hasCatch && hasFinally) {
245
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
246
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
247
- } else if (hasCatch) {
248
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
276
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
277
+ var i = this.tryEntries[o],
278
+ a = i.completion;
279
+ if ("root" === i.tryLoc) return handle("end");
280
+ if (i.tryLoc <= this.prev) {
281
+ var c = n.call(i, "catchLoc"),
282
+ u = n.call(i, "finallyLoc");
283
+ if (c && u) {
284
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
285
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
286
+ } else if (c) {
287
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
249
288
  } else {
250
- if (!hasFinally) throw new Error("try statement without catch or finally");
251
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
289
+ if (!u) throw Error("try statement without catch or finally");
290
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
252
291
  }
253
292
  }
254
293
  }
255
294
  },
256
- abrupt: function (type, arg) {
257
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
258
- var entry = this.tryEntries[i];
259
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
260
- var finallyEntry = entry;
295
+ abrupt: function (t, e) {
296
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
297
+ var o = this.tryEntries[r];
298
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
299
+ var i = o;
261
300
  break;
262
301
  }
263
302
  }
264
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
265
- var record = finallyEntry ? finallyEntry.completion : {};
266
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
303
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
304
+ var a = i ? i.completion : {};
305
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
267
306
  },
268
- complete: function (record, afterLoc) {
269
- if ("throw" === record.type) throw record.arg;
270
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
307
+ complete: function (t, e) {
308
+ if ("throw" === t.type) throw t.arg;
309
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
271
310
  },
272
- finish: function (finallyLoc) {
273
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
274
- var entry = this.tryEntries[i];
275
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
311
+ finish: function (t) {
312
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
313
+ var r = this.tryEntries[e];
314
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
276
315
  }
277
316
  },
278
- catch: function (tryLoc) {
279
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
280
- var entry = this.tryEntries[i];
281
- if (entry.tryLoc === tryLoc) {
282
- var record = entry.completion;
283
- if ("throw" === record.type) {
284
- var thrown = record.arg;
285
- resetTryEntry(entry);
317
+ catch: function (t) {
318
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
319
+ var r = this.tryEntries[e];
320
+ if (r.tryLoc === t) {
321
+ var n = r.completion;
322
+ if ("throw" === n.type) {
323
+ var o = n.arg;
324
+ resetTryEntry(r);
286
325
  }
287
- return thrown;
326
+ return o;
288
327
  }
289
328
  }
290
- throw new Error("illegal catch attempt");
329
+ throw Error("illegal catch attempt");
291
330
  },
292
- delegateYield: function (iterable, resultName, nextLoc) {
331
+ delegateYield: function (e, r, n) {
293
332
  return this.delegate = {
294
- iterator: values(iterable),
295
- resultName: resultName,
296
- nextLoc: nextLoc
297
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
333
+ iterator: values(e),
334
+ resultName: r,
335
+ nextLoc: n
336
+ }, "next" === this.method && (this.arg = t), y;
298
337
  }
299
- }, exports;
300
- }
301
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
302
- try {
303
- var info = gen[key](arg);
304
- var value = info.value;
305
- } catch (error) {
306
- reject(error);
307
- return;
308
- }
309
- if (info.done) {
310
- resolve(value);
311
- } else {
312
- Promise.resolve(value).then(_next, _throw);
313
- }
314
- }
315
- function _asyncToGenerator(fn) {
316
- return function () {
317
- var self = this,
318
- args = arguments;
319
- return new Promise(function (resolve, reject) {
320
- var gen = fn.apply(self, args);
321
- function _next(value) {
322
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
323
- }
324
- function _throw(err) {
325
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
326
- }
327
- _next(undefined);
328
- });
329
- };
330
- }
331
- function _extends() {
332
- _extends = Object.assign ? Object.assign.bind() : function (target) {
333
- for (var i = 1; i < arguments.length; i++) {
334
- var source = arguments[i];
335
- for (var key in source) {
336
- if (Object.prototype.hasOwnProperty.call(source, key)) {
337
- target[key] = source[key];
338
- }
339
- }
340
- }
341
- return target;
342
- };
343
- return _extends.apply(this, arguments);
338
+ }, e;
344
339
  }
345
340
 
346
341
  function assetToString(asset) {
@@ -1091,6 +1086,36 @@ var RangoClient = /*#__PURE__*/function () {
1091
1086
  }
1092
1087
  return executeEvmRoute$1;
1093
1088
  }();
1089
+ _proto.connectedAssets = /*#__PURE__*/function () {
1090
+ var _connectedAssets = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(connectedAssetsRequest, options) {
1091
+ var body, axiosResponse;
1092
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
1093
+ while (1) switch (_context12.prev = _context12.next) {
1094
+ case 0:
1095
+ body = {
1096
+ from: assetToString(connectedAssetsRequest.from)
1097
+ };
1098
+ _context12.next = 3;
1099
+ return this.httpService.get("/basic/connected-assets?apiKey=" + this.apiKey, _extends({
1100
+ params: body,
1101
+ headers: {
1102
+ 'X-Rango-Id': this.deviceId
1103
+ }
1104
+ }, options));
1105
+ case 3:
1106
+ axiosResponse = _context12.sent;
1107
+ return _context12.abrupt("return", axiosResponse.data);
1108
+ case 5:
1109
+ case "end":
1110
+ return _context12.stop();
1111
+ }
1112
+ }, _callee12, this);
1113
+ }));
1114
+ function connectedAssets(_x21, _x22) {
1115
+ return _connectedAssets.apply(this, arguments);
1116
+ }
1117
+ return connectedAssets;
1118
+ }();
1094
1119
  return RangoClient;
1095
1120
  }();
1096
1121