@paraspell/sdk-core 10.7.0 → 10.7.2
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 +2 -17
- package/dist/index.mjs +2 -17
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -9009,11 +9009,11 @@ var Moonriver = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9009
9009
|
|
|
9010
9010
|
var createTypeAndThenTransfer = /*#__PURE__*/function () {
|
|
9011
9011
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(options, node, version) {
|
|
9012
|
-
var api, scenario, asset,
|
|
9012
|
+
var api, scenario, asset, senderAddress, address, destination, messageId, ahApi, _yield$getParaEthTran, _yield$getParaEthTran2, bridgeFee, ahExecutionFee, feeConverted, nativeMythAmount;
|
|
9013
9013
|
return _regenerator().w(function (_context) {
|
|
9014
9014
|
while (1) switch (_context.n) {
|
|
9015
9015
|
case 0:
|
|
9016
|
-
api = options.api, scenario = options.scenario, asset = options.asset,
|
|
9016
|
+
api = options.api, scenario = options.scenario, asset = options.asset, senderAddress = options.senderAddress, address = options.address, destination = options.destination;
|
|
9017
9017
|
assertHasLocation(asset);
|
|
9018
9018
|
assertAddressIsString(address);
|
|
9019
9019
|
if (senderAddress) {
|
|
@@ -9054,21 +9054,6 @@ var createTypeAndThenTransfer = /*#__PURE__*/function () {
|
|
|
9054
9054
|
throw new InvalidParameterError("Pool DOT -> ".concat(asset.symbol, " not found."));
|
|
9055
9055
|
case 7:
|
|
9056
9056
|
nativeMythAmount = padFeeBy(feeConverted, 10);
|
|
9057
|
-
_context.n = 8;
|
|
9058
|
-
return getAssetBalanceInternal({
|
|
9059
|
-
api: api,
|
|
9060
|
-
address: senderAddress,
|
|
9061
|
-
node: node,
|
|
9062
|
-
currency: currency
|
|
9063
|
-
});
|
|
9064
|
-
case 8:
|
|
9065
|
-
nativeMythBalance = _context.v;
|
|
9066
|
-
if (!(nativeMythBalance - nativeMythAmount < 0)) {
|
|
9067
|
-
_context.n = 9;
|
|
9068
|
-
break;
|
|
9069
|
-
}
|
|
9070
|
-
throw new assets.InvalidCurrencyError("Insufficient balance. Fee: ".concat(nativeMythAmount, ", Amount: ").concat(asset.amount));
|
|
9071
|
-
case 9:
|
|
9072
9057
|
return _context.a(2, {
|
|
9073
9058
|
module: 'PolkadotXcm',
|
|
9074
9059
|
method: 'transfer_assets_using_type_and_then',
|
package/dist/index.mjs
CHANGED
|
@@ -9010,11 +9010,11 @@ var Moonriver = /*#__PURE__*/function (_ParachainNode) {
|
|
|
9010
9010
|
|
|
9011
9011
|
var createTypeAndThenTransfer = /*#__PURE__*/function () {
|
|
9012
9012
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(options, node, version) {
|
|
9013
|
-
var api, scenario, asset,
|
|
9013
|
+
var api, scenario, asset, senderAddress, address, destination, messageId, ahApi, _yield$getParaEthTran, _yield$getParaEthTran2, bridgeFee, ahExecutionFee, feeConverted, nativeMythAmount;
|
|
9014
9014
|
return _regenerator().w(function (_context) {
|
|
9015
9015
|
while (1) switch (_context.n) {
|
|
9016
9016
|
case 0:
|
|
9017
|
-
api = options.api, scenario = options.scenario, asset = options.asset,
|
|
9017
|
+
api = options.api, scenario = options.scenario, asset = options.asset, senderAddress = options.senderAddress, address = options.address, destination = options.destination;
|
|
9018
9018
|
assertHasLocation(asset);
|
|
9019
9019
|
assertAddressIsString(address);
|
|
9020
9020
|
if (senderAddress) {
|
|
@@ -9055,21 +9055,6 @@ var createTypeAndThenTransfer = /*#__PURE__*/function () {
|
|
|
9055
9055
|
throw new InvalidParameterError("Pool DOT -> ".concat(asset.symbol, " not found."));
|
|
9056
9056
|
case 7:
|
|
9057
9057
|
nativeMythAmount = padFeeBy(feeConverted, 10);
|
|
9058
|
-
_context.n = 8;
|
|
9059
|
-
return getAssetBalanceInternal({
|
|
9060
|
-
api: api,
|
|
9061
|
-
address: senderAddress,
|
|
9062
|
-
node: node,
|
|
9063
|
-
currency: currency
|
|
9064
|
-
});
|
|
9065
|
-
case 8:
|
|
9066
|
-
nativeMythBalance = _context.v;
|
|
9067
|
-
if (!(nativeMythBalance - nativeMythAmount < 0)) {
|
|
9068
|
-
_context.n = 9;
|
|
9069
|
-
break;
|
|
9070
|
-
}
|
|
9071
|
-
throw new InvalidCurrencyError("Insufficient balance. Fee: ".concat(nativeMythAmount, ", Amount: ").concat(asset.amount));
|
|
9072
|
-
case 9:
|
|
9073
9058
|
return _context.a(2, {
|
|
9074
9059
|
module: 'PolkadotXcm',
|
|
9075
9060
|
method: 'transfer_assets_using_type_and_then',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-core",
|
|
3
|
-
"version": "10.7.
|
|
3
|
+
"version": "10.7.2",
|
|
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/assets": "10.7.
|
|
30
|
-
"@paraspell/sdk-common": "10.7.
|
|
31
|
-
"@paraspell/pallets": "10.7.
|
|
29
|
+
"@paraspell/assets": "10.7.2",
|
|
30
|
+
"@paraspell/sdk-common": "10.7.2",
|
|
31
|
+
"@paraspell/pallets": "10.7.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|