@paraspell/sdk 8.9.8 → 8.9.9
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 +48 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.mjs +49 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1246,6 +1246,30 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1246
1246
|
}
|
|
1247
1247
|
return getDryRun;
|
|
1248
1248
|
}()
|
|
1249
|
+
}, {
|
|
1250
|
+
key: "getBridgeStatus",
|
|
1251
|
+
value: function () {
|
|
1252
|
+
var _getBridgeStatus = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
1253
|
+
var outboundOperatingMode;
|
|
1254
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
1255
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
1256
|
+
case 0:
|
|
1257
|
+
_context18.next = 2;
|
|
1258
|
+
return this.api.getUnsafeApi().query.EthereumOutboundQueue.OperatingMode.getValue();
|
|
1259
|
+
case 2:
|
|
1260
|
+
outboundOperatingMode = _context18.sent;
|
|
1261
|
+
return _context18.abrupt("return", outboundOperatingMode.type);
|
|
1262
|
+
case 4:
|
|
1263
|
+
case "end":
|
|
1264
|
+
return _context18.stop();
|
|
1265
|
+
}
|
|
1266
|
+
}, _callee18, this);
|
|
1267
|
+
}));
|
|
1268
|
+
function getBridgeStatus() {
|
|
1269
|
+
return _getBridgeStatus.apply(this, arguments);
|
|
1270
|
+
}
|
|
1271
|
+
return getBridgeStatus;
|
|
1272
|
+
}()
|
|
1249
1273
|
}, {
|
|
1250
1274
|
key: "setDisconnectAllowed",
|
|
1251
1275
|
value: function setDisconnectAllowed(allowed) {
|
|
@@ -1529,9 +1553,32 @@ var getParaEthTransferFees = /*#__PURE__*/function () {
|
|
|
1529
1553
|
return _ref.apply(this, arguments);
|
|
1530
1554
|
};
|
|
1531
1555
|
}();
|
|
1556
|
+
/**
|
|
1557
|
+
* Gets the Ethereum bridge status.
|
|
1558
|
+
*/
|
|
1559
|
+
var getBridgeStatus = /*#__PURE__*/function () {
|
|
1560
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(ahApi) {
|
|
1561
|
+
var papiApi;
|
|
1562
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1563
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
1564
|
+
case 0:
|
|
1565
|
+
papiApi = new PapiApi();
|
|
1566
|
+
papiApi.setApi(ahApi);
|
|
1567
|
+
return _context2.abrupt("return", sdkCore.getBridgeStatus(papiApi));
|
|
1568
|
+
case 3:
|
|
1569
|
+
case "end":
|
|
1570
|
+
return _context2.stop();
|
|
1571
|
+
}
|
|
1572
|
+
}, _callee2);
|
|
1573
|
+
}));
|
|
1574
|
+
return function getBridgeStatus(_x2) {
|
|
1575
|
+
return _ref2.apply(this, arguments);
|
|
1576
|
+
};
|
|
1577
|
+
}();
|
|
1532
1578
|
|
|
1533
1579
|
var transfer = /*#__PURE__*/Object.freeze({
|
|
1534
1580
|
__proto__: null,
|
|
1581
|
+
getBridgeStatus: getBridgeStatus,
|
|
1535
1582
|
getDryRun: getDryRun,
|
|
1536
1583
|
getParaEthTransferFees: getParaEthTransferFees,
|
|
1537
1584
|
send: send
|
|
@@ -1545,6 +1592,7 @@ exports.createApiInstanceForNode = createApiInstanceForNode;
|
|
|
1545
1592
|
exports.getAssetBalance = getAssetBalance;
|
|
1546
1593
|
exports.getBalanceForeign = getBalanceForeign;
|
|
1547
1594
|
exports.getBalanceNative = getBalanceNative;
|
|
1595
|
+
exports.getBridgeStatus = getBridgeStatus;
|
|
1548
1596
|
exports.getDryRun = getDryRun;
|
|
1549
1597
|
exports.getMaxForeignTransferableAmount = getMaxForeignTransferableAmount;
|
|
1550
1598
|
exports.getMaxNativeTransferableAmount = getMaxNativeTransferableAmount;
|
package/dist/index.d.ts
CHANGED
|
@@ -208,12 +208,18 @@ declare const getDryRun: (options: _paraspell_sdk_core.TDryRunBaseOptions<TPapiT
|
|
|
208
208
|
api?: TPapiApiOrUrl;
|
|
209
209
|
}) => Promise<_paraspell_sdk_core.TDryRunResult>;
|
|
210
210
|
declare const getParaEthTransferFees: (ahApi?: TPapiApiOrUrl) => Promise<[bigint, bigint]>;
|
|
211
|
+
/**
|
|
212
|
+
* Gets the Ethereum bridge status.
|
|
213
|
+
*/
|
|
214
|
+
declare const getBridgeStatus: (ahApi?: TPapiApiOrUrl) => Promise<_paraspell_sdk_core.TBridgeStatus>;
|
|
211
215
|
|
|
216
|
+
declare const transfer_getBridgeStatus: typeof getBridgeStatus;
|
|
212
217
|
declare const transfer_getDryRun: typeof getDryRun;
|
|
213
218
|
declare const transfer_getParaEthTransferFees: typeof getParaEthTransferFees;
|
|
214
219
|
declare const transfer_send: typeof send;
|
|
215
220
|
declare namespace transfer {
|
|
216
221
|
export {
|
|
222
|
+
transfer_getBridgeStatus as getBridgeStatus,
|
|
217
223
|
transfer_getDryRun as getDryRun,
|
|
218
224
|
transfer_getParaEthTransferFees as getParaEthTransferFees,
|
|
219
225
|
transfer_send as send,
|
|
@@ -222,5 +228,5 @@ declare namespace transfer {
|
|
|
222
228
|
|
|
223
229
|
declare const createApiInstanceForNode: (node: TNodeDotKsmWithRelayChains) => Promise<polkadot_api.PolkadotClient>;
|
|
224
230
|
|
|
225
|
-
export { Builder, EvmBuilder, assets, claimAssets, createApiInstanceForNode, getAssetBalance, getBalanceForeign, getBalanceNative, getDryRun, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getOriginFeeDetails, getParaEthTransferFees, getTransferInfo, getTransferableAmount, send, verifyEdOnDestination, transfer as xcmPallet };
|
|
231
|
+
export { Builder, EvmBuilder, assets, claimAssets, createApiInstanceForNode, getAssetBalance, getBalanceForeign, getBalanceNative, getBridgeStatus, getDryRun, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getOriginFeeDetails, getParaEthTransferFees, getTransferInfo, getTransferableAmount, send, verifyEdOnDestination, transfer as xcmPallet };
|
|
226
232
|
export type { GeneralBuilder, TEvmNodeFromPapi, TPapiApi, TPapiApiOrUrl, TPapiTransaction };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BatchMode, createApiInstanceForNode as createApiInstanceForNode$1, NodeNotSupportedError, Parents, Version, getNode, isForeignAsset, computeFeeFromDryRun, getAssetsObject, getBalanceNative as getBalanceNative$1, getBalanceForeign as getBalanceForeign$1, getTransferInfo as getTransferInfo$1, getAssetBalance as getAssetBalance$1, claimAssets as claimAssets$1, getOriginFeeDetails as getOriginFeeDetails$1, getMaxNativeTransferableAmount as getMaxNativeTransferableAmount$1, getMaxForeignTransferableAmount as getMaxForeignTransferableAmount$1, getTransferableAmount as getTransferableAmount$1, verifyEdOnDestination as verifyEdOnDestination$1, Foreign, ForeignAbstract, Native, Override, findAsset, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTNode, hasSupportForAsset, isNodeEvm, transferMoonbeamEvm, validateAddress, transferMoonbeamToEth, Builder as Builder$1, getParaEthTransferFees as getParaEthTransferFees$1, send as send$1, getDryRun as getDryRun$1 } from '@paraspell/sdk-core';
|
|
1
|
+
import { BatchMode, createApiInstanceForNode as createApiInstanceForNode$1, NodeNotSupportedError, Parents, Version, getNode, isForeignAsset, computeFeeFromDryRun, getAssetsObject, getBalanceNative as getBalanceNative$1, getBalanceForeign as getBalanceForeign$1, getTransferInfo as getTransferInfo$1, getAssetBalance as getAssetBalance$1, claimAssets as claimAssets$1, getOriginFeeDetails as getOriginFeeDetails$1, getMaxNativeTransferableAmount as getMaxNativeTransferableAmount$1, getMaxForeignTransferableAmount as getMaxForeignTransferableAmount$1, getTransferableAmount as getTransferableAmount$1, verifyEdOnDestination as verifyEdOnDestination$1, Foreign, ForeignAbstract, Native, Override, findAsset, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTNode, hasSupportForAsset, isNodeEvm, transferMoonbeamEvm, validateAddress, transferMoonbeamToEth, Builder as Builder$1, getParaEthTransferFees as getParaEthTransferFees$1, getBridgeStatus as getBridgeStatus$1, send as send$1, getDryRun as getDryRun$1 } from '@paraspell/sdk-core';
|
|
2
2
|
export * from '@paraspell/sdk-core';
|
|
3
3
|
import { blake2b } from '@noble/hashes/blake2b';
|
|
4
4
|
import { bytesToHex } from '@noble/hashes/utils';
|
|
@@ -1245,6 +1245,30 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1245
1245
|
}
|
|
1246
1246
|
return getDryRun;
|
|
1247
1247
|
}()
|
|
1248
|
+
}, {
|
|
1249
|
+
key: "getBridgeStatus",
|
|
1250
|
+
value: function () {
|
|
1251
|
+
var _getBridgeStatus = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
1252
|
+
var outboundOperatingMode;
|
|
1253
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
1254
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
1255
|
+
case 0:
|
|
1256
|
+
_context18.next = 2;
|
|
1257
|
+
return this.api.getUnsafeApi().query.EthereumOutboundQueue.OperatingMode.getValue();
|
|
1258
|
+
case 2:
|
|
1259
|
+
outboundOperatingMode = _context18.sent;
|
|
1260
|
+
return _context18.abrupt("return", outboundOperatingMode.type);
|
|
1261
|
+
case 4:
|
|
1262
|
+
case "end":
|
|
1263
|
+
return _context18.stop();
|
|
1264
|
+
}
|
|
1265
|
+
}, _callee18, this);
|
|
1266
|
+
}));
|
|
1267
|
+
function getBridgeStatus() {
|
|
1268
|
+
return _getBridgeStatus.apply(this, arguments);
|
|
1269
|
+
}
|
|
1270
|
+
return getBridgeStatus;
|
|
1271
|
+
}()
|
|
1248
1272
|
}, {
|
|
1249
1273
|
key: "setDisconnectAllowed",
|
|
1250
1274
|
value: function setDisconnectAllowed(allowed) {
|
|
@@ -1528,12 +1552,35 @@ var getParaEthTransferFees = /*#__PURE__*/function () {
|
|
|
1528
1552
|
return _ref.apply(this, arguments);
|
|
1529
1553
|
};
|
|
1530
1554
|
}();
|
|
1555
|
+
/**
|
|
1556
|
+
* Gets the Ethereum bridge status.
|
|
1557
|
+
*/
|
|
1558
|
+
var getBridgeStatus = /*#__PURE__*/function () {
|
|
1559
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(ahApi) {
|
|
1560
|
+
var papiApi;
|
|
1561
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1562
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
1563
|
+
case 0:
|
|
1564
|
+
papiApi = new PapiApi();
|
|
1565
|
+
papiApi.setApi(ahApi);
|
|
1566
|
+
return _context2.abrupt("return", getBridgeStatus$1(papiApi));
|
|
1567
|
+
case 3:
|
|
1568
|
+
case "end":
|
|
1569
|
+
return _context2.stop();
|
|
1570
|
+
}
|
|
1571
|
+
}, _callee2);
|
|
1572
|
+
}));
|
|
1573
|
+
return function getBridgeStatus(_x2) {
|
|
1574
|
+
return _ref2.apply(this, arguments);
|
|
1575
|
+
};
|
|
1576
|
+
}();
|
|
1531
1577
|
|
|
1532
1578
|
var transfer = /*#__PURE__*/Object.freeze({
|
|
1533
1579
|
__proto__: null,
|
|
1580
|
+
getBridgeStatus: getBridgeStatus,
|
|
1534
1581
|
getDryRun: getDryRun,
|
|
1535
1582
|
getParaEthTransferFees: getParaEthTransferFees,
|
|
1536
1583
|
send: send
|
|
1537
1584
|
});
|
|
1538
1585
|
|
|
1539
|
-
export { Builder, EvmBuilder, assets, claimAssets, createApiInstanceForNode, getAssetBalance, getBalanceForeign, getBalanceNative, getDryRun, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getOriginFeeDetails, getParaEthTransferFees, getTransferInfo, getTransferableAmount, send, verifyEdOnDestination, transfer as xcmPallet };
|
|
1586
|
+
export { Builder, EvmBuilder, assets, claimAssets, createApiInstanceForNode, getAssetBalance, getBalanceForeign, getBalanceNative, getBridgeStatus, getDryRun, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getOriginFeeDetails, getParaEthTransferFees, getTransferInfo, getTransferableAmount, send, verifyEdOnDestination, transfer as xcmPallet };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk",
|
|
3
|
-
"version": "8.9.
|
|
3
|
+
"version": "8.9.9",
|
|
4
4
|
"description": "SDK for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"ethers": "^6.13.5",
|
|
27
27
|
"viem": "^2.23.15",
|
|
28
28
|
"@noble/hashes": "^1.7.1",
|
|
29
|
-
"@paraspell/sdk-core": "8.9.
|
|
29
|
+
"@paraspell/sdk-core": "8.9.9"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"polkadot-api": ">= 1.9.7 < 2"
|