rango-sdk-basic 0.1.32 → 0.1.33

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.
Files changed (44) hide show
  1. package/package.json +2 -2
  2. package/lib/dist/index.d.ts +0 -3
  3. package/lib/dist/index.d.ts.map +0 -1
  4. package/lib/dist/index.js +0 -8
  5. package/lib/dist/rango-sdk-basic.cjs.development.js +0 -1104
  6. package/lib/dist/rango-sdk-basic.cjs.development.js.map +0 -1
  7. package/lib/dist/rango-sdk-basic.cjs.production.min.js +0 -2
  8. package/lib/dist/rango-sdk-basic.cjs.production.min.js.map +0 -1
  9. package/lib/dist/rango-sdk-basic.esm.js +0 -1090
  10. package/lib/dist/rango-sdk-basic.esm.js.map +0 -1
  11. package/lib/dist/services/client.d.ts +0 -25
  12. package/lib/dist/services/client.d.ts.map +0 -1
  13. package/lib/dist/services/executor.d.ts +0 -8
  14. package/lib/dist/services/executor.d.ts.map +0 -1
  15. package/lib/dist/services/index.d.ts +0 -2
  16. package/lib/dist/services/index.d.ts.map +0 -1
  17. package/lib/dist/types/api/balance.d.ts +0 -2
  18. package/lib/dist/types/api/balance.d.ts.map +0 -1
  19. package/lib/dist/types/api/common.d.ts +0 -4
  20. package/lib/dist/types/api/common.d.ts.map +0 -1
  21. package/lib/dist/types/api/meta.d.ts +0 -3
  22. package/lib/dist/types/api/meta.d.ts.map +0 -1
  23. package/lib/dist/types/api/routing.d.ts +0 -2
  24. package/lib/dist/types/api/routing.d.ts.map +0 -1
  25. package/lib/dist/types/api/transactions.d.ts +0 -2
  26. package/lib/dist/types/api/transactions.d.ts.map +0 -1
  27. package/lib/dist/types/api/txs/cosmos.d.ts +0 -2
  28. package/lib/dist/types/api/txs/cosmos.d.ts.map +0 -1
  29. package/lib/dist/types/api/txs/evm.d.ts +0 -2
  30. package/lib/dist/types/api/txs/evm.d.ts.map +0 -1
  31. package/lib/dist/types/api/txs/index.d.ts +0 -4
  32. package/lib/dist/types/api/txs/index.d.ts.map +0 -1
  33. package/lib/dist/types/api/txs/transfer.d.ts +0 -2
  34. package/lib/dist/types/api/txs/transfer.d.ts.map +0 -1
  35. package/lib/dist/types/configs.d.ts +0 -5
  36. package/lib/dist/types/configs.d.ts.map +0 -1
  37. package/lib/dist/types/index.d.ts +0 -9
  38. package/lib/dist/types/index.d.ts.map +0 -1
  39. package/lib/dist/types/utils/errors.d.ts +0 -23
  40. package/lib/dist/types/utils/errors.d.ts.map +0 -1
  41. package/lib/dist/utils/errors.d.ts +0 -2
  42. package/lib/dist/utils/errors.d.ts.map +0 -1
  43. package/lib/dist/utils/promise.d.ts +0 -2
  44. package/lib/dist/utils/promise.d.ts.map +0 -1
@@ -1,1090 +0,0 @@
1
- import uuid from 'uuid-random';
2
- import { getMessageFromCode } from 'eth-rpc-errors';
3
- import axios from 'axios';
4
-
5
- function _regeneratorRuntime() {
6
- _regeneratorRuntime = function () {
7
- return exports;
8
- };
9
- var exports = {},
10
- Op = Object.prototype,
11
- hasOwn = Op.hasOwnProperty,
12
- defineProperty = Object.defineProperty || function (obj, key, desc) {
13
- obj[key] = desc.value;
14
- },
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,
22
- enumerable: !0,
23
- configurable: !0,
24
- writable: !0
25
- }), obj[key];
26
- }
27
- try {
28
- define({}, "");
29
- } catch (err) {
30
- define = function (obj, key, value) {
31
- return obj[key] = value;
32
- };
33
- }
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;
41
- }
42
- function tryCatch(fn, obj, arg) {
43
- try {
44
- return {
45
- type: "normal",
46
- arg: fn.call(obj, arg)
47
- };
48
- } catch (err) {
49
- return {
50
- type: "throw",
51
- arg: err
52
- };
53
- }
54
- }
55
- exports.wrap = wrap;
56
- var ContinueSentinel = {};
57
- function Generator() {}
58
- function GeneratorFunction() {}
59
- function GeneratorFunctionPrototype() {}
60
- var IteratorPrototype = {};
61
- define(IteratorPrototype, iteratorSymbol, function () {
62
- return this;
63
- });
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);
72
- });
73
- });
74
- }
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);
89
- });
90
- }
91
- reject(record.arg);
92
- }
93
- var previousPromise;
94
- defineProperty(this, "_invoke", {
95
- value: function (method, arg) {
96
- function callInvokeWithMethodAndArg() {
97
- return new PromiseImpl(function (resolve, reject) {
98
- invoke(method, arg, resolve, reject);
99
- });
100
- }
101
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
102
- }
103
- });
104
- }
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;
111
- return doneResult();
112
- }
113
- for (context.method = method, context.arg = arg;;) {
114
- var delegate = context.delegate;
115
- if (delegate) {
116
- var delegateResult = maybeInvokeDelegate(delegate, context);
117
- if (delegateResult) {
118
- if (delegateResult === ContinueSentinel) continue;
119
- return delegateResult;
120
- }
121
- }
122
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
123
- if ("suspendedStart" === state) throw state = "completed", context.arg;
124
- context.dispatchException(context.arg);
125
- } else "return" === context.method && context.abrupt("return", context.arg);
126
- state = "executing";
127
- var record = tryCatch(innerFn, self, context);
128
- if ("normal" === record.type) {
129
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
130
- return {
131
- value: record.arg,
132
- done: context.done
133
- };
134
- }
135
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
136
- }
137
- };
138
- }
139
- function maybeInvokeDelegate(delegate, context) {
140
- var methodName = context.method,
141
- method = delegate.iterator[methodName];
142
- 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;
143
- var record = tryCatch(method, delegate.iterator, context.arg);
144
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
145
- var info = record.arg;
146
- 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);
147
- }
148
- function pushTryEntry(locs) {
149
- var entry = {
150
- tryLoc: locs[0]
151
- };
152
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
153
- }
154
- function resetTryEntry(entry) {
155
- var record = entry.completion || {};
156
- record.type = "normal", delete record.arg, entry.completion = record;
157
- }
158
- function Context(tryLocsList) {
159
- this.tryEntries = [{
160
- tryLoc: "root"
161
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
162
- }
163
- function values(iterable) {
164
- if (iterable) {
165
- var iteratorMethod = iterable[iteratorSymbol];
166
- if (iteratorMethod) return iteratorMethod.call(iterable);
167
- if ("function" == typeof iterable.next) return iterable;
168
- if (!isNaN(iterable.length)) {
169
- var i = -1,
170
- next = function next() {
171
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
172
- return next.value = undefined, next.done = !0, next;
173
- };
174
- return next.next = next;
175
- }
176
- }
177
- return {
178
- next: doneResult
179
- };
180
- }
181
- function doneResult() {
182
- return {
183
- value: undefined,
184
- done: !0
185
- };
186
- }
187
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
188
- value: GeneratorFunctionPrototype,
189
- configurable: !0
190
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
191
- value: GeneratorFunction,
192
- configurable: !0
193
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
194
- var ctor = "function" == typeof genFun && genFun.constructor;
195
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
196
- }, exports.mark = function (genFun) {
197
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
198
- }, exports.awrap = function (arg) {
199
- return {
200
- __await: arg
201
- };
202
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
203
- return this;
204
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
205
- void 0 === PromiseImpl && (PromiseImpl = Promise);
206
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
207
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
208
- return result.done ? result.value : iter.next();
209
- });
210
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
211
- return this;
212
- }), define(Gp, "toString", function () {
213
- return "[object Generator]";
214
- }), exports.keys = function (val) {
215
- var object = Object(val),
216
- keys = [];
217
- for (var key in object) keys.push(key);
218
- return keys.reverse(), function next() {
219
- for (; keys.length;) {
220
- var key = keys.pop();
221
- if (key in object) return next.value = key, next.done = !1, next;
222
- }
223
- return next.done = !0, next;
224
- };
225
- }, exports.values = values, Context.prototype = {
226
- constructor: Context,
227
- reset: function (skipTempReset) {
228
- 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);
229
- },
230
- stop: function () {
231
- this.done = !0;
232
- var rootRecord = this.tryEntries[0].completion;
233
- if ("throw" === rootRecord.type) throw rootRecord.arg;
234
- return this.rval;
235
- },
236
- dispatchException: function (exception) {
237
- if (this.done) throw exception;
238
- var context = this;
239
- function handle(loc, caught) {
240
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
241
- }
242
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
243
- var entry = this.tryEntries[i],
244
- record = entry.completion;
245
- if ("root" === entry.tryLoc) return handle("end");
246
- if (entry.tryLoc <= this.prev) {
247
- var hasCatch = hasOwn.call(entry, "catchLoc"),
248
- hasFinally = hasOwn.call(entry, "finallyLoc");
249
- if (hasCatch && hasFinally) {
250
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
251
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
252
- } else if (hasCatch) {
253
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
254
- } else {
255
- if (!hasFinally) throw new Error("try statement without catch or finally");
256
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
257
- }
258
- }
259
- }
260
- },
261
- abrupt: function (type, arg) {
262
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
263
- var entry = this.tryEntries[i];
264
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
265
- var finallyEntry = entry;
266
- break;
267
- }
268
- }
269
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
270
- var record = finallyEntry ? finallyEntry.completion : {};
271
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
272
- },
273
- complete: function (record, afterLoc) {
274
- if ("throw" === record.type) throw record.arg;
275
- 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;
276
- },
277
- finish: function (finallyLoc) {
278
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
279
- var entry = this.tryEntries[i];
280
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
281
- }
282
- },
283
- catch: function (tryLoc) {
284
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
285
- var entry = this.tryEntries[i];
286
- if (entry.tryLoc === tryLoc) {
287
- var record = entry.completion;
288
- if ("throw" === record.type) {
289
- var thrown = record.arg;
290
- resetTryEntry(entry);
291
- }
292
- return thrown;
293
- }
294
- }
295
- throw new Error("illegal catch attempt");
296
- },
297
- delegateYield: function (iterable, resultName, nextLoc) {
298
- return this.delegate = {
299
- iterator: values(iterable),
300
- resultName: resultName,
301
- nextLoc: nextLoc
302
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
303
- }
304
- }, exports;
305
- }
306
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
307
- try {
308
- var info = gen[key](arg);
309
- var value = info.value;
310
- } catch (error) {
311
- reject(error);
312
- return;
313
- }
314
- if (info.done) {
315
- resolve(value);
316
- } else {
317
- Promise.resolve(value).then(_next, _throw);
318
- }
319
- }
320
- function _asyncToGenerator(fn) {
321
- return function () {
322
- var self = this,
323
- args = arguments;
324
- return new Promise(function (resolve, reject) {
325
- var gen = fn.apply(self, args);
326
- function _next(value) {
327
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
328
- }
329
- function _throw(err) {
330
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
331
- }
332
- _next(undefined);
333
- });
334
- };
335
- }
336
- function _extends() {
337
- _extends = Object.assign ? Object.assign.bind() : function (target) {
338
- for (var i = 1; i < arguments.length; i++) {
339
- var source = arguments[i];
340
- for (var key in source) {
341
- if (Object.prototype.hasOwnProperty.call(source, key)) {
342
- target[key] = source[key];
343
- }
344
- }
345
- }
346
- return target;
347
- };
348
- return _extends.apply(this, arguments);
349
- }
350
-
351
- function assetToString(asset) {
352
- if (!!asset.address) return asset.blockchain + "." + asset.symbol + "--" + asset.address;else return asset.blockchain + "." + asset.symbol;
353
- }
354
-
355
- var isEvmBlockchain = function isEvmBlockchain(blockchainMeta) {
356
- return blockchainMeta.type === 'EVM';
357
- };
358
- var isCosmosBlockchain = function isCosmosBlockchain(blockchainMeta) {
359
- return blockchainMeta.type === 'COSMOS';
360
- };
361
- var isSolanaBlockchain = function isSolanaBlockchain(blockchainMeta) {
362
- return blockchainMeta.type === 'SOLANA';
363
- };
364
- var isTronBlockchain = function isTronBlockchain(blockchainMeta) {
365
- return blockchainMeta.type === 'TRON';
366
- };
367
- var isTransferBlockchain = function isTransferBlockchain(blockchainMeta) {
368
- return blockchainMeta.type === 'TRANSFER';
369
- };
370
- var isStarknetBlockchain = function isStarknetBlockchain(blockchainMeta) {
371
- return blockchainMeta.type === 'STARKNET';
372
- };
373
- var isTonBlockchain = function isTonBlockchain(blockchainMeta) {
374
- return blockchainMeta.type === 'TON';
375
- };
376
- var evmBlockchains = function evmBlockchains(blockchains) {
377
- return blockchains.filter(isEvmBlockchain);
378
- };
379
- var solanaBlockchain = function solanaBlockchain(blockchains) {
380
- return blockchains.filter(isSolanaBlockchain);
381
- };
382
- var starknetBlockchain = function starknetBlockchain(blockchains) {
383
- return blockchains.filter(isStarknetBlockchain);
384
- };
385
- var tronBlockchain = function tronBlockchain(blockchains) {
386
- return blockchains.filter(isTronBlockchain);
387
- };
388
- var cosmosBlockchains = function cosmosBlockchains(blockchains) {
389
- return blockchains.filter(isCosmosBlockchain);
390
- };
391
- var transferBlockchains = function transferBlockchains(blockchains) {
392
- return blockchains.filter(isTransferBlockchain);
393
- };
394
- var tonBlockchain = function tonBlockchain(blockchains) {
395
- return blockchains.filter(isTonBlockchain);
396
- };
397
-
398
- /**
399
- * Routing Result Type
400
- *
401
- */
402
- var RoutingResultType;
403
- (function (RoutingResultType) {
404
- RoutingResultType["OK"] = "OK";
405
- RoutingResultType["HIGH_IMPACT"] = "HIGH_IMPACT";
406
- RoutingResultType["NO_ROUTE"] = "NO_ROUTE";
407
- RoutingResultType["INPUT_LIMIT_ISSUE"] = "INPUT_LIMIT_ISSUE";
408
- })(RoutingResultType || (RoutingResultType = {}));
409
-
410
- /**
411
- * The type of transaction
412
- */
413
- var TransactionType;
414
- (function (TransactionType) {
415
- TransactionType["EVM"] = "EVM";
416
- TransactionType["TRANSFER"] = "TRANSFER";
417
- TransactionType["COSMOS"] = "COSMOS";
418
- TransactionType["SOLANA"] = "SOLANA";
419
- TransactionType["TRON"] = "TRON";
420
- TransactionType["STARKNET"] = "STARKNET";
421
- TransactionType["TON"] = "TON";
422
- })(TransactionType || (TransactionType = {}));
423
- /**
424
- * The type of transaction
425
- * @deprecated use TransactionType instead
426
- */
427
- var GenericTransactionType;
428
- (function (GenericTransactionType) {
429
- GenericTransactionType["EVM"] = "EVM";
430
- GenericTransactionType["TRANSFER"] = "TRANSFER";
431
- GenericTransactionType["COSMOS"] = "COSMOS";
432
- GenericTransactionType["SOLANA"] = "SOLANA";
433
- })(GenericTransactionType || (GenericTransactionType = {}));
434
- /**
435
- * The status of transaction in tracking
436
- */
437
- var TransactionStatus;
438
- (function (TransactionStatus) {
439
- TransactionStatus["FAILED"] = "failed";
440
- TransactionStatus["RUNNING"] = "running";
441
- TransactionStatus["SUCCESS"] = "success";
442
- })(TransactionStatus || (TransactionStatus = {}));
443
-
444
- var isCosmosTransaction = function isCosmosTransaction(transaction) {
445
- return transaction.type === TransactionType.COSMOS;
446
- };
447
-
448
- var isTransferTransaction = function isTransferTransaction(transaction) {
449
- return transaction.type === TransactionType.TRANSFER;
450
- };
451
-
452
- var TonChainID;
453
- (function (TonChainID) {
454
- TonChainID["MAINNET"] = "-239";
455
- TonChainID["TESTNET"] = "-3";
456
- })(TonChainID || (TonChainID = {}));
457
-
458
- var isEvmTransaction = function isEvmTransaction(transaction) {
459
- return transaction.type === TransactionType.EVM;
460
- };
461
-
462
- var MetamaskErrorCodes = {
463
- rpc: {
464
- invalidInput: -32000,
465
- resourceNotFound: -32001,
466
- resourceUnavailable: -32002,
467
- transactionRejected: -32003,
468
- methodNotSupported: -32004,
469
- limitExceeded: -32005,
470
- parse: -32700,
471
- invalidRequest: -32600,
472
- methodNotFound: -32601,
473
- invalidParams: -32602,
474
- internal: -32603
475
- },
476
- provider: {
477
- userRejectedRequest: 4001,
478
- unauthorized: 4100,
479
- unsupportedMethod: 4200,
480
- disconnected: 4900,
481
- chainDisconnected: 4901
482
- }
483
- };
484
-
485
- function sleep(ms) {
486
- return new Promise(function (resolve) {
487
- return setTimeout(resolve, ms);
488
- });
489
- }
490
-
491
- function prepareEvmTransaction(evmTx, isApprove) {
492
- var gasPrice = !!evmTx.gasPrice && !evmTx.gasPrice.startsWith('0x') ? '0x' + parseInt(evmTx.gasPrice).toString(16) : null;
493
- var manipulatedTx = _extends({}, evmTx, {
494
- gasPrice: gasPrice
495
- });
496
- var tx = {};
497
- if (!!manipulatedTx.from) tx = _extends({}, tx, {
498
- from: manipulatedTx.from
499
- });
500
- if (isApprove) {
501
- if (!!manipulatedTx.approveTo) tx = _extends({}, tx, {
502
- to: manipulatedTx.approveTo
503
- });
504
- if (!!manipulatedTx.approveData) tx = _extends({}, tx, {
505
- data: manipulatedTx.approveData
506
- });
507
- } else {
508
- if (!!manipulatedTx.txTo) tx = _extends({}, tx, {
509
- to: manipulatedTx.txTo
510
- });
511
- if (!!manipulatedTx.txData) tx = _extends({}, tx, {
512
- data: manipulatedTx.txData
513
- });
514
- if (!!manipulatedTx.value) tx = _extends({}, tx, {
515
- value: manipulatedTx.value
516
- });
517
- if (!!manipulatedTx.gasLimit) tx = _extends({}, tx, {
518
- gasLimit: manipulatedTx.gasLimit
519
- });
520
- if (!!manipulatedTx.gasPrice) tx = _extends({}, tx, {
521
- gasPrice: manipulatedTx.gasPrice
522
- });
523
- }
524
- return tx;
525
- }
526
- function checkApprovalSync(_x, _x2, _x3) {
527
- return _checkApprovalSync.apply(this, arguments);
528
- }
529
- function _checkApprovalSync() {
530
- _checkApprovalSync = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(requestId, txId, rangoClient) {
531
- var approvalResponse;
532
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
533
- while (1) switch (_context3.prev = _context3.next) {
534
- case 0:
535
- _context3.prev = 1;
536
- _context3.next = 4;
537
- return rangoClient.isApproved(requestId, txId);
538
- case 4:
539
- approvalResponse = _context3.sent;
540
- if (!(approvalResponse != null && approvalResponse.isApproved)) {
541
- _context3.next = 7;
542
- break;
543
- }
544
- return _context3.abrupt("return", true);
545
- case 7:
546
- if (!(!(approvalResponse != null && approvalResponse.isApproved) && (approvalResponse == null ? void 0 : approvalResponse.txStatus) === TransactionStatus.FAILED)) {
547
- _context3.next = 9;
548
- break;
549
- }
550
- return _context3.abrupt("return", false);
551
- case 9:
552
- _context3.next = 14;
553
- break;
554
- case 11:
555
- _context3.prev = 11;
556
- _context3.t0 = _context3["catch"](1);
557
- console.log('ignorinig error', {
558
- err: _context3.t0
559
- });
560
- case 14:
561
- _context3.next = 16;
562
- return sleep(3000);
563
- case 16:
564
- _context3.next = 0;
565
- break;
566
- case 18:
567
- case "end":
568
- return _context3.stop();
569
- }
570
- }, _callee3, null, [[1, 11]]);
571
- }));
572
- return _checkApprovalSync.apply(this, arguments);
573
- }
574
- var checkTransactionStatusSync = /*#__PURE__*/function () {
575
- var _ref = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(requestId, txId, rangoClient) {
576
- var txStatus;
577
- return _regeneratorRuntime().wrap(function _callee$(_context) {
578
- while (1) switch (_context.prev = _context.next) {
579
- case 0:
580
- _context.prev = 1;
581
- _context.next = 4;
582
- return rangoClient.status({
583
- requestId: requestId,
584
- txId: txId
585
- });
586
- case 4:
587
- txStatus = _context.sent;
588
- _context.next = 10;
589
- break;
590
- case 7:
591
- _context.prev = 7;
592
- _context.t0 = _context["catch"](1);
593
- console.log('ignorinig error', {
594
- err: _context.t0
595
- });
596
- case 10:
597
- if (!txStatus) {
598
- _context.next = 13;
599
- break;
600
- }
601
- if (!(!!txStatus.status && [TransactionStatus.FAILED, TransactionStatus.SUCCESS].includes(txStatus.status))) {
602
- _context.next = 13;
603
- break;
604
- }
605
- return _context.abrupt("return", txStatus);
606
- case 13:
607
- _context.next = 15;
608
- return sleep(3000);
609
- case 15:
610
- _context.next = 0;
611
- break;
612
- case 17:
613
- case "end":
614
- return _context.stop();
615
- }
616
- }, _callee, null, [[1, 7]]);
617
- }));
618
- return function checkTransactionStatusSync(_x4, _x5, _x6) {
619
- return _ref.apply(this, arguments);
620
- };
621
- }();
622
- var executeEvmRoute = /*#__PURE__*/function () {
623
- var _ref2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(client, signer, route) {
624
- var tx, requestId, error, resultType, evmTransaction, txChainId, signerChainId, approveTxData, approveTx, isApproved, mainTxData, mainTx, status;
625
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
626
- while (1) switch (_context2.prev = _context2.next) {
627
- case 0:
628
- tx = route.tx, requestId = route.requestId, error = route.error, resultType = route.resultType;
629
- if (!(resultType != 'OK')) {
630
- _context2.next = 3;
631
- break;
632
- }
633
- throw new Error(resultType);
634
- case 3:
635
- if (!(!!error || !tx)) {
636
- _context2.next = 5;
637
- break;
638
- }
639
- throw new Error(error || 'Error creating the transaction.');
640
- case 5:
641
- if (!((tx == null ? void 0 : tx.type) !== TransactionType.EVM)) {
642
- _context2.next = 7;
643
- break;
644
- }
645
- throw new Error('Non Evm transactions are not supported yet.');
646
- case 7:
647
- evmTransaction = tx;
648
- if (evmTransaction) {
649
- _context2.next = 10;
650
- break;
651
- }
652
- throw new Error('Transaction is null. Please try again!');
653
- case 10:
654
- txChainId = parseInt(evmTransaction.blockChain.chainId || '-1');
655
- _context2.next = 13;
656
- return signer.getChainId();
657
- case 13:
658
- signerChainId = _context2.sent;
659
- if (!(signerChainId !== txChainId)) {
660
- _context2.next = 16;
661
- break;
662
- }
663
- throw new Error("Signer chainId " + signerChainId + " doesn't match required chainId " + txChainId + ".");
664
- case 16:
665
- if (!(!!evmTransaction.approveTo && !!evmTransaction.approveData)) {
666
- _context2.next = 27;
667
- break;
668
- }
669
- approveTxData = prepareEvmTransaction(evmTransaction, true);
670
- _context2.next = 20;
671
- return signer.sendTransaction(approveTxData);
672
- case 20:
673
- approveTx = _context2.sent;
674
- approveTx.wait();
675
- _context2.next = 24;
676
- return checkApprovalSync(requestId, approveTx.hash, client);
677
- case 24:
678
- isApproved = _context2.sent;
679
- if (isApproved) {
680
- _context2.next = 27;
681
- break;
682
- }
683
- throw new Error('Error in approve transaction.');
684
- case 27:
685
- _context2.next = 29;
686
- return signer.getChainId();
687
- case 29:
688
- signerChainId = _context2.sent;
689
- if (!(signerChainId !== txChainId)) {
690
- _context2.next = 32;
691
- break;
692
- }
693
- throw new Error("Signer chainId " + signerChainId + " doesn't match required chainId " + txChainId + ".");
694
- case 32:
695
- mainTxData = prepareEvmTransaction(evmTransaction, false);
696
- _context2.next = 35;
697
- return signer.sendTransaction(mainTxData);
698
- case 35:
699
- mainTx = _context2.sent;
700
- mainTx.wait();
701
- _context2.next = 39;
702
- return checkTransactionStatusSync(requestId, mainTx.hash, client);
703
- case 39:
704
- status = _context2.sent;
705
- if (!(status.status !== TransactionStatus.SUCCESS)) {
706
- _context2.next = 42;
707
- break;
708
- }
709
- throw new Error("Cross-chain swap failed. " + (status.error || ''));
710
- case 42:
711
- return _context2.abrupt("return", status);
712
- case 43:
713
- case "end":
714
- return _context2.stop();
715
- }
716
- }, _callee2);
717
- }));
718
- return function executeEvmRoute(_x7, _x8, _x9) {
719
- return _ref2.apply(this, arguments);
720
- };
721
- }();
722
-
723
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
724
- var prettifyError = function prettifyError(error) {
725
- if (!error) return error;
726
- if (error.code && (error.code === 'ACTION_REJECTED' || error.code === 4001)) return new Error('Transaction Rejected');
727
- if (error && typeof error.code === 'number') {
728
- if (Object.values(MetamaskErrorCodes.provider).includes(error.code)) {
729
- return new Error(getMessageFromCode(error.code));
730
- }
731
- if (Object.values(MetamaskErrorCodes.rpc).includes(error.code)) {
732
- var _error$message, _error$message2, _error$message3;
733
- if (error.code === MetamaskErrorCodes.rpc.internal && (_error$message = error.message) != null && _error$message.includes('underpriced')) return new Error('Transaction underpriced');
734
- if ((_error$message2 = error.message) != null && _error$message2.includes('intrinsic gas too low') || (_error$message3 = error.message) != null && _error$message3.includes('out of gas')) return new Error('This Gas limit is low.');
735
- return new Error(getMessageFromCode(error.code));
736
- }
737
- }
738
- if (error.message) return new Error(error.message);
739
- return error;
740
- };
741
-
742
- var RangoClient = /*#__PURE__*/function () {
743
- function RangoClient(apiKey, debug, apiUrl) {
744
- if (debug === void 0) {
745
- debug = false;
746
- }
747
- this.apiUrl = apiUrl || 'https://api.rango.exchange';
748
- this.apiKey = apiKey;
749
- try {
750
- if (typeof window !== 'undefined') {
751
- var deviceId = localStorage.getItem('deviceId');
752
- if (deviceId) {
753
- this.deviceId = deviceId;
754
- } else {
755
- var generatedId = uuid();
756
- localStorage.setItem('deviceId', generatedId);
757
- this.deviceId = generatedId;
758
- }
759
- } else {
760
- this.deviceId = uuid();
761
- }
762
- } catch (e) {
763
- this.deviceId = uuid();
764
- }
765
- this.httpService = axios.create({
766
- baseURL: this.apiUrl
767
- });
768
- if (debug) {
769
- this.httpService.interceptors.request.use(function (request) {
770
- console.log('Starting Request', JSON.stringify(request, null, 2));
771
- return request;
772
- });
773
- this.httpService.interceptors.response.use(function (response) {
774
- console.log('Response:', JSON.stringify(response, null, 2));
775
- return response;
776
- });
777
- }
778
- }
779
- var _proto = RangoClient.prototype;
780
- _proto.meta = /*#__PURE__*/function () {
781
- var _meta = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(options) {
782
- var axiosResponse;
783
- return _regeneratorRuntime().wrap(function _callee$(_context) {
784
- while (1) switch (_context.prev = _context.next) {
785
- case 0:
786
- _context.next = 2;
787
- return this.httpService.get("/basic/meta?apiKey=" + this.apiKey, _extends({}, options));
788
- case 2:
789
- axiosResponse = _context.sent;
790
- return _context.abrupt("return", axiosResponse.data);
791
- case 4:
792
- case "end":
793
- return _context.stop();
794
- }
795
- }, _callee, this);
796
- }));
797
- function meta(_x) {
798
- return _meta.apply(this, arguments);
799
- }
800
- return meta;
801
- }();
802
- _proto.chains = /*#__PURE__*/function () {
803
- var _chains = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(options) {
804
- var axiosResponse;
805
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
806
- while (1) switch (_context2.prev = _context2.next) {
807
- case 0:
808
- _context2.next = 2;
809
- return this.httpService.get("/basic/meta/blockchains?apiKey=" + this.apiKey, _extends({}, options));
810
- case 2:
811
- axiosResponse = _context2.sent;
812
- return _context2.abrupt("return", axiosResponse.data);
813
- case 4:
814
- case "end":
815
- return _context2.stop();
816
- }
817
- }, _callee2, this);
818
- }));
819
- function chains(_x2) {
820
- return _chains.apply(this, arguments);
821
- }
822
- return chains;
823
- }();
824
- _proto.swappers = /*#__PURE__*/function () {
825
- var _swappers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(options) {
826
- var axiosResponse;
827
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
828
- while (1) switch (_context3.prev = _context3.next) {
829
- case 0:
830
- _context3.next = 2;
831
- return this.httpService.get("/basic/meta/swappers?apiKey=" + this.apiKey, _extends({}, options));
832
- case 2:
833
- axiosResponse = _context3.sent;
834
- return _context3.abrupt("return", axiosResponse.data);
835
- case 4:
836
- case "end":
837
- return _context3.stop();
838
- }
839
- }, _callee3, this);
840
- }));
841
- function swappers(_x3) {
842
- return _swappers.apply(this, arguments);
843
- }
844
- return swappers;
845
- }();
846
- _proto.messagingProtocols = /*#__PURE__*/function () {
847
- var _messagingProtocols = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(options) {
848
- var axiosResponse;
849
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
850
- while (1) switch (_context4.prev = _context4.next) {
851
- case 0:
852
- _context4.next = 2;
853
- return this.httpService.get("/basic/meta/messaging-protocols?apiKey=" + this.apiKey, _extends({}, options));
854
- case 2:
855
- axiosResponse = _context4.sent;
856
- return _context4.abrupt("return", axiosResponse.data);
857
- case 4:
858
- case "end":
859
- return _context4.stop();
860
- }
861
- }, _callee4, this);
862
- }));
863
- function messagingProtocols(_x4) {
864
- return _messagingProtocols.apply(this, arguments);
865
- }
866
- return messagingProtocols;
867
- }();
868
- _proto.quote = /*#__PURE__*/function () {
869
- var _quote = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(quoteRequest, options) {
870
- var body, axiosResponse;
871
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
872
- while (1) switch (_context5.prev = _context5.next) {
873
- case 0:
874
- body = _extends({}, quoteRequest, {
875
- from: assetToString(quoteRequest.from),
876
- to: assetToString(quoteRequest.to),
877
- swappers: !!quoteRequest.swappers && quoteRequest.swappers.length > 0 ? quoteRequest.swappers.join(',') : undefined,
878
- swapperGroups: !!quoteRequest.swapperGroups && quoteRequest.swapperGroups.length > 0 ? quoteRequest.swapperGroups.join(',') : undefined,
879
- messagingProtocols: !!quoteRequest.messagingProtocols && quoteRequest.messagingProtocols.length > 0 ? quoteRequest.messagingProtocols.join(',') : undefined
880
- });
881
- _context5.next = 3;
882
- return this.httpService.get("/basic/quote?apiKey=" + this.apiKey, _extends({
883
- params: body,
884
- headers: {
885
- 'X-Rango-Id': this.deviceId
886
- }
887
- }, options));
888
- case 3:
889
- axiosResponse = _context5.sent;
890
- return _context5.abrupt("return", axiosResponse.data);
891
- case 5:
892
- case "end":
893
- return _context5.stop();
894
- }
895
- }, _callee5, this);
896
- }));
897
- function quote(_x5, _x6) {
898
- return _quote.apply(this, arguments);
899
- }
900
- return quote;
901
- }();
902
- _proto.isApproved = /*#__PURE__*/function () {
903
- var _isApproved = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(requestId, txId, options) {
904
- var axiosResponse;
905
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
906
- while (1) switch (_context6.prev = _context6.next) {
907
- case 0:
908
- _context6.next = 2;
909
- return this.httpService.get("/basic/is-approved?apiKey=" + this.apiKey, _extends({
910
- params: {
911
- requestId: requestId,
912
- txId: txId
913
- },
914
- headers: {
915
- 'X-Rango-Id': this.deviceId
916
- }
917
- }, options));
918
- case 2:
919
- axiosResponse = _context6.sent;
920
- return _context6.abrupt("return", axiosResponse.data);
921
- case 4:
922
- case "end":
923
- return _context6.stop();
924
- }
925
- }, _callee6, this);
926
- }));
927
- function isApproved(_x7, _x8, _x9) {
928
- return _isApproved.apply(this, arguments);
929
- }
930
- return isApproved;
931
- }();
932
- _proto.status = /*#__PURE__*/function () {
933
- var _status = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(statusRequest, options) {
934
- var axiosResponse;
935
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
936
- while (1) switch (_context7.prev = _context7.next) {
937
- case 0:
938
- _context7.next = 2;
939
- return this.httpService.get("/basic/status?apiKey=" + this.apiKey, _extends({
940
- params: statusRequest,
941
- headers: {
942
- 'X-Rango-Id': this.deviceId
943
- }
944
- }, options));
945
- case 2:
946
- axiosResponse = _context7.sent;
947
- return _context7.abrupt("return", axiosResponse.data);
948
- case 4:
949
- case "end":
950
- return _context7.stop();
951
- }
952
- }, _callee7, this);
953
- }));
954
- function status(_x10, _x11) {
955
- return _status.apply(this, arguments);
956
- }
957
- return status;
958
- }();
959
- _proto.swap = /*#__PURE__*/function () {
960
- var _swap = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(swapRequest, options) {
961
- var body, axiosResponse;
962
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
963
- while (1) switch (_context8.prev = _context8.next) {
964
- case 0:
965
- body = _extends({}, swapRequest, {
966
- from: assetToString(swapRequest.from),
967
- to: assetToString(swapRequest.to),
968
- referrerAddress: swapRequest.referrerAddress || null,
969
- referrerFee: swapRequest.referrerFee || null,
970
- disableEstimate: swapRequest.disableEstimate || false,
971
- swappers: !!swapRequest.swappers && swapRequest.swappers.length > 0 ? swapRequest.swappers.join(',') : undefined,
972
- swapperGroups: !!swapRequest.swapperGroups && swapRequest.swapperGroups.length > 0 ? swapRequest.swapperGroups.join(',') : undefined,
973
- messagingProtocols: !!swapRequest.messagingProtocols && swapRequest.messagingProtocols.length > 0 ? swapRequest.messagingProtocols.join(',') : undefined
974
- });
975
- _context8.next = 3;
976
- return this.httpService.get("/basic/swap?apiKey=" + this.apiKey, _extends({
977
- params: body,
978
- headers: {
979
- 'X-Rango-Id': this.deviceId
980
- }
981
- }, options));
982
- case 3:
983
- axiosResponse = _context8.sent;
984
- return _context8.abrupt("return", axiosResponse.data);
985
- case 5:
986
- case "end":
987
- return _context8.stop();
988
- }
989
- }, _callee8, this);
990
- }));
991
- function swap(_x12, _x13) {
992
- return _swap.apply(this, arguments);
993
- }
994
- return swap;
995
- }();
996
- _proto.reportFailure = /*#__PURE__*/function () {
997
- var _reportFailure = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(requestBody, options) {
998
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
999
- while (1) switch (_context9.prev = _context9.next) {
1000
- case 0:
1001
- _context9.next = 2;
1002
- return this.httpService.post("/basic/report-tx?apiKey=" + this.apiKey, requestBody, _extends({
1003
- headers: {
1004
- 'X-Rango-Id': this.deviceId
1005
- }
1006
- }, options));
1007
- case 2:
1008
- case "end":
1009
- return _context9.stop();
1010
- }
1011
- }, _callee9, this);
1012
- }));
1013
- function reportFailure(_x14, _x15) {
1014
- return _reportFailure.apply(this, arguments);
1015
- }
1016
- return reportFailure;
1017
- }();
1018
- _proto.balance = /*#__PURE__*/function () {
1019
- var _balance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(walletAddress, options) {
1020
- var axiosResponse;
1021
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
1022
- while (1) switch (_context10.prev = _context10.next) {
1023
- case 0:
1024
- _context10.next = 2;
1025
- return this.httpService.get("/basic/balance?apiKey=" + this.apiKey, _extends({
1026
- params: walletAddress,
1027
- headers: {
1028
- 'X-Rango-Id': this.deviceId
1029
- }
1030
- }, options));
1031
- case 2:
1032
- axiosResponse = _context10.sent;
1033
- return _context10.abrupt("return", axiosResponse.data);
1034
- case 4:
1035
- case "end":
1036
- return _context10.stop();
1037
- }
1038
- }, _callee10, this);
1039
- }));
1040
- function balance(_x16, _x17) {
1041
- return _balance.apply(this, arguments);
1042
- }
1043
- return balance;
1044
- }();
1045
- _proto.executeEvmRoute = /*#__PURE__*/function () {
1046
- var _executeEvmRoute2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(
1047
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1048
- signer, route) {
1049
- var prettifiedError, message;
1050
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
1051
- while (1) switch (_context11.prev = _context11.next) {
1052
- case 0:
1053
- _context11.prev = 0;
1054
- _context11.next = 3;
1055
- return executeEvmRoute(this, signer, route);
1056
- case 3:
1057
- return _context11.abrupt("return", _context11.sent);
1058
- case 6:
1059
- _context11.prev = 6;
1060
- _context11.t0 = _context11["catch"](0);
1061
- prettifiedError = prettifyError(_context11.t0);
1062
- try {
1063
- message = (prettifiedError == null ? void 0 : prettifiedError.message) || 'Error executing the route';
1064
- this.reportFailure({
1065
- requestId: route.requestId,
1066
- eventType: 'TX_FAIL',
1067
- reason: message
1068
- });
1069
- } catch (err) {
1070
- console.log({
1071
- err: err
1072
- });
1073
- }
1074
- throw prettifiedError;
1075
- case 11:
1076
- case "end":
1077
- return _context11.stop();
1078
- }
1079
- }, _callee11, this, [[0, 6]]);
1080
- }));
1081
- function executeEvmRoute$1(_x18, _x19) {
1082
- return _executeEvmRoute2.apply(this, arguments);
1083
- }
1084
- return executeEvmRoute$1;
1085
- }();
1086
- return RangoClient;
1087
- }();
1088
-
1089
- export { GenericTransactionType, MetamaskErrorCodes, RangoClient, RoutingResultType, TransactionStatus, TransactionType, assetToString, cosmosBlockchains, evmBlockchains, isCosmosBlockchain, isCosmosTransaction, isEvmBlockchain, isEvmTransaction, isSolanaBlockchain, isStarknetBlockchain, isTonBlockchain, isTransferBlockchain, isTransferTransaction, isTronBlockchain, solanaBlockchain, starknetBlockchain, tonBlockchain, transferBlockchains, tronBlockchain };
1090
- //# sourceMappingURL=rango-sdk-basic.esm.js.map