@paraspell/sdk 8.9.8 → 8.9.10
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 +74 -10
- package/dist/index.d.ts +7 -1
- package/dist/index.mjs +75 -12
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -14,6 +14,9 @@ function _arrayLikeToArray(r, a) {
|
|
|
14
14
|
function _arrayWithHoles(r) {
|
|
15
15
|
if (Array.isArray(r)) return r;
|
|
16
16
|
}
|
|
17
|
+
function _arrayWithoutHoles(r) {
|
|
18
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
19
|
+
}
|
|
17
20
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
18
21
|
try {
|
|
19
22
|
var i = n[a](c),
|
|
@@ -109,6 +112,9 @@ function _defineProperty(e, r, t) {
|
|
|
109
112
|
writable: true
|
|
110
113
|
}) : e[r] = t, e;
|
|
111
114
|
}
|
|
115
|
+
function _iterableToArray(r) {
|
|
116
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
117
|
+
}
|
|
112
118
|
function _iterableToArrayLimit(r, l) {
|
|
113
119
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
114
120
|
if (null != t) {
|
|
@@ -136,6 +142,9 @@ function _iterableToArrayLimit(r, l) {
|
|
|
136
142
|
function _nonIterableRest() {
|
|
137
143
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
138
144
|
}
|
|
145
|
+
function _nonIterableSpread() {
|
|
146
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
147
|
+
}
|
|
139
148
|
function ownKeys(e, r) {
|
|
140
149
|
var t = Object.keys(e);
|
|
141
150
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -461,6 +470,9 @@ function _regeneratorRuntime() {
|
|
|
461
470
|
function _slicedToArray(r, e) {
|
|
462
471
|
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
463
472
|
}
|
|
473
|
+
function _toConsumableArray(r) {
|
|
474
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
475
|
+
}
|
|
464
476
|
function _toPrimitive(t, r) {
|
|
465
477
|
if ("object" != typeof t || !t) return t;
|
|
466
478
|
var e = t[Symbol.toPrimitive];
|
|
@@ -1187,7 +1199,8 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1187
1199
|
key: "getDryRun",
|
|
1188
1200
|
value: function () {
|
|
1189
1201
|
var _getDryRun = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17(_ref3) {
|
|
1190
|
-
var
|
|
1202
|
+
var _this$api$getUnsafeAp;
|
|
1203
|
+
var tx, address, node, supportsDryRunApi, isBifrost, DEFAULT_XCM_VERSION, result, isSuccess, failureReason, executionFee, fee, actualWeight, weight;
|
|
1191
1204
|
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
1192
1205
|
while (1) switch (_context17.prev = _context17.next) {
|
|
1193
1206
|
case 0:
|
|
@@ -1199,19 +1212,22 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1199
1212
|
}
|
|
1200
1213
|
throw new sdkCore.NodeNotSupportedError("DryRunApi is not available on node ".concat(node));
|
|
1201
1214
|
case 4:
|
|
1202
|
-
|
|
1203
|
-
|
|
1215
|
+
// Bifrost requires a third parameter XCM version
|
|
1216
|
+
isBifrost = node === 'BifrostPolkadot' || node === 'BifrostKusama';
|
|
1217
|
+
DEFAULT_XCM_VERSION = 3;
|
|
1218
|
+
_context17.next = 8;
|
|
1219
|
+
return (_this$api$getUnsafeAp = this.api.getUnsafeApi().apis.DryRunApi).dry_run_call.apply(_this$api$getUnsafeAp, [{
|
|
1204
1220
|
type: 'system',
|
|
1205
1221
|
value: {
|
|
1206
1222
|
type: 'Signed',
|
|
1207
1223
|
value: address
|
|
1208
1224
|
}
|
|
1209
|
-
}, tx.decodedCall);
|
|
1210
|
-
case
|
|
1225
|
+
}, tx.decodedCall].concat(_toConsumableArray(isBifrost ? [DEFAULT_XCM_VERSION] : [])));
|
|
1226
|
+
case 8:
|
|
1211
1227
|
result = _context17.sent;
|
|
1212
1228
|
isSuccess = result.success && result.value.execution_result.success;
|
|
1213
1229
|
if (isSuccess) {
|
|
1214
|
-
_context17.next =
|
|
1230
|
+
_context17.next = 13;
|
|
1215
1231
|
break;
|
|
1216
1232
|
}
|
|
1217
1233
|
failureReason = result.value.execution_result.value.error.value.value.type;
|
|
@@ -1219,10 +1235,10 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1219
1235
|
success: false,
|
|
1220
1236
|
failureReason: failureReason
|
|
1221
1237
|
}));
|
|
1222
|
-
case 11:
|
|
1223
|
-
_context17.next = 13;
|
|
1224
|
-
return this.calculateTransactionFee(tx, address);
|
|
1225
1238
|
case 13:
|
|
1239
|
+
_context17.next = 15;
|
|
1240
|
+
return this.calculateTransactionFee(tx, address);
|
|
1241
|
+
case 15:
|
|
1226
1242
|
executionFee = _context17.sent;
|
|
1227
1243
|
fee = sdkCore.computeFeeFromDryRun(result, node, executionFee);
|
|
1228
1244
|
actualWeight = result.value.execution_result.value.actual_weight;
|
|
@@ -1235,7 +1251,7 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1235
1251
|
fee: fee,
|
|
1236
1252
|
weight: weight
|
|
1237
1253
|
}));
|
|
1238
|
-
case
|
|
1254
|
+
case 20:
|
|
1239
1255
|
case "end":
|
|
1240
1256
|
return _context17.stop();
|
|
1241
1257
|
}
|
|
@@ -1246,6 +1262,30 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1246
1262
|
}
|
|
1247
1263
|
return getDryRun;
|
|
1248
1264
|
}()
|
|
1265
|
+
}, {
|
|
1266
|
+
key: "getBridgeStatus",
|
|
1267
|
+
value: function () {
|
|
1268
|
+
var _getBridgeStatus = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
1269
|
+
var outboundOperatingMode;
|
|
1270
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
1271
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
1272
|
+
case 0:
|
|
1273
|
+
_context18.next = 2;
|
|
1274
|
+
return this.api.getUnsafeApi().query.EthereumOutboundQueue.OperatingMode.getValue();
|
|
1275
|
+
case 2:
|
|
1276
|
+
outboundOperatingMode = _context18.sent;
|
|
1277
|
+
return _context18.abrupt("return", outboundOperatingMode.type);
|
|
1278
|
+
case 4:
|
|
1279
|
+
case "end":
|
|
1280
|
+
return _context18.stop();
|
|
1281
|
+
}
|
|
1282
|
+
}, _callee18, this);
|
|
1283
|
+
}));
|
|
1284
|
+
function getBridgeStatus() {
|
|
1285
|
+
return _getBridgeStatus.apply(this, arguments);
|
|
1286
|
+
}
|
|
1287
|
+
return getBridgeStatus;
|
|
1288
|
+
}()
|
|
1249
1289
|
}, {
|
|
1250
1290
|
key: "setDisconnectAllowed",
|
|
1251
1291
|
value: function setDisconnectAllowed(allowed) {
|
|
@@ -1529,9 +1569,32 @@ var getParaEthTransferFees = /*#__PURE__*/function () {
|
|
|
1529
1569
|
return _ref.apply(this, arguments);
|
|
1530
1570
|
};
|
|
1531
1571
|
}();
|
|
1572
|
+
/**
|
|
1573
|
+
* Gets the Ethereum bridge status.
|
|
1574
|
+
*/
|
|
1575
|
+
var getBridgeStatus = /*#__PURE__*/function () {
|
|
1576
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(ahApi) {
|
|
1577
|
+
var papiApi;
|
|
1578
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1579
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
1580
|
+
case 0:
|
|
1581
|
+
papiApi = new PapiApi();
|
|
1582
|
+
papiApi.setApi(ahApi);
|
|
1583
|
+
return _context2.abrupt("return", sdkCore.getBridgeStatus(papiApi));
|
|
1584
|
+
case 3:
|
|
1585
|
+
case "end":
|
|
1586
|
+
return _context2.stop();
|
|
1587
|
+
}
|
|
1588
|
+
}, _callee2);
|
|
1589
|
+
}));
|
|
1590
|
+
return function getBridgeStatus(_x2) {
|
|
1591
|
+
return _ref2.apply(this, arguments);
|
|
1592
|
+
};
|
|
1593
|
+
}();
|
|
1532
1594
|
|
|
1533
1595
|
var transfer = /*#__PURE__*/Object.freeze({
|
|
1534
1596
|
__proto__: null,
|
|
1597
|
+
getBridgeStatus: getBridgeStatus,
|
|
1535
1598
|
getDryRun: getDryRun,
|
|
1536
1599
|
getParaEthTransferFees: getParaEthTransferFees,
|
|
1537
1600
|
send: send
|
|
@@ -1545,6 +1608,7 @@ exports.createApiInstanceForNode = createApiInstanceForNode;
|
|
|
1545
1608
|
exports.getAssetBalance = getAssetBalance;
|
|
1546
1609
|
exports.getBalanceForeign = getBalanceForeign;
|
|
1547
1610
|
exports.getBalanceNative = getBalanceNative;
|
|
1611
|
+
exports.getBridgeStatus = getBridgeStatus;
|
|
1548
1612
|
exports.getDryRun = getDryRun;
|
|
1549
1613
|
exports.getMaxForeignTransferableAmount = getMaxForeignTransferableAmount;
|
|
1550
1614
|
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';
|
|
@@ -13,6 +13,9 @@ function _arrayLikeToArray(r, a) {
|
|
|
13
13
|
function _arrayWithHoles(r) {
|
|
14
14
|
if (Array.isArray(r)) return r;
|
|
15
15
|
}
|
|
16
|
+
function _arrayWithoutHoles(r) {
|
|
17
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
18
|
+
}
|
|
16
19
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
17
20
|
try {
|
|
18
21
|
var i = n[a](c),
|
|
@@ -108,6 +111,9 @@ function _defineProperty(e, r, t) {
|
|
|
108
111
|
writable: true
|
|
109
112
|
}) : e[r] = t, e;
|
|
110
113
|
}
|
|
114
|
+
function _iterableToArray(r) {
|
|
115
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
116
|
+
}
|
|
111
117
|
function _iterableToArrayLimit(r, l) {
|
|
112
118
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
113
119
|
if (null != t) {
|
|
@@ -135,6 +141,9 @@ function _iterableToArrayLimit(r, l) {
|
|
|
135
141
|
function _nonIterableRest() {
|
|
136
142
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
137
143
|
}
|
|
144
|
+
function _nonIterableSpread() {
|
|
145
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
146
|
+
}
|
|
138
147
|
function ownKeys(e, r) {
|
|
139
148
|
var t = Object.keys(e);
|
|
140
149
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -460,6 +469,9 @@ function _regeneratorRuntime() {
|
|
|
460
469
|
function _slicedToArray(r, e) {
|
|
461
470
|
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
462
471
|
}
|
|
472
|
+
function _toConsumableArray(r) {
|
|
473
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
474
|
+
}
|
|
463
475
|
function _toPrimitive(t, r) {
|
|
464
476
|
if ("object" != typeof t || !t) return t;
|
|
465
477
|
var e = t[Symbol.toPrimitive];
|
|
@@ -1186,7 +1198,8 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1186
1198
|
key: "getDryRun",
|
|
1187
1199
|
value: function () {
|
|
1188
1200
|
var _getDryRun = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17(_ref3) {
|
|
1189
|
-
var
|
|
1201
|
+
var _this$api$getUnsafeAp;
|
|
1202
|
+
var tx, address, node, supportsDryRunApi, isBifrost, DEFAULT_XCM_VERSION, result, isSuccess, failureReason, executionFee, fee, actualWeight, weight;
|
|
1190
1203
|
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
1191
1204
|
while (1) switch (_context17.prev = _context17.next) {
|
|
1192
1205
|
case 0:
|
|
@@ -1198,19 +1211,22 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1198
1211
|
}
|
|
1199
1212
|
throw new NodeNotSupportedError("DryRunApi is not available on node ".concat(node));
|
|
1200
1213
|
case 4:
|
|
1201
|
-
|
|
1202
|
-
|
|
1214
|
+
// Bifrost requires a third parameter XCM version
|
|
1215
|
+
isBifrost = node === 'BifrostPolkadot' || node === 'BifrostKusama';
|
|
1216
|
+
DEFAULT_XCM_VERSION = 3;
|
|
1217
|
+
_context17.next = 8;
|
|
1218
|
+
return (_this$api$getUnsafeAp = this.api.getUnsafeApi().apis.DryRunApi).dry_run_call.apply(_this$api$getUnsafeAp, [{
|
|
1203
1219
|
type: 'system',
|
|
1204
1220
|
value: {
|
|
1205
1221
|
type: 'Signed',
|
|
1206
1222
|
value: address
|
|
1207
1223
|
}
|
|
1208
|
-
}, tx.decodedCall);
|
|
1209
|
-
case
|
|
1224
|
+
}, tx.decodedCall].concat(_toConsumableArray(isBifrost ? [DEFAULT_XCM_VERSION] : [])));
|
|
1225
|
+
case 8:
|
|
1210
1226
|
result = _context17.sent;
|
|
1211
1227
|
isSuccess = result.success && result.value.execution_result.success;
|
|
1212
1228
|
if (isSuccess) {
|
|
1213
|
-
_context17.next =
|
|
1229
|
+
_context17.next = 13;
|
|
1214
1230
|
break;
|
|
1215
1231
|
}
|
|
1216
1232
|
failureReason = result.value.execution_result.value.error.value.value.type;
|
|
@@ -1218,10 +1234,10 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1218
1234
|
success: false,
|
|
1219
1235
|
failureReason: failureReason
|
|
1220
1236
|
}));
|
|
1221
|
-
case 11:
|
|
1222
|
-
_context17.next = 13;
|
|
1223
|
-
return this.calculateTransactionFee(tx, address);
|
|
1224
1237
|
case 13:
|
|
1238
|
+
_context17.next = 15;
|
|
1239
|
+
return this.calculateTransactionFee(tx, address);
|
|
1240
|
+
case 15:
|
|
1225
1241
|
executionFee = _context17.sent;
|
|
1226
1242
|
fee = computeFeeFromDryRun(result, node, executionFee);
|
|
1227
1243
|
actualWeight = result.value.execution_result.value.actual_weight;
|
|
@@ -1234,7 +1250,7 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1234
1250
|
fee: fee,
|
|
1235
1251
|
weight: weight
|
|
1236
1252
|
}));
|
|
1237
|
-
case
|
|
1253
|
+
case 20:
|
|
1238
1254
|
case "end":
|
|
1239
1255
|
return _context17.stop();
|
|
1240
1256
|
}
|
|
@@ -1245,6 +1261,30 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1245
1261
|
}
|
|
1246
1262
|
return getDryRun;
|
|
1247
1263
|
}()
|
|
1264
|
+
}, {
|
|
1265
|
+
key: "getBridgeStatus",
|
|
1266
|
+
value: function () {
|
|
1267
|
+
var _getBridgeStatus = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
1268
|
+
var outboundOperatingMode;
|
|
1269
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
1270
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
1271
|
+
case 0:
|
|
1272
|
+
_context18.next = 2;
|
|
1273
|
+
return this.api.getUnsafeApi().query.EthereumOutboundQueue.OperatingMode.getValue();
|
|
1274
|
+
case 2:
|
|
1275
|
+
outboundOperatingMode = _context18.sent;
|
|
1276
|
+
return _context18.abrupt("return", outboundOperatingMode.type);
|
|
1277
|
+
case 4:
|
|
1278
|
+
case "end":
|
|
1279
|
+
return _context18.stop();
|
|
1280
|
+
}
|
|
1281
|
+
}, _callee18, this);
|
|
1282
|
+
}));
|
|
1283
|
+
function getBridgeStatus() {
|
|
1284
|
+
return _getBridgeStatus.apply(this, arguments);
|
|
1285
|
+
}
|
|
1286
|
+
return getBridgeStatus;
|
|
1287
|
+
}()
|
|
1248
1288
|
}, {
|
|
1249
1289
|
key: "setDisconnectAllowed",
|
|
1250
1290
|
value: function setDisconnectAllowed(allowed) {
|
|
@@ -1528,12 +1568,35 @@ var getParaEthTransferFees = /*#__PURE__*/function () {
|
|
|
1528
1568
|
return _ref.apply(this, arguments);
|
|
1529
1569
|
};
|
|
1530
1570
|
}();
|
|
1571
|
+
/**
|
|
1572
|
+
* Gets the Ethereum bridge status.
|
|
1573
|
+
*/
|
|
1574
|
+
var getBridgeStatus = /*#__PURE__*/function () {
|
|
1575
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(ahApi) {
|
|
1576
|
+
var papiApi;
|
|
1577
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1578
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
1579
|
+
case 0:
|
|
1580
|
+
papiApi = new PapiApi();
|
|
1581
|
+
papiApi.setApi(ahApi);
|
|
1582
|
+
return _context2.abrupt("return", getBridgeStatus$1(papiApi));
|
|
1583
|
+
case 3:
|
|
1584
|
+
case "end":
|
|
1585
|
+
return _context2.stop();
|
|
1586
|
+
}
|
|
1587
|
+
}, _callee2);
|
|
1588
|
+
}));
|
|
1589
|
+
return function getBridgeStatus(_x2) {
|
|
1590
|
+
return _ref2.apply(this, arguments);
|
|
1591
|
+
};
|
|
1592
|
+
}();
|
|
1531
1593
|
|
|
1532
1594
|
var transfer = /*#__PURE__*/Object.freeze({
|
|
1533
1595
|
__proto__: null,
|
|
1596
|
+
getBridgeStatus: getBridgeStatus,
|
|
1534
1597
|
getDryRun: getDryRun,
|
|
1535
1598
|
getParaEthTransferFees: getParaEthTransferFees,
|
|
1536
1599
|
send: send
|
|
1537
1600
|
});
|
|
1538
1601
|
|
|
1539
|
-
export { Builder, EvmBuilder, assets, claimAssets, createApiInstanceForNode, getAssetBalance, getBalanceForeign, getBalanceNative, getDryRun, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getOriginFeeDetails, getParaEthTransferFees, getTransferInfo, getTransferableAmount, send, verifyEdOnDestination, transfer as xcmPallet };
|
|
1602
|
+
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.10",
|
|
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.10"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"polkadot-api": ">= 1.9.7 < 2"
|