@paraspell/sdk 1.1.12 → 1.1.13
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 +16 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.mjs +12 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('@polkadot/api');
|
|
4
4
|
var ethers = require('ethers');
|
|
5
|
-
require('@polkadot/apps-config/endpoints');
|
|
5
|
+
var endpoints = require('@polkadot/apps-config/endpoints');
|
|
6
6
|
|
|
7
7
|
// derrived from https://github.com/kodadot/packages/blob/main/minimark/src/common/types.ts
|
|
8
8
|
exports.TType = void 0;
|
|
@@ -5213,6 +5213,16 @@ function createHeaderPolkadotXCM(scenario, version, nodeId) {
|
|
|
5213
5213
|
function getNode(node) {
|
|
5214
5214
|
return nodes[node];
|
|
5215
5215
|
}
|
|
5216
|
+
function getNodeEndpointOption(node) {
|
|
5217
|
+
var _getNode = getNode(node),
|
|
5218
|
+
type = _getNode.type,
|
|
5219
|
+
name = _getNode.name;
|
|
5220
|
+
var _ref = type === 'polkadot' ? endpoints.prodRelayPolkadot : endpoints.prodRelayKusama,
|
|
5221
|
+
linked = _ref.linked;
|
|
5222
|
+
return linked ? linked.find(function (o) {
|
|
5223
|
+
return o.info === name;
|
|
5224
|
+
}) : undefined;
|
|
5225
|
+
}
|
|
5216
5226
|
var lowercaseFirstLetter = function lowercaseFirstLetter(str) {
|
|
5217
5227
|
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
5218
5228
|
};
|
|
@@ -6234,8 +6244,12 @@ var getSupportedPallets = function getSupportedPallets(node) {
|
|
|
6234
6244
|
};
|
|
6235
6245
|
|
|
6236
6246
|
exports.Builder = Builder;
|
|
6247
|
+
exports.InvalidCurrencyError = InvalidCurrencyError;
|
|
6237
6248
|
exports.NODE_NAMES = NODE_NAMES;
|
|
6249
|
+
exports.NoXCMSupportImplementedError = NoXCMSupportImplementedError;
|
|
6250
|
+
exports.NodeNotSupportedError = NodeNotSupportedError;
|
|
6238
6251
|
exports.SUPPORTED_PALLETS = SUPPORTED_PALLETS;
|
|
6252
|
+
exports.ScenarioNotSupportedError = ScenarioNotSupportedError;
|
|
6239
6253
|
exports.assets = index$4;
|
|
6240
6254
|
exports.closeChannels = index;
|
|
6241
6255
|
exports.getAllAssetsSymbols = getAllAssetsSymbols;
|
|
@@ -6244,6 +6258,7 @@ exports.getAssetId = getAssetId;
|
|
|
6244
6258
|
exports.getAssetsObject = getAssetsObject;
|
|
6245
6259
|
exports.getDefaultPallet = getDefaultPallet;
|
|
6246
6260
|
exports.getNativeAssets = getNativeAssets;
|
|
6261
|
+
exports.getNodeEndpointOption = getNodeEndpointOption;
|
|
6247
6262
|
exports.getOtherAssets = getOtherAssets;
|
|
6248
6263
|
exports.getParaId = getParaId;
|
|
6249
6264
|
exports.getRelayChainSymbol = getRelayChainSymbol;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ApiPromise } from '@polkadot/api';
|
|
2
2
|
import { SubmittableExtrinsic } from '@polkadot/api-base/types';
|
|
3
|
+
import * as _polkadot_apps_config_endpoints_types from '@polkadot/apps-config/endpoints/types';
|
|
3
4
|
|
|
4
5
|
declare const NODE_NAMES: readonly ["Statemint", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "Centrifuge", "Clover", "ComposableFinance", "Darwinia", "HydraDX", "Interlay", "Kylin", "Litentry", "Moonbeam", "Parallel", "Statemine", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Pioneer", "Calamari", "CrustShadow", "Crab", "Dorafactory", "Imbue", "Integritee", "InvArchTinker", "Karura", "Kico", "Kintsugi", "Litmus", "Mangata", "Moonriver", "ParallelHeiko", "Picasso", "Pichiu", "Quartz", "Robonomics", "Shiden", "Turing", "Equilibrium", "Unique", "Crust", "Efinity", "Ipci"];
|
|
5
6
|
declare const SUPPORTED_PALLETS: readonly ["XTokens", "OrmlXTokens", "PolkadotXcm", "RelayerXcm"];
|
|
@@ -321,4 +322,22 @@ declare function Builder(api: ApiPromise): GeneralBuilder;
|
|
|
321
322
|
declare const getDefaultPallet: (node: TNode) => TPallet;
|
|
322
323
|
declare const getSupportedPallets: (node: TNode) => TPallet[];
|
|
323
324
|
|
|
324
|
-
|
|
325
|
+
declare function getNodeEndpointOption(node: TNode): _polkadot_apps_config_endpoints_types.EndpointOption | undefined;
|
|
326
|
+
|
|
327
|
+
declare class InvalidCurrencyError extends Error {
|
|
328
|
+
constructor(message: string);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
declare class NodeNotSupportedError extends Error {
|
|
332
|
+
constructor(message: string);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
declare class NoXCMSupportImplementedError extends Error {
|
|
336
|
+
constructor(node: TNode);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
declare class ScenarioNotSupportedError extends Error {
|
|
340
|
+
constructor(node: TNode, scenario: TScenario);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export { Bool, Builder, Extrinsic, ExtrinsicFunction, IPolkadotXCMTransfer, IXTokensTransfer, InvalidCurrencyError, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, PolkadotXCMTransferInput, SUPPORTED_PALLETS, ScenarioNotSupportedError, TAssetDetails, TAssetJsonMap, TNativeAssetDetails, TNode, TNodeAssets, TPallet, TPalletJsonMap, TPalletMap, TRelayChainType, TScenario, TSerializedApiCall, TType, UpdateFunction, Version, XTokensTransferInput, index as assets, index$1 as closeChannels, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetsObject, getDefaultPallet, getNativeAssets, getNodeEndpointOption, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, hasSupportForAsset, index$2 as openChannels, index$4 as xcmPallet, index$3 as xyk };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@polkadot/api';
|
|
2
2
|
import { ethers } from 'ethers';
|
|
3
|
-
import '@polkadot/apps-config/endpoints';
|
|
3
|
+
import { prodRelayPolkadot, prodRelayKusama } from '@polkadot/apps-config/endpoints';
|
|
4
4
|
|
|
5
5
|
// derrived from https://github.com/kodadot/packages/blob/main/minimark/src/common/types.ts
|
|
6
6
|
var TType;
|
|
@@ -5211,6 +5211,16 @@ function createHeaderPolkadotXCM(scenario, version, nodeId) {
|
|
|
5211
5211
|
function getNode(node) {
|
|
5212
5212
|
return nodes[node];
|
|
5213
5213
|
}
|
|
5214
|
+
function getNodeEndpointOption(node) {
|
|
5215
|
+
var _getNode = getNode(node),
|
|
5216
|
+
type = _getNode.type,
|
|
5217
|
+
name = _getNode.name;
|
|
5218
|
+
var _ref = type === 'polkadot' ? prodRelayPolkadot : prodRelayKusama,
|
|
5219
|
+
linked = _ref.linked;
|
|
5220
|
+
return linked ? linked.find(function (o) {
|
|
5221
|
+
return o.info === name;
|
|
5222
|
+
}) : undefined;
|
|
5223
|
+
}
|
|
5214
5224
|
var lowercaseFirstLetter = function lowercaseFirstLetter(str) {
|
|
5215
5225
|
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
5216
5226
|
};
|
|
@@ -6231,4 +6241,4 @@ var getSupportedPallets = function getSupportedPallets(node) {
|
|
|
6231
6241
|
return palletsMap[node].supportedPallets;
|
|
6232
6242
|
};
|
|
6233
6243
|
|
|
6234
|
-
export { Builder, NODE_NAMES, SUPPORTED_PALLETS, TType, Version, index$4 as assets, index as closeChannels, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetsObject, getDefaultPallet, getNativeAssets, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, hasSupportForAsset, index$1 as openChannels, index$3 as xcmPallet, index$2 as xyk };
|
|
6244
|
+
export { Builder, InvalidCurrencyError, NODE_NAMES, NoXCMSupportImplementedError, NodeNotSupportedError, SUPPORTED_PALLETS, ScenarioNotSupportedError, TType, Version, index$4 as assets, index as closeChannels, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssetsObject, getDefaultPallet, getNativeAssets, getNodeEndpointOption, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedPallets, getTNode, hasSupportForAsset, index$1 as openChannels, index$3 as xcmPallet, index$2 as xyk };
|