@paraspell/sdk 14.1.0 → 14.2.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/README.md +1 -1
- package/dist/index.mjs +25 -22
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</p>
|
|
17
17
|
<p>Supporting every XCM Active Parachain <a href = "https://paraspell.github.io/docs/supported-chains.html"\>[list]</p>
|
|
18
18
|
<p>SDK documentation <a href = "https://paraspell.github.io/docs/" \>[here]</p>
|
|
19
|
-
|
|
19
|
+
<p>Generate XCM SDK starter project <a href="https://paraspell.github.io/docs/paraspell-cli/getting-started.html">[here]</a></p>
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
22
|
<br /><br />
|
package/dist/index.mjs
CHANGED
|
@@ -1465,7 +1465,7 @@ var PapiApi = /*#__PURE__*/function (_PolkadotApi) {
|
|
|
1465
1465
|
value: function () {
|
|
1466
1466
|
var _getDeliveryFee = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee12(chain, forwardedXcm, asset, assetLocalizedLoc, version) {
|
|
1467
1467
|
var _deliveryFeeRes, _deliveryFeeRes2, _deliveryFeeRes3;
|
|
1468
|
-
var xcmPaymentApi, usedThirdParam, deliveryFeeRes, baseArgs, message, assetId, transformedAssetLoc, deliveryFeeResolved, nativeAsset, res, _t6, _t7;
|
|
1468
|
+
var xcmPaymentApi, usedThirdParam, deliveryFeeRes, baseArgs, message, assetId, transformedAssetLoc, deliveryFees, deliveryFeeResolved, nativeAsset, res, _t6, _t7;
|
|
1469
1469
|
return _regenerator().w(function (_context12) {
|
|
1470
1470
|
while (1) switch (_context12.p = _context12.n) {
|
|
1471
1471
|
case 0:
|
|
@@ -1503,13 +1503,14 @@ var PapiApi = /*#__PURE__*/function (_PolkadotApi) {
|
|
|
1503
1503
|
case 5:
|
|
1504
1504
|
throw _t6;
|
|
1505
1505
|
case 6:
|
|
1506
|
-
if (!(((_deliveryFeeRes = deliveryFeeRes) === null || _deliveryFeeRes === void 0 || (
|
|
1506
|
+
if (!(((_deliveryFeeRes = deliveryFeeRes) === null || _deliveryFeeRes === void 0 ? void 0 : _deliveryFeeRes.success) === false || ((_deliveryFeeRes2 = deliveryFeeRes) === null || _deliveryFeeRes2 === void 0 || (_deliveryFeeRes2 = _deliveryFeeRes2.value) === null || _deliveryFeeRes2 === void 0 ? void 0 : _deliveryFeeRes2.type) === 'Unimplemented')) {
|
|
1507
1507
|
_context12.n = 7;
|
|
1508
1508
|
break;
|
|
1509
1509
|
}
|
|
1510
1510
|
return _context12.a(2, 0n);
|
|
1511
1511
|
case 7:
|
|
1512
|
-
|
|
1512
|
+
deliveryFees = (_deliveryFeeRes3 = deliveryFeeRes) === null || _deliveryFeeRes3 === void 0 || (_deliveryFeeRes3 = _deliveryFeeRes3.value) === null || _deliveryFeeRes3 === void 0 ? void 0 : _deliveryFeeRes3.value;
|
|
1513
|
+
deliveryFeeResolved = Array.isArray(deliveryFees) && deliveryFees.length > 0 ? deliveryFees[0].fun.value : 0n;
|
|
1513
1514
|
nativeAsset = this.findNativeAssetInfoOrThrow(chain);
|
|
1514
1515
|
if (!(isAssetEqual(asset, nativeAsset) || usedThirdParam)) {
|
|
1515
1516
|
_context12.n = 8;
|
|
@@ -1932,29 +1933,31 @@ var PapiApi = /*#__PURE__*/function (_PolkadotApi) {
|
|
|
1932
1933
|
key: "signAndSubmitFinalized",
|
|
1933
1934
|
value: function () {
|
|
1934
1935
|
var _signAndSubmitFinalized = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee21(tx, sender) {
|
|
1935
|
-
var signer;
|
|
1936
|
+
var signer, result, _t0;
|
|
1936
1937
|
return _regenerator().w(function (_context21) {
|
|
1937
|
-
while (1) switch (_context21.n) {
|
|
1938
|
+
while (1) switch (_context21.p = _context21.n) {
|
|
1938
1939
|
case 0:
|
|
1939
1940
|
signer = isSenderSigner(sender) ? sender : createDevSigner(sender);
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1941
|
+
_context21.p = 1;
|
|
1942
|
+
_context21.n = 2;
|
|
1943
|
+
return tx.signAndSubmit(signer);
|
|
1944
|
+
case 2:
|
|
1945
|
+
result = _context21.v;
|
|
1946
|
+
if (result.ok) {
|
|
1947
|
+
_context21.n = 3;
|
|
1948
|
+
break;
|
|
1949
|
+
}
|
|
1950
|
+
throw new SubmitTransactionError(JSON.stringify(result.dispatchError.value));
|
|
1951
|
+
case 3:
|
|
1952
|
+
return _context21.a(2, result.txHash);
|
|
1953
|
+
case 4:
|
|
1954
|
+
_context21.p = 4;
|
|
1955
|
+
_t0 = _context21.v;
|
|
1956
|
+
throw _t0 instanceof Error ? _t0 : new SubmitTransactionError(String(_t0));
|
|
1957
|
+
case 5:
|
|
1958
|
+
return _context21.a(2);
|
|
1956
1959
|
}
|
|
1957
|
-
}, _callee21);
|
|
1960
|
+
}, _callee21, null, [[1, 4]]);
|
|
1958
1961
|
}));
|
|
1959
1962
|
function signAndSubmitFinalized(_x35, _x36) {
|
|
1960
1963
|
return _signAndSubmitFinalized.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.2.0",
|
|
4
4
|
"description": "SDK for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"@polkadot-labs/hdkd": "^0.0.28",
|
|
28
28
|
"@polkadot-labs/hdkd-helpers": "^0.0.30",
|
|
29
29
|
"viem": "^2.55.10",
|
|
30
|
-
"@paraspell/sdk-core": "14.
|
|
30
|
+
"@paraspell/sdk-core": "14.2.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"polkadot-api": ">= 2 < 3",
|
|
34
|
-
"@paraspell/descriptors": "14.
|
|
34
|
+
"@paraspell/descriptors": "14.2.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@acala-network/chopsticks": "^1.5.0",
|