@paraspell/sdk-core 14.1.0-rc → 14.1.0
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/dist/index.d.ts +32 -112
- package/dist/index.mjs +189 -818
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -3,11 +3,11 @@ import { isChainEvm, getAssetsObject, InvalidCurrencyError, isSymbolMatch, isAss
|
|
|
3
3
|
export * from '@paraspell/assets';
|
|
4
4
|
import { base58 } from '@scure/base';
|
|
5
5
|
import { isAddress, pad, toHex, getAddress, concat, keccak256, isHex, createPublicClient, http, formatUnits as formatUnits$1, parseUnits as parseUnits$1 } from 'viem';
|
|
6
|
+
import { ParaSpellError, isTLocation, replaceBigInt, isExternalChain, CHAINS, Version, isRelayChain, isSubstrateBridge, Parents, deepEqual, isTrustedChain, isCustomChain, isSnowbridge, getJunctionValue, ETHEREUM_BRIDGE_ORIGINS, isBridge, hasJunction, RELAYCHAINS, DEFAULT_SS58_PREFIX } from '@paraspell/sdk-common';
|
|
7
|
+
export * from '@paraspell/sdk-common';
|
|
6
8
|
import { getXcmPallet, getOtherAssetsPallets, getNativeAssetsPallet, getSupportedPalletsDetails, ASSETS_PALLETS, NATIVE_ASSETS_PALLET_PRIORITY, OTHER_ASSETS_PALLET_PRIORITY, hasPalletImpl, getXcmPalletImpl } from '@paraspell/pallets';
|
|
7
9
|
export * from '@paraspell/pallets';
|
|
8
|
-
import {
|
|
9
|
-
export * from '@paraspell/sdk-common';
|
|
10
|
-
import { mainnet, sepolia, moonbeam, moonriver } from 'viem/chains';
|
|
10
|
+
import { mainnet, sepolia } from 'viem/chains';
|
|
11
11
|
|
|
12
12
|
function _arrayLikeToArray(r, a) {
|
|
13
13
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -55,13 +55,6 @@ function _callSuper(t, o, e) {
|
|
|
55
55
|
function _classCallCheck(a, n) {
|
|
56
56
|
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
57
57
|
}
|
|
58
|
-
function _construct(t, e, r) {
|
|
59
|
-
if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
|
|
60
|
-
var o = [null];
|
|
61
|
-
o.push.apply(o, e);
|
|
62
|
-
var p = new (t.bind.apply(t, o))();
|
|
63
|
-
return r && _setPrototypeOf(p, r.prototype), p;
|
|
64
|
-
}
|
|
65
58
|
function _defineProperties(e, r) {
|
|
66
59
|
for (var t = 0; t < r.length; t++) {
|
|
67
60
|
var o = r[t];
|
|
@@ -155,13 +148,6 @@ function _inherits(t, e) {
|
|
|
155
148
|
writable: false
|
|
156
149
|
}), e && _setPrototypeOf(t, e);
|
|
157
150
|
}
|
|
158
|
-
function _isNativeFunction(t) {
|
|
159
|
-
try {
|
|
160
|
-
return -1 !== Function.toString.call(t).indexOf("[native code]");
|
|
161
|
-
} catch (n) {
|
|
162
|
-
return "function" == typeof t;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
151
|
function _isNativeReflectConstruct() {
|
|
166
152
|
try {
|
|
167
153
|
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
@@ -411,126 +397,86 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
411
397
|
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
412
398
|
}
|
|
413
399
|
}
|
|
414
|
-
function _wrapNativeSuper(t) {
|
|
415
|
-
var r = "function" == typeof Map ? new Map() : void 0;
|
|
416
|
-
return _wrapNativeSuper = function (t) {
|
|
417
|
-
if (null === t || !_isNativeFunction(t)) return t;
|
|
418
|
-
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
|
|
419
|
-
if (void 0 !== r) {
|
|
420
|
-
if (r.has(t)) return r.get(t);
|
|
421
|
-
r.set(t, Wrapper);
|
|
422
|
-
}
|
|
423
|
-
function Wrapper() {
|
|
424
|
-
return _construct(t, arguments, _getPrototypeOf(this).constructor);
|
|
425
|
-
}
|
|
426
|
-
return Wrapper.prototype = Object.create(t.prototype, {
|
|
427
|
-
constructor: {
|
|
428
|
-
value: Wrapper,
|
|
429
|
-
enumerable: false,
|
|
430
|
-
writable: true,
|
|
431
|
-
configurable: true
|
|
432
|
-
}
|
|
433
|
-
}), _setPrototypeOf(Wrapper, t);
|
|
434
|
-
}, _wrapNativeSuper(t);
|
|
435
|
-
}
|
|
436
400
|
|
|
437
|
-
var AmountTooLowError = /*#__PURE__*/function (
|
|
401
|
+
var AmountTooLowError = /*#__PURE__*/function (_ParaSpellError) {
|
|
438
402
|
function AmountTooLowError(message) {
|
|
439
|
-
var _this;
|
|
440
403
|
_classCallCheck(this, AmountTooLowError);
|
|
441
|
-
|
|
442
|
-
_this.name = 'AmountTooLowError';
|
|
443
|
-
return _this;
|
|
404
|
+
return _callSuper(this, AmountTooLowError, [message !== null && message !== void 0 ? message : 'Entered amount is too low and cannot cover fees. Please enter a larger amount.']);
|
|
444
405
|
}
|
|
445
|
-
_inherits(AmountTooLowError,
|
|
406
|
+
_inherits(AmountTooLowError, _ParaSpellError);
|
|
446
407
|
return _createClass(AmountTooLowError);
|
|
447
|
-
}(
|
|
408
|
+
}(ParaSpellError);
|
|
448
409
|
|
|
449
410
|
/**
|
|
450
411
|
* Error thrown when an API operation is attempted before the API has been initialized.
|
|
451
412
|
*/
|
|
452
|
-
var ApiNotInitializedError = /*#__PURE__*/function (
|
|
413
|
+
var ApiNotInitializedError = /*#__PURE__*/function (_ParaSpellError) {
|
|
453
414
|
function ApiNotInitializedError() {
|
|
454
|
-
var _this;
|
|
455
415
|
_classCallCheck(this, ApiNotInitializedError);
|
|
456
|
-
|
|
457
|
-
_this.name = 'ApiNotInitializedError';
|
|
458
|
-
return _this;
|
|
416
|
+
return _callSuper(this, ApiNotInitializedError, ['API is not initialized. Please call init() before using this method.']);
|
|
459
417
|
}
|
|
460
|
-
_inherits(ApiNotInitializedError,
|
|
418
|
+
_inherits(ApiNotInitializedError, _ParaSpellError);
|
|
461
419
|
return _createClass(ApiNotInitializedError);
|
|
462
|
-
}(
|
|
420
|
+
}(ParaSpellError);
|
|
463
421
|
|
|
464
422
|
/**
|
|
465
423
|
* Error thrown when a batch operation is invalid or cannot be executed.
|
|
466
424
|
*/
|
|
467
|
-
var BatchValidationError = /*#__PURE__*/function (
|
|
425
|
+
var BatchValidationError = /*#__PURE__*/function (_ParaSpellError) {
|
|
468
426
|
function BatchValidationError(message) {
|
|
469
|
-
var _this;
|
|
470
427
|
_classCallCheck(this, BatchValidationError);
|
|
471
|
-
|
|
472
|
-
_this.name = 'BatchValidationError';
|
|
473
|
-
return _this;
|
|
428
|
+
return _callSuper(this, BatchValidationError, [message]);
|
|
474
429
|
}
|
|
475
|
-
_inherits(BatchValidationError,
|
|
430
|
+
_inherits(BatchValidationError, _ParaSpellError);
|
|
476
431
|
return _createClass(BatchValidationError);
|
|
477
|
-
}(
|
|
432
|
+
}(ParaSpellError);
|
|
478
433
|
|
|
479
434
|
/**
|
|
480
435
|
* Error thrown when the Ethereum bridge is halted.
|
|
481
436
|
*/
|
|
482
|
-
var BridgeHaltedError = /*#__PURE__*/function (
|
|
437
|
+
var BridgeHaltedError = /*#__PURE__*/function (_ParaSpellError) {
|
|
483
438
|
/**
|
|
484
439
|
* Constructs a new BridgeHaltedError.
|
|
485
440
|
*
|
|
486
441
|
* @param message - Optional custom error message.
|
|
487
442
|
*/
|
|
488
443
|
function BridgeHaltedError() {
|
|
489
|
-
var _this;
|
|
490
444
|
_classCallCheck(this, BridgeHaltedError);
|
|
491
|
-
|
|
492
|
-
_this.name = 'BridgeHaltedError';
|
|
493
|
-
return _this;
|
|
445
|
+
return _callSuper(this, BridgeHaltedError, ['Bridge operations have been paused by onchain governance.']);
|
|
494
446
|
}
|
|
495
|
-
_inherits(BridgeHaltedError,
|
|
447
|
+
_inherits(BridgeHaltedError, _ParaSpellError);
|
|
496
448
|
return _createClass(BridgeHaltedError);
|
|
497
|
-
}(
|
|
449
|
+
}(ParaSpellError);
|
|
498
450
|
|
|
499
451
|
/**
|
|
500
452
|
* Error thrown when a custom chain name collides with a built-in chain.
|
|
501
453
|
*/
|
|
502
|
-
var CustomChainConflictError = /*#__PURE__*/function (
|
|
454
|
+
var CustomChainConflictError = /*#__PURE__*/function (_ParaSpellError) {
|
|
503
455
|
function CustomChainConflictError(msg) {
|
|
504
|
-
var _this;
|
|
505
456
|
_classCallCheck(this, CustomChainConflictError);
|
|
506
|
-
|
|
507
|
-
_this.name = 'CustomChainConflict';
|
|
508
|
-
return _this;
|
|
457
|
+
return _callSuper(this, CustomChainConflictError, [msg]);
|
|
509
458
|
}
|
|
510
|
-
_inherits(CustomChainConflictError,
|
|
459
|
+
_inherits(CustomChainConflictError, _ParaSpellError);
|
|
511
460
|
return _createClass(CustomChainConflictError);
|
|
512
|
-
}(
|
|
461
|
+
}(ParaSpellError);
|
|
513
462
|
|
|
514
463
|
/**
|
|
515
464
|
* Error thrown when a custom chain definition is missing required fields or
|
|
516
465
|
* carries invalid values.
|
|
517
466
|
*/
|
|
518
|
-
var CustomChainInvalidError = /*#__PURE__*/function (
|
|
467
|
+
var CustomChainInvalidError = /*#__PURE__*/function (_ParaSpellError) {
|
|
519
468
|
function CustomChainInvalidError(msg) {
|
|
520
|
-
var _this;
|
|
521
469
|
_classCallCheck(this, CustomChainInvalidError);
|
|
522
|
-
|
|
523
|
-
_this.name = 'CustomChainInvalid';
|
|
524
|
-
return _this;
|
|
470
|
+
return _callSuper(this, CustomChainInvalidError, [msg]);
|
|
525
471
|
}
|
|
526
|
-
_inherits(CustomChainInvalidError,
|
|
472
|
+
_inherits(CustomChainInvalidError, _ParaSpellError);
|
|
527
473
|
return _createClass(CustomChainInvalidError);
|
|
528
|
-
}(
|
|
474
|
+
}(ParaSpellError);
|
|
529
475
|
|
|
530
476
|
/**
|
|
531
477
|
* Error thrown when the Dry Run fails.
|
|
532
478
|
*/
|
|
533
|
-
var DryRunFailedError = /*#__PURE__*/function (
|
|
479
|
+
var DryRunFailedError = /*#__PURE__*/function (_ParaSpellError) {
|
|
534
480
|
/**
|
|
535
481
|
* Constructs a new DryRunFailedError.
|
|
536
482
|
*
|
|
@@ -545,320 +491,265 @@ var DryRunFailedError = /*#__PURE__*/function (_Error) {
|
|
|
545
491
|
message = "".concat(prefix, " ").concat(message);
|
|
546
492
|
}
|
|
547
493
|
_this = _callSuper(this, DryRunFailedError, [message]);
|
|
548
|
-
_this.name = 'DryRunFailedError';
|
|
549
494
|
_this.dryRunError = error;
|
|
550
495
|
return _this;
|
|
551
496
|
}
|
|
552
|
-
_inherits(DryRunFailedError,
|
|
497
|
+
_inherits(DryRunFailedError, _ParaSpellError);
|
|
553
498
|
return _createClass(DryRunFailedError);
|
|
554
|
-
}(
|
|
499
|
+
}(ParaSpellError);
|
|
555
500
|
|
|
556
501
|
/**
|
|
557
502
|
* Error thrown when an extension is not installed.
|
|
558
503
|
*/
|
|
559
|
-
var ExtensionNotInstalledError = /*#__PURE__*/function (
|
|
504
|
+
var ExtensionNotInstalledError = /*#__PURE__*/function (_ParaSpellError) {
|
|
560
505
|
/**
|
|
561
506
|
* Constructs a new ExtensionNotInstalledError.
|
|
562
507
|
*
|
|
563
508
|
* @param message - The error message.
|
|
564
509
|
*/
|
|
565
510
|
function ExtensionNotInstalledError(message) {
|
|
566
|
-
var _this;
|
|
567
511
|
_classCallCheck(this, ExtensionNotInstalledError);
|
|
568
|
-
|
|
569
|
-
_this.name = 'ExtensionNotInstalledError';
|
|
570
|
-
return _this;
|
|
512
|
+
return _callSuper(this, ExtensionNotInstalledError, [message]);
|
|
571
513
|
}
|
|
572
|
-
_inherits(ExtensionNotInstalledError,
|
|
514
|
+
_inherits(ExtensionNotInstalledError, _ParaSpellError);
|
|
573
515
|
return _createClass(ExtensionNotInstalledError);
|
|
574
|
-
}(
|
|
516
|
+
}(ParaSpellError);
|
|
575
517
|
|
|
576
518
|
/**
|
|
577
519
|
* Error thrown when a feature or route is temporarily disabled via configuration or governance.
|
|
578
520
|
*/
|
|
579
|
-
var FeatureTemporarilyDisabledError = /*#__PURE__*/function (
|
|
521
|
+
var FeatureTemporarilyDisabledError = /*#__PURE__*/function (_ParaSpellError) {
|
|
580
522
|
function FeatureTemporarilyDisabledError(message) {
|
|
581
|
-
var _this;
|
|
582
523
|
_classCallCheck(this, FeatureTemporarilyDisabledError);
|
|
583
|
-
|
|
584
|
-
_this.name = 'FeatureTemporarilyDisabledError';
|
|
585
|
-
return _this;
|
|
524
|
+
return _callSuper(this, FeatureTemporarilyDisabledError, [message]);
|
|
586
525
|
}
|
|
587
|
-
_inherits(FeatureTemporarilyDisabledError,
|
|
526
|
+
_inherits(FeatureTemporarilyDisabledError, _ParaSpellError);
|
|
588
527
|
return _createClass(FeatureTemporarilyDisabledError);
|
|
589
|
-
}(
|
|
528
|
+
}(ParaSpellError);
|
|
590
529
|
|
|
591
530
|
/**
|
|
592
531
|
* Error thrown when an invalid address is provided.
|
|
593
532
|
*/
|
|
594
|
-
var InvalidAddressError = /*#__PURE__*/function (
|
|
533
|
+
var InvalidAddressError = /*#__PURE__*/function (_ParaSpellError) {
|
|
595
534
|
/**
|
|
596
535
|
* Constructs a new InvalidAddressError.
|
|
597
536
|
*
|
|
598
537
|
* @param message - The error message.
|
|
599
538
|
*/
|
|
600
539
|
function InvalidAddressError(message) {
|
|
601
|
-
var _this;
|
|
602
540
|
_classCallCheck(this, InvalidAddressError);
|
|
603
|
-
|
|
604
|
-
_this.name = 'InvalidAddressError';
|
|
605
|
-
return _this;
|
|
541
|
+
return _callSuper(this, InvalidAddressError, [message]);
|
|
606
542
|
}
|
|
607
|
-
_inherits(InvalidAddressError,
|
|
543
|
+
_inherits(InvalidAddressError, _ParaSpellError);
|
|
608
544
|
return _createClass(InvalidAddressError);
|
|
609
|
-
}(
|
|
545
|
+
}(ParaSpellError);
|
|
610
546
|
|
|
611
547
|
/**
|
|
612
548
|
* Error development mode is on and no API override is provided for a specific chain.
|
|
613
549
|
*/
|
|
614
|
-
var MissingChainApiError = /*#__PURE__*/function (
|
|
550
|
+
var MissingChainApiError = /*#__PURE__*/function (_ParaSpellError) {
|
|
615
551
|
/**
|
|
616
552
|
* Constructs a new MissingChainApiError.
|
|
617
553
|
*
|
|
618
554
|
* @param chain - The chain for which the API is missing.
|
|
619
555
|
*/
|
|
620
556
|
function MissingChainApiError(chain) {
|
|
621
|
-
var _this;
|
|
622
557
|
_classCallCheck(this, MissingChainApiError);
|
|
623
|
-
|
|
624
|
-
_this.name = 'MissingChainApiError';
|
|
625
|
-
return _this;
|
|
558
|
+
return _callSuper(this, MissingChainApiError, ["Development mode requires an API override for ".concat(chain, ". ") + "Please provide an API client or WebSocket URL in the apiOverrides configuration."]);
|
|
626
559
|
}
|
|
627
|
-
_inherits(MissingChainApiError,
|
|
560
|
+
_inherits(MissingChainApiError, _ParaSpellError);
|
|
628
561
|
return _createClass(MissingChainApiError);
|
|
629
|
-
}(
|
|
562
|
+
}(ParaSpellError);
|
|
630
563
|
|
|
631
564
|
/**
|
|
632
565
|
* Error thrown when a required parameter is missing.
|
|
633
566
|
*/
|
|
634
|
-
var MissingParameterError = /*#__PURE__*/function (
|
|
567
|
+
var MissingParameterError = /*#__PURE__*/function (_ParaSpellError) {
|
|
635
568
|
function MissingParameterError(parameter, message) {
|
|
636
|
-
var _this;
|
|
637
569
|
_classCallCheck(this, MissingParameterError);
|
|
638
570
|
var label = Array.isArray(parameter) ? parameter.join(', ') : parameter;
|
|
639
|
-
|
|
640
|
-
_this.name = 'MissingParameterError';
|
|
641
|
-
return _this;
|
|
571
|
+
return _callSuper(this, MissingParameterError, [message !== null && message !== void 0 ? message : "Missing required parameter: ".concat(label, ".")]);
|
|
642
572
|
}
|
|
643
|
-
_inherits(MissingParameterError,
|
|
573
|
+
_inherits(MissingParameterError, _ParaSpellError);
|
|
644
574
|
return _createClass(MissingParameterError);
|
|
645
|
-
}(
|
|
575
|
+
}(ParaSpellError);
|
|
646
576
|
|
|
647
577
|
/**
|
|
648
578
|
* Used to inform user, that Parachain they wish to use has not yet implemented full XCM Support
|
|
649
579
|
*/
|
|
650
|
-
var NoXCMSupportImplementedError = /*#__PURE__*/function (
|
|
580
|
+
var NoXCMSupportImplementedError = /*#__PURE__*/function (_ParaSpellError) {
|
|
651
581
|
/**
|
|
652
582
|
* Constructs a new NoXCMSupportImplementedError.
|
|
653
583
|
*
|
|
654
584
|
* @param chain - The chain for which XCM support is not implemented.
|
|
655
585
|
*/
|
|
656
586
|
function NoXCMSupportImplementedError(chain) {
|
|
657
|
-
var _this;
|
|
658
587
|
_classCallCheck(this, NoXCMSupportImplementedError);
|
|
659
|
-
|
|
660
|
-
_this.name = 'NoXCMSupportImplemented';
|
|
661
|
-
return _this;
|
|
588
|
+
return _callSuper(this, NoXCMSupportImplementedError, ["No XCM support implemented for chain ".concat(chain, " yet.")]);
|
|
662
589
|
}
|
|
663
|
-
_inherits(NoXCMSupportImplementedError,
|
|
590
|
+
_inherits(NoXCMSupportImplementedError, _ParaSpellError);
|
|
664
591
|
return _createClass(NoXCMSupportImplementedError);
|
|
665
|
-
}(
|
|
592
|
+
}(ParaSpellError);
|
|
666
593
|
|
|
667
594
|
/**
|
|
668
595
|
* Error thrown when numeric input is invalid or cannot be parsed.
|
|
669
596
|
*/
|
|
670
|
-
var NumberFormatError = /*#__PURE__*/function (
|
|
597
|
+
var NumberFormatError = /*#__PURE__*/function (_ParaSpellError) {
|
|
671
598
|
function NumberFormatError() {
|
|
672
|
-
var _this;
|
|
673
599
|
var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Input must be a valid number';
|
|
674
600
|
_classCallCheck(this, NumberFormatError);
|
|
675
|
-
|
|
676
|
-
_this.name = 'NumberFormatError';
|
|
677
|
-
return _this;
|
|
601
|
+
return _callSuper(this, NumberFormatError, [message]);
|
|
678
602
|
}
|
|
679
|
-
_inherits(NumberFormatError,
|
|
603
|
+
_inherits(NumberFormatError, _ParaSpellError);
|
|
680
604
|
return _createClass(NumberFormatError);
|
|
681
|
-
}(
|
|
605
|
+
}(ParaSpellError);
|
|
682
606
|
|
|
683
607
|
/**
|
|
684
608
|
* Error thrown when asset or currency overrides are invalid or conflicting.
|
|
685
609
|
*/
|
|
686
|
-
var OverrideConflictError = /*#__PURE__*/function (
|
|
610
|
+
var OverrideConflictError = /*#__PURE__*/function (_ParaSpellError) {
|
|
687
611
|
function OverrideConflictError(message) {
|
|
688
|
-
var _this;
|
|
689
612
|
_classCallCheck(this, OverrideConflictError);
|
|
690
|
-
|
|
691
|
-
_this.name = 'OverrideConflictError';
|
|
692
|
-
return _this;
|
|
613
|
+
return _callSuper(this, OverrideConflictError, [message]);
|
|
693
614
|
}
|
|
694
|
-
_inherits(OverrideConflictError,
|
|
615
|
+
_inherits(OverrideConflictError, _ParaSpellError);
|
|
695
616
|
return _createClass(OverrideConflictError);
|
|
696
|
-
}(
|
|
617
|
+
}(ParaSpellError);
|
|
697
618
|
|
|
698
619
|
/**
|
|
699
620
|
* Error thrown when no provider or RPC endpoint is available for the requested chain.
|
|
700
621
|
*/
|
|
701
|
-
var ProviderUnavailableError = /*#__PURE__*/function (
|
|
622
|
+
var ProviderUnavailableError = /*#__PURE__*/function (_ParaSpellError) {
|
|
702
623
|
function ProviderUnavailableError(message) {
|
|
703
|
-
var _this;
|
|
704
624
|
_classCallCheck(this, ProviderUnavailableError);
|
|
705
|
-
|
|
706
|
-
_this.name = 'ProviderUnavailableError';
|
|
707
|
-
return _this;
|
|
625
|
+
return _callSuper(this, ProviderUnavailableError, [message]);
|
|
708
626
|
}
|
|
709
|
-
_inherits(ProviderUnavailableError,
|
|
627
|
+
_inherits(ProviderUnavailableError, _ParaSpellError);
|
|
710
628
|
return _createClass(ProviderUnavailableError);
|
|
711
|
-
}(
|
|
629
|
+
}(ParaSpellError);
|
|
712
630
|
|
|
713
631
|
/**
|
|
714
632
|
* Error thrown when routing or path resolution fails.
|
|
715
633
|
*/
|
|
716
|
-
var RoutingResolutionError = /*#__PURE__*/function (
|
|
634
|
+
var RoutingResolutionError = /*#__PURE__*/function (_ParaSpellError) {
|
|
717
635
|
function RoutingResolutionError(message) {
|
|
718
|
-
var _this;
|
|
719
636
|
_classCallCheck(this, RoutingResolutionError);
|
|
720
|
-
|
|
721
|
-
_this.name = 'RoutingResolutionError';
|
|
722
|
-
return _this;
|
|
637
|
+
return _callSuper(this, RoutingResolutionError, [message]);
|
|
723
638
|
}
|
|
724
|
-
_inherits(RoutingResolutionError,
|
|
639
|
+
_inherits(RoutingResolutionError, _ParaSpellError);
|
|
725
640
|
return _createClass(RoutingResolutionError);
|
|
726
|
-
}(
|
|
641
|
+
}(ParaSpellError);
|
|
727
642
|
|
|
728
643
|
/**
|
|
729
644
|
* Error thrown when a runtime API call fails
|
|
730
645
|
*/
|
|
731
|
-
var RuntimeApiError = /*#__PURE__*/function (
|
|
646
|
+
var RuntimeApiError = /*#__PURE__*/function (_ParaSpellError) {
|
|
732
647
|
function RuntimeApiError(message) {
|
|
733
|
-
var _this;
|
|
734
648
|
_classCallCheck(this, RuntimeApiError);
|
|
735
|
-
|
|
736
|
-
_this.name = 'RuntimeApiError';
|
|
737
|
-
return _this;
|
|
649
|
+
return _callSuper(this, RuntimeApiError, [message]);
|
|
738
650
|
}
|
|
739
|
-
_inherits(RuntimeApiError,
|
|
651
|
+
_inherits(RuntimeApiError, _ParaSpellError);
|
|
740
652
|
return _createClass(RuntimeApiError);
|
|
741
|
-
}(
|
|
653
|
+
}(ParaSpellError);
|
|
742
654
|
|
|
743
655
|
/**
|
|
744
656
|
* Error thrown when a required runtime API is not available on the target chain.
|
|
745
657
|
*/
|
|
746
|
-
var RuntimeApiUnavailableError = /*#__PURE__*/function (
|
|
658
|
+
var RuntimeApiUnavailableError = /*#__PURE__*/function (_ParaSpellError) {
|
|
747
659
|
function RuntimeApiUnavailableError(chain, apiName) {
|
|
748
|
-
var _this;
|
|
749
660
|
_classCallCheck(this, RuntimeApiUnavailableError);
|
|
750
|
-
|
|
751
|
-
_this.name = 'RuntimeApiUnavailableError';
|
|
752
|
-
return _this;
|
|
661
|
+
return _callSuper(this, RuntimeApiUnavailableError, ["Runtime API \"".concat(apiName, "\" is not available on chain ").concat(chain)]);
|
|
753
662
|
}
|
|
754
|
-
_inherits(RuntimeApiUnavailableError,
|
|
663
|
+
_inherits(RuntimeApiUnavailableError, _ParaSpellError);
|
|
755
664
|
return _createClass(RuntimeApiUnavailableError);
|
|
756
|
-
}(
|
|
665
|
+
}(ParaSpellError);
|
|
757
666
|
|
|
758
667
|
/**
|
|
759
668
|
* Error thrown when a scenario, route, or chain capability is not supported.
|
|
760
669
|
*/
|
|
761
|
-
var ScenarioNotSupportedError = /*#__PURE__*/function (
|
|
670
|
+
var ScenarioNotSupportedError = /*#__PURE__*/function (_ParaSpellError) {
|
|
762
671
|
function ScenarioNotSupportedError(contextOrMsg) {
|
|
763
672
|
var _this;
|
|
764
673
|
_classCallCheck(this, ScenarioNotSupportedError);
|
|
765
674
|
if (typeof contextOrMsg === 'string') {
|
|
766
675
|
_this = _callSuper(this, ScenarioNotSupportedError, [contextOrMsg]);
|
|
767
|
-
_this.name = 'ScenarioNotSupportedError';
|
|
768
676
|
return _possibleConstructorReturn(_this);
|
|
769
677
|
}
|
|
770
678
|
var chain = contextOrMsg.chain,
|
|
771
679
|
scenario = contextOrMsg.scenario;
|
|
772
680
|
var parts = ["Scenario ".concat(scenario), "for chain ".concat(chain), 'is not supported'];
|
|
773
|
-
|
|
774
|
-
_this.name = 'ScenarioNotSupportedError';
|
|
775
|
-
return _assertThisInitialized(_this);
|
|
681
|
+
return _callSuper(this, ScenarioNotSupportedError, [parts.join(' ')]);
|
|
776
682
|
}
|
|
777
|
-
_inherits(ScenarioNotSupportedError,
|
|
683
|
+
_inherits(ScenarioNotSupportedError, _ParaSpellError);
|
|
778
684
|
return _createClass(ScenarioNotSupportedError);
|
|
779
|
-
}(
|
|
685
|
+
}(ParaSpellError);
|
|
780
686
|
|
|
781
687
|
/**
|
|
782
688
|
* Error thrown when a submitted transaction encounters a dispatch error on-chain.
|
|
783
689
|
*/
|
|
784
|
-
var SubmitTransactionError = /*#__PURE__*/function (
|
|
690
|
+
var SubmitTransactionError = /*#__PURE__*/function (_ParaSpellError) {
|
|
785
691
|
/**
|
|
786
692
|
* Constructs a new SubmitTransactionError.
|
|
787
693
|
*
|
|
788
694
|
* @param message - The dispatch error details.
|
|
789
695
|
*/
|
|
790
696
|
function SubmitTransactionError(message) {
|
|
791
|
-
var _this;
|
|
792
697
|
_classCallCheck(this, SubmitTransactionError);
|
|
793
|
-
|
|
794
|
-
_this.name = 'SubmitTransactionError';
|
|
795
|
-
return _this;
|
|
698
|
+
return _callSuper(this, SubmitTransactionError, [message]);
|
|
796
699
|
}
|
|
797
|
-
_inherits(SubmitTransactionError,
|
|
700
|
+
_inherits(SubmitTransactionError, _ParaSpellError);
|
|
798
701
|
return _createClass(SubmitTransactionError);
|
|
799
|
-
}(
|
|
702
|
+
}(ParaSpellError);
|
|
800
703
|
|
|
801
|
-
var TypeAndThenUnavailableError = /*#__PURE__*/function (
|
|
704
|
+
var TypeAndThenUnavailableError = /*#__PURE__*/function (_ParaSpellError) {
|
|
802
705
|
function TypeAndThenUnavailableError(message) {
|
|
803
|
-
var _this;
|
|
804
706
|
_classCallCheck(this, TypeAndThenUnavailableError);
|
|
805
|
-
|
|
806
|
-
_this.name = 'TypeAndThenUnavailableError';
|
|
807
|
-
return _this;
|
|
707
|
+
return _callSuper(this, TypeAndThenUnavailableError, [message]);
|
|
808
708
|
}
|
|
809
|
-
_inherits(TypeAndThenUnavailableError,
|
|
709
|
+
_inherits(TypeAndThenUnavailableError, _ParaSpellError);
|
|
810
710
|
return _createClass(TypeAndThenUnavailableError);
|
|
811
|
-
}(
|
|
711
|
+
}(ParaSpellError);
|
|
812
712
|
|
|
813
713
|
/**
|
|
814
714
|
* UnableToComputeError is thrown when a computation cannot be performed.
|
|
815
715
|
*/
|
|
816
|
-
var UnableToComputeError = /*#__PURE__*/function (
|
|
716
|
+
var UnableToComputeError = /*#__PURE__*/function (_ParaSpellError) {
|
|
817
717
|
/**
|
|
818
718
|
* Constructs a new UnableToComputeError.
|
|
819
719
|
*
|
|
820
720
|
* @param message - Required error message.
|
|
821
721
|
*/
|
|
822
722
|
function UnableToComputeError(message) {
|
|
823
|
-
var _this;
|
|
824
723
|
_classCallCheck(this, UnableToComputeError);
|
|
825
|
-
|
|
826
|
-
_this.name = 'UnableToComputeError';
|
|
827
|
-
return _this;
|
|
724
|
+
return _callSuper(this, UnableToComputeError, [message]);
|
|
828
725
|
}
|
|
829
|
-
_inherits(UnableToComputeError,
|
|
726
|
+
_inherits(UnableToComputeError, _ParaSpellError);
|
|
830
727
|
return _createClass(UnableToComputeError);
|
|
831
|
-
}(
|
|
728
|
+
}(ParaSpellError);
|
|
832
729
|
|
|
833
730
|
/**
|
|
834
731
|
* Error thrown when an operation or parameter combination is not supported.
|
|
835
732
|
*/
|
|
836
|
-
var UnsupportedOperationError = /*#__PURE__*/function (
|
|
733
|
+
var UnsupportedOperationError = /*#__PURE__*/function (_ParaSpellError) {
|
|
837
734
|
function UnsupportedOperationError(message) {
|
|
838
|
-
var _this;
|
|
839
735
|
_classCallCheck(this, UnsupportedOperationError);
|
|
840
|
-
|
|
841
|
-
_this.name = 'UnsupportedOperationError';
|
|
842
|
-
return _this;
|
|
736
|
+
return _callSuper(this, UnsupportedOperationError, [message]);
|
|
843
737
|
}
|
|
844
|
-
_inherits(UnsupportedOperationError,
|
|
738
|
+
_inherits(UnsupportedOperationError, _ParaSpellError);
|
|
845
739
|
return _createClass(UnsupportedOperationError);
|
|
846
|
-
}(
|
|
740
|
+
}(ParaSpellError);
|
|
847
741
|
|
|
848
742
|
/**
|
|
849
743
|
* Thrown when a validation check fails.
|
|
850
744
|
*/
|
|
851
|
-
var ValidationError = /*#__PURE__*/function (
|
|
745
|
+
var ValidationError = /*#__PURE__*/function (_ParaSpellError) {
|
|
852
746
|
function ValidationError(message) {
|
|
853
|
-
var _this;
|
|
854
747
|
_classCallCheck(this, ValidationError);
|
|
855
|
-
|
|
856
|
-
_this.name = 'ValidationError';
|
|
857
|
-
return _this;
|
|
748
|
+
return _callSuper(this, ValidationError, [message]);
|
|
858
749
|
}
|
|
859
|
-
_inherits(ValidationError,
|
|
750
|
+
_inherits(ValidationError, _ParaSpellError);
|
|
860
751
|
return _createClass(ValidationError);
|
|
861
|
-
}(
|
|
752
|
+
}(ParaSpellError);
|
|
862
753
|
|
|
863
754
|
// Inspired by Talisman Society’s SS58 encoder:
|
|
864
755
|
// https://github.com/TalismanSociety/talisman/blob/dev/packages/crypto/src/address/encoding/ss58.ts
|
|
@@ -988,6 +879,10 @@ var AssetHubPolkadot$1 = {
|
|
|
988
879
|
name: "Dwellir",
|
|
989
880
|
endpoint: "wss://asset-hub-polkadot-rpc.n.dwellir.com"
|
|
990
881
|
},
|
|
882
|
+
{
|
|
883
|
+
name: "Gatotech Unlimited",
|
|
884
|
+
endpoint: "wss://asset-hub-polkadot.gatotech.network"
|
|
885
|
+
},
|
|
991
886
|
{
|
|
992
887
|
name: "Helixstreet",
|
|
993
888
|
endpoint: "wss://rpc-asset-hub-polkadot.helixstreet.io"
|
|
@@ -1166,21 +1061,42 @@ var Hydration$1 = {
|
|
|
1166
1061
|
{
|
|
1167
1062
|
name: "Helikon",
|
|
1168
1063
|
endpoint: "wss://rpc.helikon.io/hydradx"
|
|
1169
|
-
}
|
|
1170
|
-
]
|
|
1171
|
-
};
|
|
1172
|
-
var Interlay$1 = {
|
|
1173
|
-
name: "Interlay",
|
|
1174
|
-
info: "interlay",
|
|
1175
|
-
paraId: 2032,
|
|
1176
|
-
providers: [
|
|
1064
|
+
},
|
|
1177
1065
|
{
|
|
1178
|
-
name: "
|
|
1179
|
-
endpoint: "wss://
|
|
1066
|
+
name: "Rotko (SEA)",
|
|
1067
|
+
endpoint: "wss://hydration.rotko.net"
|
|
1180
1068
|
},
|
|
1181
1069
|
{
|
|
1182
|
-
name: "
|
|
1183
|
-
endpoint: "wss://
|
|
1070
|
+
name: "sin",
|
|
1071
|
+
endpoint: "wss://subway.sin.hydration.cloud"
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
name: "coke",
|
|
1075
|
+
endpoint: "wss://subway.coke.hydration.cloud"
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
name: "kril",
|
|
1079
|
+
endpoint: "wss://rpc.kril.hydration.cloud"
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
name: "shellfish",
|
|
1083
|
+
endpoint: "wss://subway.shellfish.hydration.cloud"
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
name: "catfish-1",
|
|
1087
|
+
endpoint: "wss://rpc-catfish-1.catfish.hydration.cloud"
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
name: "catfish-2",
|
|
1091
|
+
endpoint: "wss://rpc-catfish-2.catfish.hydration.cloud"
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
name: "catfish-3",
|
|
1095
|
+
endpoint: "wss://rpc-catfish-3.catfish.hydration.cloud"
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
name: "catfish-4",
|
|
1099
|
+
endpoint: "wss://rpc-catfish-4.catfish.hydration.cloud"
|
|
1184
1100
|
}
|
|
1185
1101
|
]
|
|
1186
1102
|
};
|
|
@@ -1210,33 +1126,6 @@ var Jamton$1 = {
|
|
|
1210
1126
|
}
|
|
1211
1127
|
]
|
|
1212
1128
|
};
|
|
1213
|
-
var Moonbeam$1 = {
|
|
1214
|
-
name: "Moonbeam",
|
|
1215
|
-
info: "moonbeam",
|
|
1216
|
-
paraId: 2004,
|
|
1217
|
-
providers: [
|
|
1218
|
-
{
|
|
1219
|
-
name: "Allnodes",
|
|
1220
|
-
endpoint: "wss://moonbeam-rpc.publicnode.com"
|
|
1221
|
-
},
|
|
1222
|
-
{
|
|
1223
|
-
name: "Dwellir",
|
|
1224
|
-
endpoint: "wss://moonbeam-rpc.n.dwellir.com"
|
|
1225
|
-
},
|
|
1226
|
-
{
|
|
1227
|
-
name: "Moonbeam Foundation",
|
|
1228
|
-
endpoint: "wss://wss.api.moonbeam.network"
|
|
1229
|
-
},
|
|
1230
|
-
{
|
|
1231
|
-
name: "OnFinality",
|
|
1232
|
-
endpoint: "wss://moonbeam.api.onfinality.io/public-ws"
|
|
1233
|
-
},
|
|
1234
|
-
{
|
|
1235
|
-
name: "UnitedBloc",
|
|
1236
|
-
endpoint: "wss://moonbeam.unitedbloc.com"
|
|
1237
|
-
}
|
|
1238
|
-
]
|
|
1239
|
-
};
|
|
1240
1129
|
var CoretimePolkadot$1 = {
|
|
1241
1130
|
name: "Coretime",
|
|
1242
1131
|
info: "polkadotCoretime",
|
|
@@ -1488,48 +1377,6 @@ var Karura$1 = {
|
|
|
1488
1377
|
}
|
|
1489
1378
|
]
|
|
1490
1379
|
};
|
|
1491
|
-
var Kintsugi$1 = {
|
|
1492
|
-
name: "Kintsugi BTC",
|
|
1493
|
-
info: "kintsugi",
|
|
1494
|
-
paraId: 2092,
|
|
1495
|
-
providers: [
|
|
1496
|
-
{
|
|
1497
|
-
name: "Kintsugi Labs",
|
|
1498
|
-
endpoint: "wss://api-kusama.interlay.io/parachain"
|
|
1499
|
-
},
|
|
1500
|
-
{
|
|
1501
|
-
name: "OnFinality",
|
|
1502
|
-
endpoint: "wss://kintsugi.api.onfinality.io/public-ws"
|
|
1503
|
-
}
|
|
1504
|
-
]
|
|
1505
|
-
};
|
|
1506
|
-
var Moonriver$1 = {
|
|
1507
|
-
name: "Moonriver",
|
|
1508
|
-
info: "moonriver",
|
|
1509
|
-
paraId: 2023,
|
|
1510
|
-
providers: [
|
|
1511
|
-
{
|
|
1512
|
-
name: "Allnodes",
|
|
1513
|
-
endpoint: "wss://moonriver-rpc.publicnode.com"
|
|
1514
|
-
},
|
|
1515
|
-
{
|
|
1516
|
-
name: "Dwellir",
|
|
1517
|
-
endpoint: "wss://moonriver-rpc.n.dwellir.com"
|
|
1518
|
-
},
|
|
1519
|
-
{
|
|
1520
|
-
name: "Moonbeam Foundation",
|
|
1521
|
-
endpoint: "wss://wss.api.moonriver.moonbeam.network"
|
|
1522
|
-
},
|
|
1523
|
-
{
|
|
1524
|
-
name: "OnFinality",
|
|
1525
|
-
endpoint: "wss://moonriver.api.onfinality.io/public-ws"
|
|
1526
|
-
},
|
|
1527
|
-
{
|
|
1528
|
-
name: "UnitedBloc",
|
|
1529
|
-
endpoint: "wss://moonriver.unitedbloc.com"
|
|
1530
|
-
}
|
|
1531
|
-
]
|
|
1532
|
-
};
|
|
1533
1380
|
var CoretimeKusama$1 = {
|
|
1534
1381
|
name: "Coretime",
|
|
1535
1382
|
info: "kusamaCoretime",
|
|
@@ -1636,17 +1483,6 @@ var Crab$1 = {
|
|
|
1636
1483
|
}
|
|
1637
1484
|
]
|
|
1638
1485
|
};
|
|
1639
|
-
var Quartz$1 = {
|
|
1640
|
-
name: "QUARTZ by UNIQUE",
|
|
1641
|
-
info: "quartz",
|
|
1642
|
-
paraId: 2095,
|
|
1643
|
-
providers: [
|
|
1644
|
-
{
|
|
1645
|
-
name: "Geo Load Balancer",
|
|
1646
|
-
endpoint: "wss://ws-quartz.unique.network"
|
|
1647
|
-
}
|
|
1648
|
-
]
|
|
1649
|
-
};
|
|
1650
1486
|
var RobonomicsPolkadot$1 = {
|
|
1651
1487
|
name: "Robonomics",
|
|
1652
1488
|
info: "robonomics",
|
|
@@ -1704,17 +1540,6 @@ var Shiden$1 = {
|
|
|
1704
1540
|
}
|
|
1705
1541
|
]
|
|
1706
1542
|
};
|
|
1707
|
-
var Zeitgeist$1 = {
|
|
1708
|
-
name: "Zeitgeist",
|
|
1709
|
-
info: "zeitgeist",
|
|
1710
|
-
paraId: 2092,
|
|
1711
|
-
providers: [
|
|
1712
|
-
{
|
|
1713
|
-
name: "OnFinality",
|
|
1714
|
-
endpoint: "wss://zeitgeist.api.onfinality.io/public-ws"
|
|
1715
|
-
}
|
|
1716
|
-
]
|
|
1717
|
-
};
|
|
1718
1543
|
var AssetHubWestend$1 = {
|
|
1719
1544
|
name: "Asset Hub",
|
|
1720
1545
|
info: "WestendAssetHub",
|
|
@@ -1801,17 +1626,6 @@ var PeopleWestend$1 = {
|
|
|
1801
1626
|
}
|
|
1802
1627
|
]
|
|
1803
1628
|
};
|
|
1804
|
-
var AjunaPaseo$1 = {
|
|
1805
|
-
name: "Ajuna Network (Paseo)",
|
|
1806
|
-
info: "Ajuna(paseo)",
|
|
1807
|
-
paraId: 2051,
|
|
1808
|
-
providers: [
|
|
1809
|
-
{
|
|
1810
|
-
name: "BajunNetwork",
|
|
1811
|
-
endpoint: "wss://rpc-paseo.ajuna.network"
|
|
1812
|
-
}
|
|
1813
|
-
]
|
|
1814
|
-
};
|
|
1815
1629
|
var AssetHubPaseo$1 = {
|
|
1816
1630
|
name: "Asset Hub",
|
|
1817
1631
|
info: "PaseoAssetHub",
|
|
@@ -1824,47 +1638,6 @@ var AssetHubPaseo$1 = {
|
|
|
1824
1638
|
{
|
|
1825
1639
|
name: "TurboFlakes",
|
|
1826
1640
|
endpoint: "wss://sys.turboflakes.io/asset-hub-paseo"
|
|
1827
|
-
},
|
|
1828
|
-
{
|
|
1829
|
-
name: "Zondax",
|
|
1830
|
-
endpoint: "wss://api2.zondax.ch/pas/assethub/node/rpc"
|
|
1831
|
-
}
|
|
1832
|
-
]
|
|
1833
|
-
};
|
|
1834
|
-
var BifrostPaseo$1 = {
|
|
1835
|
-
name: "Bifrost",
|
|
1836
|
-
info: "Bifrost(Paseo)",
|
|
1837
|
-
paraId: 2030,
|
|
1838
|
-
providers: [
|
|
1839
|
-
{
|
|
1840
|
-
name: "Liebi",
|
|
1841
|
-
endpoint: "wss://bifrost-rpc.paseo.liebi.com/ws"
|
|
1842
|
-
},
|
|
1843
|
-
{
|
|
1844
|
-
name: "Liebi2",
|
|
1845
|
-
endpoint: "wss://bifrost-rpc.paseo2.liebi.com/ws"
|
|
1846
|
-
}
|
|
1847
|
-
]
|
|
1848
|
-
};
|
|
1849
|
-
var BridgeHubPaseo$1 = {
|
|
1850
|
-
name: "Bridge Hub",
|
|
1851
|
-
info: "PaseoBridgeHub",
|
|
1852
|
-
paraId: 1002,
|
|
1853
|
-
providers: [
|
|
1854
|
-
{
|
|
1855
|
-
name: "Zondax",
|
|
1856
|
-
endpoint: "wss://api2.zondax.ch/pas/bridgehub/node/rpc"
|
|
1857
|
-
}
|
|
1858
|
-
]
|
|
1859
|
-
};
|
|
1860
|
-
var CoretimePaseo$1 = {
|
|
1861
|
-
name: "Coretime",
|
|
1862
|
-
info: "PaseoCoretime",
|
|
1863
|
-
paraId: 1005,
|
|
1864
|
-
providers: [
|
|
1865
|
-
{
|
|
1866
|
-
name: "Zondax",
|
|
1867
|
-
endpoint: "wss://api2.zondax.ch/pas/coretime/node/rpc"
|
|
1868
1641
|
}
|
|
1869
1642
|
]
|
|
1870
1643
|
};
|
|
@@ -1918,12 +1691,12 @@ var PeoplePaseo$1 = {
|
|
|
1918
1691
|
paraId: 1004,
|
|
1919
1692
|
providers: [
|
|
1920
1693
|
{
|
|
1921
|
-
name: "
|
|
1922
|
-
endpoint: "wss://people-paseo.
|
|
1694
|
+
name: "Gatotech Unlimited",
|
|
1695
|
+
endpoint: "wss://people-paseo.gatotech.network"
|
|
1923
1696
|
},
|
|
1924
1697
|
{
|
|
1925
|
-
name: "
|
|
1926
|
-
endpoint: "wss://
|
|
1698
|
+
name: "Rotko",
|
|
1699
|
+
endpoint: "wss://people-paseo.rotko.net"
|
|
1927
1700
|
},
|
|
1928
1701
|
{
|
|
1929
1702
|
name: "interweb",
|
|
@@ -1931,17 +1704,6 @@ var PeoplePaseo$1 = {
|
|
|
1931
1704
|
}
|
|
1932
1705
|
]
|
|
1933
1706
|
};
|
|
1934
|
-
var ZeitgeistPaseo$1 = {
|
|
1935
|
-
name: "Zeitgeist Battery Station",
|
|
1936
|
-
info: "ZeitgeistBatteryStation",
|
|
1937
|
-
paraId: 2101,
|
|
1938
|
-
providers: [
|
|
1939
|
-
{
|
|
1940
|
-
name: "Zeitgeist",
|
|
1941
|
-
endpoint: "wss://bsr.zeitgeist.pm"
|
|
1942
|
-
}
|
|
1943
|
-
]
|
|
1944
|
-
};
|
|
1945
1707
|
var Polkadot$1 = {
|
|
1946
1708
|
name: "Polkadot Relay",
|
|
1947
1709
|
info: "polkadot",
|
|
@@ -1955,6 +1717,10 @@ var Polkadot$1 = {
|
|
|
1955
1717
|
name: "Dwellir",
|
|
1956
1718
|
endpoint: "wss://polkadot-rpc.n.dwellir.com"
|
|
1957
1719
|
},
|
|
1720
|
+
{
|
|
1721
|
+
name: "Gatotech Unlimited",
|
|
1722
|
+
endpoint: "wss://polkadot.gatotech.network"
|
|
1723
|
+
},
|
|
1958
1724
|
{
|
|
1959
1725
|
name: "Helixstreet",
|
|
1960
1726
|
endpoint: "wss://rpc-polkadot.helixstreet.io"
|
|
@@ -1994,6 +1760,10 @@ var Kusama$1 = {
|
|
|
1994
1760
|
name: "Dwellir",
|
|
1995
1761
|
endpoint: "wss://kusama-rpc.n.dwellir.com"
|
|
1996
1762
|
},
|
|
1763
|
+
{
|
|
1764
|
+
name: "Gatotech Unlimited",
|
|
1765
|
+
endpoint: "wss://kusama.gatotech.network"
|
|
1766
|
+
},
|
|
1997
1767
|
{
|
|
1998
1768
|
name: "Helixstreet",
|
|
1999
1769
|
endpoint: "wss://rpc-kusama.helixstreet.io"
|
|
@@ -2036,10 +1806,6 @@ var Paseo$1 = {
|
|
|
2036
1806
|
info: "paseo",
|
|
2037
1807
|
paraId: 0,
|
|
2038
1808
|
providers: [
|
|
2039
|
-
{
|
|
2040
|
-
name: "Amforc",
|
|
2041
|
-
endpoint: "wss://paseo.rpc.amforc.com"
|
|
2042
|
-
},
|
|
2043
1809
|
{
|
|
2044
1810
|
name: "Dwellir",
|
|
2045
1811
|
endpoint: "wss://paseo-rpc.n.dwellir.com"
|
|
@@ -2049,8 +1815,8 @@ var Paseo$1 = {
|
|
|
2049
1815
|
endpoint: "wss://rpc-paseo.stakeworld.io"
|
|
2050
1816
|
},
|
|
2051
1817
|
{
|
|
2052
|
-
name: "
|
|
2053
|
-
endpoint: "wss://
|
|
1818
|
+
name: "TurboFlakes",
|
|
1819
|
+
endpoint: "wss://paseo-v2.rpc.turboflakes.io"
|
|
2054
1820
|
},
|
|
2055
1821
|
{
|
|
2056
1822
|
name: "interweb",
|
|
@@ -2069,10 +1835,8 @@ var configs = {
|
|
|
2069
1835
|
Darwinia: Darwinia$1,
|
|
2070
1836
|
EnergyWebX: EnergyWebX$1,
|
|
2071
1837
|
Hydration: Hydration$1,
|
|
2072
|
-
Interlay: Interlay$1,
|
|
2073
1838
|
Heima: Heima$1,
|
|
2074
1839
|
Jamton: Jamton$1,
|
|
2075
|
-
Moonbeam: Moonbeam$1,
|
|
2076
1840
|
CoretimePolkadot: CoretimePolkadot$1,
|
|
2077
1841
|
Collectives: Collectives$1,
|
|
2078
1842
|
Crust: Crust$1,
|
|
@@ -2086,36 +1850,27 @@ var configs = {
|
|
|
2086
1850
|
AssetHubKusama: AssetHubKusama$1,
|
|
2087
1851
|
BridgeHubKusama: BridgeHubKusama$1,
|
|
2088
1852
|
Karura: Karura$1,
|
|
2089
|
-
Kintsugi: Kintsugi$1,
|
|
2090
|
-
Moonriver: Moonriver$1,
|
|
2091
1853
|
CoretimeKusama: CoretimeKusama$1,
|
|
2092
1854
|
Encointer: Encointer$1,
|
|
2093
1855
|
Basilisk: Basilisk$1,
|
|
2094
1856
|
BifrostKusama: BifrostKusama$1,
|
|
2095
1857
|
CrustShadow: CrustShadow$1,
|
|
2096
1858
|
Crab: Crab$1,
|
|
2097
|
-
Quartz: Quartz$1,
|
|
2098
1859
|
RobonomicsPolkadot: RobonomicsPolkadot$1,
|
|
2099
1860
|
PeopleKusama: PeopleKusama$1,
|
|
2100
1861
|
Shiden: Shiden$1,
|
|
2101
|
-
Zeitgeist: Zeitgeist$1,
|
|
2102
1862
|
AssetHubWestend: AssetHubWestend$1,
|
|
2103
1863
|
BridgeHubWestend: BridgeHubWestend$1,
|
|
2104
1864
|
CollectivesWestend: CollectivesWestend$1,
|
|
2105
1865
|
CoretimeWestend: CoretimeWestend$1,
|
|
2106
1866
|
Penpal: Penpal$1,
|
|
2107
1867
|
PeopleWestend: PeopleWestend$1,
|
|
2108
|
-
AjunaPaseo: AjunaPaseo$1,
|
|
2109
1868
|
AssetHubPaseo: AssetHubPaseo$1,
|
|
2110
|
-
BifrostPaseo: BifrostPaseo$1,
|
|
2111
|
-
BridgeHubPaseo: BridgeHubPaseo$1,
|
|
2112
|
-
CoretimePaseo: CoretimePaseo$1,
|
|
2113
1869
|
EnergyWebXPaseo: EnergyWebXPaseo$1,
|
|
2114
1870
|
HeimaPaseo: HeimaPaseo$1,
|
|
2115
1871
|
HydrationPaseo: HydrationPaseo$1,
|
|
2116
1872
|
NeuroWebPaseo: NeuroWebPaseo$1,
|
|
2117
1873
|
PeoplePaseo: PeoplePaseo$1,
|
|
2118
|
-
ZeitgeistPaseo: ZeitgeistPaseo$1,
|
|
2119
1874
|
Polkadot: Polkadot$1,
|
|
2120
1875
|
Kusama: Kusama$1,
|
|
2121
1876
|
Westend: Westend$1,
|
|
@@ -3494,16 +3249,6 @@ var getChainImpl = function getChainImpl(chain, ctx) {
|
|
|
3494
3249
|
return chains()[chain];
|
|
3495
3250
|
};
|
|
3496
3251
|
|
|
3497
|
-
var isMoonbeamWhAsset = function isMoonbeamWhAsset(location) {
|
|
3498
|
-
return !!location && hasJunction(location, 'Parachain', getParaId('Moonbeam')) && hasJunction(location, 'PalletInstance', 110);
|
|
3499
|
-
};
|
|
3500
|
-
var inferFeeAsset = function inferFeeAsset(origin, destination, asset, api) {
|
|
3501
|
-
if (origin === 'Hydration' && destination === 'Moonbeam' && isMoonbeamWhAsset(asset.location)) {
|
|
3502
|
-
return api.findNativeAssetInfoOrThrow(destination);
|
|
3503
|
-
}
|
|
3504
|
-
return undefined;
|
|
3505
|
-
};
|
|
3506
|
-
|
|
3507
3252
|
var resolveAsset = function resolveAsset(currency, origin, destination, assetCheckEnabled, api) {
|
|
3508
3253
|
if (!assetCheckEnabled) return null;
|
|
3509
3254
|
var dest = !isTLocation(destination) ? destination : null;
|
|
@@ -5536,7 +5281,7 @@ var getBalance = /*#__PURE__*/function () {
|
|
|
5536
5281
|
};
|
|
5537
5282
|
}();
|
|
5538
5283
|
|
|
5539
|
-
var ERC20_ABI
|
|
5284
|
+
var ERC20_ABI = [{
|
|
5540
5285
|
type: 'function',
|
|
5541
5286
|
name: 'balanceOf',
|
|
5542
5287
|
stateMutability: 'view',
|
|
@@ -5581,7 +5326,7 @@ var getEthErc20Balance = /*#__PURE__*/function () {
|
|
|
5581
5326
|
_context.n = 3;
|
|
5582
5327
|
return client.readContract({
|
|
5583
5328
|
address: asset.assetId,
|
|
5584
|
-
abi: ERC20_ABI
|
|
5329
|
+
abi: ERC20_ABI,
|
|
5585
5330
|
functionName: 'balanceOf',
|
|
5586
5331
|
args: [address]
|
|
5587
5332
|
});
|
|
@@ -5595,47 +5340,6 @@ var getEthErc20Balance = /*#__PURE__*/function () {
|
|
|
5595
5340
|
};
|
|
5596
5341
|
}();
|
|
5597
5342
|
|
|
5598
|
-
var ERC20_ABI = [{
|
|
5599
|
-
type: 'function',
|
|
5600
|
-
name: 'balanceOf',
|
|
5601
|
-
stateMutability: 'view',
|
|
5602
|
-
inputs: [{
|
|
5603
|
-
name: 'account',
|
|
5604
|
-
type: 'address'
|
|
5605
|
-
}],
|
|
5606
|
-
outputs: [{
|
|
5607
|
-
name: '',
|
|
5608
|
-
type: 'uint256'
|
|
5609
|
-
}]
|
|
5610
|
-
}];
|
|
5611
|
-
var getMoonbeamErc20Balance = /*#__PURE__*/function () {
|
|
5612
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(chain, assetId, address) {
|
|
5613
|
-
var client, tokenAddress;
|
|
5614
|
-
return _regenerator().w(function (_context) {
|
|
5615
|
-
while (1) switch (_context.n) {
|
|
5616
|
-
case 0:
|
|
5617
|
-
client = createPublicClient({
|
|
5618
|
-
chain: chain === 'Moonbeam' ? moonbeam : moonriver,
|
|
5619
|
-
transport: http(chain === 'Moonbeam' ? 'https://rpc.api.moonbeam.network/' : 'https://rpc.api.moonriver.moonbeam.network')
|
|
5620
|
-
});
|
|
5621
|
-
tokenAddress = assetId.startsWith('0x') ? assetId : formatAssetIdToERC20(assetId);
|
|
5622
|
-
_context.n = 1;
|
|
5623
|
-
return client.readContract({
|
|
5624
|
-
address: tokenAddress,
|
|
5625
|
-
abi: ERC20_ABI,
|
|
5626
|
-
functionName: 'balanceOf',
|
|
5627
|
-
args: [address]
|
|
5628
|
-
});
|
|
5629
|
-
case 1:
|
|
5630
|
-
return _context.a(2, _context.v);
|
|
5631
|
-
}
|
|
5632
|
-
}, _callee);
|
|
5633
|
-
}));
|
|
5634
|
-
return function getMoonbeamErc20Balance(_x, _x2, _x3) {
|
|
5635
|
-
return _ref.apply(this, arguments);
|
|
5636
|
-
};
|
|
5637
|
-
}();
|
|
5638
|
-
|
|
5639
5343
|
var isSufficientOrigin = /*#__PURE__*/function () {
|
|
5640
5344
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(api, origin, destination, sender, feeNative, asset, feeAsset) {
|
|
5641
5345
|
var edNative, balanceNative, isNativeAssetToOrigin, isNativeAssetToDest, isSufficientNative, balanceAsset, edAsset, isSufficientAsset;
|
|
@@ -6109,7 +5813,7 @@ var addEthereumBridgeFees = /*#__PURE__*/function () {
|
|
|
6109
5813
|
|
|
6110
5814
|
var dryRunInternal = /*#__PURE__*/function () {
|
|
6111
5815
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(options) {
|
|
6112
|
-
var api, origin, destination, currency, tx, sender, feeAsset, swapConfig, version, bypassOptions, _options$useRootOrigi, useRootOrigin, resolvedFeeAsset, _resolveCurrency, assets, asset, amount, resolvedVersion, originDryRun, isMythosToEthereum, originDryModified, initialForwardedXcms, initialDestParaId, processHop, traversalResult, bridgeHubChain, assetHubChain, bridgeHubHop, processedBridgeHub, bridgeHubHopIndex, result, dryRunError, _t, _t2, _t3, _t4, _t5, _t6, _t7, _t8, _t9;
|
|
5816
|
+
var api, origin, destination, currency, tx, sender, feeAsset, swapConfig, version, bypassOptions, _options$useRootOrigi, useRootOrigin, resolvedFeeAsset, _resolveCurrency, assets, asset, amount, resolvedVersion, originDryRun, isMythosToEthereum, originDryModified, initialForwardedXcms, initialDestParaId, processHop, traversalResult, relayChain, bridgeHubChain, assetHubChain, bridgeHubHop, processedBridgeHub, bridgeHubHopIndex, result, dryRunError, _t, _t2, _t3, _t4, _t5, _t6, _t7, _t8, _t9;
|
|
6113
5817
|
return _regenerator().w(function (_context2) {
|
|
6114
5818
|
while (1) switch (_context2.n) {
|
|
6115
5819
|
case 0:
|
|
@@ -6175,12 +5879,11 @@ var dryRunInternal = /*#__PURE__*/function () {
|
|
|
6175
5879
|
initialForwardedXcms = originDryModified.forwardedXcms, initialDestParaId = originDryModified.destParaId;
|
|
6176
5880
|
processHop = /*#__PURE__*/function () {
|
|
6177
5881
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(params) {
|
|
6178
|
-
var
|
|
6179
|
-
var hopApi, currentChain, currentOrigin, currentAsset, forwardedXcms, hasPassedExchange, isDestination, resolvedHopAsset, hopAsset, hopDryRun;
|
|
5882
|
+
var hopApi, currentChain, currentOrigin, currentAsset, forwardedXcms, hasPassedExchange, resolvedHopAsset, hopDryRun;
|
|
6180
5883
|
return _regenerator().w(function (_context) {
|
|
6181
5884
|
while (1) switch (_context.n) {
|
|
6182
5885
|
case 0:
|
|
6183
|
-
hopApi = params.api, currentChain = params.currentChain, currentOrigin = params.currentOrigin, currentAsset = params.currentAsset, forwardedXcms = params.forwardedXcms, hasPassedExchange = params.hasPassedExchange
|
|
5886
|
+
hopApi = params.api, currentChain = params.currentChain, currentOrigin = params.currentOrigin, currentAsset = params.currentAsset, forwardedXcms = params.forwardedXcms, hasPassedExchange = params.hasPassedExchange;
|
|
6184
5887
|
resolvedHopAsset = resolveHopAsset({
|
|
6185
5888
|
api: api,
|
|
6186
5889
|
tx: tx,
|
|
@@ -6193,7 +5896,6 @@ var dryRunInternal = /*#__PURE__*/function () {
|
|
|
6193
5896
|
swapConfig: swapConfig,
|
|
6194
5897
|
hasPassedExchange: hasPassedExchange
|
|
6195
5898
|
});
|
|
6196
|
-
hopAsset = isDestination ? (_inferFeeAsset = inferFeeAsset(origin, destination, asset, api)) !== null && _inferFeeAsset !== void 0 ? _inferFeeAsset : resolvedHopAsset : resolvedHopAsset;
|
|
6197
5899
|
if (api.hasDryRunSupport(currentChain)) {
|
|
6198
5900
|
_context.n = 1;
|
|
6199
5901
|
break;
|
|
@@ -6213,7 +5915,7 @@ var dryRunInternal = /*#__PURE__*/function () {
|
|
|
6213
5915
|
xcm: forwardedXcms[1][0],
|
|
6214
5916
|
chain: currentChain,
|
|
6215
5917
|
origin: currentOrigin,
|
|
6216
|
-
asset:
|
|
5918
|
+
asset: resolvedHopAsset,
|
|
6217
5919
|
version: resolvedVersion,
|
|
6218
5920
|
feeAsset: resolvedFeeAsset,
|
|
6219
5921
|
originFee: originDryModified.fee,
|
|
@@ -6222,7 +5924,7 @@ var dryRunInternal = /*#__PURE__*/function () {
|
|
|
6222
5924
|
case 2:
|
|
6223
5925
|
hopDryRun = _context.v;
|
|
6224
5926
|
return _context.a(2, _objectSpread2(_objectSpread2({}, hopDryRun), {}, {
|
|
6225
|
-
asset:
|
|
5927
|
+
asset: resolvedHopAsset
|
|
6226
5928
|
}));
|
|
6227
5929
|
}
|
|
6228
5930
|
}, _callee);
|
|
@@ -6254,8 +5956,9 @@ var dryRunInternal = /*#__PURE__*/function () {
|
|
|
6254
5956
|
case 6:
|
|
6255
5957
|
traversalResult = _context2.v;
|
|
6256
5958
|
// Process Ethereum bridge fees
|
|
6257
|
-
|
|
6258
|
-
|
|
5959
|
+
relayChain = api.getRelayChainOf(origin);
|
|
5960
|
+
bridgeHubChain = relayChain === 'Paseo' ? undefined : "BridgeHub".concat(relayChain);
|
|
5961
|
+
assetHubChain = "AssetHub".concat(relayChain);
|
|
6259
5962
|
bridgeHubHop = traversalResult.hops.find(function (hop) {
|
|
6260
5963
|
return hop.chain === bridgeHubChain;
|
|
6261
5964
|
}); // For Mythos → Ethereum, we skip additional Ethereum bridge fees (aligns with getXcmFeeInternal)
|
|
@@ -6941,7 +6644,7 @@ var getOriginXcmFee = /*#__PURE__*/function () {
|
|
|
6941
6644
|
|
|
6942
6645
|
var getXcmFeeOnce = /*#__PURE__*/function () {
|
|
6943
6646
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(_ref) {
|
|
6944
|
-
var api, tx, origin, destination, sender, recipient, currency, feeAsset, version, disableFallback, swapConfig, useRootOrigin, skipReverseFeeCalculation, resolvedFeeAsset, _resolveCurrency, asset, resolvedVersion, _yield$getOriginXcmFe, originFeeRaw, originAsset, originFeeType, originDryRunError, initialForwardedXcm, initialDestParaId, originWeight, sufficientOriginFee, isMythosToEthereum, originFee, destApi, destFeeRes, _result, _dryRunError, processHop, traversalResult, destFee, destAsset, destFeeType, destDryRunError, destSufficient, destResult,
|
|
6647
|
+
var api, tx, origin, destination, sender, recipient, currency, feeAsset, version, disableFallback, swapConfig, useRootOrigin, skipReverseFeeCalculation, resolvedFeeAsset, _resolveCurrency, asset, resolvedVersion, _yield$getOriginXcmFe, originFeeRaw, originAsset, originFeeType, originDryRunError, initialForwardedXcm, initialDestParaId, originWeight, sufficientOriginFee, isMythosToEthereum, originFee, destApi, destFeeRes, _result, _dryRunError, processHop, traversalResult, destFee, destAsset, destFeeType, destDryRunError, destSufficient, destResult, _destApi, destFallback, relayChain, bridgeHubChain, assetHubChain, bridgeHubHop, processedBridgeHub, bridgeHubHopIndex, convertToFeeDetail, result, dryRunError, _t, _t2, _t3, _t4;
|
|
6945
6648
|
return _regenerator().w(function (_context2) {
|
|
6946
6649
|
while (1) switch (_context2.p = _context2.n) {
|
|
6947
6650
|
case 0:
|
|
@@ -7071,12 +6774,11 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
|
|
|
7071
6774
|
case 10:
|
|
7072
6775
|
processHop = /*#__PURE__*/function () {
|
|
7073
6776
|
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(params) {
|
|
7074
|
-
var
|
|
7075
|
-
var hopApi, currentChain, currentOrigin, currentAsset, forwardedXcms, hasPassedExchange, isDestination, resolvedHopAsset, hopAsset, hopResult;
|
|
6777
|
+
var hopApi, currentChain, currentOrigin, currentAsset, forwardedXcms, hasPassedExchange, resolvedHopAsset, hopResult;
|
|
7076
6778
|
return _regenerator().w(function (_context) {
|
|
7077
6779
|
while (1) switch (_context.n) {
|
|
7078
6780
|
case 0:
|
|
7079
|
-
hopApi = params.api, currentChain = params.currentChain, currentOrigin = params.currentOrigin, currentAsset = params.currentAsset, forwardedXcms = params.forwardedXcms, hasPassedExchange = params.hasPassedExchange
|
|
6781
|
+
hopApi = params.api, currentChain = params.currentChain, currentOrigin = params.currentOrigin, currentAsset = params.currentAsset, forwardedXcms = params.forwardedXcms, hasPassedExchange = params.hasPassedExchange;
|
|
7080
6782
|
resolvedHopAsset = resolveHopAsset({
|
|
7081
6783
|
api: api,
|
|
7082
6784
|
tx: tx,
|
|
@@ -7089,7 +6791,6 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
|
|
|
7089
6791
|
swapConfig: swapConfig,
|
|
7090
6792
|
hasPassedExchange: hasPassedExchange
|
|
7091
6793
|
});
|
|
7092
|
-
hopAsset = isDestination ? (_inferFeeAsset = inferFeeAsset(origin, destination, asset, api)) !== null && _inferFeeAsset !== void 0 ? _inferFeeAsset : resolvedHopAsset : resolvedHopAsset;
|
|
7093
6794
|
_context.n = 1;
|
|
7094
6795
|
return getDestXcmFee({
|
|
7095
6796
|
api: hopApi,
|
|
@@ -7099,7 +6800,7 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
|
|
|
7099
6800
|
destination: currentChain,
|
|
7100
6801
|
currency: currency,
|
|
7101
6802
|
asset: asset,
|
|
7102
|
-
currentAsset: _objectSpread2(_objectSpread2({},
|
|
6803
|
+
currentAsset: _objectSpread2(_objectSpread2({}, resolvedHopAsset), {}, {
|
|
7103
6804
|
amount: asset.amount
|
|
7104
6805
|
}),
|
|
7105
6806
|
sender: sender,
|
|
@@ -7176,7 +6877,7 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
|
|
|
7176
6877
|
destination: destination,
|
|
7177
6878
|
currency: currency,
|
|
7178
6879
|
asset: asset,
|
|
7179
|
-
currentAsset: _objectSpread2(_objectSpread2({},
|
|
6880
|
+
currentAsset: _objectSpread2(_objectSpread2({}, asset), {}, {
|
|
7180
6881
|
amount: asset.amount
|
|
7181
6882
|
}),
|
|
7182
6883
|
sender: sender,
|
|
@@ -7203,8 +6904,9 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
|
|
|
7203
6904
|
destAsset = api.findNativeAssetInfoOrThrow(destination);
|
|
7204
6905
|
case 16:
|
|
7205
6906
|
// Process Ethereum bridge fees
|
|
7206
|
-
|
|
7207
|
-
|
|
6907
|
+
relayChain = api.getRelayChainOf(origin);
|
|
6908
|
+
bridgeHubChain = relayChain === 'Paseo' ? undefined : "BridgeHub".concat(relayChain);
|
|
6909
|
+
assetHubChain = "AssetHub".concat(relayChain);
|
|
7208
6910
|
bridgeHubHop = traversalResult.hops.find(function (hop) {
|
|
7209
6911
|
return hop.chain === bridgeHubChain;
|
|
7210
6912
|
});
|
|
@@ -7224,9 +6926,8 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
|
|
|
7224
6926
|
processedBridgeHub = _t4;
|
|
7225
6927
|
// Update bridge hub fee in hops if needed
|
|
7226
6928
|
if (processedBridgeHub && bridgeHubHop && processedBridgeHub.fee !== bridgeHubHop.result.fee) {
|
|
7227
|
-
_bridgeHubChain = "BridgeHub".concat(api.getRelayChainOf(origin));
|
|
7228
6929
|
bridgeHubHopIndex = traversalResult.hops.findIndex(function (hop) {
|
|
7229
|
-
return hop.chain ===
|
|
6930
|
+
return hop.chain === bridgeHubChain;
|
|
7230
6931
|
});
|
|
7231
6932
|
if (bridgeHubHopIndex !== -1) {
|
|
7232
6933
|
traversalResult.hops[bridgeHubHopIndex].result = _objectSpread2(_objectSpread2({}, traversalResult.hops[bridgeHubHopIndex].result), {}, {
|
|
@@ -10835,15 +10536,6 @@ var Ajuna = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
10835
10536
|
}]);
|
|
10836
10537
|
}(SubstrateChain);
|
|
10837
10538
|
|
|
10838
|
-
var AjunaPaseo = /*#__PURE__*/function (_Ajuna) {
|
|
10839
|
-
function AjunaPaseo() {
|
|
10840
|
-
_classCallCheck(this, AjunaPaseo);
|
|
10841
|
-
return _callSuper(this, AjunaPaseo, ['AjunaPaseo', 'Ajuna(paseo)', 'Paseo', Version.V5]);
|
|
10842
|
-
}
|
|
10843
|
-
_inherits(AjunaPaseo, _Ajuna);
|
|
10844
|
-
return _createClass(AjunaPaseo);
|
|
10845
|
-
}(Ajuna);
|
|
10846
|
-
|
|
10847
10539
|
var AssetHubKusama = /*#__PURE__*/function (_SubstrateChain) {
|
|
10848
10540
|
function AssetHubKusama() {
|
|
10849
10541
|
_classCallCheck(this, AssetHubKusama);
|
|
@@ -11113,27 +10805,20 @@ var Hydration = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
11113
10805
|
key: "transferPolkadotXCM",
|
|
11114
10806
|
value: function () {
|
|
11115
10807
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
11116
|
-
var
|
|
10808
|
+
var _t;
|
|
11117
10809
|
return _regenerator().w(function (_context) {
|
|
11118
10810
|
while (1) switch (_context.n) {
|
|
11119
10811
|
case 0:
|
|
11120
|
-
destination = input.destination, asset = input.assetInfo, api = input.api;
|
|
11121
10812
|
if (!this.shouldUseExecuteTransfer(input)) {
|
|
11122
10813
|
_context.n = 2;
|
|
11123
10814
|
break;
|
|
11124
10815
|
}
|
|
11125
|
-
_t = api;
|
|
10816
|
+
_t = input.api;
|
|
11126
10817
|
_context.n = 1;
|
|
11127
10818
|
return handleExecuteTransfer(input);
|
|
11128
10819
|
case 1:
|
|
11129
10820
|
return _context.a(2, _t.deserializeExtrinsics.call(_t, _context.v));
|
|
11130
10821
|
case 2:
|
|
11131
|
-
if (!(isMoonbeamWhAsset(asset.location) && destination === 'Moonbeam')) {
|
|
11132
|
-
_context.n = 3;
|
|
11133
|
-
break;
|
|
11134
|
-
}
|
|
11135
|
-
return _context.a(2, this.transferMoonbeamWhAsset(input));
|
|
11136
|
-
case 3:
|
|
11137
10822
|
return _context.a(2, transferPolkadotXcm(input));
|
|
11138
10823
|
}
|
|
11139
10824
|
}, _callee, this);
|
|
@@ -11143,22 +10828,6 @@ var Hydration = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
11143
10828
|
}
|
|
11144
10829
|
return transferPolkadotXCM;
|
|
11145
10830
|
}()
|
|
11146
|
-
}, {
|
|
11147
|
-
key: "transferMoonbeamWhAsset",
|
|
11148
|
-
value: function transferMoonbeamWhAsset(input) {
|
|
11149
|
-
var api = input.api,
|
|
11150
|
-
assetInfo = input.assetInfo,
|
|
11151
|
-
version = input.version;
|
|
11152
|
-
var glmr = api.findAssetInfoOrThrow(this.chain, {
|
|
11153
|
-
symbol: getNativeAssetSymbol('Moonbeam')
|
|
11154
|
-
});
|
|
11155
|
-
var FEE_AMOUNT = 150000000000000000n; // 0.15 GLMR
|
|
11156
|
-
return transferPolkadotXcm(_objectSpread2(_objectSpread2({}, input), {}, {
|
|
11157
|
-
overriddenAsset: [_objectSpread2(_objectSpread2({}, createAsset(version, FEE_AMOUNT, glmr.location)), {}, {
|
|
11158
|
-
isFeeAsset: true
|
|
11159
|
-
}), createAsset(version, assetInfo.amount, assetInfo.location)]
|
|
11160
|
-
}));
|
|
11161
|
-
}
|
|
11162
10831
|
}, {
|
|
11163
10832
|
key: "transferLocalNativeAsset",
|
|
11164
10833
|
value: function transferLocalNativeAsset(options) {
|
|
@@ -11331,15 +11000,6 @@ var BifrostKusama = /*#__PURE__*/function (_BifrostPolkadot) {
|
|
|
11331
11000
|
return _createClass(BifrostKusama);
|
|
11332
11001
|
}(BifrostPolkadot);
|
|
11333
11002
|
|
|
11334
|
-
var BifrostPaseo = /*#__PURE__*/function (_BifrostPolkadot) {
|
|
11335
|
-
function BifrostPaseo() {
|
|
11336
|
-
_classCallCheck(this, BifrostPaseo);
|
|
11337
|
-
return _callSuper(this, BifrostPaseo, ['BifrostPaseo', 'Bifrost(Paseo)', 'Paseo', Version.V5]);
|
|
11338
|
-
}
|
|
11339
|
-
_inherits(BifrostPaseo, _BifrostPolkadot);
|
|
11340
|
-
return _createClass(BifrostPaseo);
|
|
11341
|
-
}(BifrostPolkadot);
|
|
11342
|
-
|
|
11343
11003
|
var BridgeHubKusama = /*#__PURE__*/function (_SubstrateChain) {
|
|
11344
11004
|
function BridgeHubKusama() {
|
|
11345
11005
|
_classCallCheck(this, BridgeHubKusama);
|
|
@@ -11381,15 +11041,6 @@ var BridgeHubPolkadot = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
11381
11041
|
}]);
|
|
11382
11042
|
}(SubstrateChain);
|
|
11383
11043
|
|
|
11384
|
-
var BridgeHubPaseo = /*#__PURE__*/function (_BridgeHubPolkadot) {
|
|
11385
|
-
function BridgeHubPaseo() {
|
|
11386
|
-
_classCallCheck(this, BridgeHubPaseo);
|
|
11387
|
-
return _callSuper(this, BridgeHubPaseo, ['BridgeHubPaseo', 'PaseoBridgeHub', 'Paseo', Version.V5]);
|
|
11388
|
-
}
|
|
11389
|
-
_inherits(BridgeHubPaseo, _BridgeHubPolkadot);
|
|
11390
|
-
return _createClass(BridgeHubPaseo);
|
|
11391
|
-
}(BridgeHubPolkadot);
|
|
11392
|
-
|
|
11393
11044
|
var BridgeHubWestend = /*#__PURE__*/function (_BridgeHubPolkadot) {
|
|
11394
11045
|
function BridgeHubWestend() {
|
|
11395
11046
|
_classCallCheck(this, BridgeHubWestend);
|
|
@@ -11643,20 +11294,11 @@ var CoretimePolkadot = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
11643
11294
|
}, {
|
|
11644
11295
|
key: "canReceiveFrom",
|
|
11645
11296
|
value: function canReceiveFrom(origin) {
|
|
11646
|
-
return origin !== 'Hydration'
|
|
11297
|
+
return origin !== 'Hydration';
|
|
11647
11298
|
}
|
|
11648
11299
|
}]);
|
|
11649
11300
|
}(SubstrateChain);
|
|
11650
11301
|
|
|
11651
|
-
var CoretimePaseo = /*#__PURE__*/function (_CoretimePolkadot) {
|
|
11652
|
-
function CoretimePaseo() {
|
|
11653
|
-
_classCallCheck(this, CoretimePaseo);
|
|
11654
|
-
return _callSuper(this, CoretimePaseo, ['CoretimePaseo', 'PaseoCoretime', 'Paseo', Version.V5]);
|
|
11655
|
-
}
|
|
11656
|
-
_inherits(CoretimePaseo, _CoretimePolkadot);
|
|
11657
|
-
return _createClass(CoretimePaseo);
|
|
11658
|
-
}(CoretimePolkadot);
|
|
11659
|
-
|
|
11660
11302
|
var CoretimeWestend = /*#__PURE__*/function (_CoretimePolkadot) {
|
|
11661
11303
|
function CoretimeWestend() {
|
|
11662
11304
|
_classCallCheck(this, CoretimeWestend);
|
|
@@ -12014,72 +11656,6 @@ var HydrationPaseo = /*#__PURE__*/function (_Hydration) {
|
|
|
12014
11656
|
return _createClass(HydrationPaseo);
|
|
12015
11657
|
}(Hydration);
|
|
12016
11658
|
|
|
12017
|
-
var Interlay = /*#__PURE__*/function (_SubstrateChain) {
|
|
12018
|
-
function Interlay() {
|
|
12019
|
-
_classCallCheck(this, Interlay);
|
|
12020
|
-
return _callSuper(this, Interlay, ['Interlay', 'interlay', 'Polkadot', Version.V3]);
|
|
12021
|
-
}
|
|
12022
|
-
_inherits(Interlay, _SubstrateChain);
|
|
12023
|
-
return _createClass(Interlay, [{
|
|
12024
|
-
key: "getCustomCurrencyId",
|
|
12025
|
-
value: function getCustomCurrencyId(_api, asset) {
|
|
12026
|
-
return asset.isNative ? {
|
|
12027
|
-
Token: asset.symbol
|
|
12028
|
-
} : {
|
|
12029
|
-
ForeignAsset: Number(asset.assetId)
|
|
12030
|
-
};
|
|
12031
|
-
}
|
|
12032
|
-
}, {
|
|
12033
|
-
key: "transferXTokens",
|
|
12034
|
-
value: function transferXTokens$1(input) {
|
|
12035
|
-
var asset = input.asset,
|
|
12036
|
-
api = input.api;
|
|
12037
|
-
var currencySelection = this.getCustomCurrencyId(api, asset);
|
|
12038
|
-
return transferXTokens(input, currencySelection);
|
|
12039
|
-
}
|
|
12040
|
-
}, {
|
|
12041
|
-
key: "transferLocalNativeAsset",
|
|
12042
|
-
value: function transferLocalNativeAsset(options) {
|
|
12043
|
-
return Promise.resolve(this.transferLocalNonNativeAsset(options));
|
|
12044
|
-
}
|
|
12045
|
-
}, {
|
|
12046
|
-
key: "transferLocalNonNativeAsset",
|
|
12047
|
-
value: function transferLocalNonNativeAsset(options) {
|
|
12048
|
-
var api = options.api,
|
|
12049
|
-
asset = options.assetInfo,
|
|
12050
|
-
recipient = options.recipient,
|
|
12051
|
-
isAmountAll = options.isAmountAll,
|
|
12052
|
-
keepAlive = options.keepAlive;
|
|
12053
|
-
var currencyId = this.getCustomCurrencyId(api, asset);
|
|
12054
|
-
if (isAmountAll) {
|
|
12055
|
-
return api.deserializeExtrinsics({
|
|
12056
|
-
module: 'Tokens',
|
|
12057
|
-
method: 'transfer_all',
|
|
12058
|
-
params: {
|
|
12059
|
-
dest: recipient,
|
|
12060
|
-
currency_id: currencyId,
|
|
12061
|
-
keep_alive: keepAlive
|
|
12062
|
-
}
|
|
12063
|
-
});
|
|
12064
|
-
}
|
|
12065
|
-
return api.deserializeExtrinsics({
|
|
12066
|
-
module: 'Tokens',
|
|
12067
|
-
method: keepAlive ? 'transfer_keep_alive' : 'transfer',
|
|
12068
|
-
params: {
|
|
12069
|
-
dest: recipient,
|
|
12070
|
-
currency_id: currencyId,
|
|
12071
|
-
amount: asset.amount
|
|
12072
|
-
}
|
|
12073
|
-
});
|
|
12074
|
-
}
|
|
12075
|
-
}, {
|
|
12076
|
-
key: "getBalanceNative",
|
|
12077
|
-
value: function getBalanceNative(api, address, asset) {
|
|
12078
|
-
return this.getBalanceForeign(api, address, asset);
|
|
12079
|
-
}
|
|
12080
|
-
}]);
|
|
12081
|
-
}(SubstrateChain);
|
|
12082
|
-
|
|
12083
11659
|
var Jamton = /*#__PURE__*/function (_SubstrateChain) {
|
|
12084
11660
|
function Jamton() {
|
|
12085
11661
|
_classCallCheck(this, Jamton);
|
|
@@ -12133,72 +11709,6 @@ var Karura = /*#__PURE__*/function (_Acala) {
|
|
|
12133
11709
|
return _createClass(Karura);
|
|
12134
11710
|
}(Acala);
|
|
12135
11711
|
|
|
12136
|
-
var Kintsugi = /*#__PURE__*/function (_SubstrateChain) {
|
|
12137
|
-
function Kintsugi() {
|
|
12138
|
-
_classCallCheck(this, Kintsugi);
|
|
12139
|
-
return _callSuper(this, Kintsugi, ['Kintsugi', 'kintsugi', 'Kusama', Version.V3]);
|
|
12140
|
-
}
|
|
12141
|
-
_inherits(Kintsugi, _SubstrateChain);
|
|
12142
|
-
return _createClass(Kintsugi, [{
|
|
12143
|
-
key: "getCustomCurrencyId",
|
|
12144
|
-
value: function getCustomCurrencyId(_api, asset) {
|
|
12145
|
-
return asset.isNative ? {
|
|
12146
|
-
Token: asset.symbol
|
|
12147
|
-
} : {
|
|
12148
|
-
ForeignAsset: Number(asset.assetId)
|
|
12149
|
-
};
|
|
12150
|
-
}
|
|
12151
|
-
}, {
|
|
12152
|
-
key: "transferXTokens",
|
|
12153
|
-
value: function transferXTokens$1(input) {
|
|
12154
|
-
var asset = input.asset,
|
|
12155
|
-
api = input.api;
|
|
12156
|
-
var currencySelection = this.getCustomCurrencyId(api, asset);
|
|
12157
|
-
return transferXTokens(input, currencySelection);
|
|
12158
|
-
}
|
|
12159
|
-
}, {
|
|
12160
|
-
key: "transferLocalNativeAsset",
|
|
12161
|
-
value: function transferLocalNativeAsset(options) {
|
|
12162
|
-
return Promise.resolve(this.transferLocalNonNativeAsset(options));
|
|
12163
|
-
}
|
|
12164
|
-
}, {
|
|
12165
|
-
key: "transferLocalNonNativeAsset",
|
|
12166
|
-
value: function transferLocalNonNativeAsset(options) {
|
|
12167
|
-
var api = options.api,
|
|
12168
|
-
asset = options.assetInfo,
|
|
12169
|
-
recipient = options.recipient,
|
|
12170
|
-
isAmountAll = options.isAmountAll,
|
|
12171
|
-
keepAlive = options.keepAlive;
|
|
12172
|
-
var currencyId = this.getCustomCurrencyId(api, asset);
|
|
12173
|
-
if (isAmountAll) {
|
|
12174
|
-
return api.deserializeExtrinsics({
|
|
12175
|
-
module: 'Tokens',
|
|
12176
|
-
method: 'transfer_all',
|
|
12177
|
-
params: {
|
|
12178
|
-
dest: recipient,
|
|
12179
|
-
currency_id: currencyId,
|
|
12180
|
-
keep_alive: keepAlive
|
|
12181
|
-
}
|
|
12182
|
-
});
|
|
12183
|
-
}
|
|
12184
|
-
return api.deserializeExtrinsics({
|
|
12185
|
-
module: 'Tokens',
|
|
12186
|
-
method: keepAlive ? 'transfer_keep_alive' : 'transfer',
|
|
12187
|
-
params: {
|
|
12188
|
-
dest: recipient,
|
|
12189
|
-
currency_id: currencyId,
|
|
12190
|
-
amount: asset.amount
|
|
12191
|
-
}
|
|
12192
|
-
});
|
|
12193
|
-
}
|
|
12194
|
-
}, {
|
|
12195
|
-
key: "getBalanceNative",
|
|
12196
|
-
value: function getBalanceNative(api, address, asset) {
|
|
12197
|
-
return this.getBalanceForeign(api, address, asset);
|
|
12198
|
-
}
|
|
12199
|
-
}]);
|
|
12200
|
-
}(SubstrateChain);
|
|
12201
|
-
|
|
12202
11712
|
var Relaychain = /*#__PURE__*/function (_SubstrateChain) {
|
|
12203
11713
|
function Relaychain() {
|
|
12204
11714
|
_classCallCheck(this, Relaychain);
|
|
@@ -12235,54 +11745,6 @@ var Kusama = /*#__PURE__*/function (_Polkadot) {
|
|
|
12235
11745
|
return _createClass(Kusama);
|
|
12236
11746
|
}(Polkadot);
|
|
12237
11747
|
|
|
12238
|
-
var Moonbeam = /*#__PURE__*/function (_SubstrateChain) {
|
|
12239
|
-
function Moonbeam() {
|
|
12240
|
-
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Moonbeam';
|
|
12241
|
-
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'moonbeam';
|
|
12242
|
-
var ecosystem = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Polkadot';
|
|
12243
|
-
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.V5;
|
|
12244
|
-
_classCallCheck(this, Moonbeam);
|
|
12245
|
-
return _callSuper(this, Moonbeam, [chain, info, ecosystem, version]);
|
|
12246
|
-
}
|
|
12247
|
-
_inherits(Moonbeam, _SubstrateChain);
|
|
12248
|
-
return _createClass(Moonbeam, [{
|
|
12249
|
-
key: "transferPolkadotXCM",
|
|
12250
|
-
value: function transferPolkadotXCM(options) {
|
|
12251
|
-
return transferPolkadotXcm(options);
|
|
12252
|
-
}
|
|
12253
|
-
}, {
|
|
12254
|
-
key: "transferLocalNonNativeAsset",
|
|
12255
|
-
value: function transferLocalNonNativeAsset(_options) {
|
|
12256
|
-
throw new ScenarioNotSupportedError("".concat(this.chain, " local transfers are supported only from EVM Builder"));
|
|
12257
|
-
}
|
|
12258
|
-
}, {
|
|
12259
|
-
key: "getBalanceForeign",
|
|
12260
|
-
value: function getBalanceForeign(_api, address, asset) {
|
|
12261
|
-
assertHasId(asset);
|
|
12262
|
-
return getMoonbeamErc20Balance(this.chain, asset.assetId, address);
|
|
12263
|
-
}
|
|
12264
|
-
}]);
|
|
12265
|
-
}(SubstrateChain);
|
|
12266
|
-
|
|
12267
|
-
var Moonriver = /*#__PURE__*/function (_SubstrateChain) {
|
|
12268
|
-
function Moonriver() {
|
|
12269
|
-
_classCallCheck(this, Moonriver);
|
|
12270
|
-
return _callSuper(this, Moonriver, ['Moonriver', 'moonriver', 'Kusama', Version.V5]);
|
|
12271
|
-
}
|
|
12272
|
-
_inherits(Moonriver, _SubstrateChain);
|
|
12273
|
-
return _createClass(Moonriver, [{
|
|
12274
|
-
key: "transferPolkadotXCM",
|
|
12275
|
-
value: function transferPolkadotXCM(options) {
|
|
12276
|
-
return transferPolkadotXcm(options);
|
|
12277
|
-
}
|
|
12278
|
-
}, {
|
|
12279
|
-
key: "transferLocalNonNativeAsset",
|
|
12280
|
-
value: function transferLocalNonNativeAsset(options) {
|
|
12281
|
-
return getSubstrateChainImpl('Moonbeam').transferLocalNonNativeAsset(options);
|
|
12282
|
-
}
|
|
12283
|
-
}]);
|
|
12284
|
-
}(SubstrateChain);
|
|
12285
|
-
|
|
12286
11748
|
var createTypeAndThenTransfer = /*#__PURE__*/function () {
|
|
12287
11749
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(options, chain, version) {
|
|
12288
11750
|
var api, asset, sender, recipient, ethAsset, messageId, nativeMythAmount, hopDestination;
|
|
@@ -12596,19 +12058,29 @@ var Pendulum = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
12596
12058
|
}]);
|
|
12597
12059
|
}(SubstrateChain);
|
|
12598
12060
|
|
|
12599
|
-
var Penpal = /*#__PURE__*/function (
|
|
12061
|
+
var Penpal = /*#__PURE__*/function (_SubstrateChain) {
|
|
12600
12062
|
function Penpal() {
|
|
12601
12063
|
_classCallCheck(this, Penpal);
|
|
12602
12064
|
return _callSuper(this, Penpal, ['Penpal', 'westendPenpal', 'Westend', Version.V4]);
|
|
12603
12065
|
}
|
|
12604
|
-
_inherits(Penpal,
|
|
12066
|
+
_inherits(Penpal, _SubstrateChain);
|
|
12605
12067
|
return _createClass(Penpal, [{
|
|
12068
|
+
key: "transferPolkadotXCM",
|
|
12069
|
+
value: function transferPolkadotXCM(options) {
|
|
12070
|
+
return transferPolkadotXcm(options);
|
|
12071
|
+
}
|
|
12072
|
+
}, {
|
|
12073
|
+
key: "transferLocalNonNativeAsset",
|
|
12074
|
+
value: function transferLocalNonNativeAsset(_options) {
|
|
12075
|
+
throw new ScenarioNotSupportedError("".concat(this.chain, " local transfers are supported only from EVM Builder"));
|
|
12076
|
+
}
|
|
12077
|
+
}, {
|
|
12606
12078
|
key: "getBalanceForeign",
|
|
12607
12079
|
value: function getBalanceForeign(api, address, asset) {
|
|
12608
12080
|
return getPalletInstance('ForeignAssets').getBalance(api, address, asset);
|
|
12609
12081
|
}
|
|
12610
12082
|
}]);
|
|
12611
|
-
}(
|
|
12083
|
+
}(SubstrateChain);
|
|
12612
12084
|
|
|
12613
12085
|
var PeopleKusama = /*#__PURE__*/function (_SubstrateChain) {
|
|
12614
12086
|
function PeopleKusama() {
|
|
@@ -12672,35 +12144,6 @@ var PeopleWestend = /*#__PURE__*/function (_PeoplePolkadot) {
|
|
|
12672
12144
|
return _createClass(PeopleWestend);
|
|
12673
12145
|
}(PeoplePolkadot);
|
|
12674
12146
|
|
|
12675
|
-
var Quartz = /*#__PURE__*/function (_SubstrateChain) {
|
|
12676
|
-
function Quartz() {
|
|
12677
|
-
_classCallCheck(this, Quartz);
|
|
12678
|
-
return _callSuper(this, Quartz, ['Quartz', 'quartz', 'Kusama', Version.V5]);
|
|
12679
|
-
}
|
|
12680
|
-
_inherits(Quartz, _SubstrateChain);
|
|
12681
|
-
return _createClass(Quartz, [{
|
|
12682
|
-
key: "transferPolkadotXCM",
|
|
12683
|
-
value: function transferPolkadotXCM(input) {
|
|
12684
|
-
return transferPolkadotXcm(input);
|
|
12685
|
-
}
|
|
12686
|
-
}, {
|
|
12687
|
-
key: "transferLocalNonNativeAsset",
|
|
12688
|
-
value: function transferLocalNonNativeAsset(options) {
|
|
12689
|
-
return getSubstrateChainImpl('Unique').transferLocalNonNativeAsset(options);
|
|
12690
|
-
}
|
|
12691
|
-
}, {
|
|
12692
|
-
key: "getBalanceForeign",
|
|
12693
|
-
value: function getBalanceForeign(api, address, asset) {
|
|
12694
|
-
return getSubstrateChainImpl('Unique').getBalanceForeign(api, address, asset);
|
|
12695
|
-
}
|
|
12696
|
-
}, {
|
|
12697
|
-
key: "isSendingTempDisabled",
|
|
12698
|
-
value: function isSendingTempDisabled() {
|
|
12699
|
-
return true;
|
|
12700
|
-
}
|
|
12701
|
-
}]);
|
|
12702
|
-
}(SubstrateChain);
|
|
12703
|
-
|
|
12704
12147
|
var RobonomicsPolkadot = /*#__PURE__*/function (_SubstrateChain) {
|
|
12705
12148
|
function RobonomicsPolkadot() {
|
|
12706
12149
|
_classCallCheck(this, RobonomicsPolkadot);
|
|
@@ -12856,67 +12299,6 @@ var Xode = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
12856
12299
|
}]);
|
|
12857
12300
|
}(SubstrateChain);
|
|
12858
12301
|
|
|
12859
|
-
var Zeitgeist = /*#__PURE__*/function (_SubstrateChain) {
|
|
12860
|
-
function Zeitgeist() {
|
|
12861
|
-
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Zeitgeist';
|
|
12862
|
-
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'zeitgeist';
|
|
12863
|
-
var ecosystem = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Polkadot';
|
|
12864
|
-
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.V4;
|
|
12865
|
-
_classCallCheck(this, Zeitgeist);
|
|
12866
|
-
return _callSuper(this, Zeitgeist, [chain, info, ecosystem, version]);
|
|
12867
|
-
}
|
|
12868
|
-
_inherits(Zeitgeist, _SubstrateChain);
|
|
12869
|
-
return _createClass(Zeitgeist, [{
|
|
12870
|
-
key: "getCustomCurrencyId",
|
|
12871
|
-
value: function getCustomCurrencyId(_api, asset) {
|
|
12872
|
-
if (asset.isNative) return 'Ztg';
|
|
12873
|
-
assertHasId(asset);
|
|
12874
|
-
return {
|
|
12875
|
-
ForeignAsset: Number(asset.assetId)
|
|
12876
|
-
};
|
|
12877
|
-
}
|
|
12878
|
-
}, {
|
|
12879
|
-
key: "transferPolkadotXCM",
|
|
12880
|
-
value: function transferPolkadotXCM(input) {
|
|
12881
|
-
return transferPolkadotXcm(input);
|
|
12882
|
-
}
|
|
12883
|
-
}, {
|
|
12884
|
-
key: "canReceiveFrom",
|
|
12885
|
-
value: function canReceiveFrom(origin) {
|
|
12886
|
-
return origin !== 'Astar';
|
|
12887
|
-
}
|
|
12888
|
-
}, {
|
|
12889
|
-
key: "transferLocalNonNativeAsset",
|
|
12890
|
-
value: function transferLocalNonNativeAsset(options) {
|
|
12891
|
-
var api = options.api,
|
|
12892
|
-
asset = options.assetInfo,
|
|
12893
|
-
recipient = options.recipient;
|
|
12894
|
-
assertHasId(asset);
|
|
12895
|
-
var amount = getLocalTransferAmount(options);
|
|
12896
|
-
return api.deserializeExtrinsics({
|
|
12897
|
-
module: 'AssetManager',
|
|
12898
|
-
method: 'transfer',
|
|
12899
|
-
params: {
|
|
12900
|
-
dest: {
|
|
12901
|
-
Id: recipient
|
|
12902
|
-
},
|
|
12903
|
-
currency_id: this.getCustomCurrencyId(api, asset),
|
|
12904
|
-
amount: amount
|
|
12905
|
-
}
|
|
12906
|
-
});
|
|
12907
|
-
}
|
|
12908
|
-
}]);
|
|
12909
|
-
}(SubstrateChain);
|
|
12910
|
-
|
|
12911
|
-
var ZeitgeistPaseo = /*#__PURE__*/function (_Zeitgeist) {
|
|
12912
|
-
function ZeitgeistPaseo() {
|
|
12913
|
-
_classCallCheck(this, ZeitgeistPaseo);
|
|
12914
|
-
return _callSuper(this, ZeitgeistPaseo, ['ZeitgeistPaseo', 'ZeitgeistBatteryStation', 'Paseo', Version.V4]);
|
|
12915
|
-
}
|
|
12916
|
-
_inherits(ZeitgeistPaseo, _Zeitgeist);
|
|
12917
|
-
return _createClass(ZeitgeistPaseo);
|
|
12918
|
-
}(Zeitgeist);
|
|
12919
|
-
|
|
12920
12302
|
var chains = function chains() {
|
|
12921
12303
|
return {
|
|
12922
12304
|
// Polkadot chains
|
|
@@ -12933,10 +12315,8 @@ var chains = function chains() {
|
|
|
12933
12315
|
Darwinia: new Darwinia(),
|
|
12934
12316
|
EnergyWebX: new EnergyWebX(),
|
|
12935
12317
|
Hydration: new Hydration(),
|
|
12936
|
-
Interlay: new Interlay(),
|
|
12937
12318
|
Heima: new Heima(),
|
|
12938
12319
|
Jamton: new Jamton(),
|
|
12939
|
-
Moonbeam: new Moonbeam(),
|
|
12940
12320
|
CoretimePolkadot: new CoretimePolkadot(),
|
|
12941
12321
|
PeoplePolkadot: new PeoplePolkadot(),
|
|
12942
12322
|
RobonomicsPolkadot: new RobonomicsPolkadot(),
|
|
@@ -12957,12 +12337,8 @@ var chains = function chains() {
|
|
|
12957
12337
|
CrustShadow: new CrustShadow(),
|
|
12958
12338
|
Crab: new Crab(),
|
|
12959
12339
|
Karura: new Karura(),
|
|
12960
|
-
Kintsugi: new Kintsugi(),
|
|
12961
|
-
Moonriver: new Moonriver(),
|
|
12962
|
-
Quartz: new Quartz(),
|
|
12963
12340
|
PeopleKusama: new PeopleKusama(),
|
|
12964
12341
|
Shiden: new Shiden(),
|
|
12965
|
-
Zeitgeist: new Zeitgeist(),
|
|
12966
12342
|
// Westend chains
|
|
12967
12343
|
Westend: new Westend(),
|
|
12968
12344
|
AssetHubWestend: new AssetHubWestend(),
|
|
@@ -12974,16 +12350,11 @@ var chains = function chains() {
|
|
|
12974
12350
|
// Paseo chains
|
|
12975
12351
|
Paseo: new Paseo(),
|
|
12976
12352
|
AssetHubPaseo: new AssetHubPaseo(),
|
|
12977
|
-
BridgeHubPaseo: new BridgeHubPaseo(),
|
|
12978
|
-
CoretimePaseo: new CoretimePaseo(),
|
|
12979
12353
|
EnergyWebXPaseo: new EnergyWebXPaseo(),
|
|
12980
12354
|
PeoplePaseo: new PeoplePaseo(),
|
|
12981
|
-
AjunaPaseo: new AjunaPaseo(),
|
|
12982
|
-
BifrostPaseo: new BifrostPaseo(),
|
|
12983
12355
|
HeimaPaseo: new HeimaPaseo(),
|
|
12984
12356
|
HydrationPaseo: new HydrationPaseo(),
|
|
12985
12357
|
NeuroWebPaseo: new NeuroWebPaseo(),
|
|
12986
|
-
ZeitgeistPaseo: new ZeitgeistPaseo(),
|
|
12987
12358
|
// External chains
|
|
12988
12359
|
Ethereum: new Ethereum(),
|
|
12989
12360
|
EthereumTestnet: new EthereumTestnet()
|
|
@@ -14375,4 +13746,4 @@ var createClientCache = function createClientCache(maxSize, pingClient, onEvicti
|
|
|
14375
13746
|
};
|
|
14376
13747
|
};
|
|
14377
13748
|
|
|
14378
|
-
export { API_TYPES, AmountTooLowError, ApiNotInitializedError, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, CustomChainConflictError, CustomChainInvalidError, DEFAULT_TTL_MS, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, EXCHANGE_CHAINS, EXTENSION_MS, ExtensionNotInstalledError, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MAX_CLIENTS, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotApi, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiError, RuntimeApiUnavailableError, ScenarioNotSupportedError, SubmitTransactionError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, aggregateHopFees, applyDecimalAbstraction, assertAddressIsString, assertCurrencyCore, assertEvmAddress, assertExtensionInstalled, assertHasId, assertNotEvmTransfer, assertSender, assertSenderSource, assertSubstrateOrigin, assertSwapSupport, assertToIsString, blake2b256, blake2b512, buildCustomChainAssetsInfo, buildCustomChainConfig, buildDestInfo, buildDryRunError, buildHopInfo, buildOriginInfo, calcPreviewMintAmount, compareAddresses, computeOverridenAmount, constructTypeAndThenCall, convertBuilderConfig, convertSs58, createAsset, createAssetId, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createClientCache, createClientPoolHelpers, createCustomXcmOnDest, createDestination, createDirectExecuteXcm, createEthereumBridgeInstructions, createExecuteCall, createExecuteExchangeXcm, createSwapBuilder, createTransfer, createTransferOrSwap, createTransferOrSwapAll, createTxOverrideAmount, createTypeAndThenCall, createTypeThenAutoReserve, createVersionedAssets, createVersionedDestination, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, executeWithSwap, formatAssetIdToERC20, formatUnits, generateMessageId, getAssetBalanceInternal, getAssetReserveChain, getAssetReserveChainImpl, getBalance, getBalanceInternal, getBridgeStatus, getChain, getChainConfig, getChainConfigImpl, getChainLocation, getChainProviders, getChainProvidersImpl, getChainVersion, getDryRunError, getErrorInstruction, getEthErc20Balance, getEvmExtensionOrThrow, getEvmPrivateKeyHex, getEvmSnowbridgeExtensionOrThrow, getLocalTransferAmount, getMinTransferableAmount, getMinTransferableAmountInternal,
|
|
13749
|
+
export { API_TYPES, AmountTooLowError, ApiNotInitializedError, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, CustomChainConflictError, CustomChainInvalidError, DEFAULT_TTL_MS, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, EXCHANGE_CHAINS, EXTENSION_MS, ExtensionNotInstalledError, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MAX_CLIENTS, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotApi, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiError, RuntimeApiUnavailableError, ScenarioNotSupportedError, SubmitTransactionError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, aggregateHopFees, applyDecimalAbstraction, assertAddressIsString, assertCurrencyCore, assertEvmAddress, assertExtensionInstalled, assertHasId, assertNotEvmTransfer, assertSender, assertSenderSource, assertSubstrateOrigin, assertSwapSupport, assertToIsString, blake2b256, blake2b512, buildCustomChainAssetsInfo, buildCustomChainConfig, buildDestInfo, buildDryRunError, buildHopInfo, buildOriginInfo, calcPreviewMintAmount, compareAddresses, computeOverridenAmount, constructTypeAndThenCall, convertBuilderConfig, convertSs58, createAsset, createAssetId, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createClientCache, createClientPoolHelpers, createCustomXcmOnDest, createDestination, createDirectExecuteXcm, createEthereumBridgeInstructions, createExecuteCall, createExecuteExchangeXcm, createSwapBuilder, createTransfer, createTransferOrSwap, createTransferOrSwapAll, createTxOverrideAmount, createTypeAndThenCall, createTypeThenAutoReserve, createVersionedAssets, createVersionedDestination, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, executeWithSwap, formatAssetIdToERC20, formatUnits, generateMessageId, getAssetBalanceInternal, getAssetReserveChain, getAssetReserveChainImpl, getBalance, getBalanceInternal, getBridgeStatus, getChain, getChainConfig, getChainConfigImpl, getChainLocation, getChainProviders, getChainProvidersImpl, getChainVersion, getDryRunError, getErrorInstruction, getEthErc20Balance, getEvmExtensionOrThrow, getEvmPrivateKeyHex, getEvmSnowbridgeExtensionOrThrow, getLocalTransferAmount, getMinTransferableAmount, getMinTransferableAmountInternal, getOriginXcmFee, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getParaIdImpl, getRelayChainOf, getRelayChainOfImpl, getRelayChainSymbolOf, getSwapExtensionOrThrow, getTChain, getTSubstrateChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeInternal, getXcmFeeOnce, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, isExchange, isNativeAssetTeleport, isSenderSigner, isViemSigner, keyFromWs, localizeLocation, localizeLocationImpl, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, normalizeCustomChains, normalizeExchange, overrideTxAmount, padFee, padValueBy, parseUnits, pickCompatibleXcmVersion, pickOtherMintPallet, pickRouterCompatibleXcmVersion, registerEvmExtension, registerEvmSnowbridgeExtension, registerSwapExtension, resolveAssetCount, resolveDestChain, resolveModuleError, resolveParaId, resolveTransferParams, reverseTransformLocation, selectXcmVersion, sortAssets, throwUnsupportedCurrency, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, validateDestinationAddress, validateTransact, verifyEdOnDestination, wrapTxBypass };
|