@paraspell/sdk-core 14.2.1 → 14.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -17
- package/dist/index.mjs +28 -131
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -120,7 +120,6 @@ declare abstract class PolkadotApi<TApi, TRes, TSigner, TCustomChain extends str
|
|
|
120
120
|
}>;
|
|
121
121
|
abstract getXcmWeight(xcm: any): Promise<TWeight>;
|
|
122
122
|
abstract getXcmPaymentApiFee(chain: TSubstrateChain, localXcm: any, forwardedXcm: any, asset: TAssetInfo, version: Version, transformXcm: boolean): Promise<bigint>;
|
|
123
|
-
abstract getEvmStorage(contract: string, slot: string): Promise<string>;
|
|
124
123
|
abstract getFromRpc(module: string, method: string, key: string): Promise<string>;
|
|
125
124
|
abstract blake2AsHex(data: Uint8Array): string;
|
|
126
125
|
abstract clone(): PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
@@ -148,7 +147,7 @@ declare abstract class SubstrateChain<TApi, TRes, TSigner, TCustomChain extends
|
|
|
148
147
|
isRelayToParaEnabled(): boolean;
|
|
149
148
|
throwIfCantReceive(destChain: TChain | undefined): void;
|
|
150
149
|
throwIfTempDisabled(options: TTransferInternalOptions<TApi, TRes, TSigner, TCustomChain>, destChain?: TChain): void;
|
|
151
|
-
isSendingTempDisabled(
|
|
150
|
+
isSendingTempDisabled(_asset: TAssetInfo): boolean;
|
|
152
151
|
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
153
152
|
canReceiveFrom<TCustomChain extends string = never>(_origin: TChain | TCustomChain): boolean;
|
|
154
153
|
shouldUseNativeAssetTeleport({ api, assetInfo: asset, to }: TTransferInternalOptions<TApi, TRes, TSigner, TCustomChain>): boolean;
|
|
@@ -214,7 +213,7 @@ declare class Astar<TApi, TRes, TSigner, TCustomChain extends string = never> ex
|
|
|
214
213
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
215
214
|
protected getMintConfig(): TMintConfig;
|
|
216
215
|
protected shouldUseReserveTransfer(): boolean;
|
|
217
|
-
isSendingTempDisabled(
|
|
216
|
+
isSendingTempDisabled(assetInfo: TAssetInfo): boolean;
|
|
218
217
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner, TCustomChain>): Promise<TRes>;
|
|
219
218
|
isRelayToParaEnabled(): boolean;
|
|
220
219
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner, TCustomChain>): TRes;
|
|
@@ -335,13 +334,6 @@ declare class CoretimeWestend<TApi, TRes, TSigner, TCustomChain extends string =
|
|
|
335
334
|
constructor();
|
|
336
335
|
}
|
|
337
336
|
|
|
338
|
-
declare class Crab<TApi, TRes, TSigner, TCustomChain extends string = never> extends SubstrateChain<TApi, TRes, TSigner, TCustomChain> implements IPolkadotXCMTransfer<TApi, TRes, TSigner, TCustomChain> {
|
|
339
|
-
constructor();
|
|
340
|
-
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner, TCustomChain>): Promise<TRes>;
|
|
341
|
-
isRelayToParaEnabled(): boolean;
|
|
342
|
-
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner, TCustomChain>): TRes;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
337
|
declare class Crust<TApi, TRes, TSigner, TCustomChain extends string = never> extends SubstrateChain<TApi, TRes, TSigner, TCustomChain> implements IXTokensTransfer<TApi, TRes, TSigner, TCustomChain> {
|
|
346
338
|
constructor();
|
|
347
339
|
private getCurrencySelection;
|
|
@@ -461,10 +453,6 @@ declare class NeuroWeb<TApi, TRes, TSigner, TCustomChain extends string = never>
|
|
|
461
453
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner, TCustomChain>): TRes;
|
|
462
454
|
}
|
|
463
455
|
|
|
464
|
-
declare class NeuroWebPaseo<TApi, TRes, TSigner, TCustomChain extends string = never> extends NeuroWeb<TApi, TRes, TSigner, TCustomChain> {
|
|
465
|
-
constructor();
|
|
466
|
-
}
|
|
467
|
-
|
|
468
456
|
declare class Paseo<TApi, TRes, TSigner, TCustomChain extends string = never> extends Polkadot<TApi, TRes, TSigner, TCustomChain> {
|
|
469
457
|
constructor();
|
|
470
458
|
}
|
|
@@ -569,7 +557,6 @@ declare const chains: <TApi, TRes, TSigner>() => {
|
|
|
569
557
|
BifrostKusama: BifrostKusama<TApi, TRes, TSigner, never>;
|
|
570
558
|
Curio: Curio<TApi, TRes, TSigner, never>;
|
|
571
559
|
CrustShadow: CrustShadow<TApi, TRes, TSigner, never>;
|
|
572
|
-
Crab: Crab<TApi, TRes, TSigner, never>;
|
|
573
560
|
Karura: Karura<TApi, TRes, TSigner, never>;
|
|
574
561
|
PeopleKusama: PeopleKusama<TApi, TRes, TSigner, never>;
|
|
575
562
|
Shiden: Shiden<TApi, TRes, TSigner, never>;
|
|
@@ -586,7 +573,6 @@ declare const chains: <TApi, TRes, TSigner>() => {
|
|
|
586
573
|
PeoplePaseo: PeoplePaseo<TApi, TRes, TSigner, never>;
|
|
587
574
|
HeimaPaseo: HeimaPaseo<TApi, TRes, TSigner, never>;
|
|
588
575
|
HydrationPaseo: HydrationPaseo<TApi, TRes, TSigner, never>;
|
|
589
|
-
NeuroWebPaseo: NeuroWebPaseo<TApi, TRes, TSigner, never>;
|
|
590
576
|
Ethereum: Ethereum<TApi, TRes, TSigner>;
|
|
591
577
|
EthereumTestnet: EthereumTestnet<TApi, TRes, TSigner>;
|
|
592
578
|
};
|
|
@@ -2526,7 +2512,7 @@ declare const reverseTransformLocation: (location: TLocation) => TLocation;
|
|
|
2526
2512
|
|
|
2527
2513
|
declare const normalizeAmount: (amount: bigint) => bigint;
|
|
2528
2514
|
|
|
2529
|
-
declare const resolveDestChain: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, originChain: TSubstrateChain | TCustomChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "Darwinia" | "EnergyWebX" | "Hydration" | "Heima" | "Jamton" | "CoretimePolkadot" | "Collectives" | "Crust" | "NeuroWeb" | "Pendulum" | "Mythos" | "Peaq" | "PeoplePolkadot" | "Unique" | "Xode" | "AssetHubKusama" | "BridgeHubKusama" | "Karura" | "CoretimeKusama" | "Encointer" | "Basilisk" | "BifrostKusama" | "Curio" | "CrustShadow" | "
|
|
2515
|
+
declare const resolveDestChain: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, originChain: TSubstrateChain | TCustomChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "Darwinia" | "EnergyWebX" | "Hydration" | "Heima" | "Jamton" | "CoretimePolkadot" | "Collectives" | "Crust" | "NeuroWeb" | "Pendulum" | "Mythos" | "Peaq" | "PeoplePolkadot" | "Unique" | "Xode" | "AssetHubKusama" | "BridgeHubKusama" | "Karura" | "CoretimeKusama" | "Encointer" | "Basilisk" | "BifrostKusama" | "Curio" | "CrustShadow" | "RobonomicsPolkadot" | "PeopleKusama" | "Shiden" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AssetHubPaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "PeoplePaseo" | undefined;
|
|
2530
2516
|
|
|
2531
2517
|
declare const resolveParaId: <TApi, TRes, TSigner, TCustomChain extends string = never>(paraId: number | undefined, destination: TDestination, api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>) => number | undefined;
|
|
2532
2518
|
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { blake2b } from '@noble/hashes/blake2.js';
|
|
|
2
2
|
import { isChainEvm, getAssetsObject, InvalidCurrencyError, isSymbolMatch, isAssetEqual, isStableCoinAsset, isAdditionalSubstrateBridgeAsset, isBridgedSystemAsset, STABLECOIN_IDS, isSymbolSpecifier, normalizeLocation, getNativeAssetSymbol, getEdFromAssetOrThrow, extractAssetLocation, hasDryRunSupport, normalizeSymbol, Native, getOtherAssets, canonicalizeLocation, getAssetsObjectImpl, getAssetsImpl, getNativeAssetsImpl, getOtherAssetsImpl, findAssetInfoImpl, findAssetInfoOrThrowImpl, findAssetInfoOnDestImpl, findAssetOnDestOrThrowImpl, findNativeAssetInfoImpl, findNativeAssetInfoOrThrowImpl, isChainEvmImpl, getNativeAssetSymbolImpl, getRelayChainSymbolImpl, hasDryRunSupportImpl, hasXcmPaymentApiSupportImpl, getExistentialDepositOrThrowImpl, normalizeCustomAssets } from '@paraspell/assets';
|
|
3
3
|
export * from '@paraspell/assets';
|
|
4
4
|
import { base58 } from '@scure/base';
|
|
5
|
-
import { isAddress,
|
|
5
|
+
import { isAddress, isHex, createPublicClient, http, formatUnits as formatUnits$1, parseUnits as parseUnits$1 } from 'viem';
|
|
6
6
|
import { ParaSpellError, isTLocation, replaceBigInt, isExternalChain, CHAINS, Version, isRelayChain, isSubstrateBridge, Parents, deepEqual, isTrustedChain, isCustomChain, isSnowbridge, getJunctionValue, hasJunction, ETHEREUM_BRIDGE_ORIGINS, isBridge, RELAYCHAINS, DEFAULT_SS58_PREFIX } from '@paraspell/sdk-common';
|
|
7
7
|
export * from '@paraspell/sdk-common';
|
|
8
8
|
import { getXcmPallet, getOtherAssetsPallets, getNativeAssetsPallet, getSupportedPalletsDetails, ASSETS_PALLETS, NATIVE_ASSETS_PALLET_PRIORITY, OTHER_ASSETS_PALLET_PRIORITY, hasPalletImpl, getXcmPalletImpl } from '@paraspell/pallets';
|
|
@@ -1513,17 +1513,6 @@ var CrustShadow$1 = {
|
|
|
1513
1513
|
}
|
|
1514
1514
|
]
|
|
1515
1515
|
};
|
|
1516
|
-
var Crab$1 = {
|
|
1517
|
-
name: "Crab",
|
|
1518
|
-
info: "crab",
|
|
1519
|
-
paraId: 2105,
|
|
1520
|
-
providers: [
|
|
1521
|
-
{
|
|
1522
|
-
name: "Darwinia",
|
|
1523
|
-
endpoint: "wss://crab-rpc.darwinia.network/"
|
|
1524
|
-
}
|
|
1525
|
-
]
|
|
1526
|
-
};
|
|
1527
1516
|
var RobonomicsPolkadot$1 = {
|
|
1528
1517
|
name: "Robonomics",
|
|
1529
1518
|
info: "robonomics",
|
|
@@ -1715,17 +1704,6 @@ var HydrationPaseo$1 = {
|
|
|
1715
1704
|
}
|
|
1716
1705
|
]
|
|
1717
1706
|
};
|
|
1718
|
-
var NeuroWebPaseo$1 = {
|
|
1719
|
-
name: "NeuroWeb Testnet",
|
|
1720
|
-
info: "NeuroWeb",
|
|
1721
|
-
paraId: 2043,
|
|
1722
|
-
providers: [
|
|
1723
|
-
{
|
|
1724
|
-
name: "TraceLabs",
|
|
1725
|
-
endpoint: "wss://parachain-testnet-rpc.origin-trail.network/"
|
|
1726
|
-
}
|
|
1727
|
-
]
|
|
1728
|
-
};
|
|
1729
1707
|
var PeoplePaseo$1 = {
|
|
1730
1708
|
name: "People",
|
|
1731
1709
|
info: "PaseoPeopleChain",
|
|
@@ -1897,7 +1875,6 @@ var configs = {
|
|
|
1897
1875
|
BifrostKusama: BifrostKusama$1,
|
|
1898
1876
|
Curio: Curio$1,
|
|
1899
1877
|
CrustShadow: CrustShadow$1,
|
|
1900
|
-
Crab: Crab$1,
|
|
1901
1878
|
RobonomicsPolkadot: RobonomicsPolkadot$1,
|
|
1902
1879
|
PeopleKusama: PeopleKusama$1,
|
|
1903
1880
|
Shiden: Shiden$1,
|
|
@@ -1911,7 +1888,6 @@ var configs = {
|
|
|
1911
1888
|
EnergyWebXPaseo: EnergyWebXPaseo$1,
|
|
1912
1889
|
HeimaPaseo: HeimaPaseo$1,
|
|
1913
1890
|
HydrationPaseo: HydrationPaseo$1,
|
|
1914
|
-
NeuroWebPaseo: NeuroWebPaseo$1,
|
|
1915
1891
|
PeoplePaseo: PeoplePaseo$1,
|
|
1916
1892
|
Polkadot: Polkadot$1,
|
|
1917
1893
|
Kusama: Kusama$1,
|
|
@@ -2563,21 +2539,6 @@ var FungiblesPallet = /*#__PURE__*/function (_AssetsPallet) {
|
|
|
2563
2539
|
}]);
|
|
2564
2540
|
}(AssetsPallet);
|
|
2565
2541
|
|
|
2566
|
-
var SIZE = 32;
|
|
2567
|
-
var BALANCE_SLOT = 0;
|
|
2568
|
-
var BALANCE_SLOT_WORMHOLE = 5;
|
|
2569
|
-
var calculateMappingSlot = function calculateMappingSlot(key, assetId) {
|
|
2570
|
-
var normalizedKey = getAddress(key);
|
|
2571
|
-
var keyPadded = pad(normalizedKey, {
|
|
2572
|
-
size: SIZE
|
|
2573
|
-
});
|
|
2574
|
-
var resolvedSlot = assetId !== null && assetId !== void 0 && assetId.startsWith('0x') ? BALANCE_SLOT_WORMHOLE : BALANCE_SLOT;
|
|
2575
|
-
var slotHex = pad(toHex(resolvedSlot), {
|
|
2576
|
-
size: SIZE
|
|
2577
|
-
});
|
|
2578
|
-
var encoded = concat([keyPadded, slotHex]);
|
|
2579
|
-
return keccak256(encoded);
|
|
2580
|
-
};
|
|
2581
2542
|
var SystemPallet = /*#__PURE__*/function (_BaseAssetsPallet) {
|
|
2582
2543
|
function SystemPallet() {
|
|
2583
2544
|
_classCallCheck(this, SystemPallet);
|
|
@@ -2586,61 +2547,31 @@ var SystemPallet = /*#__PURE__*/function (_BaseAssetsPallet) {
|
|
|
2586
2547
|
_inherits(SystemPallet, _BaseAssetsPallet);
|
|
2587
2548
|
return _createClass(SystemPallet, [{
|
|
2588
2549
|
key: "mint",
|
|
2589
|
-
value: function () {
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
return _regenerator().w(function (_context) {
|
|
2593
|
-
while (1) switch (_context.n) {
|
|
2594
|
-
case 0:
|
|
2595
|
-
assertHasId(assetInfo);
|
|
2596
|
-
contractAddr = formatAssetIdToERC20(assetInfo.assetId);
|
|
2597
|
-
slot = calculateMappingSlot(address, assetInfo.assetId);
|
|
2598
|
-
amountEncoded = pad(toHex(assetInfo.amount + balance), {
|
|
2599
|
-
size: SIZE
|
|
2600
|
-
});
|
|
2601
|
-
_context.n = 1;
|
|
2602
|
-
return api.getEvmStorage(contractAddr, slot);
|
|
2603
|
-
case 1:
|
|
2604
|
-
storageKey = _context.v;
|
|
2605
|
-
return _context.a(2, {
|
|
2606
|
-
balanceTx: {
|
|
2607
|
-
module: this.palletName,
|
|
2608
|
-
method: 'set_storage',
|
|
2609
|
-
params: {
|
|
2610
|
-
items: [[storageKey, amountEncoded]]
|
|
2611
|
-
}
|
|
2612
|
-
}
|
|
2613
|
-
});
|
|
2614
|
-
}
|
|
2615
|
-
}, _callee, this);
|
|
2616
|
-
}));
|
|
2617
|
-
function mint(_x, _x2, _x3, _x4) {
|
|
2618
|
-
return _mint.apply(this, arguments);
|
|
2619
|
-
}
|
|
2620
|
-
return mint;
|
|
2621
|
-
}()
|
|
2550
|
+
value: function mint(_api, _address, _assetInfo, _balance) {
|
|
2551
|
+
throw new UnsupportedOperationError('System pallet does not support minting.');
|
|
2552
|
+
}
|
|
2622
2553
|
}, {
|
|
2623
2554
|
key: "getBalance",
|
|
2624
2555
|
value: function () {
|
|
2625
|
-
var _getBalance = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
2556
|
+
var _getBalance = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(api, address, asset) {
|
|
2626
2557
|
var _asset$existentialDep;
|
|
2627
2558
|
var account, free, reserved, frozen, ed, frozenUntouchable, untouchable, spendable;
|
|
2628
|
-
return _regenerator().w(function (
|
|
2629
|
-
while (1) switch (
|
|
2559
|
+
return _regenerator().w(function (_context) {
|
|
2560
|
+
while (1) switch (_context.n) {
|
|
2630
2561
|
case 0:
|
|
2631
|
-
|
|
2562
|
+
_context.n = 1;
|
|
2632
2563
|
return api.queryState({
|
|
2633
2564
|
module: this.palletName,
|
|
2634
2565
|
method: 'Account',
|
|
2635
2566
|
params: [address]
|
|
2636
2567
|
});
|
|
2637
2568
|
case 1:
|
|
2638
|
-
account =
|
|
2569
|
+
account = _context.v;
|
|
2639
2570
|
if (!((account === null || account === void 0 ? void 0 : account.data) === undefined)) {
|
|
2640
|
-
|
|
2571
|
+
_context.n = 2;
|
|
2641
2572
|
break;
|
|
2642
2573
|
}
|
|
2643
|
-
return
|
|
2574
|
+
return _context.a(2, 0n);
|
|
2644
2575
|
case 2:
|
|
2645
2576
|
free = BigInt(account.data.free);
|
|
2646
2577
|
reserved = BigInt(account.data.reserved);
|
|
@@ -2649,11 +2580,11 @@ var SystemPallet = /*#__PURE__*/function (_BaseAssetsPallet) {
|
|
|
2649
2580
|
frozenUntouchable = frozen - reserved;
|
|
2650
2581
|
untouchable = frozenUntouchable > ed ? frozenUntouchable : ed;
|
|
2651
2582
|
spendable = free - untouchable;
|
|
2652
|
-
return
|
|
2583
|
+
return _context.a(2, spendable > 0n ? spendable : 0n);
|
|
2653
2584
|
}
|
|
2654
|
-
},
|
|
2585
|
+
}, _callee, this);
|
|
2655
2586
|
}));
|
|
2656
|
-
function getBalance(
|
|
2587
|
+
function getBalance(_x, _x2, _x3) {
|
|
2657
2588
|
return _getBalance.apply(this, arguments);
|
|
2658
2589
|
}
|
|
2659
2590
|
return getBalance;
|
|
@@ -2984,7 +2915,7 @@ var SubstrateChain = /*#__PURE__*/function (_Chain) {
|
|
|
2984
2915
|
}, {
|
|
2985
2916
|
key: "throwIfTempDisabled",
|
|
2986
2917
|
value: function throwIfTempDisabled(options, destChain) {
|
|
2987
|
-
var isSendingDisabled = this.isSendingTempDisabled(options);
|
|
2918
|
+
var isSendingDisabled = this.isSendingTempDisabled(options.assetInfo);
|
|
2988
2919
|
if (isSendingDisabled) {
|
|
2989
2920
|
throw new FeatureTemporarilyDisabledError("Sending ".concat(options.assetInfo.symbol, " from ").concat(this.chain, " is temporarily disabled"));
|
|
2990
2921
|
}
|
|
@@ -2996,7 +2927,7 @@ var SubstrateChain = /*#__PURE__*/function (_Chain) {
|
|
|
2996
2927
|
}
|
|
2997
2928
|
}, {
|
|
2998
2929
|
key: "isSendingTempDisabled",
|
|
2999
|
-
value: function isSendingTempDisabled(
|
|
2930
|
+
value: function isSendingTempDisabled(_asset) {
|
|
3000
2931
|
return false;
|
|
3001
2932
|
}
|
|
3002
2933
|
}, {
|
|
@@ -6206,7 +6137,7 @@ var mintBonusForSent = function mintBonusForSent(chain, sent, feeAsset, mintFeeA
|
|
|
6206
6137
|
var preminted = [_native, relay, feeAsset].filter(function (a) {
|
|
6207
6138
|
return !!a;
|
|
6208
6139
|
}).filter(function (a) {
|
|
6209
|
-
var k = JSON.stringify(a.location);
|
|
6140
|
+
var k = JSON.stringify(a.location, replaceBigInt);
|
|
6210
6141
|
if (seen.has(k)) return false;
|
|
6211
6142
|
seen.add(k);
|
|
6212
6143
|
return true;
|
|
@@ -8501,7 +8432,7 @@ var resolveSnowbridgeMessageId = function resolveSnowbridgeMessageId(_ref3) {
|
|
|
8501
8432
|
recipient = _ref3$options.recipient;
|
|
8502
8433
|
if (!isSnowbridge) return Promise.resolve(null);
|
|
8503
8434
|
assertSender(sender);
|
|
8504
|
-
return generateMessageId(origin.api, sender, origin.api.getParaId(origin.chain), JSON.stringify(assetInfo.location), JSON.stringify(recipient), assetInfo.amount);
|
|
8435
|
+
return generateMessageId(origin.api, sender, origin.api.getParaId(origin.chain), JSON.stringify(assetInfo.location, replaceBigInt), JSON.stringify(recipient), assetInfo.amount);
|
|
8505
8436
|
};
|
|
8506
8437
|
var createCustomXcm = /*#__PURE__*/function () {
|
|
8507
8438
|
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(context, assetCount, isForFeeCalc, systemAssetAmount) {
|
|
@@ -10827,8 +10758,7 @@ var Astar = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
10827
10758
|
}
|
|
10828
10759
|
}, {
|
|
10829
10760
|
key: "isSendingTempDisabled",
|
|
10830
|
-
value: function isSendingTempDisabled(
|
|
10831
|
-
var assetInfo = _ref.assetInfo;
|
|
10761
|
+
value: function isSendingTempDisabled(assetInfo) {
|
|
10832
10762
|
return deepEqual(assetInfo.location, RELAY_LOCATION);
|
|
10833
10763
|
}
|
|
10834
10764
|
}, {
|
|
@@ -11415,34 +11345,6 @@ var CoretimeWestend = /*#__PURE__*/function (_CoretimePolkadot) {
|
|
|
11415
11345
|
return _createClass(CoretimeWestend);
|
|
11416
11346
|
}(CoretimePolkadot);
|
|
11417
11347
|
|
|
11418
|
-
var Crab = /*#__PURE__*/function (_SubstrateChain) {
|
|
11419
|
-
function Crab() {
|
|
11420
|
-
_classCallCheck(this, Crab);
|
|
11421
|
-
return _callSuper(this, Crab, ['Crab', 'crab', 'Kusama', Version.V4]);
|
|
11422
|
-
}
|
|
11423
|
-
_inherits(Crab, _SubstrateChain);
|
|
11424
|
-
return _createClass(Crab, [{
|
|
11425
|
-
key: "transferPolkadotXCM",
|
|
11426
|
-
value: function transferPolkadotXCM(input) {
|
|
11427
|
-
if (input.scenario === 'ParaToPara') return transferPolkadotXcm(input);
|
|
11428
|
-
throw new ScenarioNotSupportedError({
|
|
11429
|
-
chain: this.chain,
|
|
11430
|
-
scenario: input.scenario
|
|
11431
|
-
});
|
|
11432
|
-
}
|
|
11433
|
-
}, {
|
|
11434
|
-
key: "isRelayToParaEnabled",
|
|
11435
|
-
value: function isRelayToParaEnabled() {
|
|
11436
|
-
return false;
|
|
11437
|
-
}
|
|
11438
|
-
}, {
|
|
11439
|
-
key: "transferLocalNonNativeAsset",
|
|
11440
|
-
value: function transferLocalNonNativeAsset(options) {
|
|
11441
|
-
return getSubstrateChainImpl('Darwinia').transferLocalNonNativeAsset(options);
|
|
11442
|
-
}
|
|
11443
|
-
}]);
|
|
11444
|
-
}(SubstrateChain);
|
|
11445
|
-
|
|
11446
11348
|
var Crust = /*#__PURE__*/function (_SubstrateChain) {
|
|
11447
11349
|
function Crust() {
|
|
11448
11350
|
_classCallCheck(this, Crust);
|
|
@@ -11841,7 +11743,7 @@ var Jamton = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
11841
11743
|
destination = input.destination;
|
|
11842
11744
|
if (assetInfo.isNative) return transferPolkadotXcm(input);
|
|
11843
11745
|
if (scenario === 'ParaToPara' && destination !== 'AssetHubPolkadot') {
|
|
11844
|
-
throw new ScenarioNotSupportedError("Transfer from ".concat(this.chain, " to ").concat(JSON.stringify(destination), " is not yet supported"));
|
|
11746
|
+
throw new ScenarioNotSupportedError("Transfer from ".concat(this.chain, " to ").concat(JSON.stringify(destination, replaceBigInt), " is not yet supported"));
|
|
11845
11747
|
}
|
|
11846
11748
|
return transferPolkadotXcm(input);
|
|
11847
11749
|
}
|
|
@@ -12077,15 +11979,6 @@ var NeuroWeb = /*#__PURE__*/function (_SubstrateChain) {
|
|
|
12077
11979
|
}]);
|
|
12078
11980
|
}(SubstrateChain);
|
|
12079
11981
|
|
|
12080
|
-
var NeuroWebPaseo = /*#__PURE__*/function (_NeuroWeb) {
|
|
12081
|
-
function NeuroWebPaseo() {
|
|
12082
|
-
_classCallCheck(this, NeuroWebPaseo);
|
|
12083
|
-
return _callSuper(this, NeuroWebPaseo, ['NeuroWebPaseo', 'NeuroWeb', 'Paseo', Version.V4]);
|
|
12084
|
-
}
|
|
12085
|
-
_inherits(NeuroWebPaseo, _NeuroWeb);
|
|
12086
|
-
return _createClass(NeuroWebPaseo);
|
|
12087
|
-
}(NeuroWeb);
|
|
12088
|
-
|
|
12089
11982
|
var Paseo = /*#__PURE__*/function (_Polkadot) {
|
|
12090
11983
|
function Paseo() {
|
|
12091
11984
|
_classCallCheck(this, Paseo);
|
|
@@ -12484,7 +12377,6 @@ var chains = function chains() {
|
|
|
12484
12377
|
BifrostKusama: new BifrostKusama(),
|
|
12485
12378
|
Curio: new Curio(),
|
|
12486
12379
|
CrustShadow: new CrustShadow(),
|
|
12487
|
-
Crab: new Crab(),
|
|
12488
12380
|
Karura: new Karura(),
|
|
12489
12381
|
PeopleKusama: new PeopleKusama(),
|
|
12490
12382
|
Shiden: new Shiden(),
|
|
@@ -12503,7 +12395,6 @@ var chains = function chains() {
|
|
|
12503
12395
|
PeoplePaseo: new PeoplePaseo(),
|
|
12504
12396
|
HeimaPaseo: new HeimaPaseo(),
|
|
12505
12397
|
HydrationPaseo: new HydrationPaseo(),
|
|
12506
|
-
NeuroWebPaseo: new NeuroWebPaseo(),
|
|
12507
12398
|
// External chains
|
|
12508
12399
|
Ethereum: new Ethereum(),
|
|
12509
12400
|
EthereumTestnet: new EthereumTestnet()
|
|
@@ -12787,7 +12678,9 @@ var sortAssets = function sortAssets(assets) {
|
|
|
12787
12678
|
if (aGeneralIndex === undefined && bGeneralIndex === undefined) return 0;
|
|
12788
12679
|
if (aGeneralIndex === undefined) return 1;
|
|
12789
12680
|
if (bGeneralIndex === undefined) return -1;
|
|
12790
|
-
|
|
12681
|
+
var aIndex = BigInt(aGeneralIndex);
|
|
12682
|
+
var bIndex = BigInt(bGeneralIndex);
|
|
12683
|
+
return aIndex < bIndex ? -1 : aIndex > bIndex ? 1 : 0;
|
|
12791
12684
|
});
|
|
12792
12685
|
};
|
|
12793
12686
|
|
|
@@ -13781,7 +13674,11 @@ var createClientCache = function createClientCache(maxSize, pingClient, onEvicti
|
|
|
13781
13674
|
clearTimeout(timers.get(k));
|
|
13782
13675
|
timers["delete"](k);
|
|
13783
13676
|
data["delete"](k);
|
|
13784
|
-
|
|
13677
|
+
try {
|
|
13678
|
+
onEviction === null || onEviction === void 0 || onEviction(k, w.value);
|
|
13679
|
+
} catch (_unused2) {
|
|
13680
|
+
/* ignore */
|
|
13681
|
+
}
|
|
13785
13682
|
};
|
|
13786
13683
|
var evictIfNeeded = function evictIfNeeded() {
|
|
13787
13684
|
if (data.size <= maxSize) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-core",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.3.0",
|
|
4
4
|
"description": "SDK core for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@noble/hashes": "^2.
|
|
26
|
-
"@
|
|
27
|
-
"
|
|
28
|
-
"@paraspell/sdk-common": "14.
|
|
29
|
-
"@
|
|
30
|
-
"
|
|
25
|
+
"@noble/hashes": "^2.3.0",
|
|
26
|
+
"@paraspell/assets": "14.3.0",
|
|
27
|
+
"@paraspell/pallets": "14.3.0",
|
|
28
|
+
"@paraspell/sdk-common": "14.3.0",
|
|
29
|
+
"@scure/base": "^2.3.0",
|
|
30
|
+
"viem": "^2.55.19"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@babel/plugin-syntax-import-attributes": "^7.29.7",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"@rollup/plugin-babel": "^7.1.0",
|
|
37
37
|
"@rollup/plugin-json": "^6.1.0",
|
|
38
38
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
39
|
-
"@vitest/coverage-v8": "^4.1.
|
|
39
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
40
40
|
"axios": "^1.19.0",
|
|
41
41
|
"dotenv": "^17.4.2",
|
|
42
|
-
"rollup": "^4.62.
|
|
43
|
-
"rollup-plugin-dts": "^6.
|
|
42
|
+
"rollup": "^4.62.5",
|
|
43
|
+
"rollup-plugin-dts": "^6.5.1",
|
|
44
44
|
"ts-morph": "^28.0.0",
|
|
45
|
-
"tsx": "^4.23.
|
|
45
|
+
"tsx": "^4.23.12"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"compile": "tsc --noEmit",
|