@paraspell/sdk-pjs 11.2.2 → 11.2.3
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 +34 -45
- package/dist/index.mjs +34 -45
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -215,19 +215,17 @@ function _regeneratorDefine(e, r, n, t) {
|
|
|
215
215
|
i = 0;
|
|
216
216
|
}
|
|
217
217
|
_regeneratorDefine = function (e, r, n, t) {
|
|
218
|
-
|
|
218
|
+
function o(r, n) {
|
|
219
|
+
_regeneratorDefine(e, r, function (e) {
|
|
220
|
+
return this._invoke(r, n, e);
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
r ? i ? i(e, r, {
|
|
219
224
|
value: n,
|
|
220
225
|
enumerable: !t,
|
|
221
226
|
configurable: !t,
|
|
222
227
|
writable: !t
|
|
223
|
-
}) : e[r] = n;
|
|
224
|
-
function o(r, n) {
|
|
225
|
-
_regeneratorDefine(e, r, function (e) {
|
|
226
|
-
return this._invoke(r, n, e);
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
o("next", 0), o("throw", 1), o("return", 2);
|
|
230
|
-
}
|
|
228
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
231
229
|
}, _regeneratorDefine(e, r, n, t);
|
|
232
230
|
}
|
|
233
231
|
function _slicedToArray(r, e) {
|
|
@@ -1222,6 +1220,7 @@ var createContext = function createContext(executionUrl, env) {
|
|
|
1222
1220
|
var config = env.config;
|
|
1223
1221
|
return new api$1.Context({
|
|
1224
1222
|
environment: env.name,
|
|
1223
|
+
graphqlApiUrl: config.GRAPHQL_API_URL,
|
|
1225
1224
|
ethereum: {
|
|
1226
1225
|
ethChainId: env.ethChainId,
|
|
1227
1226
|
ethChains: _defineProperty(_defineProperty({}, sdkCore.ETH_CHAIN_ID.toString(), executionUrl), sdkCore.getParaId('Moonbeam'), 'https://rpc.api.moonbeam.network'),
|
|
@@ -1252,7 +1251,7 @@ var createContext = function createContext(executionUrl, env) {
|
|
|
1252
1251
|
*/
|
|
1253
1252
|
var transferEthToPolkadot$1 = /*#__PURE__*/function () {
|
|
1254
1253
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref) {
|
|
1255
|
-
var api, provider, signer, address, to, currency, ethAsset, amount, env, context, destParaId, overrides, registry, fee, sourceAddress, transfer, validation, tx, response, receipt, messageReceipt, _t, _t2, _t3, _t4, _t5, _t6, _t7, _t8, _t9, _t0, _t1, _t10, _t11, _t12, _t13
|
|
1254
|
+
var api, provider, signer, address, to, currency, ethAsset, amount, env, context, destParaId, overrides, registry, fee, sourceAddress, transfer, validation, tx, response, receipt, messageReceipt, _t, _t2, _t3, _t4, _t5, _t6, _t7, _t8, _t9, _t0, _t1, _t10, _t11, _t12, _t13;
|
|
1256
1255
|
return _regenerator().w(function (_context) {
|
|
1257
1256
|
while (1) switch (_context.n) {
|
|
1258
1257
|
case 0:
|
|
@@ -1309,34 +1308,26 @@ var transferEthToPolkadot$1 = /*#__PURE__*/function () {
|
|
|
1309
1308
|
_context.n = 5;
|
|
1310
1309
|
return api$1.assetsV2.fromContext(context);
|
|
1311
1310
|
case 5:
|
|
1312
|
-
_t5 = _context.v;
|
|
1313
|
-
_t6 = _t3(_t4, _t5);
|
|
1314
|
-
_t7 = overrides;
|
|
1315
|
-
_t8 = _t2(_t6, _t7);
|
|
1316
1311
|
_context.n = 6;
|
|
1317
|
-
return _t.buildRegistry.call(_t,
|
|
1312
|
+
return _t.buildRegistry.call(_t, _t2(_t3(_t4, _context.v), overrides));
|
|
1318
1313
|
case 6:
|
|
1319
1314
|
registry = _context.v;
|
|
1320
|
-
|
|
1321
|
-
|
|
1315
|
+
_t5 = api$1.toPolkadotV2;
|
|
1316
|
+
_t6 = context.gateway();
|
|
1322
1317
|
_context.n = 7;
|
|
1323
1318
|
return context.assetHub();
|
|
1324
1319
|
case 7:
|
|
1325
|
-
|
|
1320
|
+
_t7 = _context.v;
|
|
1326
1321
|
_context.n = 8;
|
|
1327
1322
|
return context.parachain(destParaId);
|
|
1328
1323
|
case 8:
|
|
1329
|
-
|
|
1330
|
-
_t11 = {
|
|
1331
|
-
gateway: _t0,
|
|
1332
|
-
assetHub: _t1,
|
|
1333
|
-
destination: _t10
|
|
1334
|
-
};
|
|
1335
|
-
_t12 = registry;
|
|
1336
|
-
_t13 = ethAsset.assetId;
|
|
1337
|
-
_t14 = destParaId;
|
|
1324
|
+
_t8 = _context.v;
|
|
1338
1325
|
_context.n = 9;
|
|
1339
|
-
return
|
|
1326
|
+
return _t5.getDeliveryFee.call(_t5, {
|
|
1327
|
+
gateway: _t6,
|
|
1328
|
+
assetHub: _t7,
|
|
1329
|
+
destination: _t8
|
|
1330
|
+
}, registry, ethAsset.assetId, destParaId);
|
|
1340
1331
|
case 9:
|
|
1341
1332
|
fee = _context.v;
|
|
1342
1333
|
_context.n = 10;
|
|
@@ -1347,17 +1338,17 @@ var transferEthToPolkadot$1 = /*#__PURE__*/function () {
|
|
|
1347
1338
|
return api$1.toPolkadotV2.createTransfer(registry, sourceAddress, address, ethAsset.assetId, destParaId, amount, fee);
|
|
1348
1339
|
case 11:
|
|
1349
1340
|
transfer = _context.v;
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1341
|
+
_t9 = api$1.toPolkadotV2;
|
|
1342
|
+
_t0 = context.ethereum();
|
|
1343
|
+
_t1 = context.gateway();
|
|
1353
1344
|
_context.n = 12;
|
|
1354
1345
|
return context.bridgeHub();
|
|
1355
1346
|
case 12:
|
|
1356
|
-
|
|
1347
|
+
_t10 = _context.v;
|
|
1357
1348
|
_context.n = 13;
|
|
1358
1349
|
return context.assetHub();
|
|
1359
1350
|
case 13:
|
|
1360
|
-
|
|
1351
|
+
_t11 = _context.v;
|
|
1361
1352
|
if (!(destParaId !== sdkCore.getParaId('AssetHubPolkadot'))) {
|
|
1362
1353
|
_context.n = 15;
|
|
1363
1354
|
break;
|
|
@@ -1365,23 +1356,21 @@ var transferEthToPolkadot$1 = /*#__PURE__*/function () {
|
|
|
1365
1356
|
_context.n = 14;
|
|
1366
1357
|
return context.parachain(destParaId);
|
|
1367
1358
|
case 14:
|
|
1368
|
-
|
|
1359
|
+
_t12 = _context.v;
|
|
1369
1360
|
_context.n = 16;
|
|
1370
1361
|
break;
|
|
1371
1362
|
case 15:
|
|
1372
|
-
|
|
1363
|
+
_t12 = undefined;
|
|
1373
1364
|
case 16:
|
|
1374
|
-
|
|
1375
|
-
_t22 = {
|
|
1376
|
-
ethereum: _t16,
|
|
1377
|
-
gateway: _t17,
|
|
1378
|
-
bridgeHub: _t18,
|
|
1379
|
-
assetHub: _t19,
|
|
1380
|
-
destParachain: _t21
|
|
1381
|
-
};
|
|
1382
|
-
_t23 = transfer;
|
|
1365
|
+
_t13 = _t12;
|
|
1383
1366
|
_context.n = 17;
|
|
1384
|
-
return
|
|
1367
|
+
return _t9.validateTransfer.call(_t9, {
|
|
1368
|
+
ethereum: _t0,
|
|
1369
|
+
gateway: _t1,
|
|
1370
|
+
bridgeHub: _t10,
|
|
1371
|
+
assetHub: _t11,
|
|
1372
|
+
destParachain: _t13
|
|
1373
|
+
}, transfer);
|
|
1385
1374
|
case 17:
|
|
1386
1375
|
validation = _context.v;
|
|
1387
1376
|
if (!validation.logs.find(function (l) {
|
package/dist/index.mjs
CHANGED
|
@@ -214,19 +214,17 @@ function _regeneratorDefine(e, r, n, t) {
|
|
|
214
214
|
i = 0;
|
|
215
215
|
}
|
|
216
216
|
_regeneratorDefine = function (e, r, n, t) {
|
|
217
|
-
|
|
217
|
+
function o(r, n) {
|
|
218
|
+
_regeneratorDefine(e, r, function (e) {
|
|
219
|
+
return this._invoke(r, n, e);
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
r ? i ? i(e, r, {
|
|
218
223
|
value: n,
|
|
219
224
|
enumerable: !t,
|
|
220
225
|
configurable: !t,
|
|
221
226
|
writable: !t
|
|
222
|
-
}) : e[r] = n;
|
|
223
|
-
function o(r, n) {
|
|
224
|
-
_regeneratorDefine(e, r, function (e) {
|
|
225
|
-
return this._invoke(r, n, e);
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
o("next", 0), o("throw", 1), o("return", 2);
|
|
229
|
-
}
|
|
227
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
230
228
|
}, _regeneratorDefine(e, r, n, t);
|
|
231
229
|
}
|
|
232
230
|
function _slicedToArray(r, e) {
|
|
@@ -1221,6 +1219,7 @@ var createContext = function createContext(executionUrl, env) {
|
|
|
1221
1219
|
var config = env.config;
|
|
1222
1220
|
return new Context({
|
|
1223
1221
|
environment: env.name,
|
|
1222
|
+
graphqlApiUrl: config.GRAPHQL_API_URL,
|
|
1224
1223
|
ethereum: {
|
|
1225
1224
|
ethChainId: env.ethChainId,
|
|
1226
1225
|
ethChains: _defineProperty(_defineProperty({}, ETH_CHAIN_ID.toString(), executionUrl), getParaId('Moonbeam'), 'https://rpc.api.moonbeam.network'),
|
|
@@ -1251,7 +1250,7 @@ var createContext = function createContext(executionUrl, env) {
|
|
|
1251
1250
|
*/
|
|
1252
1251
|
var transferEthToPolkadot$1 = /*#__PURE__*/function () {
|
|
1253
1252
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref) {
|
|
1254
|
-
var api, provider, signer, address, to, currency, ethAsset, amount, env, context, destParaId, overrides, registry, fee, sourceAddress, transfer, validation, tx, response, receipt, messageReceipt, _t, _t2, _t3, _t4, _t5, _t6, _t7, _t8, _t9, _t0, _t1, _t10, _t11, _t12, _t13
|
|
1253
|
+
var api, provider, signer, address, to, currency, ethAsset, amount, env, context, destParaId, overrides, registry, fee, sourceAddress, transfer, validation, tx, response, receipt, messageReceipt, _t, _t2, _t3, _t4, _t5, _t6, _t7, _t8, _t9, _t0, _t1, _t10, _t11, _t12, _t13;
|
|
1255
1254
|
return _regenerator().w(function (_context) {
|
|
1256
1255
|
while (1) switch (_context.n) {
|
|
1257
1256
|
case 0:
|
|
@@ -1308,34 +1307,26 @@ var transferEthToPolkadot$1 = /*#__PURE__*/function () {
|
|
|
1308
1307
|
_context.n = 5;
|
|
1309
1308
|
return assetsV2.fromContext(context);
|
|
1310
1309
|
case 5:
|
|
1311
|
-
_t5 = _context.v;
|
|
1312
|
-
_t6 = _t3(_t4, _t5);
|
|
1313
|
-
_t7 = overrides;
|
|
1314
|
-
_t8 = _t2(_t6, _t7);
|
|
1315
1310
|
_context.n = 6;
|
|
1316
|
-
return _t.buildRegistry.call(_t,
|
|
1311
|
+
return _t.buildRegistry.call(_t, _t2(_t3(_t4, _context.v), overrides));
|
|
1317
1312
|
case 6:
|
|
1318
1313
|
registry = _context.v;
|
|
1319
|
-
|
|
1320
|
-
|
|
1314
|
+
_t5 = toPolkadotV2;
|
|
1315
|
+
_t6 = context.gateway();
|
|
1321
1316
|
_context.n = 7;
|
|
1322
1317
|
return context.assetHub();
|
|
1323
1318
|
case 7:
|
|
1324
|
-
|
|
1319
|
+
_t7 = _context.v;
|
|
1325
1320
|
_context.n = 8;
|
|
1326
1321
|
return context.parachain(destParaId);
|
|
1327
1322
|
case 8:
|
|
1328
|
-
|
|
1329
|
-
_t11 = {
|
|
1330
|
-
gateway: _t0,
|
|
1331
|
-
assetHub: _t1,
|
|
1332
|
-
destination: _t10
|
|
1333
|
-
};
|
|
1334
|
-
_t12 = registry;
|
|
1335
|
-
_t13 = ethAsset.assetId;
|
|
1336
|
-
_t14 = destParaId;
|
|
1323
|
+
_t8 = _context.v;
|
|
1337
1324
|
_context.n = 9;
|
|
1338
|
-
return
|
|
1325
|
+
return _t5.getDeliveryFee.call(_t5, {
|
|
1326
|
+
gateway: _t6,
|
|
1327
|
+
assetHub: _t7,
|
|
1328
|
+
destination: _t8
|
|
1329
|
+
}, registry, ethAsset.assetId, destParaId);
|
|
1339
1330
|
case 9:
|
|
1340
1331
|
fee = _context.v;
|
|
1341
1332
|
_context.n = 10;
|
|
@@ -1346,17 +1337,17 @@ var transferEthToPolkadot$1 = /*#__PURE__*/function () {
|
|
|
1346
1337
|
return toPolkadotV2.createTransfer(registry, sourceAddress, address, ethAsset.assetId, destParaId, amount, fee);
|
|
1347
1338
|
case 11:
|
|
1348
1339
|
transfer = _context.v;
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1340
|
+
_t9 = toPolkadotV2;
|
|
1341
|
+
_t0 = context.ethereum();
|
|
1342
|
+
_t1 = context.gateway();
|
|
1352
1343
|
_context.n = 12;
|
|
1353
1344
|
return context.bridgeHub();
|
|
1354
1345
|
case 12:
|
|
1355
|
-
|
|
1346
|
+
_t10 = _context.v;
|
|
1356
1347
|
_context.n = 13;
|
|
1357
1348
|
return context.assetHub();
|
|
1358
1349
|
case 13:
|
|
1359
|
-
|
|
1350
|
+
_t11 = _context.v;
|
|
1360
1351
|
if (!(destParaId !== getParaId('AssetHubPolkadot'))) {
|
|
1361
1352
|
_context.n = 15;
|
|
1362
1353
|
break;
|
|
@@ -1364,23 +1355,21 @@ var transferEthToPolkadot$1 = /*#__PURE__*/function () {
|
|
|
1364
1355
|
_context.n = 14;
|
|
1365
1356
|
return context.parachain(destParaId);
|
|
1366
1357
|
case 14:
|
|
1367
|
-
|
|
1358
|
+
_t12 = _context.v;
|
|
1368
1359
|
_context.n = 16;
|
|
1369
1360
|
break;
|
|
1370
1361
|
case 15:
|
|
1371
|
-
|
|
1362
|
+
_t12 = undefined;
|
|
1372
1363
|
case 16:
|
|
1373
|
-
|
|
1374
|
-
_t22 = {
|
|
1375
|
-
ethereum: _t16,
|
|
1376
|
-
gateway: _t17,
|
|
1377
|
-
bridgeHub: _t18,
|
|
1378
|
-
assetHub: _t19,
|
|
1379
|
-
destParachain: _t21
|
|
1380
|
-
};
|
|
1381
|
-
_t23 = transfer;
|
|
1364
|
+
_t13 = _t12;
|
|
1382
1365
|
_context.n = 17;
|
|
1383
|
-
return
|
|
1366
|
+
return _t9.validateTransfer.call(_t9, {
|
|
1367
|
+
ethereum: _t0,
|
|
1368
|
+
gateway: _t1,
|
|
1369
|
+
bridgeHub: _t10,
|
|
1370
|
+
assetHub: _t11,
|
|
1371
|
+
destParachain: _t13
|
|
1372
|
+
}, transfer);
|
|
1384
1373
|
case 17:
|
|
1385
1374
|
validation = _context.v;
|
|
1386
1375
|
if (!validation.logs.find(function (l) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-pjs",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.3",
|
|
4
4
|
"description": "Polkadot.js based SDK for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@snowbridge/api": "0.
|
|
27
|
-
"@snowbridge/contract-types": "0.
|
|
26
|
+
"@snowbridge/api": "0.2.0",
|
|
27
|
+
"@snowbridge/contract-types": "0.2.0",
|
|
28
28
|
"ethers": "^6.15.0",
|
|
29
|
-
"viem": "^2.
|
|
30
|
-
"@paraspell/sdk-core": "11.2.
|
|
29
|
+
"viem": "^2.36.0",
|
|
30
|
+
"@paraspell/sdk-core": "11.2.3"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@polkadot/api": ">= 16.0 < 17",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|
|
41
|
-
"@babel/preset-env": "^7.28.
|
|
41
|
+
"@babel/preset-env": "^7.28.3",
|
|
42
42
|
"@codecov/rollup-plugin": "^1.9.1",
|
|
43
43
|
"@rollup/plugin-babel": "^6.0.4",
|
|
44
44
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"axios": "^1.11.0",
|
|
48
48
|
"dotenv": "^17.2.1",
|
|
49
49
|
"prettier": "^3.6.2",
|
|
50
|
-
"rollup": "^4.
|
|
51
|
-
"rollup-plugin-dts": "^6.2.
|
|
50
|
+
"rollup": "^4.50.0",
|
|
51
|
+
"rollup-plugin-dts": "^6.2.3",
|
|
52
52
|
"tslib": "^2.8.1"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|