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