@paraspell/sdk 7.2.6 → 7.2.7
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 +11 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +11 -7
- package/dist/papi/index.cjs +11 -7
- package/dist/papi/index.d.ts +1 -1
- package/dist/papi/index.mjs +11 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -16816,7 +16816,7 @@ var getBalanceForeignXTokens = function getBalanceForeignXTokens(api, node, addr
|
|
|
16816
16816
|
}
|
|
16817
16817
|
return _context.abrupt("return", api.getBalanceForeignBifrost(address, asset));
|
|
16818
16818
|
case 6:
|
|
16819
|
-
return _context.abrupt("return", api.getBalanceForeignXTokens(address, asset));
|
|
16819
|
+
return _context.abrupt("return", api.getBalanceForeignXTokens(node, address, asset));
|
|
16820
16820
|
case 7:
|
|
16821
16821
|
case "end":
|
|
16822
16822
|
return _context.stop();
|
|
@@ -19354,15 +19354,19 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
19354
19354
|
}
|
|
19355
19355
|
}, {
|
|
19356
19356
|
key: "getBalanceForeignXTokens",
|
|
19357
|
-
value: function getBalanceForeignXTokens(address, asset) {
|
|
19357
|
+
value: function getBalanceForeignXTokens(node, address, asset) {
|
|
19358
19358
|
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
19359
|
-
var response, entry, accountData;
|
|
19359
|
+
var pallet, response, entry, accountData;
|
|
19360
19360
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
19361
19361
|
while (1) switch (_context11.prev = _context11.next) {
|
|
19362
19362
|
case 0:
|
|
19363
|
-
|
|
19364
|
-
|
|
19365
|
-
|
|
19363
|
+
pallet = 'tokens';
|
|
19364
|
+
if (node === 'Centrifuge' || node === 'Altair') {
|
|
19365
|
+
pallet = 'ormlTokens';
|
|
19366
|
+
}
|
|
19367
|
+
_context11.next = 4;
|
|
19368
|
+
return this.api.query[pallet].accounts.entries(address);
|
|
19369
|
+
case 4:
|
|
19366
19370
|
response = _context11.sent;
|
|
19367
19371
|
entry = response.find(function (_ref2) {
|
|
19368
19372
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
@@ -19376,7 +19380,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
19376
19380
|
});
|
|
19377
19381
|
accountData = entry ? entry[1] : null;
|
|
19378
19382
|
return _context11.abrupt("return", accountData ? BigInt(accountData.free.toString()) : BigInt(0));
|
|
19379
|
-
case
|
|
19383
|
+
case 8:
|
|
19380
19384
|
case "end":
|
|
19381
19385
|
return _context11.stop();
|
|
19382
19386
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1042,7 +1042,7 @@ interface IPolkadotApi<TApi, TRes> {
|
|
|
1042
1042
|
getMythosForeignBalance(address: string): Promise<bigint>;
|
|
1043
1043
|
getAssetHubForeignBalance(address: string, multiLocation: TMultiLocation): Promise<bigint>;
|
|
1044
1044
|
getForeignAssetsByIdBalance(address: string, assetId: string): Promise<bigint>;
|
|
1045
|
-
getBalanceForeignXTokens(address: string, asset: TAsset): Promise<bigint>;
|
|
1045
|
+
getBalanceForeignXTokens(node: TNodePolkadotKusama, address: string, asset: TAsset): Promise<bigint>;
|
|
1046
1046
|
getBalanceForeignBifrost(address: string, asset: TAsset): Promise<bigint>;
|
|
1047
1047
|
getBalanceForeignAssetsAccount(address: string, assetId: bigint | number): Promise<bigint>;
|
|
1048
1048
|
getFromStorage(key: string): Promise<string>;
|
package/dist/index.mjs
CHANGED
|
@@ -16814,7 +16814,7 @@ var getBalanceForeignXTokens = function getBalanceForeignXTokens(api, node, addr
|
|
|
16814
16814
|
}
|
|
16815
16815
|
return _context.abrupt("return", api.getBalanceForeignBifrost(address, asset));
|
|
16816
16816
|
case 6:
|
|
16817
|
-
return _context.abrupt("return", api.getBalanceForeignXTokens(address, asset));
|
|
16817
|
+
return _context.abrupt("return", api.getBalanceForeignXTokens(node, address, asset));
|
|
16818
16818
|
case 7:
|
|
16819
16819
|
case "end":
|
|
16820
16820
|
return _context.stop();
|
|
@@ -19352,15 +19352,19 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
19352
19352
|
}
|
|
19353
19353
|
}, {
|
|
19354
19354
|
key: "getBalanceForeignXTokens",
|
|
19355
|
-
value: function getBalanceForeignXTokens(address, asset) {
|
|
19355
|
+
value: function getBalanceForeignXTokens(node, address, asset) {
|
|
19356
19356
|
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
19357
|
-
var response, entry, accountData;
|
|
19357
|
+
var pallet, response, entry, accountData;
|
|
19358
19358
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
19359
19359
|
while (1) switch (_context11.prev = _context11.next) {
|
|
19360
19360
|
case 0:
|
|
19361
|
-
|
|
19362
|
-
|
|
19363
|
-
|
|
19361
|
+
pallet = 'tokens';
|
|
19362
|
+
if (node === 'Centrifuge' || node === 'Altair') {
|
|
19363
|
+
pallet = 'ormlTokens';
|
|
19364
|
+
}
|
|
19365
|
+
_context11.next = 4;
|
|
19366
|
+
return this.api.query[pallet].accounts.entries(address);
|
|
19367
|
+
case 4:
|
|
19364
19368
|
response = _context11.sent;
|
|
19365
19369
|
entry = response.find(function (_ref2) {
|
|
19366
19370
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
@@ -19374,7 +19378,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
|
|
|
19374
19378
|
});
|
|
19375
19379
|
accountData = entry ? entry[1] : null;
|
|
19376
19380
|
return _context11.abrupt("return", accountData ? BigInt(accountData.free.toString()) : BigInt(0));
|
|
19377
|
-
case
|
|
19381
|
+
case 8:
|
|
19378
19382
|
case "end":
|
|
19379
19383
|
return _context11.stop();
|
|
19380
19384
|
}
|
package/dist/papi/index.cjs
CHANGED
|
@@ -16816,7 +16816,7 @@ var getBalanceForeignXTokens = function getBalanceForeignXTokens(api, node, addr
|
|
|
16816
16816
|
}
|
|
16817
16817
|
return _context.abrupt("return", api.getBalanceForeignBifrost(address, asset));
|
|
16818
16818
|
case 6:
|
|
16819
|
-
return _context.abrupt("return", api.getBalanceForeignXTokens(address, asset));
|
|
16819
|
+
return _context.abrupt("return", api.getBalanceForeignXTokens(node, address, asset));
|
|
16820
16820
|
case 7:
|
|
16821
16821
|
case "end":
|
|
16822
16822
|
return _context.stop();
|
|
@@ -19549,15 +19549,19 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
19549
19549
|
}
|
|
19550
19550
|
}, {
|
|
19551
19551
|
key: "getBalanceForeignXTokens",
|
|
19552
|
-
value: function getBalanceForeignXTokens(address, asset) {
|
|
19552
|
+
value: function getBalanceForeignXTokens(node, address, asset) {
|
|
19553
19553
|
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
19554
|
-
var response, entry;
|
|
19554
|
+
var pallet, response, entry;
|
|
19555
19555
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
19556
19556
|
while (1) switch (_context11.prev = _context11.next) {
|
|
19557
19557
|
case 0:
|
|
19558
|
-
|
|
19559
|
-
|
|
19560
|
-
|
|
19558
|
+
pallet = 'Tokens';
|
|
19559
|
+
if (node === 'Centrifuge' || node === 'Altair') {
|
|
19560
|
+
pallet = 'OrmlTokens';
|
|
19561
|
+
}
|
|
19562
|
+
_context11.next = 4;
|
|
19563
|
+
return this.api.getUnsafeApi().query[pallet].Accounts.getEntries(address);
|
|
19564
|
+
case 4:
|
|
19561
19565
|
response = _context11.sent;
|
|
19562
19566
|
entry = response.find(function (_ref2) {
|
|
19563
19567
|
var keyArgs = _ref2.keyArgs;
|
|
@@ -19568,7 +19572,7 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
19568
19572
|
return assetItem.toString().toLowerCase() === ((_a = asset.symbol) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || isForeignAsset(asset) && assetItem.toString().toLowerCase() === ((_b = asset.assetId) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || _typeof(assetItem) === 'object' && 'value' in assetItem && assetItem.value.toString().toLowerCase() === ((_c = asset.symbol) === null || _c === void 0 ? void 0 : _c.toLowerCase()) || _typeof(assetItem) === 'object' && 'value' in assetItem && isForeignAsset(asset) && assetItem.value.toString().toLowerCase() === ((_d = asset.assetId) === null || _d === void 0 ? void 0 : _d.toLowerCase());
|
|
19569
19573
|
});
|
|
19570
19574
|
return _context11.abrupt("return", (entry === null || entry === void 0 ? void 0 : entry.value) ? BigInt(entry.value.free.toString()) : BigInt(0));
|
|
19571
|
-
case
|
|
19575
|
+
case 7:
|
|
19572
19576
|
case "end":
|
|
19573
19577
|
return _context11.stop();
|
|
19574
19578
|
}
|
package/dist/papi/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ interface IPolkadotApi<TApi, TRes> {
|
|
|
22
22
|
getMythosForeignBalance(address: string): Promise<bigint>;
|
|
23
23
|
getAssetHubForeignBalance(address: string, multiLocation: TMultiLocation): Promise<bigint>;
|
|
24
24
|
getForeignAssetsByIdBalance(address: string, assetId: string): Promise<bigint>;
|
|
25
|
-
getBalanceForeignXTokens(address: string, asset: TAsset): Promise<bigint>;
|
|
25
|
+
getBalanceForeignXTokens(node: TNodePolkadotKusama, address: string, asset: TAsset): Promise<bigint>;
|
|
26
26
|
getBalanceForeignBifrost(address: string, asset: TAsset): Promise<bigint>;
|
|
27
27
|
getBalanceForeignAssetsAccount(address: string, assetId: bigint | number): Promise<bigint>;
|
|
28
28
|
getFromStorage(key: string): Promise<string>;
|
package/dist/papi/index.mjs
CHANGED
|
@@ -16814,7 +16814,7 @@ var getBalanceForeignXTokens = function getBalanceForeignXTokens(api, node, addr
|
|
|
16814
16814
|
}
|
|
16815
16815
|
return _context.abrupt("return", api.getBalanceForeignBifrost(address, asset));
|
|
16816
16816
|
case 6:
|
|
16817
|
-
return _context.abrupt("return", api.getBalanceForeignXTokens(address, asset));
|
|
16817
|
+
return _context.abrupt("return", api.getBalanceForeignXTokens(node, address, asset));
|
|
16818
16818
|
case 7:
|
|
16819
16819
|
case "end":
|
|
16820
16820
|
return _context.stop();
|
|
@@ -19547,15 +19547,19 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
19547
19547
|
}
|
|
19548
19548
|
}, {
|
|
19549
19549
|
key: "getBalanceForeignXTokens",
|
|
19550
|
-
value: function getBalanceForeignXTokens(address, asset) {
|
|
19550
|
+
value: function getBalanceForeignXTokens(node, address, asset) {
|
|
19551
19551
|
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
19552
|
-
var response, entry;
|
|
19552
|
+
var pallet, response, entry;
|
|
19553
19553
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
19554
19554
|
while (1) switch (_context11.prev = _context11.next) {
|
|
19555
19555
|
case 0:
|
|
19556
|
-
|
|
19557
|
-
|
|
19558
|
-
|
|
19556
|
+
pallet = 'Tokens';
|
|
19557
|
+
if (node === 'Centrifuge' || node === 'Altair') {
|
|
19558
|
+
pallet = 'OrmlTokens';
|
|
19559
|
+
}
|
|
19560
|
+
_context11.next = 4;
|
|
19561
|
+
return this.api.getUnsafeApi().query[pallet].Accounts.getEntries(address);
|
|
19562
|
+
case 4:
|
|
19559
19563
|
response = _context11.sent;
|
|
19560
19564
|
entry = response.find(function (_ref2) {
|
|
19561
19565
|
var keyArgs = _ref2.keyArgs;
|
|
@@ -19566,7 +19570,7 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
19566
19570
|
return assetItem.toString().toLowerCase() === ((_a = asset.symbol) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || isForeignAsset(asset) && assetItem.toString().toLowerCase() === ((_b = asset.assetId) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || _typeof(assetItem) === 'object' && 'value' in assetItem && assetItem.value.toString().toLowerCase() === ((_c = asset.symbol) === null || _c === void 0 ? void 0 : _c.toLowerCase()) || _typeof(assetItem) === 'object' && 'value' in assetItem && isForeignAsset(asset) && assetItem.value.toString().toLowerCase() === ((_d = asset.assetId) === null || _d === void 0 ? void 0 : _d.toLowerCase());
|
|
19567
19571
|
});
|
|
19568
19572
|
return _context11.abrupt("return", (entry === null || entry === void 0 ? void 0 : entry.value) ? BigInt(entry.value.free.toString()) : BigInt(0));
|
|
19569
|
-
case
|
|
19573
|
+
case 7:
|
|
19570
19574
|
case "end":
|
|
19571
19575
|
return _context11.stop();
|
|
19572
19576
|
}
|