@paraspell/sdk-core 14.1.0-rc.1 → 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.
Files changed (3) hide show
  1. package/dist/index.d.ts +32 -112
  2. package/dist/index.mjs +138 -811
  3. 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 { isTLocation, replaceBigInt, isExternalChain, CHAINS, Version, isRelayChain, isSubstrateBridge, Parents, deepEqual, isTrustedChain, isCustomChain, hasJunction, isSnowbridge, getJunctionValue, ETHEREUM_BRIDGE_ORIGINS, isBridge, RELAYCHAINS, DEFAULT_SS58_PREFIX } from '@paraspell/sdk-common';
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 (_Error) {
401
+ var AmountTooLowError = /*#__PURE__*/function (_ParaSpellError) {
438
402
  function AmountTooLowError(message) {
439
- var _this;
440
403
  _classCallCheck(this, AmountTooLowError);
441
- _this = _callSuper(this, AmountTooLowError, [message !== null && message !== void 0 ? message : 'Entered amount is too low and cannot cover fees. Please enter a larger amount.']);
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, _Error);
406
+ _inherits(AmountTooLowError, _ParaSpellError);
446
407
  return _createClass(AmountTooLowError);
447
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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 (_Error) {
413
+ var ApiNotInitializedError = /*#__PURE__*/function (_ParaSpellError) {
453
414
  function ApiNotInitializedError() {
454
- var _this;
455
415
  _classCallCheck(this, ApiNotInitializedError);
456
- _this = _callSuper(this, ApiNotInitializedError, ['API is not initialized. Please call init() before using this method.']);
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, _Error);
418
+ _inherits(ApiNotInitializedError, _ParaSpellError);
461
419
  return _createClass(ApiNotInitializedError);
462
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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 (_Error) {
425
+ var BatchValidationError = /*#__PURE__*/function (_ParaSpellError) {
468
426
  function BatchValidationError(message) {
469
- var _this;
470
427
  _classCallCheck(this, BatchValidationError);
471
- _this = _callSuper(this, BatchValidationError, [message]);
472
- _this.name = 'BatchValidationError';
473
- return _this;
428
+ return _callSuper(this, BatchValidationError, [message]);
474
429
  }
475
- _inherits(BatchValidationError, _Error);
430
+ _inherits(BatchValidationError, _ParaSpellError);
476
431
  return _createClass(BatchValidationError);
477
- }(/*#__PURE__*/_wrapNativeSuper(Error));
432
+ }(ParaSpellError);
478
433
 
479
434
  /**
480
435
  * Error thrown when the Ethereum bridge is halted.
481
436
  */
482
- var BridgeHaltedError = /*#__PURE__*/function (_Error) {
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
- _this = _callSuper(this, BridgeHaltedError, ['Bridge operations have been paused by onchain governance.']);
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, _Error);
447
+ _inherits(BridgeHaltedError, _ParaSpellError);
496
448
  return _createClass(BridgeHaltedError);
497
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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 (_Error) {
454
+ var CustomChainConflictError = /*#__PURE__*/function (_ParaSpellError) {
503
455
  function CustomChainConflictError(msg) {
504
- var _this;
505
456
  _classCallCheck(this, CustomChainConflictError);
506
- _this = _callSuper(this, CustomChainConflictError, [msg]);
507
- _this.name = 'CustomChainConflict';
508
- return _this;
457
+ return _callSuper(this, CustomChainConflictError, [msg]);
509
458
  }
510
- _inherits(CustomChainConflictError, _Error);
459
+ _inherits(CustomChainConflictError, _ParaSpellError);
511
460
  return _createClass(CustomChainConflictError);
512
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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 (_Error) {
467
+ var CustomChainInvalidError = /*#__PURE__*/function (_ParaSpellError) {
519
468
  function CustomChainInvalidError(msg) {
520
- var _this;
521
469
  _classCallCheck(this, CustomChainInvalidError);
522
- _this = _callSuper(this, CustomChainInvalidError, [msg]);
523
- _this.name = 'CustomChainInvalid';
524
- return _this;
470
+ return _callSuper(this, CustomChainInvalidError, [msg]);
525
471
  }
526
- _inherits(CustomChainInvalidError, _Error);
472
+ _inherits(CustomChainInvalidError, _ParaSpellError);
527
473
  return _createClass(CustomChainInvalidError);
528
- }(/*#__PURE__*/_wrapNativeSuper(Error));
474
+ }(ParaSpellError);
529
475
 
530
476
  /**
531
477
  * Error thrown when the Dry Run fails.
532
478
  */
533
- var DryRunFailedError = /*#__PURE__*/function (_Error) {
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, _Error);
497
+ _inherits(DryRunFailedError, _ParaSpellError);
553
498
  return _createClass(DryRunFailedError);
554
- }(/*#__PURE__*/_wrapNativeSuper(Error));
499
+ }(ParaSpellError);
555
500
 
556
501
  /**
557
502
  * Error thrown when an extension is not installed.
558
503
  */
559
- var ExtensionNotInstalledError = /*#__PURE__*/function (_Error) {
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
- _this = _callSuper(this, ExtensionNotInstalledError, [message]);
569
- _this.name = 'ExtensionNotInstalledError';
570
- return _this;
512
+ return _callSuper(this, ExtensionNotInstalledError, [message]);
571
513
  }
572
- _inherits(ExtensionNotInstalledError, _Error);
514
+ _inherits(ExtensionNotInstalledError, _ParaSpellError);
573
515
  return _createClass(ExtensionNotInstalledError);
574
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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 (_Error) {
521
+ var FeatureTemporarilyDisabledError = /*#__PURE__*/function (_ParaSpellError) {
580
522
  function FeatureTemporarilyDisabledError(message) {
581
- var _this;
582
523
  _classCallCheck(this, FeatureTemporarilyDisabledError);
583
- _this = _callSuper(this, FeatureTemporarilyDisabledError, [message]);
584
- _this.name = 'FeatureTemporarilyDisabledError';
585
- return _this;
524
+ return _callSuper(this, FeatureTemporarilyDisabledError, [message]);
586
525
  }
587
- _inherits(FeatureTemporarilyDisabledError, _Error);
526
+ _inherits(FeatureTemporarilyDisabledError, _ParaSpellError);
588
527
  return _createClass(FeatureTemporarilyDisabledError);
589
- }(/*#__PURE__*/_wrapNativeSuper(Error));
528
+ }(ParaSpellError);
590
529
 
591
530
  /**
592
531
  * Error thrown when an invalid address is provided.
593
532
  */
594
- var InvalidAddressError = /*#__PURE__*/function (_Error) {
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
- _this = _callSuper(this, InvalidAddressError, [message]);
604
- _this.name = 'InvalidAddressError';
605
- return _this;
541
+ return _callSuper(this, InvalidAddressError, [message]);
606
542
  }
607
- _inherits(InvalidAddressError, _Error);
543
+ _inherits(InvalidAddressError, _ParaSpellError);
608
544
  return _createClass(InvalidAddressError);
609
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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 (_Error) {
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
- _this = _callSuper(this, MissingChainApiError, ["Development mode requires an API override for ".concat(chain, ". ") + "Please provide an API client or WebSocket URL in the apiOverrides configuration."]);
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, _Error);
560
+ _inherits(MissingChainApiError, _ParaSpellError);
628
561
  return _createClass(MissingChainApiError);
629
- }(/*#__PURE__*/_wrapNativeSuper(Error));
562
+ }(ParaSpellError);
630
563
 
631
564
  /**
632
565
  * Error thrown when a required parameter is missing.
633
566
  */
634
- var MissingParameterError = /*#__PURE__*/function (_Error) {
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
- _this = _callSuper(this, MissingParameterError, [message !== null && message !== void 0 ? message : "Missing required parameter: ".concat(label, ".")]);
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, _Error);
573
+ _inherits(MissingParameterError, _ParaSpellError);
644
574
  return _createClass(MissingParameterError);
645
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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 (_Error) {
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
- _this = _callSuper(this, NoXCMSupportImplementedError, ["No XCM support implemented for chain ".concat(chain, " yet.")]);
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, _Error);
590
+ _inherits(NoXCMSupportImplementedError, _ParaSpellError);
664
591
  return _createClass(NoXCMSupportImplementedError);
665
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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 (_Error) {
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
- _this = _callSuper(this, NumberFormatError, [message]);
676
- _this.name = 'NumberFormatError';
677
- return _this;
601
+ return _callSuper(this, NumberFormatError, [message]);
678
602
  }
679
- _inherits(NumberFormatError, _Error);
603
+ _inherits(NumberFormatError, _ParaSpellError);
680
604
  return _createClass(NumberFormatError);
681
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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 (_Error) {
610
+ var OverrideConflictError = /*#__PURE__*/function (_ParaSpellError) {
687
611
  function OverrideConflictError(message) {
688
- var _this;
689
612
  _classCallCheck(this, OverrideConflictError);
690
- _this = _callSuper(this, OverrideConflictError, [message]);
691
- _this.name = 'OverrideConflictError';
692
- return _this;
613
+ return _callSuper(this, OverrideConflictError, [message]);
693
614
  }
694
- _inherits(OverrideConflictError, _Error);
615
+ _inherits(OverrideConflictError, _ParaSpellError);
695
616
  return _createClass(OverrideConflictError);
696
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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 (_Error) {
622
+ var ProviderUnavailableError = /*#__PURE__*/function (_ParaSpellError) {
702
623
  function ProviderUnavailableError(message) {
703
- var _this;
704
624
  _classCallCheck(this, ProviderUnavailableError);
705
- _this = _callSuper(this, ProviderUnavailableError, [message]);
706
- _this.name = 'ProviderUnavailableError';
707
- return _this;
625
+ return _callSuper(this, ProviderUnavailableError, [message]);
708
626
  }
709
- _inherits(ProviderUnavailableError, _Error);
627
+ _inherits(ProviderUnavailableError, _ParaSpellError);
710
628
  return _createClass(ProviderUnavailableError);
711
- }(/*#__PURE__*/_wrapNativeSuper(Error));
629
+ }(ParaSpellError);
712
630
 
713
631
  /**
714
632
  * Error thrown when routing or path resolution fails.
715
633
  */
716
- var RoutingResolutionError = /*#__PURE__*/function (_Error) {
634
+ var RoutingResolutionError = /*#__PURE__*/function (_ParaSpellError) {
717
635
  function RoutingResolutionError(message) {
718
- var _this;
719
636
  _classCallCheck(this, RoutingResolutionError);
720
- _this = _callSuper(this, RoutingResolutionError, [message]);
721
- _this.name = 'RoutingResolutionError';
722
- return _this;
637
+ return _callSuper(this, RoutingResolutionError, [message]);
723
638
  }
724
- _inherits(RoutingResolutionError, _Error);
639
+ _inherits(RoutingResolutionError, _ParaSpellError);
725
640
  return _createClass(RoutingResolutionError);
726
- }(/*#__PURE__*/_wrapNativeSuper(Error));
641
+ }(ParaSpellError);
727
642
 
728
643
  /**
729
644
  * Error thrown when a runtime API call fails
730
645
  */
731
- var RuntimeApiError = /*#__PURE__*/function (_Error) {
646
+ var RuntimeApiError = /*#__PURE__*/function (_ParaSpellError) {
732
647
  function RuntimeApiError(message) {
733
- var _this;
734
648
  _classCallCheck(this, RuntimeApiError);
735
- _this = _callSuper(this, RuntimeApiError, [message]);
736
- _this.name = 'RuntimeApiError';
737
- return _this;
649
+ return _callSuper(this, RuntimeApiError, [message]);
738
650
  }
739
- _inherits(RuntimeApiError, _Error);
651
+ _inherits(RuntimeApiError, _ParaSpellError);
740
652
  return _createClass(RuntimeApiError);
741
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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 (_Error) {
658
+ var RuntimeApiUnavailableError = /*#__PURE__*/function (_ParaSpellError) {
747
659
  function RuntimeApiUnavailableError(chain, apiName) {
748
- var _this;
749
660
  _classCallCheck(this, RuntimeApiUnavailableError);
750
- _this = _callSuper(this, RuntimeApiUnavailableError, ["Runtime API \"".concat(apiName, "\" is not available on chain ").concat(chain)]);
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, _Error);
663
+ _inherits(RuntimeApiUnavailableError, _ParaSpellError);
755
664
  return _createClass(RuntimeApiUnavailableError);
756
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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 (_Error) {
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
- _this = _callSuper(this, ScenarioNotSupportedError, [parts.join(' ')]);
774
- _this.name = 'ScenarioNotSupportedError';
775
- return _assertThisInitialized(_this);
681
+ return _callSuper(this, ScenarioNotSupportedError, [parts.join(' ')]);
776
682
  }
777
- _inherits(ScenarioNotSupportedError, _Error);
683
+ _inherits(ScenarioNotSupportedError, _ParaSpellError);
778
684
  return _createClass(ScenarioNotSupportedError);
779
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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 (_Error) {
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
- _this = _callSuper(this, SubmitTransactionError, [message]);
794
- _this.name = 'SubmitTransactionError';
795
- return _this;
698
+ return _callSuper(this, SubmitTransactionError, [message]);
796
699
  }
797
- _inherits(SubmitTransactionError, _Error);
700
+ _inherits(SubmitTransactionError, _ParaSpellError);
798
701
  return _createClass(SubmitTransactionError);
799
- }(/*#__PURE__*/_wrapNativeSuper(Error));
702
+ }(ParaSpellError);
800
703
 
801
- var TypeAndThenUnavailableError = /*#__PURE__*/function (_Error) {
704
+ var TypeAndThenUnavailableError = /*#__PURE__*/function (_ParaSpellError) {
802
705
  function TypeAndThenUnavailableError(message) {
803
- var _this;
804
706
  _classCallCheck(this, TypeAndThenUnavailableError);
805
- _this = _callSuper(this, TypeAndThenUnavailableError, [message]);
806
- _this.name = 'TypeAndThenUnavailableError';
807
- return _this;
707
+ return _callSuper(this, TypeAndThenUnavailableError, [message]);
808
708
  }
809
- _inherits(TypeAndThenUnavailableError, _Error);
709
+ _inherits(TypeAndThenUnavailableError, _ParaSpellError);
810
710
  return _createClass(TypeAndThenUnavailableError);
811
- }(/*#__PURE__*/_wrapNativeSuper(Error));
711
+ }(ParaSpellError);
812
712
 
813
713
  /**
814
714
  * UnableToComputeError is thrown when a computation cannot be performed.
815
715
  */
816
- var UnableToComputeError = /*#__PURE__*/function (_Error) {
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
- _this = _callSuper(this, UnableToComputeError, [message]);
826
- _this.name = 'UnableToComputeError';
827
- return _this;
724
+ return _callSuper(this, UnableToComputeError, [message]);
828
725
  }
829
- _inherits(UnableToComputeError, _Error);
726
+ _inherits(UnableToComputeError, _ParaSpellError);
830
727
  return _createClass(UnableToComputeError);
831
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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 (_Error) {
733
+ var UnsupportedOperationError = /*#__PURE__*/function (_ParaSpellError) {
837
734
  function UnsupportedOperationError(message) {
838
- var _this;
839
735
  _classCallCheck(this, UnsupportedOperationError);
840
- _this = _callSuper(this, UnsupportedOperationError, [message]);
841
- _this.name = 'UnsupportedOperationError';
842
- return _this;
736
+ return _callSuper(this, UnsupportedOperationError, [message]);
843
737
  }
844
- _inherits(UnsupportedOperationError, _Error);
738
+ _inherits(UnsupportedOperationError, _ParaSpellError);
845
739
  return _createClass(UnsupportedOperationError);
846
- }(/*#__PURE__*/_wrapNativeSuper(Error));
740
+ }(ParaSpellError);
847
741
 
848
742
  /**
849
743
  * Thrown when a validation check fails.
850
744
  */
851
- var ValidationError = /*#__PURE__*/function (_Error) {
745
+ var ValidationError = /*#__PURE__*/function (_ParaSpellError) {
852
746
  function ValidationError(message) {
853
- var _this;
854
747
  _classCallCheck(this, ValidationError);
855
- _this = _callSuper(this, ValidationError, [message]);
856
- _this.name = 'ValidationError';
857
- return _this;
748
+ return _callSuper(this, ValidationError, [message]);
858
749
  }
859
- _inherits(ValidationError, _Error);
750
+ _inherits(ValidationError, _ParaSpellError);
860
751
  return _createClass(ValidationError);
861
- }(/*#__PURE__*/_wrapNativeSuper(Error));
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
@@ -1209,21 +1100,6 @@ var Hydration$1 = {
1209
1100
  }
1210
1101
  ]
1211
1102
  };
1212
- var Interlay$1 = {
1213
- name: "Interlay",
1214
- info: "interlay",
1215
- paraId: 2032,
1216
- providers: [
1217
- {
1218
- name: "Kintsugi Labs",
1219
- endpoint: "wss://api.interlay.io/parachain"
1220
- },
1221
- {
1222
- name: "LuckyFriday",
1223
- endpoint: "wss://rpc-interlay.luckyfriday.io/"
1224
- }
1225
- ]
1226
- };
1227
1103
  var Heima$1 = {
1228
1104
  name: "Heima",
1229
1105
  info: "heima",
@@ -1250,33 +1126,6 @@ var Jamton$1 = {
1250
1126
  }
1251
1127
  ]
1252
1128
  };
1253
- var Moonbeam$1 = {
1254
- name: "Moonbeam",
1255
- info: "moonbeam",
1256
- paraId: 2004,
1257
- providers: [
1258
- {
1259
- name: "Allnodes",
1260
- endpoint: "wss://moonbeam-rpc.publicnode.com"
1261
- },
1262
- {
1263
- name: "Dwellir",
1264
- endpoint: "wss://moonbeam-rpc.n.dwellir.com"
1265
- },
1266
- {
1267
- name: "Moonbeam Foundation",
1268
- endpoint: "wss://wss.api.moonbeam.network"
1269
- },
1270
- {
1271
- name: "OnFinality",
1272
- endpoint: "wss://moonbeam.api.onfinality.io/public-ws"
1273
- },
1274
- {
1275
- name: "UnitedBloc",
1276
- endpoint: "wss://moonbeam.unitedbloc.com"
1277
- }
1278
- ]
1279
- };
1280
1129
  var CoretimePolkadot$1 = {
1281
1130
  name: "Coretime",
1282
1131
  info: "polkadotCoretime",
@@ -1528,48 +1377,6 @@ var Karura$1 = {
1528
1377
  }
1529
1378
  ]
1530
1379
  };
1531
- var Kintsugi$1 = {
1532
- name: "Kintsugi BTC",
1533
- info: "kintsugi",
1534
- paraId: 2092,
1535
- providers: [
1536
- {
1537
- name: "Kintsugi Labs",
1538
- endpoint: "wss://api-kusama.interlay.io/parachain"
1539
- },
1540
- {
1541
- name: "OnFinality",
1542
- endpoint: "wss://kintsugi.api.onfinality.io/public-ws"
1543
- }
1544
- ]
1545
- };
1546
- var Moonriver$1 = {
1547
- name: "Moonriver",
1548
- info: "moonriver",
1549
- paraId: 2023,
1550
- providers: [
1551
- {
1552
- name: "Allnodes",
1553
- endpoint: "wss://moonriver-rpc.publicnode.com"
1554
- },
1555
- {
1556
- name: "Dwellir",
1557
- endpoint: "wss://moonriver-rpc.n.dwellir.com"
1558
- },
1559
- {
1560
- name: "Moonbeam Foundation",
1561
- endpoint: "wss://wss.api.moonriver.moonbeam.network"
1562
- },
1563
- {
1564
- name: "OnFinality",
1565
- endpoint: "wss://moonriver.api.onfinality.io/public-ws"
1566
- },
1567
- {
1568
- name: "UnitedBloc",
1569
- endpoint: "wss://moonriver.unitedbloc.com"
1570
- }
1571
- ]
1572
- };
1573
1380
  var CoretimeKusama$1 = {
1574
1381
  name: "Coretime",
1575
1382
  info: "kusamaCoretime",
@@ -1676,17 +1483,6 @@ var Crab$1 = {
1676
1483
  }
1677
1484
  ]
1678
1485
  };
1679
- var Quartz$1 = {
1680
- name: "QUARTZ by UNIQUE",
1681
- info: "quartz",
1682
- paraId: 2095,
1683
- providers: [
1684
- {
1685
- name: "Geo Load Balancer",
1686
- endpoint: "wss://ws-quartz.unique.network"
1687
- }
1688
- ]
1689
- };
1690
1486
  var RobonomicsPolkadot$1 = {
1691
1487
  name: "Robonomics",
1692
1488
  info: "robonomics",
@@ -1744,17 +1540,6 @@ var Shiden$1 = {
1744
1540
  }
1745
1541
  ]
1746
1542
  };
1747
- var Zeitgeist$1 = {
1748
- name: "Zeitgeist",
1749
- info: "zeitgeist",
1750
- paraId: 2092,
1751
- providers: [
1752
- {
1753
- name: "OnFinality",
1754
- endpoint: "wss://zeitgeist.api.onfinality.io/public-ws"
1755
- }
1756
- ]
1757
- };
1758
1543
  var AssetHubWestend$1 = {
1759
1544
  name: "Asset Hub",
1760
1545
  info: "WestendAssetHub",
@@ -1841,17 +1626,6 @@ var PeopleWestend$1 = {
1841
1626
  }
1842
1627
  ]
1843
1628
  };
1844
- var AjunaPaseo$1 = {
1845
- name: "Ajuna Network (Paseo)",
1846
- info: "Ajuna(paseo)",
1847
- paraId: 2051,
1848
- providers: [
1849
- {
1850
- name: "BajunNetwork",
1851
- endpoint: "wss://rpc-paseo.ajuna.network"
1852
- }
1853
- ]
1854
- };
1855
1629
  var AssetHubPaseo$1 = {
1856
1630
  name: "Asset Hub",
1857
1631
  info: "PaseoAssetHub",
@@ -1864,47 +1638,6 @@ var AssetHubPaseo$1 = {
1864
1638
  {
1865
1639
  name: "TurboFlakes",
1866
1640
  endpoint: "wss://sys.turboflakes.io/asset-hub-paseo"
1867
- },
1868
- {
1869
- name: "Zondax",
1870
- endpoint: "wss://api2.zondax.ch/pas/assethub/node/rpc"
1871
- }
1872
- ]
1873
- };
1874
- var BifrostPaseo$1 = {
1875
- name: "Bifrost",
1876
- info: "Bifrost(Paseo)",
1877
- paraId: 2030,
1878
- providers: [
1879
- {
1880
- name: "Liebi",
1881
- endpoint: "wss://bifrost-rpc.paseo.liebi.com/ws"
1882
- },
1883
- {
1884
- name: "Liebi2",
1885
- endpoint: "wss://bifrost-rpc.paseo2.liebi.com/ws"
1886
- }
1887
- ]
1888
- };
1889
- var BridgeHubPaseo$1 = {
1890
- name: "Bridge Hub",
1891
- info: "PaseoBridgeHub",
1892
- paraId: 1002,
1893
- providers: [
1894
- {
1895
- name: "Zondax",
1896
- endpoint: "wss://api2.zondax.ch/pas/bridgehub/node/rpc"
1897
- }
1898
- ]
1899
- };
1900
- var CoretimePaseo$1 = {
1901
- name: "Coretime",
1902
- info: "PaseoCoretime",
1903
- paraId: 1005,
1904
- providers: [
1905
- {
1906
- name: "Zondax",
1907
- endpoint: "wss://api2.zondax.ch/pas/coretime/node/rpc"
1908
1641
  }
1909
1642
  ]
1910
1643
  };
@@ -1971,17 +1704,6 @@ var PeoplePaseo$1 = {
1971
1704
  }
1972
1705
  ]
1973
1706
  };
1974
- var ZeitgeistPaseo$1 = {
1975
- name: "Zeitgeist Battery Station",
1976
- info: "ZeitgeistBatteryStation",
1977
- paraId: 2101,
1978
- providers: [
1979
- {
1980
- name: "Zeitgeist",
1981
- endpoint: "wss://bsr.zeitgeist.pm"
1982
- }
1983
- ]
1984
- };
1985
1707
  var Polkadot$1 = {
1986
1708
  name: "Polkadot Relay",
1987
1709
  info: "polkadot",
@@ -2113,10 +1835,8 @@ var configs = {
2113
1835
  Darwinia: Darwinia$1,
2114
1836
  EnergyWebX: EnergyWebX$1,
2115
1837
  Hydration: Hydration$1,
2116
- Interlay: Interlay$1,
2117
1838
  Heima: Heima$1,
2118
1839
  Jamton: Jamton$1,
2119
- Moonbeam: Moonbeam$1,
2120
1840
  CoretimePolkadot: CoretimePolkadot$1,
2121
1841
  Collectives: Collectives$1,
2122
1842
  Crust: Crust$1,
@@ -2130,36 +1850,27 @@ var configs = {
2130
1850
  AssetHubKusama: AssetHubKusama$1,
2131
1851
  BridgeHubKusama: BridgeHubKusama$1,
2132
1852
  Karura: Karura$1,
2133
- Kintsugi: Kintsugi$1,
2134
- Moonriver: Moonriver$1,
2135
1853
  CoretimeKusama: CoretimeKusama$1,
2136
1854
  Encointer: Encointer$1,
2137
1855
  Basilisk: Basilisk$1,
2138
1856
  BifrostKusama: BifrostKusama$1,
2139
1857
  CrustShadow: CrustShadow$1,
2140
1858
  Crab: Crab$1,
2141
- Quartz: Quartz$1,
2142
1859
  RobonomicsPolkadot: RobonomicsPolkadot$1,
2143
1860
  PeopleKusama: PeopleKusama$1,
2144
1861
  Shiden: Shiden$1,
2145
- Zeitgeist: Zeitgeist$1,
2146
1862
  AssetHubWestend: AssetHubWestend$1,
2147
1863
  BridgeHubWestend: BridgeHubWestend$1,
2148
1864
  CollectivesWestend: CollectivesWestend$1,
2149
1865
  CoretimeWestend: CoretimeWestend$1,
2150
1866
  Penpal: Penpal$1,
2151
1867
  PeopleWestend: PeopleWestend$1,
2152
- AjunaPaseo: AjunaPaseo$1,
2153
1868
  AssetHubPaseo: AssetHubPaseo$1,
2154
- BifrostPaseo: BifrostPaseo$1,
2155
- BridgeHubPaseo: BridgeHubPaseo$1,
2156
- CoretimePaseo: CoretimePaseo$1,
2157
1869
  EnergyWebXPaseo: EnergyWebXPaseo$1,
2158
1870
  HeimaPaseo: HeimaPaseo$1,
2159
1871
  HydrationPaseo: HydrationPaseo$1,
2160
1872
  NeuroWebPaseo: NeuroWebPaseo$1,
2161
1873
  PeoplePaseo: PeoplePaseo$1,
2162
- ZeitgeistPaseo: ZeitgeistPaseo$1,
2163
1874
  Polkadot: Polkadot$1,
2164
1875
  Kusama: Kusama$1,
2165
1876
  Westend: Westend$1,
@@ -3538,16 +3249,6 @@ var getChainImpl = function getChainImpl(chain, ctx) {
3538
3249
  return chains()[chain];
3539
3250
  };
3540
3251
 
3541
- var isMoonbeamWhAsset = function isMoonbeamWhAsset(location) {
3542
- return !!location && hasJunction(location, 'Parachain', getParaId('Moonbeam')) && hasJunction(location, 'PalletInstance', 110);
3543
- };
3544
- var inferFeeAsset = function inferFeeAsset(origin, destination, asset, api) {
3545
- if (origin === 'Hydration' && destination === 'Moonbeam' && isMoonbeamWhAsset(asset.location)) {
3546
- return api.findNativeAssetInfoOrThrow(destination);
3547
- }
3548
- return undefined;
3549
- };
3550
-
3551
3252
  var resolveAsset = function resolveAsset(currency, origin, destination, assetCheckEnabled, api) {
3552
3253
  if (!assetCheckEnabled) return null;
3553
3254
  var dest = !isTLocation(destination) ? destination : null;
@@ -5580,7 +5281,7 @@ var getBalance = /*#__PURE__*/function () {
5580
5281
  };
5581
5282
  }();
5582
5283
 
5583
- var ERC20_ABI$1 = [{
5284
+ var ERC20_ABI = [{
5584
5285
  type: 'function',
5585
5286
  name: 'balanceOf',
5586
5287
  stateMutability: 'view',
@@ -5625,7 +5326,7 @@ var getEthErc20Balance = /*#__PURE__*/function () {
5625
5326
  _context.n = 3;
5626
5327
  return client.readContract({
5627
5328
  address: asset.assetId,
5628
- abi: ERC20_ABI$1,
5329
+ abi: ERC20_ABI,
5629
5330
  functionName: 'balanceOf',
5630
5331
  args: [address]
5631
5332
  });
@@ -5639,47 +5340,6 @@ var getEthErc20Balance = /*#__PURE__*/function () {
5639
5340
  };
5640
5341
  }();
5641
5342
 
5642
- var ERC20_ABI = [{
5643
- type: 'function',
5644
- name: 'balanceOf',
5645
- stateMutability: 'view',
5646
- inputs: [{
5647
- name: 'account',
5648
- type: 'address'
5649
- }],
5650
- outputs: [{
5651
- name: '',
5652
- type: 'uint256'
5653
- }]
5654
- }];
5655
- var getMoonbeamErc20Balance = /*#__PURE__*/function () {
5656
- var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(chain, assetId, address) {
5657
- var client, tokenAddress;
5658
- return _regenerator().w(function (_context) {
5659
- while (1) switch (_context.n) {
5660
- case 0:
5661
- client = createPublicClient({
5662
- chain: chain === 'Moonbeam' ? moonbeam : moonriver,
5663
- transport: http(chain === 'Moonbeam' ? 'https://rpc.api.moonbeam.network/' : 'https://rpc.api.moonriver.moonbeam.network')
5664
- });
5665
- tokenAddress = assetId.startsWith('0x') ? assetId : formatAssetIdToERC20(assetId);
5666
- _context.n = 1;
5667
- return client.readContract({
5668
- address: tokenAddress,
5669
- abi: ERC20_ABI,
5670
- functionName: 'balanceOf',
5671
- args: [address]
5672
- });
5673
- case 1:
5674
- return _context.a(2, _context.v);
5675
- }
5676
- }, _callee);
5677
- }));
5678
- return function getMoonbeamErc20Balance(_x, _x2, _x3) {
5679
- return _ref.apply(this, arguments);
5680
- };
5681
- }();
5682
-
5683
5343
  var isSufficientOrigin = /*#__PURE__*/function () {
5684
5344
  var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(api, origin, destination, sender, feeNative, asset, feeAsset) {
5685
5345
  var edNative, balanceNative, isNativeAssetToOrigin, isNativeAssetToDest, isSufficientNative, balanceAsset, edAsset, isSufficientAsset;
@@ -6153,7 +5813,7 @@ var addEthereumBridgeFees = /*#__PURE__*/function () {
6153
5813
 
6154
5814
  var dryRunInternal = /*#__PURE__*/function () {
6155
5815
  var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(options) {
6156
- 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;
6157
5817
  return _regenerator().w(function (_context2) {
6158
5818
  while (1) switch (_context2.n) {
6159
5819
  case 0:
@@ -6219,12 +5879,11 @@ var dryRunInternal = /*#__PURE__*/function () {
6219
5879
  initialForwardedXcms = originDryModified.forwardedXcms, initialDestParaId = originDryModified.destParaId;
6220
5880
  processHop = /*#__PURE__*/function () {
6221
5881
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(params) {
6222
- var _inferFeeAsset;
6223
- var hopApi, currentChain, currentOrigin, currentAsset, forwardedXcms, hasPassedExchange, isDestination, resolvedHopAsset, hopAsset, hopDryRun;
5882
+ var hopApi, currentChain, currentOrigin, currentAsset, forwardedXcms, hasPassedExchange, resolvedHopAsset, hopDryRun;
6224
5883
  return _regenerator().w(function (_context) {
6225
5884
  while (1) switch (_context.n) {
6226
5885
  case 0:
6227
- hopApi = params.api, currentChain = params.currentChain, currentOrigin = params.currentOrigin, currentAsset = params.currentAsset, forwardedXcms = params.forwardedXcms, hasPassedExchange = params.hasPassedExchange, isDestination = params.isDestination;
5886
+ hopApi = params.api, currentChain = params.currentChain, currentOrigin = params.currentOrigin, currentAsset = params.currentAsset, forwardedXcms = params.forwardedXcms, hasPassedExchange = params.hasPassedExchange;
6228
5887
  resolvedHopAsset = resolveHopAsset({
6229
5888
  api: api,
6230
5889
  tx: tx,
@@ -6237,7 +5896,6 @@ var dryRunInternal = /*#__PURE__*/function () {
6237
5896
  swapConfig: swapConfig,
6238
5897
  hasPassedExchange: hasPassedExchange
6239
5898
  });
6240
- hopAsset = isDestination ? (_inferFeeAsset = inferFeeAsset(origin, destination, asset, api)) !== null && _inferFeeAsset !== void 0 ? _inferFeeAsset : resolvedHopAsset : resolvedHopAsset;
6241
5899
  if (api.hasDryRunSupport(currentChain)) {
6242
5900
  _context.n = 1;
6243
5901
  break;
@@ -6257,7 +5915,7 @@ var dryRunInternal = /*#__PURE__*/function () {
6257
5915
  xcm: forwardedXcms[1][0],
6258
5916
  chain: currentChain,
6259
5917
  origin: currentOrigin,
6260
- asset: hopAsset,
5918
+ asset: resolvedHopAsset,
6261
5919
  version: resolvedVersion,
6262
5920
  feeAsset: resolvedFeeAsset,
6263
5921
  originFee: originDryModified.fee,
@@ -6266,7 +5924,7 @@ var dryRunInternal = /*#__PURE__*/function () {
6266
5924
  case 2:
6267
5925
  hopDryRun = _context.v;
6268
5926
  return _context.a(2, _objectSpread2(_objectSpread2({}, hopDryRun), {}, {
6269
- asset: hopAsset
5927
+ asset: resolvedHopAsset
6270
5928
  }));
6271
5929
  }
6272
5930
  }, _callee);
@@ -6298,8 +5956,9 @@ var dryRunInternal = /*#__PURE__*/function () {
6298
5956
  case 6:
6299
5957
  traversalResult = _context2.v;
6300
5958
  // Process Ethereum bridge fees
6301
- bridgeHubChain = "BridgeHub".concat(api.getRelayChainOf(origin));
6302
- assetHubChain = "AssetHub".concat(api.getRelayChainOf(origin));
5959
+ relayChain = api.getRelayChainOf(origin);
5960
+ bridgeHubChain = relayChain === 'Paseo' ? undefined : "BridgeHub".concat(relayChain);
5961
+ assetHubChain = "AssetHub".concat(relayChain);
6303
5962
  bridgeHubHop = traversalResult.hops.find(function (hop) {
6304
5963
  return hop.chain === bridgeHubChain;
6305
5964
  }); // For Mythos → Ethereum, we skip additional Ethereum bridge fees (aligns with getXcmFeeInternal)
@@ -6985,7 +6644,7 @@ var getOriginXcmFee = /*#__PURE__*/function () {
6985
6644
 
6986
6645
  var getXcmFeeOnce = /*#__PURE__*/function () {
6987
6646
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(_ref) {
6988
- 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, _inferFeeAsset2, _destApi, destFallback, bridgeHubChain, assetHubChain, bridgeHubHop, processedBridgeHub, _bridgeHubChain, bridgeHubHopIndex, convertToFeeDetail, result, dryRunError, _t, _t2, _t3, _t4;
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;
6989
6648
  return _regenerator().w(function (_context2) {
6990
6649
  while (1) switch (_context2.p = _context2.n) {
6991
6650
  case 0:
@@ -7115,12 +6774,11 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
7115
6774
  case 10:
7116
6775
  processHop = /*#__PURE__*/function () {
7117
6776
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(params) {
7118
- var _inferFeeAsset;
7119
- var hopApi, currentChain, currentOrigin, currentAsset, forwardedXcms, hasPassedExchange, isDestination, resolvedHopAsset, hopAsset, hopResult;
6777
+ var hopApi, currentChain, currentOrigin, currentAsset, forwardedXcms, hasPassedExchange, resolvedHopAsset, hopResult;
7120
6778
  return _regenerator().w(function (_context) {
7121
6779
  while (1) switch (_context.n) {
7122
6780
  case 0:
7123
- hopApi = params.api, currentChain = params.currentChain, currentOrigin = params.currentOrigin, currentAsset = params.currentAsset, forwardedXcms = params.forwardedXcms, hasPassedExchange = params.hasPassedExchange, isDestination = params.isDestination;
6781
+ hopApi = params.api, currentChain = params.currentChain, currentOrigin = params.currentOrigin, currentAsset = params.currentAsset, forwardedXcms = params.forwardedXcms, hasPassedExchange = params.hasPassedExchange;
7124
6782
  resolvedHopAsset = resolveHopAsset({
7125
6783
  api: api,
7126
6784
  tx: tx,
@@ -7133,7 +6791,6 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
7133
6791
  swapConfig: swapConfig,
7134
6792
  hasPassedExchange: hasPassedExchange
7135
6793
  });
7136
- hopAsset = isDestination ? (_inferFeeAsset = inferFeeAsset(origin, destination, asset, api)) !== null && _inferFeeAsset !== void 0 ? _inferFeeAsset : resolvedHopAsset : resolvedHopAsset;
7137
6794
  _context.n = 1;
7138
6795
  return getDestXcmFee({
7139
6796
  api: hopApi,
@@ -7143,7 +6800,7 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
7143
6800
  destination: currentChain,
7144
6801
  currency: currency,
7145
6802
  asset: asset,
7146
- currentAsset: _objectSpread2(_objectSpread2({}, hopAsset), {}, {
6803
+ currentAsset: _objectSpread2(_objectSpread2({}, resolvedHopAsset), {}, {
7147
6804
  amount: asset.amount
7148
6805
  }),
7149
6806
  sender: sender,
@@ -7220,7 +6877,7 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
7220
6877
  destination: destination,
7221
6878
  currency: currency,
7222
6879
  asset: asset,
7223
- currentAsset: _objectSpread2(_objectSpread2({}, (_inferFeeAsset2 = inferFeeAsset(origin, destination, asset, api)) !== null && _inferFeeAsset2 !== void 0 ? _inferFeeAsset2 : asset), {}, {
6880
+ currentAsset: _objectSpread2(_objectSpread2({}, asset), {}, {
7224
6881
  amount: asset.amount
7225
6882
  }),
7226
6883
  sender: sender,
@@ -7247,8 +6904,9 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
7247
6904
  destAsset = api.findNativeAssetInfoOrThrow(destination);
7248
6905
  case 16:
7249
6906
  // Process Ethereum bridge fees
7250
- bridgeHubChain = "BridgeHub".concat(api.getRelayChainOf(origin));
7251
- assetHubChain = "AssetHub".concat(api.getRelayChainOf(origin));
6907
+ relayChain = api.getRelayChainOf(origin);
6908
+ bridgeHubChain = relayChain === 'Paseo' ? undefined : "BridgeHub".concat(relayChain);
6909
+ assetHubChain = "AssetHub".concat(relayChain);
7252
6910
  bridgeHubHop = traversalResult.hops.find(function (hop) {
7253
6911
  return hop.chain === bridgeHubChain;
7254
6912
  });
@@ -7268,9 +6926,8 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
7268
6926
  processedBridgeHub = _t4;
7269
6927
  // Update bridge hub fee in hops if needed
7270
6928
  if (processedBridgeHub && bridgeHubHop && processedBridgeHub.fee !== bridgeHubHop.result.fee) {
7271
- _bridgeHubChain = "BridgeHub".concat(api.getRelayChainOf(origin));
7272
6929
  bridgeHubHopIndex = traversalResult.hops.findIndex(function (hop) {
7273
- return hop.chain === _bridgeHubChain;
6930
+ return hop.chain === bridgeHubChain;
7274
6931
  });
7275
6932
  if (bridgeHubHopIndex !== -1) {
7276
6933
  traversalResult.hops[bridgeHubHopIndex].result = _objectSpread2(_objectSpread2({}, traversalResult.hops[bridgeHubHopIndex].result), {}, {
@@ -10879,15 +10536,6 @@ var Ajuna = /*#__PURE__*/function (_SubstrateChain) {
10879
10536
  }]);
10880
10537
  }(SubstrateChain);
10881
10538
 
10882
- var AjunaPaseo = /*#__PURE__*/function (_Ajuna) {
10883
- function AjunaPaseo() {
10884
- _classCallCheck(this, AjunaPaseo);
10885
- return _callSuper(this, AjunaPaseo, ['AjunaPaseo', 'Ajuna(paseo)', 'Paseo', Version.V5]);
10886
- }
10887
- _inherits(AjunaPaseo, _Ajuna);
10888
- return _createClass(AjunaPaseo);
10889
- }(Ajuna);
10890
-
10891
10539
  var AssetHubKusama = /*#__PURE__*/function (_SubstrateChain) {
10892
10540
  function AssetHubKusama() {
10893
10541
  _classCallCheck(this, AssetHubKusama);
@@ -11157,27 +10805,20 @@ var Hydration = /*#__PURE__*/function (_SubstrateChain) {
11157
10805
  key: "transferPolkadotXCM",
11158
10806
  value: function () {
11159
10807
  var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
11160
- var destination, asset, api, _t;
10808
+ var _t;
11161
10809
  return _regenerator().w(function (_context) {
11162
10810
  while (1) switch (_context.n) {
11163
10811
  case 0:
11164
- destination = input.destination, asset = input.assetInfo, api = input.api;
11165
10812
  if (!this.shouldUseExecuteTransfer(input)) {
11166
10813
  _context.n = 2;
11167
10814
  break;
11168
10815
  }
11169
- _t = api;
10816
+ _t = input.api;
11170
10817
  _context.n = 1;
11171
10818
  return handleExecuteTransfer(input);
11172
10819
  case 1:
11173
10820
  return _context.a(2, _t.deserializeExtrinsics.call(_t, _context.v));
11174
10821
  case 2:
11175
- if (!(isMoonbeamWhAsset(asset.location) && destination === 'Moonbeam')) {
11176
- _context.n = 3;
11177
- break;
11178
- }
11179
- return _context.a(2, this.transferMoonbeamWhAsset(input));
11180
- case 3:
11181
10822
  return _context.a(2, transferPolkadotXcm(input));
11182
10823
  }
11183
10824
  }, _callee, this);
@@ -11187,22 +10828,6 @@ var Hydration = /*#__PURE__*/function (_SubstrateChain) {
11187
10828
  }
11188
10829
  return transferPolkadotXCM;
11189
10830
  }()
11190
- }, {
11191
- key: "transferMoonbeamWhAsset",
11192
- value: function transferMoonbeamWhAsset(input) {
11193
- var api = input.api,
11194
- assetInfo = input.assetInfo,
11195
- version = input.version;
11196
- var glmr = api.findAssetInfoOrThrow(this.chain, {
11197
- symbol: getNativeAssetSymbol('Moonbeam')
11198
- });
11199
- var FEE_AMOUNT = 150000000000000000n; // 0.15 GLMR
11200
- return transferPolkadotXcm(_objectSpread2(_objectSpread2({}, input), {}, {
11201
- overriddenAsset: [_objectSpread2(_objectSpread2({}, createAsset(version, FEE_AMOUNT, glmr.location)), {}, {
11202
- isFeeAsset: true
11203
- }), createAsset(version, assetInfo.amount, assetInfo.location)]
11204
- }));
11205
- }
11206
10831
  }, {
11207
10832
  key: "transferLocalNativeAsset",
11208
10833
  value: function transferLocalNativeAsset(options) {
@@ -11375,15 +11000,6 @@ var BifrostKusama = /*#__PURE__*/function (_BifrostPolkadot) {
11375
11000
  return _createClass(BifrostKusama);
11376
11001
  }(BifrostPolkadot);
11377
11002
 
11378
- var BifrostPaseo = /*#__PURE__*/function (_BifrostPolkadot) {
11379
- function BifrostPaseo() {
11380
- _classCallCheck(this, BifrostPaseo);
11381
- return _callSuper(this, BifrostPaseo, ['BifrostPaseo', 'Bifrost(Paseo)', 'Paseo', Version.V5]);
11382
- }
11383
- _inherits(BifrostPaseo, _BifrostPolkadot);
11384
- return _createClass(BifrostPaseo);
11385
- }(BifrostPolkadot);
11386
-
11387
11003
  var BridgeHubKusama = /*#__PURE__*/function (_SubstrateChain) {
11388
11004
  function BridgeHubKusama() {
11389
11005
  _classCallCheck(this, BridgeHubKusama);
@@ -11425,15 +11041,6 @@ var BridgeHubPolkadot = /*#__PURE__*/function (_SubstrateChain) {
11425
11041
  }]);
11426
11042
  }(SubstrateChain);
11427
11043
 
11428
- var BridgeHubPaseo = /*#__PURE__*/function (_BridgeHubPolkadot) {
11429
- function BridgeHubPaseo() {
11430
- _classCallCheck(this, BridgeHubPaseo);
11431
- return _callSuper(this, BridgeHubPaseo, ['BridgeHubPaseo', 'PaseoBridgeHub', 'Paseo', Version.V5]);
11432
- }
11433
- _inherits(BridgeHubPaseo, _BridgeHubPolkadot);
11434
- return _createClass(BridgeHubPaseo);
11435
- }(BridgeHubPolkadot);
11436
-
11437
11044
  var BridgeHubWestend = /*#__PURE__*/function (_BridgeHubPolkadot) {
11438
11045
  function BridgeHubWestend() {
11439
11046
  _classCallCheck(this, BridgeHubWestend);
@@ -11687,20 +11294,11 @@ var CoretimePolkadot = /*#__PURE__*/function (_SubstrateChain) {
11687
11294
  }, {
11688
11295
  key: "canReceiveFrom",
11689
11296
  value: function canReceiveFrom(origin) {
11690
- return origin !== 'Hydration' && origin !== 'Moonbeam';
11297
+ return origin !== 'Hydration';
11691
11298
  }
11692
11299
  }]);
11693
11300
  }(SubstrateChain);
11694
11301
 
11695
- var CoretimePaseo = /*#__PURE__*/function (_CoretimePolkadot) {
11696
- function CoretimePaseo() {
11697
- _classCallCheck(this, CoretimePaseo);
11698
- return _callSuper(this, CoretimePaseo, ['CoretimePaseo', 'PaseoCoretime', 'Paseo', Version.V5]);
11699
- }
11700
- _inherits(CoretimePaseo, _CoretimePolkadot);
11701
- return _createClass(CoretimePaseo);
11702
- }(CoretimePolkadot);
11703
-
11704
11302
  var CoretimeWestend = /*#__PURE__*/function (_CoretimePolkadot) {
11705
11303
  function CoretimeWestend() {
11706
11304
  _classCallCheck(this, CoretimeWestend);
@@ -12058,72 +11656,6 @@ var HydrationPaseo = /*#__PURE__*/function (_Hydration) {
12058
11656
  return _createClass(HydrationPaseo);
12059
11657
  }(Hydration);
12060
11658
 
12061
- var Interlay = /*#__PURE__*/function (_SubstrateChain) {
12062
- function Interlay() {
12063
- _classCallCheck(this, Interlay);
12064
- return _callSuper(this, Interlay, ['Interlay', 'interlay', 'Polkadot', Version.V3]);
12065
- }
12066
- _inherits(Interlay, _SubstrateChain);
12067
- return _createClass(Interlay, [{
12068
- key: "getCustomCurrencyId",
12069
- value: function getCustomCurrencyId(_api, asset) {
12070
- return asset.isNative ? {
12071
- Token: asset.symbol
12072
- } : {
12073
- ForeignAsset: Number(asset.assetId)
12074
- };
12075
- }
12076
- }, {
12077
- key: "transferXTokens",
12078
- value: function transferXTokens$1(input) {
12079
- var asset = input.asset,
12080
- api = input.api;
12081
- var currencySelection = this.getCustomCurrencyId(api, asset);
12082
- return transferXTokens(input, currencySelection);
12083
- }
12084
- }, {
12085
- key: "transferLocalNativeAsset",
12086
- value: function transferLocalNativeAsset(options) {
12087
- return Promise.resolve(this.transferLocalNonNativeAsset(options));
12088
- }
12089
- }, {
12090
- key: "transferLocalNonNativeAsset",
12091
- value: function transferLocalNonNativeAsset(options) {
12092
- var api = options.api,
12093
- asset = options.assetInfo,
12094
- recipient = options.recipient,
12095
- isAmountAll = options.isAmountAll,
12096
- keepAlive = options.keepAlive;
12097
- var currencyId = this.getCustomCurrencyId(api, asset);
12098
- if (isAmountAll) {
12099
- return api.deserializeExtrinsics({
12100
- module: 'Tokens',
12101
- method: 'transfer_all',
12102
- params: {
12103
- dest: recipient,
12104
- currency_id: currencyId,
12105
- keep_alive: keepAlive
12106
- }
12107
- });
12108
- }
12109
- return api.deserializeExtrinsics({
12110
- module: 'Tokens',
12111
- method: keepAlive ? 'transfer_keep_alive' : 'transfer',
12112
- params: {
12113
- dest: recipient,
12114
- currency_id: currencyId,
12115
- amount: asset.amount
12116
- }
12117
- });
12118
- }
12119
- }, {
12120
- key: "getBalanceNative",
12121
- value: function getBalanceNative(api, address, asset) {
12122
- return this.getBalanceForeign(api, address, asset);
12123
- }
12124
- }]);
12125
- }(SubstrateChain);
12126
-
12127
11659
  var Jamton = /*#__PURE__*/function (_SubstrateChain) {
12128
11660
  function Jamton() {
12129
11661
  _classCallCheck(this, Jamton);
@@ -12177,72 +11709,6 @@ var Karura = /*#__PURE__*/function (_Acala) {
12177
11709
  return _createClass(Karura);
12178
11710
  }(Acala);
12179
11711
 
12180
- var Kintsugi = /*#__PURE__*/function (_SubstrateChain) {
12181
- function Kintsugi() {
12182
- _classCallCheck(this, Kintsugi);
12183
- return _callSuper(this, Kintsugi, ['Kintsugi', 'kintsugi', 'Kusama', Version.V3]);
12184
- }
12185
- _inherits(Kintsugi, _SubstrateChain);
12186
- return _createClass(Kintsugi, [{
12187
- key: "getCustomCurrencyId",
12188
- value: function getCustomCurrencyId(_api, asset) {
12189
- return asset.isNative ? {
12190
- Token: asset.symbol
12191
- } : {
12192
- ForeignAsset: Number(asset.assetId)
12193
- };
12194
- }
12195
- }, {
12196
- key: "transferXTokens",
12197
- value: function transferXTokens$1(input) {
12198
- var asset = input.asset,
12199
- api = input.api;
12200
- var currencySelection = this.getCustomCurrencyId(api, asset);
12201
- return transferXTokens(input, currencySelection);
12202
- }
12203
- }, {
12204
- key: "transferLocalNativeAsset",
12205
- value: function transferLocalNativeAsset(options) {
12206
- return Promise.resolve(this.transferLocalNonNativeAsset(options));
12207
- }
12208
- }, {
12209
- key: "transferLocalNonNativeAsset",
12210
- value: function transferLocalNonNativeAsset(options) {
12211
- var api = options.api,
12212
- asset = options.assetInfo,
12213
- recipient = options.recipient,
12214
- isAmountAll = options.isAmountAll,
12215
- keepAlive = options.keepAlive;
12216
- var currencyId = this.getCustomCurrencyId(api, asset);
12217
- if (isAmountAll) {
12218
- return api.deserializeExtrinsics({
12219
- module: 'Tokens',
12220
- method: 'transfer_all',
12221
- params: {
12222
- dest: recipient,
12223
- currency_id: currencyId,
12224
- keep_alive: keepAlive
12225
- }
12226
- });
12227
- }
12228
- return api.deserializeExtrinsics({
12229
- module: 'Tokens',
12230
- method: keepAlive ? 'transfer_keep_alive' : 'transfer',
12231
- params: {
12232
- dest: recipient,
12233
- currency_id: currencyId,
12234
- amount: asset.amount
12235
- }
12236
- });
12237
- }
12238
- }, {
12239
- key: "getBalanceNative",
12240
- value: function getBalanceNative(api, address, asset) {
12241
- return this.getBalanceForeign(api, address, asset);
12242
- }
12243
- }]);
12244
- }(SubstrateChain);
12245
-
12246
11712
  var Relaychain = /*#__PURE__*/function (_SubstrateChain) {
12247
11713
  function Relaychain() {
12248
11714
  _classCallCheck(this, Relaychain);
@@ -12279,54 +11745,6 @@ var Kusama = /*#__PURE__*/function (_Polkadot) {
12279
11745
  return _createClass(Kusama);
12280
11746
  }(Polkadot);
12281
11747
 
12282
- var Moonbeam = /*#__PURE__*/function (_SubstrateChain) {
12283
- function Moonbeam() {
12284
- var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Moonbeam';
12285
- var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'moonbeam';
12286
- var ecosystem = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Polkadot';
12287
- var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.V5;
12288
- _classCallCheck(this, Moonbeam);
12289
- return _callSuper(this, Moonbeam, [chain, info, ecosystem, version]);
12290
- }
12291
- _inherits(Moonbeam, _SubstrateChain);
12292
- return _createClass(Moonbeam, [{
12293
- key: "transferPolkadotXCM",
12294
- value: function transferPolkadotXCM(options) {
12295
- return transferPolkadotXcm(options);
12296
- }
12297
- }, {
12298
- key: "transferLocalNonNativeAsset",
12299
- value: function transferLocalNonNativeAsset(_options) {
12300
- throw new ScenarioNotSupportedError("".concat(this.chain, " local transfers are supported only from EVM Builder"));
12301
- }
12302
- }, {
12303
- key: "getBalanceForeign",
12304
- value: function getBalanceForeign(_api, address, asset) {
12305
- assertHasId(asset);
12306
- return getMoonbeamErc20Balance(this.chain, asset.assetId, address);
12307
- }
12308
- }]);
12309
- }(SubstrateChain);
12310
-
12311
- var Moonriver = /*#__PURE__*/function (_SubstrateChain) {
12312
- function Moonriver() {
12313
- _classCallCheck(this, Moonriver);
12314
- return _callSuper(this, Moonriver, ['Moonriver', 'moonriver', 'Kusama', Version.V5]);
12315
- }
12316
- _inherits(Moonriver, _SubstrateChain);
12317
- return _createClass(Moonriver, [{
12318
- key: "transferPolkadotXCM",
12319
- value: function transferPolkadotXCM(options) {
12320
- return transferPolkadotXcm(options);
12321
- }
12322
- }, {
12323
- key: "transferLocalNonNativeAsset",
12324
- value: function transferLocalNonNativeAsset(options) {
12325
- return getSubstrateChainImpl('Moonbeam').transferLocalNonNativeAsset(options);
12326
- }
12327
- }]);
12328
- }(SubstrateChain);
12329
-
12330
11748
  var createTypeAndThenTransfer = /*#__PURE__*/function () {
12331
11749
  var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(options, chain, version) {
12332
11750
  var api, asset, sender, recipient, ethAsset, messageId, nativeMythAmount, hopDestination;
@@ -12640,19 +12058,29 @@ var Pendulum = /*#__PURE__*/function (_SubstrateChain) {
12640
12058
  }]);
12641
12059
  }(SubstrateChain);
12642
12060
 
12643
- var Penpal = /*#__PURE__*/function (_Moonbeam) {
12061
+ var Penpal = /*#__PURE__*/function (_SubstrateChain) {
12644
12062
  function Penpal() {
12645
12063
  _classCallCheck(this, Penpal);
12646
12064
  return _callSuper(this, Penpal, ['Penpal', 'westendPenpal', 'Westend', Version.V4]);
12647
12065
  }
12648
- _inherits(Penpal, _Moonbeam);
12066
+ _inherits(Penpal, _SubstrateChain);
12649
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
+ }, {
12650
12078
  key: "getBalanceForeign",
12651
12079
  value: function getBalanceForeign(api, address, asset) {
12652
12080
  return getPalletInstance('ForeignAssets').getBalance(api, address, asset);
12653
12081
  }
12654
12082
  }]);
12655
- }(Moonbeam);
12083
+ }(SubstrateChain);
12656
12084
 
12657
12085
  var PeopleKusama = /*#__PURE__*/function (_SubstrateChain) {
12658
12086
  function PeopleKusama() {
@@ -12716,35 +12144,6 @@ var PeopleWestend = /*#__PURE__*/function (_PeoplePolkadot) {
12716
12144
  return _createClass(PeopleWestend);
12717
12145
  }(PeoplePolkadot);
12718
12146
 
12719
- var Quartz = /*#__PURE__*/function (_SubstrateChain) {
12720
- function Quartz() {
12721
- _classCallCheck(this, Quartz);
12722
- return _callSuper(this, Quartz, ['Quartz', 'quartz', 'Kusama', Version.V5]);
12723
- }
12724
- _inherits(Quartz, _SubstrateChain);
12725
- return _createClass(Quartz, [{
12726
- key: "transferPolkadotXCM",
12727
- value: function transferPolkadotXCM(input) {
12728
- return transferPolkadotXcm(input);
12729
- }
12730
- }, {
12731
- key: "transferLocalNonNativeAsset",
12732
- value: function transferLocalNonNativeAsset(options) {
12733
- return getSubstrateChainImpl('Unique').transferLocalNonNativeAsset(options);
12734
- }
12735
- }, {
12736
- key: "getBalanceForeign",
12737
- value: function getBalanceForeign(api, address, asset) {
12738
- return getSubstrateChainImpl('Unique').getBalanceForeign(api, address, asset);
12739
- }
12740
- }, {
12741
- key: "isSendingTempDisabled",
12742
- value: function isSendingTempDisabled() {
12743
- return true;
12744
- }
12745
- }]);
12746
- }(SubstrateChain);
12747
-
12748
12147
  var RobonomicsPolkadot = /*#__PURE__*/function (_SubstrateChain) {
12749
12148
  function RobonomicsPolkadot() {
12750
12149
  _classCallCheck(this, RobonomicsPolkadot);
@@ -12900,67 +12299,6 @@ var Xode = /*#__PURE__*/function (_SubstrateChain) {
12900
12299
  }]);
12901
12300
  }(SubstrateChain);
12902
12301
 
12903
- var Zeitgeist = /*#__PURE__*/function (_SubstrateChain) {
12904
- function Zeitgeist() {
12905
- var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Zeitgeist';
12906
- var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'zeitgeist';
12907
- var ecosystem = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Polkadot';
12908
- var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.V4;
12909
- _classCallCheck(this, Zeitgeist);
12910
- return _callSuper(this, Zeitgeist, [chain, info, ecosystem, version]);
12911
- }
12912
- _inherits(Zeitgeist, _SubstrateChain);
12913
- return _createClass(Zeitgeist, [{
12914
- key: "getCustomCurrencyId",
12915
- value: function getCustomCurrencyId(_api, asset) {
12916
- if (asset.isNative) return 'Ztg';
12917
- assertHasId(asset);
12918
- return {
12919
- ForeignAsset: Number(asset.assetId)
12920
- };
12921
- }
12922
- }, {
12923
- key: "transferPolkadotXCM",
12924
- value: function transferPolkadotXCM(input) {
12925
- return transferPolkadotXcm(input);
12926
- }
12927
- }, {
12928
- key: "canReceiveFrom",
12929
- value: function canReceiveFrom(origin) {
12930
- return origin !== 'Astar';
12931
- }
12932
- }, {
12933
- key: "transferLocalNonNativeAsset",
12934
- value: function transferLocalNonNativeAsset(options) {
12935
- var api = options.api,
12936
- asset = options.assetInfo,
12937
- recipient = options.recipient;
12938
- assertHasId(asset);
12939
- var amount = getLocalTransferAmount(options);
12940
- return api.deserializeExtrinsics({
12941
- module: 'AssetManager',
12942
- method: 'transfer',
12943
- params: {
12944
- dest: {
12945
- Id: recipient
12946
- },
12947
- currency_id: this.getCustomCurrencyId(api, asset),
12948
- amount: amount
12949
- }
12950
- });
12951
- }
12952
- }]);
12953
- }(SubstrateChain);
12954
-
12955
- var ZeitgeistPaseo = /*#__PURE__*/function (_Zeitgeist) {
12956
- function ZeitgeistPaseo() {
12957
- _classCallCheck(this, ZeitgeistPaseo);
12958
- return _callSuper(this, ZeitgeistPaseo, ['ZeitgeistPaseo', 'ZeitgeistBatteryStation', 'Paseo', Version.V4]);
12959
- }
12960
- _inherits(ZeitgeistPaseo, _Zeitgeist);
12961
- return _createClass(ZeitgeistPaseo);
12962
- }(Zeitgeist);
12963
-
12964
12302
  var chains = function chains() {
12965
12303
  return {
12966
12304
  // Polkadot chains
@@ -12977,10 +12315,8 @@ var chains = function chains() {
12977
12315
  Darwinia: new Darwinia(),
12978
12316
  EnergyWebX: new EnergyWebX(),
12979
12317
  Hydration: new Hydration(),
12980
- Interlay: new Interlay(),
12981
12318
  Heima: new Heima(),
12982
12319
  Jamton: new Jamton(),
12983
- Moonbeam: new Moonbeam(),
12984
12320
  CoretimePolkadot: new CoretimePolkadot(),
12985
12321
  PeoplePolkadot: new PeoplePolkadot(),
12986
12322
  RobonomicsPolkadot: new RobonomicsPolkadot(),
@@ -13001,12 +12337,8 @@ var chains = function chains() {
13001
12337
  CrustShadow: new CrustShadow(),
13002
12338
  Crab: new Crab(),
13003
12339
  Karura: new Karura(),
13004
- Kintsugi: new Kintsugi(),
13005
- Moonriver: new Moonriver(),
13006
- Quartz: new Quartz(),
13007
12340
  PeopleKusama: new PeopleKusama(),
13008
12341
  Shiden: new Shiden(),
13009
- Zeitgeist: new Zeitgeist(),
13010
12342
  // Westend chains
13011
12343
  Westend: new Westend(),
13012
12344
  AssetHubWestend: new AssetHubWestend(),
@@ -13018,16 +12350,11 @@ var chains = function chains() {
13018
12350
  // Paseo chains
13019
12351
  Paseo: new Paseo(),
13020
12352
  AssetHubPaseo: new AssetHubPaseo(),
13021
- BridgeHubPaseo: new BridgeHubPaseo(),
13022
- CoretimePaseo: new CoretimePaseo(),
13023
12353
  EnergyWebXPaseo: new EnergyWebXPaseo(),
13024
12354
  PeoplePaseo: new PeoplePaseo(),
13025
- AjunaPaseo: new AjunaPaseo(),
13026
- BifrostPaseo: new BifrostPaseo(),
13027
12355
  HeimaPaseo: new HeimaPaseo(),
13028
12356
  HydrationPaseo: new HydrationPaseo(),
13029
12357
  NeuroWebPaseo: new NeuroWebPaseo(),
13030
- ZeitgeistPaseo: new ZeitgeistPaseo(),
13031
12358
  // External chains
13032
12359
  Ethereum: new Ethereum(),
13033
12360
  EthereumTestnet: new EthereumTestnet()
@@ -14419,4 +13746,4 @@ var createClientCache = function createClientCache(maxSize, pingClient, onEvicti
14419
13746
  };
14420
13747
  };
14421
13748
 
14422
- 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, getMoonbeamErc20Balance, 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 };
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 };