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
|
@@ -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
|
|
41
|
+
return e;
|
|
8
42
|
};
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function define(
|
|
20
|
-
return Object.defineProperty(
|
|
21
|
-
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
|
-
}),
|
|
60
|
+
}), t[e];
|
|
26
61
|
}
|
|
27
62
|
try {
|
|
28
63
|
define({}, "");
|
|
29
|
-
} catch (
|
|
30
|
-
define = function (
|
|
31
|
-
return
|
|
64
|
+
} catch (t) {
|
|
65
|
+
define = function (t, e, r) {
|
|
66
|
+
return t[e] = r;
|
|
32
67
|
};
|
|
33
68
|
}
|
|
34
|
-
function wrap(
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return
|
|
39
|
-
value: makeInvokeMethod(
|
|
40
|
-
}),
|
|
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(
|
|
77
|
+
function tryCatch(t, e, r) {
|
|
43
78
|
try {
|
|
44
79
|
return {
|
|
45
80
|
type: "normal",
|
|
46
|
-
arg:
|
|
81
|
+
arg: t.call(e, r)
|
|
47
82
|
};
|
|
48
|
-
} catch (
|
|
83
|
+
} catch (t) {
|
|
49
84
|
return {
|
|
50
85
|
type: "throw",
|
|
51
|
-
arg:
|
|
86
|
+
arg: t
|
|
52
87
|
};
|
|
53
88
|
}
|
|
54
89
|
}
|
|
55
|
-
|
|
56
|
-
var
|
|
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
|
|
61
|
-
define(
|
|
99
|
+
var p = {};
|
|
100
|
+
define(p, a, function () {
|
|
62
101
|
return this;
|
|
63
102
|
});
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
var
|
|
68
|
-
function defineIteratorMethods(
|
|
69
|
-
["next", "throw", "return"].forEach(function (
|
|
70
|
-
define(
|
|
71
|
-
return this._invoke(
|
|
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(
|
|
76
|
-
function invoke(
|
|
77
|
-
var
|
|
78
|
-
if ("throw" !==
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
return
|
|
82
|
-
invoke("next",
|
|
83
|
-
}, function (
|
|
84
|
-
invoke("throw",
|
|
85
|
-
}) :
|
|
86
|
-
|
|
87
|
-
}, function (
|
|
88
|
-
return invoke("throw",
|
|
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
|
-
|
|
130
|
+
a(c.arg);
|
|
92
131
|
}
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
value: function (
|
|
132
|
+
var r;
|
|
133
|
+
o(this, "_invoke", {
|
|
134
|
+
value: function (t, n) {
|
|
96
135
|
function callInvokeWithMethodAndArg() {
|
|
97
|
-
return new
|
|
98
|
-
invoke(
|
|
136
|
+
return new e(function (e, r) {
|
|
137
|
+
invoke(t, n, e, r);
|
|
99
138
|
});
|
|
100
139
|
}
|
|
101
|
-
return
|
|
140
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
102
141
|
}
|
|
103
142
|
});
|
|
104
143
|
}
|
|
105
|
-
function makeInvokeMethod(
|
|
106
|
-
var
|
|
107
|
-
return function (
|
|
108
|
-
if (
|
|
109
|
-
if (
|
|
110
|
-
if ("throw" ===
|
|
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:
|
|
151
|
+
value: t,
|
|
113
152
|
done: !0
|
|
114
153
|
};
|
|
115
154
|
}
|
|
116
|
-
for (
|
|
117
|
-
var
|
|
118
|
-
if (
|
|
119
|
-
var
|
|
120
|
-
if (
|
|
121
|
-
if (
|
|
122
|
-
return
|
|
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" ===
|
|
126
|
-
if (
|
|
127
|
-
|
|
128
|
-
} else "return" ===
|
|
129
|
-
|
|
130
|
-
var
|
|
131
|
-
if ("normal" ===
|
|
132
|
-
if (
|
|
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:
|
|
135
|
-
done:
|
|
173
|
+
value: p.arg,
|
|
174
|
+
done: n.done
|
|
136
175
|
};
|
|
137
176
|
}
|
|
138
|
-
"throw" ===
|
|
177
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
139
178
|
}
|
|
140
179
|
};
|
|
141
180
|
}
|
|
142
|
-
function maybeInvokeDelegate(
|
|
143
|
-
var
|
|
144
|
-
|
|
145
|
-
if (
|
|
146
|
-
var
|
|
147
|
-
if ("throw" ===
|
|
148
|
-
var
|
|
149
|
-
return
|
|
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(
|
|
152
|
-
var
|
|
153
|
-
tryLoc:
|
|
190
|
+
function pushTryEntry(t) {
|
|
191
|
+
var e = {
|
|
192
|
+
tryLoc: t[0]
|
|
154
193
|
};
|
|
155
|
-
1 in
|
|
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(
|
|
158
|
-
var
|
|
159
|
-
|
|
196
|
+
function resetTryEntry(t) {
|
|
197
|
+
var e = t.completion || {};
|
|
198
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
160
199
|
}
|
|
161
|
-
function Context(
|
|
200
|
+
function Context(t) {
|
|
162
201
|
this.tryEntries = [{
|
|
163
202
|
tryLoc: "root"
|
|
164
|
-
}],
|
|
203
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
165
204
|
}
|
|
166
|
-
function values(
|
|
167
|
-
if (
|
|
168
|
-
var
|
|
169
|
-
if (
|
|
170
|
-
if ("function" == typeof
|
|
171
|
-
if (!isNaN(
|
|
172
|
-
var
|
|
173
|
-
|
|
174
|
-
for (; ++
|
|
175
|
-
return next.value =
|
|
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
|
|
216
|
+
return i.next = i;
|
|
178
217
|
}
|
|
179
218
|
}
|
|
180
|
-
throw new TypeError(typeof
|
|
219
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
181
220
|
}
|
|
182
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
221
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
183
222
|
value: GeneratorFunctionPrototype,
|
|
184
223
|
configurable: !0
|
|
185
|
-
}),
|
|
224
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
186
225
|
value: GeneratorFunction,
|
|
187
226
|
configurable: !0
|
|
188
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
189
|
-
var
|
|
190
|
-
return !!
|
|
191
|
-
},
|
|
192
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
193
|
-
},
|
|
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:
|
|
234
|
+
__await: t
|
|
196
235
|
};
|
|
197
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
236
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
198
237
|
return this;
|
|
199
|
-
}),
|
|
200
|
-
void 0 ===
|
|
201
|
-
var
|
|
202
|
-
return
|
|
203
|
-
return
|
|
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(
|
|
244
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
206
245
|
return this;
|
|
207
|
-
}), define(
|
|
246
|
+
}), define(g, "toString", function () {
|
|
208
247
|
return "[object Generator]";
|
|
209
|
-
}),
|
|
210
|
-
var
|
|
211
|
-
|
|
212
|
-
for (var
|
|
213
|
-
return
|
|
214
|
-
for (;
|
|
215
|
-
var
|
|
216
|
-
if (
|
|
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
|
-
},
|
|
259
|
+
}, e.values = values, Context.prototype = {
|
|
221
260
|
constructor: Context,
|
|
222
|
-
reset: function (
|
|
223
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
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
|
|
228
|
-
if ("throw" ===
|
|
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 (
|
|
232
|
-
if (this.done) throw
|
|
233
|
-
var
|
|
234
|
-
function handle(
|
|
235
|
-
return
|
|
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
|
|
238
|
-
var
|
|
239
|
-
|
|
240
|
-
if ("root" ===
|
|
241
|
-
if (
|
|
242
|
-
var
|
|
243
|
-
|
|
244
|
-
if (
|
|
245
|
-
if (this.prev <
|
|
246
|
-
if (this.prev <
|
|
247
|
-
} else if (
|
|
248
|
-
if (this.prev <
|
|
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 (!
|
|
251
|
-
if (this.prev <
|
|
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 (
|
|
257
|
-
for (var
|
|
258
|
-
var
|
|
259
|
-
if (
|
|
260
|
-
var
|
|
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
|
-
|
|
265
|
-
var
|
|
266
|
-
return
|
|
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 (
|
|
269
|
-
if ("throw" ===
|
|
270
|
-
return "break" ===
|
|
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 (
|
|
273
|
-
for (var
|
|
274
|
-
var
|
|
275
|
-
if (
|
|
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 (
|
|
279
|
-
for (var
|
|
280
|
-
var
|
|
281
|
-
if (
|
|
282
|
-
var
|
|
283
|
-
if ("throw" ===
|
|
284
|
-
var
|
|
285
|
-
resetTryEntry(
|
|
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
|
|
326
|
+
return o;
|
|
288
327
|
}
|
|
289
328
|
}
|
|
290
|
-
throw
|
|
329
|
+
throw Error("illegal catch attempt");
|
|
291
330
|
},
|
|
292
|
-
delegateYield: function (
|
|
331
|
+
delegateYield: function (e, r, n) {
|
|
293
332
|
return this.delegate = {
|
|
294
|
-
iterator: values(
|
|
295
|
-
resultName:
|
|
296
|
-
nextLoc:
|
|
297
|
-
}, "next" === this.method && (this.arg =
|
|
333
|
+
iterator: values(e),
|
|
334
|
+
resultName: r,
|
|
335
|
+
nextLoc: n
|
|
336
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
298
337
|
}
|
|
299
|
-
},
|
|
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
|
|