@paraspell/sdk-core 10.4.0 → 10.4.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.cjs +36 -19
- package/dist/index.mjs +36 -19
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -6307,6 +6307,7 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
6307
6307
|
PARA_TO_PARA_FEE_DOT,
|
|
6308
6308
|
fee,
|
|
6309
6309
|
ethAsset,
|
|
6310
|
+
customXcmOnDest,
|
|
6310
6311
|
messageId,
|
|
6311
6312
|
call,
|
|
6312
6313
|
_args3 = arguments;
|
|
@@ -6358,16 +6359,47 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
6358
6359
|
PARA_TO_PARA_FEE_DOT = 500000000; // 0.5 DOT
|
|
6359
6360
|
fee = useOnlyDepositInstruction ? PARA_TO_PARA_FEE_DOT : (bridgeFee + executionFee).toString();
|
|
6360
6361
|
ethAsset = assets.findAssetByMultiLocation(assets.getOtherAssets('Ethereum'), asset.multiLocation);
|
|
6361
|
-
if (
|
|
6362
|
+
if (ethAsset) {
|
|
6362
6363
|
_context3.n = 8;
|
|
6363
6364
|
break;
|
|
6364
6365
|
}
|
|
6365
6366
|
throw new assets.InvalidCurrencyError("Could not obtain Ethereum asset address for ".concat(JSON.stringify(asset)));
|
|
6366
6367
|
case 8:
|
|
6367
|
-
|
|
6368
|
-
|
|
6368
|
+
if (!useOnlyDepositInstruction) {
|
|
6369
|
+
_context3.n = 9;
|
|
6370
|
+
break;
|
|
6371
|
+
}
|
|
6372
|
+
customXcmOnDest = addXcmVersionHeader([{
|
|
6373
|
+
DepositAsset: {
|
|
6374
|
+
assets: {
|
|
6375
|
+
Wild: {
|
|
6376
|
+
AllCounted: 1
|
|
6377
|
+
}
|
|
6378
|
+
},
|
|
6379
|
+
beneficiary: createBeneficiaryMultiLocation({
|
|
6380
|
+
api: api,
|
|
6381
|
+
scenario: scenario,
|
|
6382
|
+
pallet: 'PolkadotXcm',
|
|
6383
|
+
recipientAddress: address,
|
|
6384
|
+
version: version
|
|
6385
|
+
})
|
|
6386
|
+
}
|
|
6387
|
+
}], version);
|
|
6388
|
+
_context3.n = 12;
|
|
6389
|
+
break;
|
|
6369
6390
|
case 9:
|
|
6391
|
+
if (ethAsset.assetId) {
|
|
6392
|
+
_context3.n = 10;
|
|
6393
|
+
break;
|
|
6394
|
+
}
|
|
6395
|
+
throw new assets.InvalidCurrencyError("Ethereum asset ".concat(JSON.stringify(ethAsset), " has no assetId"));
|
|
6396
|
+
case 10:
|
|
6397
|
+
_context3.n = 11;
|
|
6398
|
+
return generateMessageId(api, senderAddress, getParaId(this.node), ethAsset.assetId, address, asset.amount);
|
|
6399
|
+
case 11:
|
|
6370
6400
|
messageId = _context3.v;
|
|
6401
|
+
customXcmOnDest = createCustomXcmOnDest(input, this.node, version, messageId);
|
|
6402
|
+
case 12:
|
|
6371
6403
|
call = {
|
|
6372
6404
|
module: 'PolkadotXcm',
|
|
6373
6405
|
method: 'transfer_assets_using_type_and_then',
|
|
@@ -6377,22 +6409,7 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
6377
6409
|
assets_transfer_type: 'DestinationReserve',
|
|
6378
6410
|
remote_fees_id: addXcmVersionHeader((_feeAsset$multiLocati2 = feeAsset === null || feeAsset === void 0 ? void 0 : feeAsset.multiLocation) !== null && _feeAsset$multiLocati2 !== void 0 ? _feeAsset$multiLocati2 : DOT_MULTILOCATION, version),
|
|
6379
6411
|
fees_transfer_type: 'DestinationReserve',
|
|
6380
|
-
custom_xcm_on_dest:
|
|
6381
|
-
DepositAsset: {
|
|
6382
|
-
assets: {
|
|
6383
|
-
Wild: {
|
|
6384
|
-
AllCounted: 1
|
|
6385
|
-
}
|
|
6386
|
-
},
|
|
6387
|
-
beneficiary: createBeneficiaryMultiLocation({
|
|
6388
|
-
api: api,
|
|
6389
|
-
scenario: scenario,
|
|
6390
|
-
pallet: 'PolkadotXcm',
|
|
6391
|
-
recipientAddress: address,
|
|
6392
|
-
version: version
|
|
6393
|
-
})
|
|
6394
|
-
}
|
|
6395
|
-
}], version) : createCustomXcmOnDest(input, this.node, version, messageId),
|
|
6412
|
+
custom_xcm_on_dest: customXcmOnDest,
|
|
6396
6413
|
weight_limit: 'Unlimited'
|
|
6397
6414
|
}
|
|
6398
6415
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -6308,6 +6308,7 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
6308
6308
|
PARA_TO_PARA_FEE_DOT,
|
|
6309
6309
|
fee,
|
|
6310
6310
|
ethAsset,
|
|
6311
|
+
customXcmOnDest,
|
|
6311
6312
|
messageId,
|
|
6312
6313
|
call,
|
|
6313
6314
|
_args3 = arguments;
|
|
@@ -6359,16 +6360,47 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
6359
6360
|
PARA_TO_PARA_FEE_DOT = 500000000; // 0.5 DOT
|
|
6360
6361
|
fee = useOnlyDepositInstruction ? PARA_TO_PARA_FEE_DOT : (bridgeFee + executionFee).toString();
|
|
6361
6362
|
ethAsset = findAssetByMultiLocation(getOtherAssets('Ethereum'), asset.multiLocation);
|
|
6362
|
-
if (
|
|
6363
|
+
if (ethAsset) {
|
|
6363
6364
|
_context3.n = 8;
|
|
6364
6365
|
break;
|
|
6365
6366
|
}
|
|
6366
6367
|
throw new InvalidCurrencyError("Could not obtain Ethereum asset address for ".concat(JSON.stringify(asset)));
|
|
6367
6368
|
case 8:
|
|
6368
|
-
|
|
6369
|
-
|
|
6369
|
+
if (!useOnlyDepositInstruction) {
|
|
6370
|
+
_context3.n = 9;
|
|
6371
|
+
break;
|
|
6372
|
+
}
|
|
6373
|
+
customXcmOnDest = addXcmVersionHeader([{
|
|
6374
|
+
DepositAsset: {
|
|
6375
|
+
assets: {
|
|
6376
|
+
Wild: {
|
|
6377
|
+
AllCounted: 1
|
|
6378
|
+
}
|
|
6379
|
+
},
|
|
6380
|
+
beneficiary: createBeneficiaryMultiLocation({
|
|
6381
|
+
api: api,
|
|
6382
|
+
scenario: scenario,
|
|
6383
|
+
pallet: 'PolkadotXcm',
|
|
6384
|
+
recipientAddress: address,
|
|
6385
|
+
version: version
|
|
6386
|
+
})
|
|
6387
|
+
}
|
|
6388
|
+
}], version);
|
|
6389
|
+
_context3.n = 12;
|
|
6390
|
+
break;
|
|
6370
6391
|
case 9:
|
|
6392
|
+
if (ethAsset.assetId) {
|
|
6393
|
+
_context3.n = 10;
|
|
6394
|
+
break;
|
|
6395
|
+
}
|
|
6396
|
+
throw new InvalidCurrencyError("Ethereum asset ".concat(JSON.stringify(ethAsset), " has no assetId"));
|
|
6397
|
+
case 10:
|
|
6398
|
+
_context3.n = 11;
|
|
6399
|
+
return generateMessageId(api, senderAddress, getParaId(this.node), ethAsset.assetId, address, asset.amount);
|
|
6400
|
+
case 11:
|
|
6371
6401
|
messageId = _context3.v;
|
|
6402
|
+
customXcmOnDest = createCustomXcmOnDest(input, this.node, version, messageId);
|
|
6403
|
+
case 12:
|
|
6372
6404
|
call = {
|
|
6373
6405
|
module: 'PolkadotXcm',
|
|
6374
6406
|
method: 'transfer_assets_using_type_and_then',
|
|
@@ -6378,22 +6410,7 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
6378
6410
|
assets_transfer_type: 'DestinationReserve',
|
|
6379
6411
|
remote_fees_id: addXcmVersionHeader((_feeAsset$multiLocati2 = feeAsset === null || feeAsset === void 0 ? void 0 : feeAsset.multiLocation) !== null && _feeAsset$multiLocati2 !== void 0 ? _feeAsset$multiLocati2 : DOT_MULTILOCATION, version),
|
|
6380
6412
|
fees_transfer_type: 'DestinationReserve',
|
|
6381
|
-
custom_xcm_on_dest:
|
|
6382
|
-
DepositAsset: {
|
|
6383
|
-
assets: {
|
|
6384
|
-
Wild: {
|
|
6385
|
-
AllCounted: 1
|
|
6386
|
-
}
|
|
6387
|
-
},
|
|
6388
|
-
beneficiary: createBeneficiaryMultiLocation({
|
|
6389
|
-
api: api,
|
|
6390
|
-
scenario: scenario,
|
|
6391
|
-
pallet: 'PolkadotXcm',
|
|
6392
|
-
recipientAddress: address,
|
|
6393
|
-
version: version
|
|
6394
|
-
})
|
|
6395
|
-
}
|
|
6396
|
-
}], version) : createCustomXcmOnDest(input, this.node, version, messageId),
|
|
6413
|
+
custom_xcm_on_dest: customXcmOnDest,
|
|
6397
6414
|
weight_limit: 'Unlimited'
|
|
6398
6415
|
}
|
|
6399
6416
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-core",
|
|
3
|
-
"version": "10.4.
|
|
3
|
+
"version": "10.4.1",
|
|
4
4
|
"description": "SDK core for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"@noble/hashes": "^1.8.0",
|
|
27
27
|
"@scure/base": "^1.2.6",
|
|
28
28
|
"viem": "^2.30.5",
|
|
29
|
-
"@paraspell/
|
|
30
|
-
"@paraspell/
|
|
31
|
-
"@paraspell/sdk-common": "10.4.
|
|
29
|
+
"@paraspell/pallets": "10.4.1",
|
|
30
|
+
"@paraspell/assets": "10.4.1",
|
|
31
|
+
"@paraspell/sdk-common": "10.4.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|