@paraspell/sdk-core 14.1.0-rc.1 → 14.1.1
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 +37 -113
- package/dist/index.mjs +167 -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
|
|
@@ -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,
|
|
@@ -3055,7 +2766,7 @@ var SubstrateChain = /*#__PURE__*/function (_Chain) {
|
|
|
3055
2766
|
key: "transfer",
|
|
3056
2767
|
value: function () {
|
|
3057
2768
|
var _transfer = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(transferOptions) {
|
|
3058
|
-
var api, asset, currency, feeAsset, feeCurrency, recipient, destination, paraIdTo, overriddenAsset, version, sender, ahAddress, pallet, method, keepAlive, transactOptions, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, mythAsset, isMythAsset, assetNeedsTypeThen, supportsTypeThen, isSubBridge, useTypeAndThen, options, promise, isAHOrigin, isAHDest, isExternalAsset, isEthDest, isExternalAssetViaAh, isExternalAssetToAh, call, input, _t;
|
|
2769
|
+
var api, asset, currency, feeAsset, feeCurrency, recipient, destination, paraIdTo, overriddenAsset, version, sender, ahAddress, pallet, method, keepAlive, transactOptions, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, mythAsset, isMythAsset, assetNeedsTypeThen, shouldUseReserveTransfer, supportsTypeThen, isSubBridge, useTypeAndThen, options, promise, isAHOrigin, isAHDest, isExternalAsset, isEthDest, isExternalAssetViaAh, isExternalAssetToAh, call, input, _t;
|
|
3059
2770
|
return _regenerator().w(function (_context) {
|
|
3060
2771
|
while (1) switch (_context.n) {
|
|
3061
2772
|
case 0:
|
|
@@ -3084,18 +2795,19 @@ var SubstrateChain = /*#__PURE__*/function (_Chain) {
|
|
|
3084
2795
|
mythAsset = api.findNativeAssetInfoOrThrow('Mythos');
|
|
3085
2796
|
isMythAsset = isAssetEqual(mythAsset, asset);
|
|
3086
2797
|
assetNeedsTypeThen = isRelayAsset || isMythAsset;
|
|
2798
|
+
shouldUseReserveTransfer = isRelayAsset && this.shouldUseReserveTransfer();
|
|
3087
2799
|
_context.n = 3;
|
|
3088
2800
|
return api.hasMethod(api.hasPallet(this.chain, 'XcmPallet') ? 'XcmPallet' : 'PolkadotXcm', 'transfer_assets_using_type_and_then');
|
|
3089
2801
|
case 3:
|
|
3090
2802
|
supportsTypeThen = _context.v;
|
|
3091
|
-
|
|
2803
|
+
isSubBridge = !isTLocation(destination) && isSubstrateBridge(this.chain, destination);
|
|
2804
|
+
if (!(assetNeedsTypeThen && !supportsTypeThen && (!shouldUseReserveTransfer || isSubBridge))) {
|
|
3092
2805
|
_context.n = 4;
|
|
3093
2806
|
break;
|
|
3094
2807
|
}
|
|
3095
2808
|
throw new TypeAndThenUnavailableError('Relaychain assets require the type-and-then method which is not supported by this chain.');
|
|
3096
2809
|
case 4:
|
|
3097
|
-
|
|
3098
|
-
useTypeAndThen = assetNeedsTypeThen && supportsTypeThen && destChain && !isExternalChain(destChain) && !feeAsset && (!isTrustedChain(this.chain) || !isTrustedChain(destChain)) || isSubBridge;
|
|
2810
|
+
useTypeAndThen = !shouldUseReserveTransfer && assetNeedsTypeThen && supportsTypeThen && destChain && !isExternalChain(destChain) && !feeAsset && (!isTrustedChain(this.chain) || !isTrustedChain(destChain)) || isSubBridge;
|
|
3099
2811
|
if (!(supportsPolkadotXCM(this) || useTypeAndThen)) {
|
|
3100
2812
|
_context.n = 13;
|
|
3101
2813
|
break;
|
|
@@ -3232,7 +2944,7 @@ var SubstrateChain = /*#__PURE__*/function (_Chain) {
|
|
|
3232
2944
|
value: function throwIfTempDisabled(options, destChain) {
|
|
3233
2945
|
var isSendingDisabled = this.isSendingTempDisabled(options);
|
|
3234
2946
|
if (isSendingDisabled) {
|
|
3235
|
-
throw new FeatureTemporarilyDisabledError("Sending from ".concat(this.chain, " is temporarily disabled"));
|
|
2947
|
+
throw new FeatureTemporarilyDisabledError("Sending ".concat(options.assetInfo.symbol, " from ").concat(this.chain, " is temporarily disabled"));
|
|
3236
2948
|
}
|
|
3237
2949
|
var scenario = resolveScenario(this.chain, options.to);
|
|
3238
2950
|
var isReceivingDisabled = destChain && !isExternalChain(destChain) && getChain(destChain).isReceivingTempDisabled(scenario);
|
|
@@ -3270,6 +2982,11 @@ var SubstrateChain = /*#__PURE__*/function (_Chain) {
|
|
|
3270
2982
|
value: function shouldUseExecuteTransfer(_options) {
|
|
3271
2983
|
return false;
|
|
3272
2984
|
}
|
|
2985
|
+
}, {
|
|
2986
|
+
key: "shouldUseReserveTransfer",
|
|
2987
|
+
value: function shouldUseReserveTransfer() {
|
|
2988
|
+
return false;
|
|
2989
|
+
}
|
|
3273
2990
|
}, {
|
|
3274
2991
|
key: "createAsset",
|
|
3275
2992
|
value: function createAsset$1(api, asset, version) {
|
|
@@ -3538,16 +3255,6 @@ var getChainImpl = function getChainImpl(chain, ctx) {
|
|
|
3538
3255
|
return chains()[chain];
|
|
3539
3256
|
};
|
|
3540
3257
|
|
|
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
3258
|
var resolveAsset = function resolveAsset(currency, origin, destination, assetCheckEnabled, api) {
|
|
3552
3259
|
if (!assetCheckEnabled) return null;
|
|
3553
3260
|
var dest = !isTLocation(destination) ? destination : null;
|
|
@@ -5580,7 +5287,7 @@ var getBalance = /*#__PURE__*/function () {
|
|
|
5580
5287
|
};
|
|
5581
5288
|
}();
|
|
5582
5289
|
|
|
5583
|
-
var ERC20_ABI
|
|
5290
|
+
var ERC20_ABI = [{
|
|
5584
5291
|
type: 'function',
|
|
5585
5292
|
name: 'balanceOf',
|
|
5586
5293
|
stateMutability: 'view',
|
|
@@ -5625,7 +5332,7 @@ var getEthErc20Balance = /*#__PURE__*/function () {
|
|
|
5625
5332
|
_context.n = 3;
|
|
5626
5333
|
return client.readContract({
|
|
5627
5334
|
address: asset.assetId,
|
|
5628
|
-
abi: ERC20_ABI
|
|
5335
|
+
abi: ERC20_ABI,
|
|
5629
5336
|
functionName: 'balanceOf',
|
|
5630
5337
|
args: [address]
|
|
5631
5338
|
});
|
|
@@ -5639,47 +5346,6 @@ var getEthErc20Balance = /*#__PURE__*/function () {
|
|
|
5639
5346
|
};
|
|
5640
5347
|
}();
|
|
5641
5348
|
|
|
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
5349
|
var isSufficientOrigin = /*#__PURE__*/function () {
|
|
5684
5350
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(api, origin, destination, sender, feeNative, asset, feeAsset) {
|
|
5685
5351
|
var edNative, balanceNative, isNativeAssetToOrigin, isNativeAssetToDest, isSufficientNative, balanceAsset, edAsset, isSufficientAsset;
|
|
@@ -6153,7 +5819,7 @@ var addEthereumBridgeFees = /*#__PURE__*/function () {
|
|
|
6153
5819
|
|
|
6154
5820
|
var dryRunInternal = /*#__PURE__*/function () {
|
|
6155
5821
|
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;
|
|
5822
|
+
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
5823
|
return _regenerator().w(function (_context2) {
|
|
6158
5824
|
while (1) switch (_context2.n) {
|
|
6159
5825
|
case 0:
|
|
@@ -6219,12 +5885,11 @@ var dryRunInternal = /*#__PURE__*/function () {
|
|
|
6219
5885
|
initialForwardedXcms = originDryModified.forwardedXcms, initialDestParaId = originDryModified.destParaId;
|
|
6220
5886
|
processHop = /*#__PURE__*/function () {
|
|
6221
5887
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(params) {
|
|
6222
|
-
var
|
|
6223
|
-
var hopApi, currentChain, currentOrigin, currentAsset, forwardedXcms, hasPassedExchange, isDestination, resolvedHopAsset, hopAsset, hopDryRun;
|
|
5888
|
+
var hopApi, currentChain, currentOrigin, currentAsset, forwardedXcms, hasPassedExchange, resolvedHopAsset, hopDryRun;
|
|
6224
5889
|
return _regenerator().w(function (_context) {
|
|
6225
5890
|
while (1) switch (_context.n) {
|
|
6226
5891
|
case 0:
|
|
6227
|
-
hopApi = params.api, currentChain = params.currentChain, currentOrigin = params.currentOrigin, currentAsset = params.currentAsset, forwardedXcms = params.forwardedXcms, hasPassedExchange = params.hasPassedExchange
|
|
5892
|
+
hopApi = params.api, currentChain = params.currentChain, currentOrigin = params.currentOrigin, currentAsset = params.currentAsset, forwardedXcms = params.forwardedXcms, hasPassedExchange = params.hasPassedExchange;
|
|
6228
5893
|
resolvedHopAsset = resolveHopAsset({
|
|
6229
5894
|
api: api,
|
|
6230
5895
|
tx: tx,
|
|
@@ -6237,7 +5902,6 @@ var dryRunInternal = /*#__PURE__*/function () {
|
|
|
6237
5902
|
swapConfig: swapConfig,
|
|
6238
5903
|
hasPassedExchange: hasPassedExchange
|
|
6239
5904
|
});
|
|
6240
|
-
hopAsset = isDestination ? (_inferFeeAsset = inferFeeAsset(origin, destination, asset, api)) !== null && _inferFeeAsset !== void 0 ? _inferFeeAsset : resolvedHopAsset : resolvedHopAsset;
|
|
6241
5905
|
if (api.hasDryRunSupport(currentChain)) {
|
|
6242
5906
|
_context.n = 1;
|
|
6243
5907
|
break;
|
|
@@ -6257,7 +5921,7 @@ var dryRunInternal = /*#__PURE__*/function () {
|
|
|
6257
5921
|
xcm: forwardedXcms[1][0],
|
|
6258
5922
|
chain: currentChain,
|
|
6259
5923
|
origin: currentOrigin,
|
|
6260
|
-
asset:
|
|
5924
|
+
asset: resolvedHopAsset,
|
|
6261
5925
|
version: resolvedVersion,
|
|
6262
5926
|
feeAsset: resolvedFeeAsset,
|
|
6263
5927
|
originFee: originDryModified.fee,
|
|
@@ -6266,7 +5930,7 @@ var dryRunInternal = /*#__PURE__*/function () {
|
|
|
6266
5930
|
case 2:
|
|
6267
5931
|
hopDryRun = _context.v;
|
|
6268
5932
|
return _context.a(2, _objectSpread2(_objectSpread2({}, hopDryRun), {}, {
|
|
6269
|
-
asset:
|
|
5933
|
+
asset: resolvedHopAsset
|
|
6270
5934
|
}));
|
|
6271
5935
|
}
|
|
6272
5936
|
}, _callee);
|
|
@@ -6298,8 +5962,9 @@ var dryRunInternal = /*#__PURE__*/function () {
|
|
|
6298
5962
|
case 6:
|
|
6299
5963
|
traversalResult = _context2.v;
|
|
6300
5964
|
// Process Ethereum bridge fees
|
|
6301
|
-
|
|
6302
|
-
|
|
5965
|
+
relayChain = api.getRelayChainOf(origin);
|
|
5966
|
+
bridgeHubChain = relayChain === 'Paseo' ? undefined : "BridgeHub".concat(relayChain);
|
|
5967
|
+
assetHubChain = "AssetHub".concat(relayChain);
|
|
6303
5968
|
bridgeHubHop = traversalResult.hops.find(function (hop) {
|
|
6304
5969
|
return hop.chain === bridgeHubChain;
|
|
6305
5970
|
}); // For Mythos → Ethereum, we skip additional Ethereum bridge fees (aligns with getXcmFeeInternal)
|
|
@@ -6985,7 +6650,7 @@ var getOriginXcmFee = /*#__PURE__*/function () {
|
|
|
6985
6650
|
|
|
6986
6651
|
var getXcmFeeOnce = /*#__PURE__*/function () {
|
|
6987
6652
|
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,
|
|
6653
|
+
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
6654
|
return _regenerator().w(function (_context2) {
|
|
6990
6655
|
while (1) switch (_context2.p = _context2.n) {
|
|
6991
6656
|
case 0:
|
|
@@ -7115,12 +6780,11 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
|
|
|
7115
6780
|
case 10:
|
|
7116
6781
|
processHop = /*#__PURE__*/function () {
|
|
7117
6782
|
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(params) {
|
|
7118
|
-
var
|
|
7119
|
-
var hopApi, currentChain, currentOrigin, currentAsset, forwardedXcms, hasPassedExchange, isDestination, resolvedHopAsset, hopAsset, hopResult;
|
|
6783
|
+
var hopApi, currentChain, currentOrigin, currentAsset, forwardedXcms, hasPassedExchange, resolvedHopAsset, hopResult;
|
|
7120
6784
|
return _regenerator().w(function (_context) {
|
|
7121
6785
|
while (1) switch (_context.n) {
|
|
7122
6786
|
case 0:
|
|
7123
|
-
hopApi = params.api, currentChain = params.currentChain, currentOrigin = params.currentOrigin, currentAsset = params.currentAsset, forwardedXcms = params.forwardedXcms, hasPassedExchange = params.hasPassedExchange
|
|
6787
|
+
hopApi = params.api, currentChain = params.currentChain, currentOrigin = params.currentOrigin, currentAsset = params.currentAsset, forwardedXcms = params.forwardedXcms, hasPassedExchange = params.hasPassedExchange;
|
|
7124
6788
|
resolvedHopAsset = resolveHopAsset({
|
|
7125
6789
|
api: api,
|
|
7126
6790
|
tx: tx,
|
|
@@ -7133,7 +6797,6 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
|
|
|
7133
6797
|
swapConfig: swapConfig,
|
|
7134
6798
|
hasPassedExchange: hasPassedExchange
|
|
7135
6799
|
});
|
|
7136
|
-
hopAsset = isDestination ? (_inferFeeAsset = inferFeeAsset(origin, destination, asset, api)) !== null && _inferFeeAsset !== void 0 ? _inferFeeAsset : resolvedHopAsset : resolvedHopAsset;
|
|
7137
6800
|
_context.n = 1;
|
|
7138
6801
|
return getDestXcmFee({
|
|
7139
6802
|
api: hopApi,
|
|
@@ -7143,7 +6806,7 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
|
|
|
7143
6806
|
destination: currentChain,
|
|
7144
6807
|
currency: currency,
|
|
7145
6808
|
asset: asset,
|
|
7146
|
-
currentAsset: _objectSpread2(_objectSpread2({},
|
|
6809
|
+
currentAsset: _objectSpread2(_objectSpread2({}, resolvedHopAsset), {}, {
|
|
7147
6810
|
amount: asset.amount
|
|
7148
6811
|
}),
|
|
7149
6812
|
sender: sender,
|
|
@@ -7220,7 +6883,7 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
|
|
|
7220
6883
|
destination: destination,
|
|
7221
6884
|
currency: currency,
|
|
7222
6885
|
asset: asset,
|
|
7223
|
-
currentAsset: _objectSpread2(_objectSpread2({},
|
|
6886
|
+
currentAsset: _objectSpread2(_objectSpread2({}, asset), {}, {
|
|
7224
6887
|
amount: asset.amount
|
|
7225
6888
|
}),
|
|
7226
6889
|
sender: sender,
|
|
@@ -7247,8 +6910,9 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
|
|
|
7247
6910
|
destAsset = api.findNativeAssetInfoOrThrow(destination);
|
|
7248
6911
|
case 16:
|
|
7249
6912
|
// Process Ethereum bridge fees
|
|
7250
|
-
|
|
7251
|
-
|
|
6913
|
+
relayChain = api.getRelayChainOf(origin);
|
|
6914
|
+
bridgeHubChain = relayChain === 'Paseo' ? undefined : "BridgeHub".concat(relayChain);
|
|
6915
|
+
assetHubChain = "AssetHub".concat(relayChain);
|
|
7252
6916
|
bridgeHubHop = traversalResult.hops.find(function (hop) {
|
|
7253
6917
|
return hop.chain === bridgeHubChain;
|
|
7254
6918
|
});
|
|
@@ -7268,9 +6932,8 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
|
|
|
7268
6932
|
processedBridgeHub = _t4;
|
|
7269
6933
|
// Update bridge hub fee in hops if needed
|
|
7270
6934
|
if (processedBridgeHub && bridgeHubHop && processedBridgeHub.fee !== bridgeHubHop.result.fee) {
|
|
7271
|
-
_bridgeHubChain = "BridgeHub".concat(api.getRelayChainOf(origin));
|
|
7272
6935
|
bridgeHubHopIndex = traversalResult.hops.findIndex(function (hop) {
|
|
7273
|
-
return hop.chain ===
|
|
6936
|
+
return hop.chain === bridgeHubChain;
|
|
7274
6937
|
});
|
|
7275
6938
|
if (bridgeHubHopIndex !== -1) {
|
|
7276
6939
|
traversalResult.hops[bridgeHubHopIndex].result = _objectSpread2(_objectSpread2({}, traversalResult.hops[bridgeHubHopIndex].result), {}, {
|
|
@@ -10879,15 +10542,6 @@ var Ajuna = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
10879
10542
|
}]);
|
|
10880
10543
|
}(SubstrateChain);
|
|
10881
10544
|
|
|
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
10545
|
var AssetHubKusama = /*#__PURE__*/function (_SubstrateChain) {
|
|
10892
10546
|
function AssetHubKusama() {
|
|
10893
10547
|
_classCallCheck(this, AssetHubKusama);
|
|
@@ -11076,10 +10730,21 @@ var Astar = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
11076
10730
|
useBigIntId: true
|
|
11077
10731
|
};
|
|
11078
10732
|
}
|
|
10733
|
+
}, {
|
|
10734
|
+
key: "shouldUseReserveTransfer",
|
|
10735
|
+
value: function shouldUseReserveTransfer() {
|
|
10736
|
+
return true;
|
|
10737
|
+
}
|
|
10738
|
+
}, {
|
|
10739
|
+
key: "isSendingTempDisabled",
|
|
10740
|
+
value: function isSendingTempDisabled(_ref) {
|
|
10741
|
+
var assetInfo = _ref.assetInfo;
|
|
10742
|
+
return deepEqual(assetInfo.location, RELAY_LOCATION);
|
|
10743
|
+
}
|
|
11079
10744
|
}, {
|
|
11080
10745
|
key: "transferPolkadotXCM",
|
|
11081
10746
|
value: function transferPolkadotXCM(input) {
|
|
11082
|
-
return transferPolkadotXcm(input, '
|
|
10747
|
+
return transferPolkadotXcm(input, 'reserve_transfer_assets');
|
|
11083
10748
|
}
|
|
11084
10749
|
}, {
|
|
11085
10750
|
key: "isRelayToParaEnabled",
|
|
@@ -11157,27 +10822,20 @@ var Hydration = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
11157
10822
|
key: "transferPolkadotXCM",
|
|
11158
10823
|
value: function () {
|
|
11159
10824
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
11160
|
-
var
|
|
10825
|
+
var _t;
|
|
11161
10826
|
return _regenerator().w(function (_context) {
|
|
11162
10827
|
while (1) switch (_context.n) {
|
|
11163
10828
|
case 0:
|
|
11164
|
-
destination = input.destination, asset = input.assetInfo, api = input.api;
|
|
11165
10829
|
if (!this.shouldUseExecuteTransfer(input)) {
|
|
11166
10830
|
_context.n = 2;
|
|
11167
10831
|
break;
|
|
11168
10832
|
}
|
|
11169
|
-
_t = api;
|
|
10833
|
+
_t = input.api;
|
|
11170
10834
|
_context.n = 1;
|
|
11171
10835
|
return handleExecuteTransfer(input);
|
|
11172
10836
|
case 1:
|
|
11173
10837
|
return _context.a(2, _t.deserializeExtrinsics.call(_t, _context.v));
|
|
11174
10838
|
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
10839
|
return _context.a(2, transferPolkadotXcm(input));
|
|
11182
10840
|
}
|
|
11183
10841
|
}, _callee, this);
|
|
@@ -11187,22 +10845,6 @@ var Hydration = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
11187
10845
|
}
|
|
11188
10846
|
return transferPolkadotXCM;
|
|
11189
10847
|
}()
|
|
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
10848
|
}, {
|
|
11207
10849
|
key: "transferLocalNativeAsset",
|
|
11208
10850
|
value: function transferLocalNativeAsset(options) {
|
|
@@ -11375,15 +11017,6 @@ var BifrostKusama = /*#__PURE__*/function (_BifrostPolkadot) {
|
|
|
11375
11017
|
return _createClass(BifrostKusama);
|
|
11376
11018
|
}(BifrostPolkadot);
|
|
11377
11019
|
|
|
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
11020
|
var BridgeHubKusama = /*#__PURE__*/function (_SubstrateChain) {
|
|
11388
11021
|
function BridgeHubKusama() {
|
|
11389
11022
|
_classCallCheck(this, BridgeHubKusama);
|
|
@@ -11425,15 +11058,6 @@ var BridgeHubPolkadot = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
11425
11058
|
}]);
|
|
11426
11059
|
}(SubstrateChain);
|
|
11427
11060
|
|
|
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
11061
|
var BridgeHubWestend = /*#__PURE__*/function (_BridgeHubPolkadot) {
|
|
11438
11062
|
function BridgeHubWestend() {
|
|
11439
11063
|
_classCallCheck(this, BridgeHubWestend);
|
|
@@ -11687,20 +11311,11 @@ var CoretimePolkadot = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
11687
11311
|
}, {
|
|
11688
11312
|
key: "canReceiveFrom",
|
|
11689
11313
|
value: function canReceiveFrom(origin) {
|
|
11690
|
-
return origin !== 'Hydration'
|
|
11314
|
+
return origin !== 'Hydration';
|
|
11691
11315
|
}
|
|
11692
11316
|
}]);
|
|
11693
11317
|
}(SubstrateChain);
|
|
11694
11318
|
|
|
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
11319
|
var CoretimeWestend = /*#__PURE__*/function (_CoretimePolkadot) {
|
|
11705
11320
|
function CoretimeWestend() {
|
|
11706
11321
|
_classCallCheck(this, CoretimeWestend);
|
|
@@ -11932,13 +11547,18 @@ var EnergyWebX = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
11932
11547
|
scenario: scenario
|
|
11933
11548
|
});
|
|
11934
11549
|
}
|
|
11935
|
-
return transferPolkadotXcm(input);
|
|
11550
|
+
return transferPolkadotXcm(input, 'limited_reserve_transfer_assets', 'Unlimited');
|
|
11936
11551
|
}
|
|
11937
11552
|
}, {
|
|
11938
11553
|
key: "isRelayToParaEnabled",
|
|
11939
11554
|
value: function isRelayToParaEnabled() {
|
|
11940
11555
|
return false;
|
|
11941
11556
|
}
|
|
11557
|
+
}, {
|
|
11558
|
+
key: "shouldUseReserveTransfer",
|
|
11559
|
+
value: function shouldUseReserveTransfer() {
|
|
11560
|
+
return true;
|
|
11561
|
+
}
|
|
11942
11562
|
}, {
|
|
11943
11563
|
key: "getMintConfig",
|
|
11944
11564
|
value: function getMintConfig() {
|
|
@@ -12058,72 +11678,6 @@ var HydrationPaseo = /*#__PURE__*/function (_Hydration) {
|
|
|
12058
11678
|
return _createClass(HydrationPaseo);
|
|
12059
11679
|
}(Hydration);
|
|
12060
11680
|
|
|
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
11681
|
var Jamton = /*#__PURE__*/function (_SubstrateChain) {
|
|
12128
11682
|
function Jamton() {
|
|
12129
11683
|
_classCallCheck(this, Jamton);
|
|
@@ -12177,72 +11731,6 @@ var Karura = /*#__PURE__*/function (_Acala) {
|
|
|
12177
11731
|
return _createClass(Karura);
|
|
12178
11732
|
}(Acala);
|
|
12179
11733
|
|
|
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
11734
|
var Relaychain = /*#__PURE__*/function (_SubstrateChain) {
|
|
12247
11735
|
function Relaychain() {
|
|
12248
11736
|
_classCallCheck(this, Relaychain);
|
|
@@ -12279,54 +11767,6 @@ var Kusama = /*#__PURE__*/function (_Polkadot) {
|
|
|
12279
11767
|
return _createClass(Kusama);
|
|
12280
11768
|
}(Polkadot);
|
|
12281
11769
|
|
|
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
11770
|
var createTypeAndThenTransfer = /*#__PURE__*/function () {
|
|
12331
11771
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(options, chain, version) {
|
|
12332
11772
|
var api, asset, sender, recipient, ethAsset, messageId, nativeMythAmount, hopDestination;
|
|
@@ -12640,19 +12080,29 @@ var Pendulum = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
12640
12080
|
}]);
|
|
12641
12081
|
}(SubstrateChain);
|
|
12642
12082
|
|
|
12643
|
-
var Penpal = /*#__PURE__*/function (
|
|
12083
|
+
var Penpal = /*#__PURE__*/function (_SubstrateChain) {
|
|
12644
12084
|
function Penpal() {
|
|
12645
12085
|
_classCallCheck(this, Penpal);
|
|
12646
12086
|
return _callSuper(this, Penpal, ['Penpal', 'westendPenpal', 'Westend', Version.V4]);
|
|
12647
12087
|
}
|
|
12648
|
-
_inherits(Penpal,
|
|
12088
|
+
_inherits(Penpal, _SubstrateChain);
|
|
12649
12089
|
return _createClass(Penpal, [{
|
|
12090
|
+
key: "transferPolkadotXCM",
|
|
12091
|
+
value: function transferPolkadotXCM(options) {
|
|
12092
|
+
return transferPolkadotXcm(options);
|
|
12093
|
+
}
|
|
12094
|
+
}, {
|
|
12095
|
+
key: "transferLocalNonNativeAsset",
|
|
12096
|
+
value: function transferLocalNonNativeAsset(_options) {
|
|
12097
|
+
throw new ScenarioNotSupportedError("".concat(this.chain, " local transfers are supported only from EVM Builder"));
|
|
12098
|
+
}
|
|
12099
|
+
}, {
|
|
12650
12100
|
key: "getBalanceForeign",
|
|
12651
12101
|
value: function getBalanceForeign(api, address, asset) {
|
|
12652
12102
|
return getPalletInstance('ForeignAssets').getBalance(api, address, asset);
|
|
12653
12103
|
}
|
|
12654
12104
|
}]);
|
|
12655
|
-
}(
|
|
12105
|
+
}(SubstrateChain);
|
|
12656
12106
|
|
|
12657
12107
|
var PeopleKusama = /*#__PURE__*/function (_SubstrateChain) {
|
|
12658
12108
|
function PeopleKusama() {
|
|
@@ -12716,35 +12166,6 @@ var PeopleWestend = /*#__PURE__*/function (_PeoplePolkadot) {
|
|
|
12716
12166
|
return _createClass(PeopleWestend);
|
|
12717
12167
|
}(PeoplePolkadot);
|
|
12718
12168
|
|
|
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
12169
|
var RobonomicsPolkadot = /*#__PURE__*/function (_SubstrateChain) {
|
|
12749
12170
|
function RobonomicsPolkadot() {
|
|
12750
12171
|
_classCallCheck(this, RobonomicsPolkadot);
|
|
@@ -12900,67 +12321,6 @@ var Xode = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
12900
12321
|
}]);
|
|
12901
12322
|
}(SubstrateChain);
|
|
12902
12323
|
|
|
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
12324
|
var chains = function chains() {
|
|
12965
12325
|
return {
|
|
12966
12326
|
// Polkadot chains
|
|
@@ -12977,10 +12337,8 @@ var chains = function chains() {
|
|
|
12977
12337
|
Darwinia: new Darwinia(),
|
|
12978
12338
|
EnergyWebX: new EnergyWebX(),
|
|
12979
12339
|
Hydration: new Hydration(),
|
|
12980
|
-
Interlay: new Interlay(),
|
|
12981
12340
|
Heima: new Heima(),
|
|
12982
12341
|
Jamton: new Jamton(),
|
|
12983
|
-
Moonbeam: new Moonbeam(),
|
|
12984
12342
|
CoretimePolkadot: new CoretimePolkadot(),
|
|
12985
12343
|
PeoplePolkadot: new PeoplePolkadot(),
|
|
12986
12344
|
RobonomicsPolkadot: new RobonomicsPolkadot(),
|
|
@@ -13001,12 +12359,8 @@ var chains = function chains() {
|
|
|
13001
12359
|
CrustShadow: new CrustShadow(),
|
|
13002
12360
|
Crab: new Crab(),
|
|
13003
12361
|
Karura: new Karura(),
|
|
13004
|
-
Kintsugi: new Kintsugi(),
|
|
13005
|
-
Moonriver: new Moonriver(),
|
|
13006
|
-
Quartz: new Quartz(),
|
|
13007
12362
|
PeopleKusama: new PeopleKusama(),
|
|
13008
12363
|
Shiden: new Shiden(),
|
|
13009
|
-
Zeitgeist: new Zeitgeist(),
|
|
13010
12364
|
// Westend chains
|
|
13011
12365
|
Westend: new Westend(),
|
|
13012
12366
|
AssetHubWestend: new AssetHubWestend(),
|
|
@@ -13018,16 +12372,11 @@ var chains = function chains() {
|
|
|
13018
12372
|
// Paseo chains
|
|
13019
12373
|
Paseo: new Paseo(),
|
|
13020
12374
|
AssetHubPaseo: new AssetHubPaseo(),
|
|
13021
|
-
BridgeHubPaseo: new BridgeHubPaseo(),
|
|
13022
|
-
CoretimePaseo: new CoretimePaseo(),
|
|
13023
12375
|
EnergyWebXPaseo: new EnergyWebXPaseo(),
|
|
13024
12376
|
PeoplePaseo: new PeoplePaseo(),
|
|
13025
|
-
AjunaPaseo: new AjunaPaseo(),
|
|
13026
|
-
BifrostPaseo: new BifrostPaseo(),
|
|
13027
12377
|
HeimaPaseo: new HeimaPaseo(),
|
|
13028
12378
|
HydrationPaseo: new HydrationPaseo(),
|
|
13029
12379
|
NeuroWebPaseo: new NeuroWebPaseo(),
|
|
13030
|
-
ZeitgeistPaseo: new ZeitgeistPaseo(),
|
|
13031
12380
|
// External chains
|
|
13032
12381
|
Ethereum: new Ethereum(),
|
|
13033
12382
|
EthereumTestnet: new EthereumTestnet()
|
|
@@ -14419,4 +13768,4 @@ var createClientCache = function createClientCache(maxSize, pingClient, onEvicti
|
|
|
14419
13768
|
};
|
|
14420
13769
|
};
|
|
14421
13770
|
|
|
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,
|
|
13771
|
+
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 };
|