@paraspell/sdk-core 12.6.0 → 12.6.3
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.d.ts +6 -38
- package/dist/index.mjs +30 -303
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _paraspell_sdk_common from '@paraspell/sdk-common';
|
|
|
2
2
|
import { TChain, TSubstrateChain, Version, TLocation, TRelaychain, TParachain, TExternalChain, TJunction, Parents, TJunctions } from '@paraspell/sdk-common';
|
|
3
3
|
export * from '@paraspell/sdk-common';
|
|
4
4
|
import * as _paraspell_assets from '@paraspell/assets';
|
|
5
|
-
import { TAssetInfo, WithAmount, TAsset, TCurrencyInputWithAmount, TCurrencyInput, TAssetWithFee, WithComplexAmount, TCurrencyCore, TAmount,
|
|
5
|
+
import { TAssetInfo, WithAmount, TAsset, TCurrencyInputWithAmount, TCurrencyInput, TAssetWithFee, WithComplexAmount, TCurrencyCore, TAmount, TAssetInfoWithId } from '@paraspell/assets';
|
|
6
6
|
export * from '@paraspell/assets';
|
|
7
7
|
import { TPallet, TAssetsPallet } from '@paraspell/pallets';
|
|
8
8
|
export * from '@paraspell/pallets';
|
|
@@ -313,14 +313,6 @@ declare class CrustShadow<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner
|
|
|
313
313
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
declare class Curio<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IXTokensTransfer<TApi, TRes, TSigner> {
|
|
317
|
-
constructor();
|
|
318
|
-
getCustomCurrencyId(asset: TAssetInfo): TForeignOrTokenAsset;
|
|
319
|
-
transferXTokens(input: TXTokensTransferOptions<TApi, TRes, TSigner>): TRes;
|
|
320
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes, TSigner>): boolean;
|
|
321
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
316
|
declare class Darwinia<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
325
317
|
constructor();
|
|
326
318
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
@@ -511,12 +503,6 @@ declare class PeopleWestend<TApi, TRes, TSigner> extends PeoplePolkadot<TApi, TR
|
|
|
511
503
|
constructor();
|
|
512
504
|
}
|
|
513
505
|
|
|
514
|
-
declare class Phala<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IXTransferTransfer<TApi, TRes, TSigner> {
|
|
515
|
-
constructor();
|
|
516
|
-
transferXTransfer(input: TXTransferTransferOptions<TApi, TRes, TSigner>): TRes;
|
|
517
|
-
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
506
|
declare class Quartz<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
521
507
|
constructor();
|
|
522
508
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
@@ -589,9 +575,7 @@ declare const chains: <TApi, TRes, TSigner>() => {
|
|
|
589
575
|
NeuroWeb: NeuroWeb<TApi, TRes, TSigner>;
|
|
590
576
|
Pendulum: Pendulum<TApi, TRes, TSigner>;
|
|
591
577
|
Collectives: Collectives<TApi, TRes, TSigner>;
|
|
592
|
-
Phala: Phala<TApi, TRes, TSigner>;
|
|
593
578
|
KiltSpiritnet: KiltSpiritnet<TApi, TRes, TSigner>;
|
|
594
|
-
Curio: Curio<TApi, TRes, TSigner>;
|
|
595
579
|
Mythos: Mythos<TApi, TRes, TSigner>;
|
|
596
580
|
Peaq: Peaq<TApi, TRes, TSigner>;
|
|
597
581
|
Xode: Xode<TApi, TRes, TSigner>;
|
|
@@ -680,26 +664,12 @@ type TXTokensTransferOptions<TApi, TRes, TSigner> = {
|
|
|
680
664
|
method?: string;
|
|
681
665
|
useMultiAssetTransfer?: boolean;
|
|
682
666
|
};
|
|
683
|
-
type TXTransferTransferOptions<TApi, TRes, TSigner> = {
|
|
684
|
-
api: IPolkadotApi<TApi, TRes, TSigner>;
|
|
685
|
-
asset: WithAmount<TAssetInfo>;
|
|
686
|
-
recipientAddress: TAddress;
|
|
687
|
-
origin: TSubstrateChain;
|
|
688
|
-
paraIdTo?: number;
|
|
689
|
-
destination: TDestination;
|
|
690
|
-
overriddenAsset?: TLocation | TAsset[];
|
|
691
|
-
pallet?: string;
|
|
692
|
-
method?: string;
|
|
693
|
-
};
|
|
694
667
|
interface IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
695
668
|
transferPolkadotXCM: (input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>) => Promise<TRes>;
|
|
696
669
|
}
|
|
697
670
|
interface IXTokensTransfer<TApi, TRes, TSigner> {
|
|
698
671
|
transferXTokens: (input: TXTokensTransferOptions<TApi, TRes, TSigner>) => TRes;
|
|
699
672
|
}
|
|
700
|
-
interface IXTransferTransfer<TApi, TRes, TSigner> {
|
|
701
|
-
transferXTransfer: (input: TXTransferTransferOptions<TApi, TRes, TSigner>) => TRes;
|
|
702
|
-
}
|
|
703
673
|
type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
|
|
704
674
|
type TAddress = string | TLocation;
|
|
705
675
|
type TDestination = TChain | TLocation;
|
|
@@ -804,7 +774,6 @@ type TDestWeight = {
|
|
|
804
774
|
ref_time: bigint;
|
|
805
775
|
proof_size: bigint;
|
|
806
776
|
};
|
|
807
|
-
type TXTransferMethod = 'transfer';
|
|
808
777
|
type TXTokensMethod = 'transfer' | 'transfer_multiasset' | 'transfer_multiassets';
|
|
809
778
|
type TPolkadotXcmMethod = 'limited_teleport_assets' | 'limited_reserve_transfer_assets' | 'reserve_transfer_assets' | 'reserve_withdraw_assets' | 'transfer_assets' | 'transfer_assets_using_type_and_then';
|
|
810
779
|
type TXcmPalletMethod = 'limited_teleport_assets' | 'limited_reserve_transfer_assets' | 'transfer_assets_using_type_and_then';
|
|
@@ -2095,7 +2064,7 @@ type TTypeAndThenCallContext<TApi, TRes, TSigner> = {
|
|
|
2095
2064
|
isSubBridge: boolean;
|
|
2096
2065
|
isSnowbridge: boolean;
|
|
2097
2066
|
isRelayAsset: boolean;
|
|
2098
|
-
assetInfo: WithAmount<
|
|
2067
|
+
assetInfo: WithAmount<TAssetInfo>;
|
|
2099
2068
|
systemAsset: TAssetInfo;
|
|
2100
2069
|
options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>;
|
|
2101
2070
|
};
|
|
@@ -2219,7 +2188,7 @@ declare const resolveSendParams: <TApi, TRes, TSigner>(options: TSendOptions<TAp
|
|
|
2219
2188
|
symbol: string;
|
|
2220
2189
|
isNative?: boolean;
|
|
2221
2190
|
assetId?: string;
|
|
2222
|
-
location
|
|
2191
|
+
location: _paraspell_sdk_common.TLocation;
|
|
2223
2192
|
existentialDeposit?: string;
|
|
2224
2193
|
isFeeAsset?: boolean;
|
|
2225
2194
|
alias?: string;
|
|
@@ -2264,7 +2233,6 @@ declare const validateDestinationAddress: <TApi, TRes, TSigner>(address: TAddres
|
|
|
2264
2233
|
declare const assertToIsString: (to: TDestination, overrideMsg?: string) => asserts to is Exclude<TDestination, TLocation>;
|
|
2265
2234
|
declare const assertAddressIsString: (address: TAddress) => asserts address is Exclude<TAddress, TLocation>;
|
|
2266
2235
|
declare const assertSenderAddress: (address: string | undefined) => asserts address is string;
|
|
2267
|
-
declare const assertHasLocation: (asset: TAssetInfo) => asserts asset is TAssetWithLocation;
|
|
2268
2236
|
declare const assertHasId: (asset: TAssetInfo) => asserts asset is TAssetInfoWithId;
|
|
2269
2237
|
declare const assertSender: <TSigner>(sender?: TSender<TSigner>) => asserts sender is TSender<TSigner>;
|
|
2270
2238
|
declare const isSenderSigner: <TSigner>(sender: TSender<TSigner>) => sender is TSigner;
|
|
@@ -2346,7 +2314,7 @@ declare const reverseTransformLocation: (location: TLocation) => TLocation;
|
|
|
2346
2314
|
|
|
2347
2315
|
declare const normalizeAmount: (amount: bigint) => bigint;
|
|
2348
2316
|
|
|
2349
|
-
declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "Darwinia" | "EnergyWebX" | "Hydration" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "
|
|
2317
|
+
declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "Darwinia" | "EnergyWebX" | "Hydration" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "KiltSpiritnet" | "Mythos" | "Peaq" | "RobonomicsPolkadot" | "PeoplePolkadot" | "Unique" | "Xode" | "AssetHubKusama" | "BridgeHubKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Altair" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Laos" | "Quartz" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "KiltPaseo" | "LaosPaseo" | "NeuroWebPaseo" | "PAssetHub" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
|
|
2350
2318
|
|
|
2351
2319
|
declare const resolveParaId: (paraId: number | undefined, destination: TDestination) => number | undefined;
|
|
2352
2320
|
|
|
@@ -2394,5 +2362,5 @@ declare const selectXcmVersion: (forcedVersion: Version | undefined, originVersi
|
|
|
2394
2362
|
declare const pickCompatibleXcmVersion: (origin: TSubstrateChain, destination: TDestination, override?: Version) => Version;
|
|
2395
2363
|
declare const pickRouterCompatibleXcmVersion: (origin: TSubstrateChain | undefined, exchangeChain: TSubstrateChain, destination: TChain | undefined) => Version;
|
|
2396
2364
|
|
|
2397
|
-
export { AmountTooLowError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiUnavailableError, ScenarioNotSupportedError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId,
|
|
2398
|
-
export type { BuildHopInfoOptions, ClientCache, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer,
|
|
2365
|
+
export { AmountTooLowError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiUnavailableError, ScenarioNotSupportedError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertSender, assertSenderAddress, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, compareAddresses, computeFeeFromDryRun, computeFeeFromDryRunPjs, computeOverridenAmount, constructTypeAndThenCall, convertSs58, createAsset, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createClientCache, createClientPoolHelpers, createDestination, createDirectExecuteXcm, createExecuteCall, createExecuteExchangeXcm, createId, createTx, createTypeAndThenCall, createTypeThenAutoReserve, createVersionedAssets, createVersionedDestination, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, formatAssetIdToERC20, formatUnits, getAssetBalanceInternal, getAssetReserveChain, getBalance, getBalanceInternal, getBridgeStatus, getChain, getChainConfig, getChainLocation, getChainProviders, getChainVersion, getEthErc20Balance, getEvmPrivateKeyHex, getFailureInfo, getLocalTransferAmount, getMinTransferableAmount, getMinTransferableAmountInternal, getMoonbeamErc20Balance, getOriginXcmFee, getOriginXcmFeeEstimate, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getRelayChainOf, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, getXcmFeeInternal, getXcmFeeOnce, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, isSenderSigner, keyFromWs, localizeLocation, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, overrideTxAmount, padFee, padValueBy, parseUnits, pickCompatibleXcmVersion, pickRouterCompatibleXcmVersion, resolveDestChain, resolveModuleError, resolveParaId, resolveSendParams, reverseTransformLocation, selectXcmVersion, send, sortAssets, throwUnsupportedCurrency, transferMoonbeamEvm, transferMoonbeamToEth, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, validateDestinationAddress, validateTransact, verifyEdOnDestination, wrapTxBypass };
|
|
2366
|
+
export type { BuildHopInfoOptions, ClientCache, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedSendOptions, TBifrostToken, TBridgeStatus, TBuildDestInfoOptions, TBuildInternalRes, TBuilderConfig, TBuilderInternalOptions, TBuilderOptions, TBypassOptions, TCacheItem, TChainConfig, TChainConfigMap, TChainEndpoint, TChainWithApi, TClientEntry, TClientKey, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TDestWeight, TDestXcmFeeDetail, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunError, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmBuilderOptions, TEvmBuilderOptionsBase, TEvmChainFrom, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceCommonOptions, TGetBalanceOptions, TGetBalanceOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeEstimateOptions, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeEstimateDetail, TGetXcmFeeEstimateOptions, TGetXcmFeeEstimateResult, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, TMantaAsset, TModuleError, TNativeTokenAsset, TNodleAsset, TOriginFeeDetails, TOtherReserveAsset, TPaymentInfo, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TReserveAsset, TResolveHopParams, TScenario, TSelfReserveAsset, TSendBaseOptions, TSendBaseOptionsWithSenderAddress, TSendInternalOptions, TSendOptions, TSender, TSerializeEthTransferOptions, TSerializedEthTransfer, TSerializedExtrinsics, TSerializedRuntimeApiQuery, TSerializedStateQuery, TSetBalanceRes, TSwapConfig, TSwapFeeEstimates, TTransactOptions, TTransactOrigin, TTransferFeeEstimates, TTransferInfo, TTransferLocalOptions, TTxFactory, TTypeAndThenCallContext, TTypeAndThenFees, TTypeAndThenOverrides, TUrl, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmFeeSwapConfig, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSenderAddress };
|
package/dist/index.mjs
CHANGED
|
@@ -1097,11 +1097,6 @@ var assertSenderAddress = function assertSenderAddress(address) {
|
|
|
1097
1097
|
throw new MissingParameterError('senderAddress');
|
|
1098
1098
|
}
|
|
1099
1099
|
};
|
|
1100
|
-
var assertHasLocation = function assertHasLocation(asset) {
|
|
1101
|
-
if (!asset.location) {
|
|
1102
|
-
throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(asset, replaceBigInt), " is missing location"));
|
|
1103
|
-
}
|
|
1104
|
-
};
|
|
1105
1100
|
var assertHasId = function assertHasId(asset) {
|
|
1106
1101
|
if (asset.assetId === undefined) {
|
|
1107
1102
|
throw new InvalidCurrencyError("Asset ".concat(JSON.stringify(asset, replaceBigInt), " has no assetId"));
|
|
@@ -1338,7 +1333,6 @@ var resolveAssets = function resolveAssets(_ref, version) {
|
|
|
1338
1333
|
currency = _ref.currency;
|
|
1339
1334
|
var normalizeAsset = function normalizeAsset(amount, currency) {
|
|
1340
1335
|
var asset = findAssetInfoOrThrow(chain, currency, null);
|
|
1341
|
-
assertHasLocation(asset);
|
|
1342
1336
|
var abstracted = abstractDecimals(amount, asset.decimals, api);
|
|
1343
1337
|
return createAsset(version, abstracted, localizeLocation(chain, asset.location));
|
|
1344
1338
|
};
|
|
@@ -1459,7 +1453,6 @@ var getMythosOriginFee = /*#__PURE__*/function () {
|
|
|
1459
1453
|
bridgeFee = _yield$getParaEthTran2[0];
|
|
1460
1454
|
ahExecutionFee = _yield$getParaEthTran2[1];
|
|
1461
1455
|
nativeAsset = findNativeAssetInfoOrThrow('Mythos');
|
|
1462
|
-
assertHasLocation(nativeAsset);
|
|
1463
1456
|
_context.n = 3;
|
|
1464
1457
|
return ahApi.quoteAhPrice(DOT_LOCATION, nativeAsset.location, bridgeFee + ahExecutionFee);
|
|
1465
1458
|
case 3:
|
|
@@ -1949,21 +1942,6 @@ var Pendulum$1 = {
|
|
|
1949
1942
|
}
|
|
1950
1943
|
]
|
|
1951
1944
|
};
|
|
1952
|
-
var Phala$1 = {
|
|
1953
|
-
name: "Phala Network",
|
|
1954
|
-
info: "phala",
|
|
1955
|
-
paraId: 2035,
|
|
1956
|
-
providers: [
|
|
1957
|
-
{
|
|
1958
|
-
name: "Dwellir",
|
|
1959
|
-
endpoint: "wss://phala-rpc.n.dwellir.com"
|
|
1960
|
-
},
|
|
1961
|
-
{
|
|
1962
|
-
name: "RadiumBlock",
|
|
1963
|
-
endpoint: "wss://phala.public.curie.radiumblock.co/ws"
|
|
1964
|
-
}
|
|
1965
|
-
]
|
|
1966
|
-
};
|
|
1967
1945
|
var KiltSpiritnet$1 = {
|
|
1968
1946
|
name: "KILT Spiritnet",
|
|
1969
1947
|
info: "kilt",
|
|
@@ -1979,17 +1957,6 @@ var KiltSpiritnet$1 = {
|
|
|
1979
1957
|
}
|
|
1980
1958
|
]
|
|
1981
1959
|
};
|
|
1982
|
-
var Curio$1 = {
|
|
1983
|
-
name: "Curio",
|
|
1984
|
-
info: "curio",
|
|
1985
|
-
paraId: 3339,
|
|
1986
|
-
providers: [
|
|
1987
|
-
{
|
|
1988
|
-
name: "Curio",
|
|
1989
|
-
endpoint: "wss://parachain.curioinvest.com/"
|
|
1990
|
-
}
|
|
1991
|
-
]
|
|
1992
|
-
};
|
|
1993
1960
|
var Mythos$1 = {
|
|
1994
1961
|
name: "Mythos",
|
|
1995
1962
|
info: "mythos",
|
|
@@ -2961,9 +2928,7 @@ var configs = {
|
|
|
2961
2928
|
Nodle: Nodle$1,
|
|
2962
2929
|
NeuroWeb: NeuroWeb$1,
|
|
2963
2930
|
Pendulum: Pendulum$1,
|
|
2964
|
-
Phala: Phala$1,
|
|
2965
2931
|
KiltSpiritnet: KiltSpiritnet$1,
|
|
2966
|
-
Curio: Curio$1,
|
|
2967
2932
|
Mythos: Mythos$1,
|
|
2968
2933
|
Peaq: Peaq$1,
|
|
2969
2934
|
RobonomicsPolkadot: RobonomicsPolkadot$1,
|
|
@@ -4560,10 +4525,6 @@ var getDestXcmFee = /*#__PURE__*/function () {
|
|
|
4560
4525
|
while (1) switch (_context.p = _context.n) {
|
|
4561
4526
|
case 0:
|
|
4562
4527
|
assetInfo = findAssetInfoOrThrow(chain, curr, destination);
|
|
4563
|
-
if (!assetInfo.location) {
|
|
4564
|
-
_context.n = 6;
|
|
4565
|
-
break;
|
|
4566
|
-
}
|
|
4567
4528
|
_context.p = 1;
|
|
4568
4529
|
_context.n = 2;
|
|
4569
4530
|
return getReverseTxFee(_objectSpread2(_objectSpread2({}, options), {}, {
|
|
@@ -4593,15 +4554,7 @@ var getDestXcmFee = /*#__PURE__*/function () {
|
|
|
4593
4554
|
case 5:
|
|
4594
4555
|
throw _t;
|
|
4595
4556
|
case 6:
|
|
4596
|
-
_context.
|
|
4597
|
-
return getReverseTxFee(_objectSpread2(_objectSpread2({}, options), {}, {
|
|
4598
|
-
destination: destination
|
|
4599
|
-
}), {
|
|
4600
|
-
symbol: assetInfo.symbol,
|
|
4601
|
-
amount: amt
|
|
4602
|
-
});
|
|
4603
|
-
case 7:
|
|
4604
|
-
return _context.a(2, _context.v);
|
|
4557
|
+
return _context.a(2);
|
|
4605
4558
|
}
|
|
4606
4559
|
}, _callee, null, [[1, 3]]);
|
|
4607
4560
|
}));
|
|
@@ -4752,14 +4705,13 @@ var getEthereumJunction = function getEthereumJunction(chain) {
|
|
|
4752
4705
|
};
|
|
4753
4706
|
|
|
4754
4707
|
var validateBridgeAsset = function validateBridgeAsset(origin, destination, asset, currency, isBridge) {
|
|
4755
|
-
var _asset$location;
|
|
4756
4708
|
if (!asset || isTLocation(destination) || isExternalChain(destination) || !isBridge) {
|
|
4757
4709
|
return;
|
|
4758
4710
|
}
|
|
4759
4711
|
var nativeAsset = findNativeAssetInfoOrThrow(origin);
|
|
4760
4712
|
var isNativeAsset = isAssetEqual(asset, nativeAsset);
|
|
4761
4713
|
var ecosystem = getRelayChainOf(destination).toLowerCase();
|
|
4762
|
-
var isBridgedSystemAsset =
|
|
4714
|
+
var isBridgedSystemAsset = asset.location.parents === Parents.TWO && deepEqual(getJunctionValue(asset.location, 'GlobalConsensus'), _defineProperty({}, ecosystem, null));
|
|
4763
4715
|
var isBridgedStablecoin = isStableCoinAsset(asset);
|
|
4764
4716
|
if (!(isNativeAsset || isBridgedSystemAsset || isBridgedStablecoin)) {
|
|
4765
4717
|
throw new InvalidCurrencyError("Substrate bridge does not support currency ".concat(JSON.stringify(currency, replaceBigInt), "."));
|
|
@@ -4779,7 +4731,6 @@ var validateEcosystems = function validateEcosystems(origin, destination) {
|
|
|
4779
4731
|
}
|
|
4780
4732
|
};
|
|
4781
4733
|
var validateEthereumAsset = function validateEthereumAsset(origin, destination, asset) {
|
|
4782
|
-
var _asset$location2;
|
|
4783
4734
|
if (!asset || !isTLocation(destination) && !isSnowbridge(origin, destination) || origin === 'Mythos') {
|
|
4784
4735
|
return;
|
|
4785
4736
|
}
|
|
@@ -4794,7 +4745,7 @@ var validateEthereumAsset = function validateEthereumAsset(origin, destination,
|
|
|
4794
4745
|
}]
|
|
4795
4746
|
}
|
|
4796
4747
|
}];
|
|
4797
|
-
var isEthCompatibleAsset =
|
|
4748
|
+
var isEthCompatibleAsset = asset.location.parents === Parents.TWO && deepEqual(getJunctionValue(asset.location, 'GlobalConsensus'), getEthereumJunction(origin, false).GlobalConsensus) || ADDITIONAL_ALLOWED_LOCATIONS.some(function (loc) {
|
|
4798
4749
|
return deepEqual(asset.location, loc);
|
|
4799
4750
|
});
|
|
4800
4751
|
if (!isEthCompatibleAsset) {
|
|
@@ -4860,7 +4811,6 @@ var resolveOverriddenAsset = function resolveOverriddenAsset(options, isBridge,
|
|
|
4860
4811
|
if (!asset) {
|
|
4861
4812
|
throw new InvalidCurrencyError("Origin chain ".concat(origin, " does not support currency ").concat(JSON.stringify(currency)));
|
|
4862
4813
|
}
|
|
4863
|
-
assertHasLocation(asset);
|
|
4864
4814
|
if (!resolvedFeeAsset) {
|
|
4865
4815
|
throw new InvalidCurrencyError('Fee asset not found');
|
|
4866
4816
|
}
|
|
@@ -5510,7 +5460,6 @@ var reverseTransformLocation = function reverseTransformLocation(location) {
|
|
|
5510
5460
|
|
|
5511
5461
|
var createMainInstruction = function createMainInstruction(origin, asset, ethAsset, address, messageId) {
|
|
5512
5462
|
assertHasId(ethAsset);
|
|
5513
|
-
assertHasLocation(asset);
|
|
5514
5463
|
var interiorSb = ethAsset.symbol === 'ETH' ? {
|
|
5515
5464
|
Here: null
|
|
5516
5465
|
} : {
|
|
@@ -6324,9 +6273,6 @@ var calcPreviewMintAmount = function calcPreviewMintAmount(balance, desired) {
|
|
|
6324
6273
|
var missing = desired - balance;
|
|
6325
6274
|
return missing > 0n ? missing : null;
|
|
6326
6275
|
};
|
|
6327
|
-
var assetKey = function assetKey(a) {
|
|
6328
|
-
return a.location ? JSON.stringify(a.location) : !a.isNative && a.assetId != null ? "id:".concat(a.assetId) : "sym:".concat(a.symbol);
|
|
6329
|
-
};
|
|
6330
6276
|
var mintBonusForSent = function mintBonusForSent(chain, sent, feeAsset, mintFeeAssets) {
|
|
6331
6277
|
if (!mintFeeAssets) return 0n;
|
|
6332
6278
|
var _native = findNativeAssetInfo(chain);
|
|
@@ -6342,7 +6288,7 @@ var mintBonusForSent = function mintBonusForSent(chain, sent, feeAsset, mintFeeA
|
|
|
6342
6288
|
var preminted = [_native, relay, feeAsset].filter(function (a) {
|
|
6343
6289
|
return !!a;
|
|
6344
6290
|
}).filter(function (a) {
|
|
6345
|
-
var k =
|
|
6291
|
+
var k = JSON.stringify(a.location);
|
|
6346
6292
|
if (seen.has(k)) return false;
|
|
6347
6293
|
seen.add(k);
|
|
6348
6294
|
return true;
|
|
@@ -7384,7 +7330,7 @@ var BRIDGE_FEE_KSM = 12016807000n; // 0.012016807 KSM
|
|
|
7384
7330
|
*/
|
|
7385
7331
|
var getXcmFeeEstimate = /*#__PURE__*/function () {
|
|
7386
7332
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(options) {
|
|
7387
|
-
var api, origin, destination, currency, feeAsset, address, senderAddress, originAsset, destAsset, amount, resolvedFeeAsset, destApi, _ref2, _ref3, fixedOriginFee, fixedDestinationFee, originSufficient, _destinationSufficient, originFeeDetails,
|
|
7333
|
+
var api, origin, destination, currency, feeAsset, address, senderAddress, originAsset, destAsset, amount, resolvedFeeAsset, destApi, _ref2, _ref3, fixedOriginFee, fixedDestinationFee, originSufficient, _destinationSufficient, originFeeDetails, destinationFee, destinationSufficient, destFeeDetails, _t;
|
|
7388
7334
|
return _regenerator().w(function (_context) {
|
|
7389
7335
|
while (1) switch (_context.n) {
|
|
7390
7336
|
case 0:
|
|
@@ -7432,13 +7378,6 @@ var getXcmFeeEstimate = /*#__PURE__*/function () {
|
|
|
7432
7378
|
return getOriginXcmFeeEstimate(options);
|
|
7433
7379
|
case 6:
|
|
7434
7380
|
originFeeDetails = _context.v;
|
|
7435
|
-
currencyInput = originAsset.location ? {
|
|
7436
|
-
location: originAsset.location,
|
|
7437
|
-
amount: amount
|
|
7438
|
-
} : {
|
|
7439
|
-
symbol: originAsset.symbol,
|
|
7440
|
-
amount: amount
|
|
7441
|
-
};
|
|
7442
7381
|
if (!isExternalChain(destination)) {
|
|
7443
7382
|
_context.n = 7;
|
|
7444
7383
|
break;
|
|
@@ -7451,7 +7390,10 @@ var getXcmFeeEstimate = /*#__PURE__*/function () {
|
|
|
7451
7390
|
return getReverseTxFee(_objectSpread2(_objectSpread2({}, options), {}, {
|
|
7452
7391
|
api: destApi,
|
|
7453
7392
|
destination: destination
|
|
7454
|
-
}),
|
|
7393
|
+
}), {
|
|
7394
|
+
location: originAsset.location,
|
|
7395
|
+
amount: amount
|
|
7396
|
+
});
|
|
7455
7397
|
case 8:
|
|
7456
7398
|
_t = _context.v;
|
|
7457
7399
|
case 9:
|
|
@@ -7671,7 +7613,7 @@ var buildDestInfo = /*#__PURE__*/function () {
|
|
|
7671
7613
|
|
|
7672
7614
|
var buildHopInfo = /*#__PURE__*/function () {
|
|
7673
7615
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref) {
|
|
7674
|
-
var api, chain, fee, originChain, asset, currency, hopApi, xcmFeeDetails, isBridgeHub, nativeAsset, hopAsset,
|
|
7616
|
+
var api, chain, fee, originChain, asset, currency, hopApi, xcmFeeDetails, isBridgeHub, nativeAsset, hopAsset, ed;
|
|
7675
7617
|
return _regenerator().w(function (_context) {
|
|
7676
7618
|
while (1) switch (_context.p = _context.n) {
|
|
7677
7619
|
case 0:
|
|
@@ -7698,12 +7640,9 @@ var buildHopInfo = /*#__PURE__*/function () {
|
|
|
7698
7640
|
});
|
|
7699
7641
|
case 3:
|
|
7700
7642
|
hopAsset = findAssetOnDestOrThrow(originChain, chain, currency);
|
|
7701
|
-
|
|
7643
|
+
ed = getExistentialDepositOrThrow(chain, {
|
|
7702
7644
|
location: hopAsset.location
|
|
7703
|
-
}
|
|
7704
|
-
symbol: hopAsset.symbol
|
|
7705
|
-
};
|
|
7706
|
-
ed = getExistentialDepositOrThrow(chain, hopCurrencyPayload);
|
|
7645
|
+
});
|
|
7707
7646
|
return _context.a(2, {
|
|
7708
7647
|
asset: hopAsset,
|
|
7709
7648
|
existentialDeposit: ed,
|
|
@@ -8280,7 +8219,6 @@ var createTypeAndThenCallContext = /*#__PURE__*/function () {
|
|
|
8280
8219
|
while (1) switch (_context.n) {
|
|
8281
8220
|
case 0:
|
|
8282
8221
|
api = options.api, chain = options.chain, destination = options.destination, assetInfo = options.assetInfo;
|
|
8283
|
-
assertHasLocation(assetInfo);
|
|
8284
8222
|
assertToIsString(destination);
|
|
8285
8223
|
destinationChain = destination;
|
|
8286
8224
|
isSubBridge = isSubstrateBridge(chain, destinationChain);
|
|
@@ -9029,8 +8967,6 @@ var prepareExecuteContext = function prepareExecuteContext(_ref) {
|
|
|
9029
8967
|
feeAssetInfo = _ref.feeAssetInfo,
|
|
9030
8968
|
originFee = _ref.fees.originFee,
|
|
9031
8969
|
version = _ref.version;
|
|
9032
|
-
assertHasLocation(assetInfo);
|
|
9033
|
-
if (feeAssetInfo) assertHasLocation(feeAssetInfo);
|
|
9034
8970
|
var amount = assetInfo.amount;
|
|
9035
8971
|
var reserveChain = getAssetReserveChain(chain, assetInfo.location);
|
|
9036
8972
|
var asset = createAsset(version, amount, assetInfo.location);
|
|
@@ -9200,7 +9136,6 @@ var createExecuteExchangeXcm = function createExecuteExchangeXcm(input, origin,
|
|
|
9200
9136
|
address: address,
|
|
9201
9137
|
version: version
|
|
9202
9138
|
});
|
|
9203
|
-
assertHasLocation(asset);
|
|
9204
9139
|
var transformedLocation = localizeLocation(origin, asset.location);
|
|
9205
9140
|
var call = {
|
|
9206
9141
|
module: 'PolkadotXcm',
|
|
@@ -9475,7 +9410,6 @@ var createExchangeInstructions = /*#__PURE__*/function () {
|
|
|
9475
9410
|
nativeAsset = findAssetInfoOrThrow(exchangeChain, {
|
|
9476
9411
|
symbol: Native(nativeSymbol)
|
|
9477
9412
|
}, null);
|
|
9478
|
-
assertHasLocation(nativeAsset);
|
|
9479
9413
|
if (needsMultiHop) {
|
|
9480
9414
|
_context.n = 1;
|
|
9481
9415
|
break;
|
|
@@ -9520,8 +9454,6 @@ var createSwapExecuteXcm = /*#__PURE__*/function () {
|
|
|
9520
9454
|
while (1) switch (_context2.n) {
|
|
9521
9455
|
case 0:
|
|
9522
9456
|
api = options.api, chain = options.chain, exchangeChain = options.exchangeChain, destChain = options.destChain, assetInfoFrom = options.assetInfoFrom, assetInfoTo = options.assetInfoTo, _options$fees2 = options.fees, originReserveFee = _options$fees2.originReserveFee, destReserveFee = _options$fees2.destReserveFee, recipientAddress = options.recipientAddress, version = options.version, paraIdTo = options.paraIdTo;
|
|
9523
|
-
assertHasLocation(assetInfoFrom);
|
|
9524
|
-
assertHasLocation(assetInfoTo);
|
|
9525
9457
|
assetFrom = createAsset(version, assetInfoFrom.amount, localizeLocation(exchangeChain, assetInfoFrom.location));
|
|
9526
9458
|
amountOut = assetInfoTo.amount;
|
|
9527
9459
|
assetTo = createAsset(version, amountOut, localizeLocation(exchangeChain, assetInfoTo.location));
|
|
@@ -9936,8 +9868,6 @@ var throwUnsupportedCurrency = function throwUnsupportedCurrency(currency, chain
|
|
|
9936
9868
|
throw new InvalidCurrencyError("".concat(isDestination ? 'Destination' : 'Origin', " chain ").concat(chain, " does not support currency ").concat(JSON.stringify(currency, replaceBigInt), "."));
|
|
9937
9869
|
};
|
|
9938
9870
|
|
|
9939
|
-
var ERR_LOCATION_DEST_NOT_SUPPORTED = 'XCM Location destinations are not supported for specific transfer you are trying to create. In special cases such as xTokens or xTransfer pallet try using address locaation instead (for both destination and address in same location set (eg. X2 - Parachain, Address). For further assistance please open issue in our repository.';
|
|
9940
|
-
|
|
9941
9871
|
var resolveLocationFromDest = function resolveLocationFromDest(destination, asset) {
|
|
9942
9872
|
if (_typeof(destination) === 'object') return destination;
|
|
9943
9873
|
if (isRelayChain(destination)) return DOT_LOCATION;
|
|
@@ -9946,42 +9876,18 @@ var resolveLocationFromDest = function resolveLocationFromDest(destination, asse
|
|
|
9946
9876
|
var _ahAsset$symbol, _asset$symbol;
|
|
9947
9877
|
return ((_ahAsset$symbol = ahAsset.symbol) === null || _ahAsset$symbol === void 0 ? void 0 : _ahAsset$symbol.toLowerCase()) === ((_asset$symbol = asset.symbol) === null || _asset$symbol === void 0 ? void 0 : _asset$symbol.toLowerCase());
|
|
9948
9878
|
});
|
|
9949
|
-
if (!
|
|
9950
|
-
throw new InvalidCurrencyError("Asset ".concat(asset.symbol, " not found
|
|
9879
|
+
if (!assetHubAsset) {
|
|
9880
|
+
throw new InvalidCurrencyError("Asset ".concat(asset.symbol, " not found"));
|
|
9951
9881
|
}
|
|
9952
9882
|
return assetHubAsset.location;
|
|
9953
9883
|
};
|
|
9954
9884
|
var buildLocation = function buildLocation(_ref) {
|
|
9955
|
-
var
|
|
9956
|
-
asset = _ref.asset,
|
|
9957
|
-
origin = _ref.origin,
|
|
9885
|
+
var asset = _ref.asset,
|
|
9958
9886
|
destination = _ref.destination;
|
|
9959
9887
|
if (asset.isNative) {
|
|
9960
9888
|
return resolveLocationFromDest(destination, asset);
|
|
9961
9889
|
}
|
|
9962
|
-
|
|
9963
|
-
return {
|
|
9964
|
-
parents: Parents.ONE,
|
|
9965
|
-
interior: {
|
|
9966
|
-
X3: [{
|
|
9967
|
-
Parachain: paraIdTo
|
|
9968
|
-
}, {
|
|
9969
|
-
PalletInstance: '50'
|
|
9970
|
-
}, {
|
|
9971
|
-
GeneralIndex: BigInt(assetId)
|
|
9972
|
-
}]
|
|
9973
|
-
}
|
|
9974
|
-
};
|
|
9975
|
-
};
|
|
9976
|
-
var isBifrostOrigin = origin === 'BifrostPolkadot' || origin === 'BifrostKusama';
|
|
9977
|
-
if (isBifrostOrigin) {
|
|
9978
|
-
return createDefaultLocation(asset.assetId);
|
|
9979
|
-
}
|
|
9980
|
-
if (asset.location) {
|
|
9981
|
-
return asset.location;
|
|
9982
|
-
} else {
|
|
9983
|
-
return createDefaultLocation(asset.assetId);
|
|
9984
|
-
}
|
|
9890
|
+
return asset.location;
|
|
9985
9891
|
};
|
|
9986
9892
|
|
|
9987
9893
|
var createDefaultCurrencySelection = function createDefaultCurrencySelection(input) {
|
|
@@ -10092,9 +9998,6 @@ var resolveParaId = function resolveParaId(paraId, destination) {
|
|
|
10092
9998
|
var supportsXTokens = function supportsXTokens(obj) {
|
|
10093
9999
|
return _typeof(obj) === 'object' && obj !== null && 'transferXTokens' in obj;
|
|
10094
10000
|
};
|
|
10095
|
-
var supportsXTransfer = function supportsXTransfer(obj) {
|
|
10096
|
-
return _typeof(obj) === 'object' && obj !== null && 'transferXTransfer' in obj;
|
|
10097
|
-
};
|
|
10098
10001
|
var supportsPolkadotXCM = function supportsPolkadotXCM(obj) {
|
|
10099
10002
|
return _typeof(obj) === 'object' && obj !== null && 'transferPolkadotXCM' in obj;
|
|
10100
10003
|
};
|
|
@@ -10130,7 +10033,7 @@ var Chain = /*#__PURE__*/function () {
|
|
|
10130
10033
|
key: "transfer",
|
|
10131
10034
|
value: function () {
|
|
10132
10035
|
var _transfer = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(sendOptions) {
|
|
10133
|
-
var api, asset, currency, feeAsset, feeCurrency, address, destination, paraIdTo, overriddenAsset, version, senderAddress, ahAddress, pallet, method, keepAlive, transactOptions, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, mythAsset, isMythAsset, assetNeedsTypeThen, supportsTypeThen, isSubBridge, useTypeAndThen,
|
|
10036
|
+
var api, asset, currency, feeAsset, feeCurrency, address, destination, paraIdTo, overriddenAsset, version, senderAddress, ahAddress, pallet, method, keepAlive, transactOptions, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, mythAsset, isMythAsset, assetNeedsTypeThen, supportsTypeThen, isSubBridge, useTypeAndThen, options, promise, shouldUseTeleport, isAhToOtherPara, isOtherParaToAh, isAllowedAhTransfer, isAHOrigin, isAHDest, isExternalAsset, isEthDest, isExternalAssetViaAh, isExternalAssetToAh, call, isBifrostOrigin, isJamtonOrigin, isAssetHubDest, useMultiAssets, input, _t;
|
|
10134
10037
|
return _regenerator().w(function (_context) {
|
|
10135
10038
|
while (1) switch (_context.n) {
|
|
10136
10039
|
case 0:
|
|
@@ -10233,7 +10136,7 @@ var Chain = /*#__PURE__*/function () {
|
|
|
10233
10136
|
case 8:
|
|
10234
10137
|
isAHOrigin = this.chain.includes('AssetHub');
|
|
10235
10138
|
isAHDest = !isTLocation(destination) && destination.includes('AssetHub'); // Handle common cases
|
|
10236
|
-
isExternalAsset =
|
|
10139
|
+
isExternalAsset = asset.location.parents === Parents.TWO;
|
|
10237
10140
|
isEthDest = _typeof(destination) !== 'object' && isExternalChain(destination); // External asset - Any origin to any dest via AH - DestinationReserve - multiple instructions
|
|
10238
10141
|
isExternalAssetViaAh = isExternalAsset && !isAHOrigin && !isAHDest && !isEthDest && !feeAsset; // External asset - Any origin to AHP - DestinationReserve - one DepositAsset instruction
|
|
10239
10142
|
isExternalAssetToAh = isExternalAsset && isAHDest && !isAHOrigin && !isEthDest && !feeAsset;
|
|
@@ -10260,7 +10163,7 @@ var Chain = /*#__PURE__*/function () {
|
|
|
10260
10163
|
}
|
|
10261
10164
|
return _context.a(2, this.transferPolkadotXCM(options));
|
|
10262
10165
|
case 12:
|
|
10263
|
-
_context.n =
|
|
10166
|
+
_context.n = 15;
|
|
10264
10167
|
break;
|
|
10265
10168
|
case 13:
|
|
10266
10169
|
if (!supportsXTokens(this)) {
|
|
@@ -10292,24 +10195,8 @@ var Chain = /*#__PURE__*/function () {
|
|
|
10292
10195
|
case 14:
|
|
10293
10196
|
return _context.a(2, this.transferXTokens(input));
|
|
10294
10197
|
case 15:
|
|
10295
|
-
if (!supportsXTransfer(this)) {
|
|
10296
|
-
_context.n = 16;
|
|
10297
|
-
break;
|
|
10298
|
-
}
|
|
10299
|
-
return _context.a(2, this.transferXTransfer({
|
|
10300
|
-
api: api,
|
|
10301
|
-
asset: asset,
|
|
10302
|
-
recipientAddress: address,
|
|
10303
|
-
paraIdTo: paraId,
|
|
10304
|
-
origin: this.chain,
|
|
10305
|
-
destination: destination,
|
|
10306
|
-
overriddenAsset: overriddenAsset,
|
|
10307
|
-
pallet: pallet,
|
|
10308
|
-
method: method
|
|
10309
|
-
}));
|
|
10310
|
-
case 16:
|
|
10311
10198
|
throw new NoXCMSupportImplementedError(this._chain);
|
|
10312
|
-
case
|
|
10199
|
+
case 16:
|
|
10313
10200
|
return _context.a(2);
|
|
10314
10201
|
}
|
|
10315
10202
|
}, _callee, this);
|
|
@@ -10382,7 +10269,7 @@ var Chain = /*#__PURE__*/function () {
|
|
|
10382
10269
|
});
|
|
10383
10270
|
var isNativeAsset = !isTLocation(to) && (isAHPOrigin && !asset.isNative && isSymbolMatch(asset.symbol, getNativeAssetSymbol(to)) || isAHPDest && isSomeChainNativeAsset);
|
|
10384
10271
|
var assetHubChain = "AssetHub".concat(getRelayChainOf(this.chain));
|
|
10385
|
-
var isRegisteredOnAh =
|
|
10272
|
+
var isRegisteredOnAh = findAssetInfo(assetHubChain, {
|
|
10386
10273
|
location: asset.location
|
|
10387
10274
|
}, null);
|
|
10388
10275
|
return Boolean(isNativeAsset) && Boolean(isRegisteredOnAh) && (isAHPOrigin || isAHPDest);
|
|
@@ -10390,7 +10277,6 @@ var Chain = /*#__PURE__*/function () {
|
|
|
10390
10277
|
}, {
|
|
10391
10278
|
key: "createAsset",
|
|
10392
10279
|
value: function createAsset$1(asset, version) {
|
|
10393
|
-
assertHasLocation(asset);
|
|
10394
10280
|
var amount = asset.amount,
|
|
10395
10281
|
location = asset.location;
|
|
10396
10282
|
return createAsset(version, amount, localizeLocation(this.chain, location));
|
|
@@ -10572,7 +10458,6 @@ var Chain = /*#__PURE__*/function () {
|
|
|
10572
10458
|
}
|
|
10573
10459
|
throw new BridgeHaltedError();
|
|
10574
10460
|
case 2:
|
|
10575
|
-
assertHasLocation(asset);
|
|
10576
10461
|
assertAddressIsString(address);
|
|
10577
10462
|
assertSenderAddress(senderAddress);
|
|
10578
10463
|
ethAsset = createAsset(version, asset.amount, asset.location);
|
|
@@ -11007,7 +10892,6 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Chain) {
|
|
|
11007
10892
|
case 0:
|
|
11008
10893
|
api = input.api, version = input.version, destination = input.destination, senderAddress = input.senderAddress, address = input.address, paraIdTo = input.paraIdTo, asset = input.assetInfo;
|
|
11009
10894
|
assertSenderAddress(senderAddress);
|
|
11010
|
-
assertHasLocation(asset);
|
|
11011
10895
|
_context.n = 1;
|
|
11012
10896
|
return generateMessageId(api, senderAddress, getParaId(this.chain), JSON.stringify(asset.location), JSON.stringify(address), asset.amount);
|
|
11013
10897
|
case 1:
|
|
@@ -11159,8 +11043,8 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Chain) {
|
|
|
11159
11043
|
key: "getBalanceForeign",
|
|
11160
11044
|
value: function getBalanceForeign(api, address, asset) {
|
|
11161
11045
|
var ASSETS_PALLET_ID = 50;
|
|
11162
|
-
var hasRequiredJunctions =
|
|
11163
|
-
if (
|
|
11046
|
+
var hasRequiredJunctions = hasJunction(asset.location, 'PalletInstance', ASSETS_PALLET_ID) && hasJunction(asset.location, 'GeneralIndex') && !hasJunction(asset.location, 'GlobalConsensus');
|
|
11047
|
+
if (hasRequiredJunctions) {
|
|
11164
11048
|
return getPalletInstance('Assets').getBalance(api, address, asset);
|
|
11165
11049
|
}
|
|
11166
11050
|
return getPalletInstance('ForeignAssets').getBalance(api, address, asset);
|
|
@@ -11268,7 +11152,7 @@ var Hydration = /*#__PURE__*/function (_Chain) {
|
|
|
11268
11152
|
}
|
|
11269
11153
|
return _context.a(2, this.transferToEthereum(input));
|
|
11270
11154
|
case 1:
|
|
11271
|
-
isMoonbeamWhAsset =
|
|
11155
|
+
isMoonbeamWhAsset = hasJunction(asset.location, 'Parachain', getParaId('Moonbeam')) && hasJunction(asset.location, 'PalletInstance', 110);
|
|
11272
11156
|
if (!(isMoonbeamWhAsset && destination === 'Moonbeam')) {
|
|
11273
11157
|
_context.n = 2;
|
|
11274
11158
|
break;
|
|
@@ -11311,12 +11195,10 @@ var Hydration = /*#__PURE__*/function (_Chain) {
|
|
|
11311
11195
|
value: function transferMoonbeamWhAsset(input) {
|
|
11312
11196
|
var assetInfo = input.assetInfo,
|
|
11313
11197
|
version = input.version;
|
|
11314
|
-
assertHasLocation(assetInfo);
|
|
11315
11198
|
var glmr = findAssetInfoOrThrow(this.chain, {
|
|
11316
11199
|
symbol: getNativeAssetSymbol('Moonbeam')
|
|
11317
11200
|
}, null);
|
|
11318
11201
|
var FEE_AMOUNT = 80000000000000000n; // 0.08 GLMR
|
|
11319
|
-
assertHasLocation(glmr);
|
|
11320
11202
|
return transferPolkadotXcm(_objectSpread2(_objectSpread2({}, input), {}, {
|
|
11321
11203
|
overriddenAsset: [_objectSpread2(_objectSpread2({}, createAsset(version, FEE_AMOUNT, glmr.location)), {}, {
|
|
11322
11204
|
isFeeAsset: true
|
|
@@ -11838,41 +11720,6 @@ var CrustShadow = /*#__PURE__*/function (_Chain) {
|
|
|
11838
11720
|
}]);
|
|
11839
11721
|
}(Chain);
|
|
11840
11722
|
|
|
11841
|
-
var Curio = /*#__PURE__*/function (_Chain) {
|
|
11842
|
-
function Curio() {
|
|
11843
|
-
_classCallCheck(this, Curio);
|
|
11844
|
-
return _callSuper(this, Curio, ['Curio', 'curio', 'Kusama', Version.V3]);
|
|
11845
|
-
}
|
|
11846
|
-
_inherits(Curio, _Chain);
|
|
11847
|
-
return _createClass(Curio, [{
|
|
11848
|
-
key: "getCustomCurrencyId",
|
|
11849
|
-
value: function getCustomCurrencyId(asset) {
|
|
11850
|
-
return asset.isNative ? {
|
|
11851
|
-
Token: asset.symbol
|
|
11852
|
-
} : {
|
|
11853
|
-
ForeignAsset: Number(asset.assetId)
|
|
11854
|
-
};
|
|
11855
|
-
}
|
|
11856
|
-
}, {
|
|
11857
|
-
key: "transferXTokens",
|
|
11858
|
-
value: function transferXTokens$1(input) {
|
|
11859
|
-
var asset = input.asset;
|
|
11860
|
-
var currencySelection = this.getCustomCurrencyId(asset);
|
|
11861
|
-
return transferXTokens(input, currencySelection);
|
|
11862
|
-
}
|
|
11863
|
-
}, {
|
|
11864
|
-
key: "isSendingTempDisabled",
|
|
11865
|
-
value: function isSendingTempDisabled(_options) {
|
|
11866
|
-
return true;
|
|
11867
|
-
}
|
|
11868
|
-
}, {
|
|
11869
|
-
key: "isReceivingTempDisabled",
|
|
11870
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
11871
|
-
return true;
|
|
11872
|
-
}
|
|
11873
|
-
}]);
|
|
11874
|
-
}(Chain);
|
|
11875
|
-
|
|
11876
11723
|
var Darwinia = /*#__PURE__*/function (_Chain) {
|
|
11877
11724
|
function Darwinia() {
|
|
11878
11725
|
_classCallCheck(this, Darwinia);
|
|
@@ -11983,7 +11830,6 @@ var EnergyWebX = /*#__PURE__*/function (_Chain) {
|
|
|
11983
11830
|
return _regenerator().w(function (_context) {
|
|
11984
11831
|
while (1) switch (_context.n) {
|
|
11985
11832
|
case 0:
|
|
11986
|
-
assertHasLocation(asset);
|
|
11987
11833
|
_context.n = 1;
|
|
11988
11834
|
return api.queryState({
|
|
11989
11835
|
module: 'Assets',
|
|
@@ -12156,8 +12002,6 @@ var Jamton = /*#__PURE__*/function (_Chain) {
|
|
|
12156
12002
|
var usdt = findAssetInfoOrThrow(this.chain, {
|
|
12157
12003
|
symbol: 'USDt'
|
|
12158
12004
|
}, null);
|
|
12159
|
-
assertHasLocation(assetInfo);
|
|
12160
|
-
assertHasLocation(usdt);
|
|
12161
12005
|
var MIN_USDT_AMOUNT = 180000n; // 0.18 USDt
|
|
12162
12006
|
return transferPolkadotXcm(_objectSpread2(_objectSpread2({}, input), {}, {
|
|
12163
12007
|
overriddenAsset: [_objectSpread2(_objectSpread2({}, createAsset(version, MIN_USDT_AMOUNT, usdt.location)), {}, {
|
|
@@ -12492,7 +12336,6 @@ var createTypeAndThenTransfer = /*#__PURE__*/function () {
|
|
|
12492
12336
|
ethAsset = findAssetInfoOrThrow('Ethereum', {
|
|
12493
12337
|
symbol: asset.symbol
|
|
12494
12338
|
}, null);
|
|
12495
|
-
assertHasLocation(ethAsset);
|
|
12496
12339
|
assertHasId(ethAsset);
|
|
12497
12340
|
assertAddressIsString(address);
|
|
12498
12341
|
assertSenderAddress(senderAddress);
|
|
@@ -12897,105 +12740,6 @@ var PeopleWestend = /*#__PURE__*/function (_PeoplePolkadot) {
|
|
|
12897
12740
|
return _createClass(PeopleWestend);
|
|
12898
12741
|
}(PeoplePolkadot);
|
|
12899
12742
|
|
|
12900
|
-
var determineDestWeight = function determineDestWeight(destChain) {
|
|
12901
|
-
if (destChain === 'Astar') {
|
|
12902
|
-
return {
|
|
12903
|
-
ref_time: 6000000000n,
|
|
12904
|
-
proof_size: 1000000n
|
|
12905
|
-
};
|
|
12906
|
-
}
|
|
12907
|
-
if (destChain === 'Moonbeam' || destChain === 'Hydration') {
|
|
12908
|
-
return {
|
|
12909
|
-
ref_time: 5000000000n,
|
|
12910
|
-
proof_size: 0n
|
|
12911
|
-
};
|
|
12912
|
-
}
|
|
12913
|
-
throw new ScenarioNotSupportedError("Pallet XTransfer does not support transfering to ".concat(destChain, "."));
|
|
12914
|
-
};
|
|
12915
|
-
|
|
12916
|
-
var transferXTransfer = function transferXTransfer(input) {
|
|
12917
|
-
var api = input.api,
|
|
12918
|
-
origin = input.origin,
|
|
12919
|
-
destination = input.destination,
|
|
12920
|
-
asset = input.asset,
|
|
12921
|
-
overriddenAsset = input.overriddenAsset,
|
|
12922
|
-
recipientAddress = input.recipientAddress,
|
|
12923
|
-
pallet = input.pallet,
|
|
12924
|
-
methodOverride = input.method,
|
|
12925
|
-
paraIdTo = input.paraIdTo;
|
|
12926
|
-
assertToIsString(destination, ERR_LOCATION_DEST_NOT_SUPPORTED);
|
|
12927
|
-
// XTransfer pallet does not require version specification
|
|
12928
|
-
// but the XCM syntax matches the V3 format
|
|
12929
|
-
var version = Version.V3;
|
|
12930
|
-
var multiAsset = createAsset(version, asset.amount, {
|
|
12931
|
-
parents: Parents.ZERO,
|
|
12932
|
-
interior: 'Here'
|
|
12933
|
-
});
|
|
12934
|
-
var resolvedMultiAsset = maybeOverrideAsset(version, asset.amount, multiAsset, overriddenAsset);
|
|
12935
|
-
var dest = createBeneficiaryLocXTokens({
|
|
12936
|
-
api: api,
|
|
12937
|
-
origin: origin,
|
|
12938
|
-
destination: destination,
|
|
12939
|
-
address: recipientAddress,
|
|
12940
|
-
version: version,
|
|
12941
|
-
paraId: paraIdTo
|
|
12942
|
-
});
|
|
12943
|
-
var destWeight = determineDestWeight(destination);
|
|
12944
|
-
var method = 'transfer';
|
|
12945
|
-
var call = {
|
|
12946
|
-
module: pallet !== null && pallet !== void 0 ? pallet : 'XTransfer',
|
|
12947
|
-
method: methodOverride !== null && methodOverride !== void 0 ? methodOverride : method,
|
|
12948
|
-
params: {
|
|
12949
|
-
asset: resolvedMultiAsset,
|
|
12950
|
-
dest: dest,
|
|
12951
|
-
dest_weight: destWeight
|
|
12952
|
-
}
|
|
12953
|
-
};
|
|
12954
|
-
return api.deserializeExtrinsics(call);
|
|
12955
|
-
};
|
|
12956
|
-
|
|
12957
|
-
var Phala = /*#__PURE__*/function (_Chain) {
|
|
12958
|
-
function Phala() {
|
|
12959
|
-
_classCallCheck(this, Phala);
|
|
12960
|
-
return _callSuper(this, Phala, ['Phala', 'phala', 'Polkadot', Version.V3]);
|
|
12961
|
-
}
|
|
12962
|
-
_inherits(Phala, _Chain);
|
|
12963
|
-
return _createClass(Phala, [{
|
|
12964
|
-
key: "transferXTransfer",
|
|
12965
|
-
value: function transferXTransfer$1(input) {
|
|
12966
|
-
var asset = input.asset;
|
|
12967
|
-
if (asset.symbol !== this.getNativeAssetSymbol()) {
|
|
12968
|
-
throw new InvalidCurrencyError("Chain ".concat(this.chain, " does not support currency ").concat(asset.symbol));
|
|
12969
|
-
}
|
|
12970
|
-
return transferXTransfer(input);
|
|
12971
|
-
}
|
|
12972
|
-
}, {
|
|
12973
|
-
key: "transferLocalNonNativeAsset",
|
|
12974
|
-
value: function transferLocalNonNativeAsset(options) {
|
|
12975
|
-
var api = options.api,
|
|
12976
|
-
asset = options.assetInfo,
|
|
12977
|
-
address = options.address,
|
|
12978
|
-
isAmountAll = options.isAmountAll,
|
|
12979
|
-
keepAlive = options.keepAlive;
|
|
12980
|
-
assertHasId(asset);
|
|
12981
|
-
var assetId = BigInt(asset.assetId);
|
|
12982
|
-
var dest = {
|
|
12983
|
-
Id: address
|
|
12984
|
-
};
|
|
12985
|
-
var amount = isAmountAll ? options.balance : asset.amount;
|
|
12986
|
-
return api.deserializeExtrinsics({
|
|
12987
|
-
module: 'Assets',
|
|
12988
|
-
method: keepAlive ? 'transfer_keep_alive' : 'transfer',
|
|
12989
|
-
params: {
|
|
12990
|
-
id: assetId,
|
|
12991
|
-
target: dest,
|
|
12992
|
-
amount: amount
|
|
12993
|
-
}
|
|
12994
|
-
});
|
|
12995
|
-
}
|
|
12996
|
-
}]);
|
|
12997
|
-
}(Chain);
|
|
12998
|
-
|
|
12999
12743
|
var Quartz = /*#__PURE__*/function (_Chain) {
|
|
13000
12744
|
function Quartz() {
|
|
13001
12745
|
_classCallCheck(this, Quartz);
|
|
@@ -13109,7 +12853,6 @@ var Unique = /*#__PURE__*/function (_Chain) {
|
|
|
13109
12853
|
return _regenerator().w(function (_context) {
|
|
13110
12854
|
while (1) switch (_context.n) {
|
|
13111
12855
|
case 0:
|
|
13112
|
-
assertHasLocation(asset);
|
|
13113
12856
|
assertHasId(asset);
|
|
13114
12857
|
_context.n = 1;
|
|
13115
12858
|
return api.queryState({
|
|
@@ -13263,9 +13006,7 @@ var chains = function chains() {
|
|
|
13263
13006
|
NeuroWeb: new NeuroWeb(),
|
|
13264
13007
|
Pendulum: new Pendulum(),
|
|
13265
13008
|
Collectives: new Collectives(),
|
|
13266
|
-
Phala: new Phala(),
|
|
13267
13009
|
KiltSpiritnet: new KiltSpiritnet(),
|
|
13268
|
-
Curio: new Curio(),
|
|
13269
13010
|
Mythos: new Mythos(),
|
|
13270
13011
|
Peaq: new Peaq(),
|
|
13271
13012
|
Xode: new Xode(),
|
|
@@ -13333,18 +13074,6 @@ var RELAY_LOCATION = {
|
|
|
13333
13074
|
Here: null
|
|
13334
13075
|
}
|
|
13335
13076
|
};
|
|
13336
|
-
[{
|
|
13337
|
-
parents: Parents.ONE,
|
|
13338
|
-
interior: {
|
|
13339
|
-
X3: [{
|
|
13340
|
-
Parachain: 1000
|
|
13341
|
-
}, {
|
|
13342
|
-
PalletInstance: 50
|
|
13343
|
-
}, {
|
|
13344
|
-
GeneralIndex: 50000075
|
|
13345
|
-
}]
|
|
13346
|
-
}
|
|
13347
|
-
}];
|
|
13348
13077
|
var ASSET_HUB_EXECUTION_FEE = 2200000000n; // 0.22 DOT
|
|
13349
13078
|
var TX_CLIENT_TIMEOUT_MS = 20 * 60 * 1000; // 20 minutes
|
|
13350
13079
|
var DRY_RUN_CLIENT_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
|
|
@@ -13357,6 +13086,7 @@ var BYPASS_MINT_AMOUNT = '1000';
|
|
|
13357
13086
|
var MIN_AMOUNT = 2n;
|
|
13358
13087
|
var AMOUNT_ALL = 'ALL';
|
|
13359
13088
|
var TRANSACT_ORIGINS = ['Native', 'SovereignAccount', 'Superuser', 'Xcm'];
|
|
13089
|
+
var ERR_LOCATION_DEST_NOT_SUPPORTED = 'XCM Location destinations are not supported for specific transfer you are trying to create. In special cases such as xTokens pallet, try using address location instead (for both destination and address in same location set (eg. X2 - Parachain, Address). For further assistance please open issue in our repository.';
|
|
13360
13090
|
|
|
13361
13091
|
var EVM_DEV_PRIVATE_KEYS = {
|
|
13362
13092
|
alith: '0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133',
|
|
@@ -13877,9 +13607,8 @@ var AssetsPallet = /*#__PURE__*/function (_BaseAssetsPallet) {
|
|
|
13877
13607
|
value: function () {
|
|
13878
13608
|
var _getBalance = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(api, address, asset) {
|
|
13879
13609
|
var _this = this,
|
|
13880
|
-
_balance$balance,
|
|
13881
13610
|
_balance2;
|
|
13882
|
-
var fetchBalance, balance, _t;
|
|
13611
|
+
var fetchBalance, balance, value, _t;
|
|
13883
13612
|
return _regenerator().w(function (_context) {
|
|
13884
13613
|
while (1) switch (_context.p = _context.n) {
|
|
13885
13614
|
case 0:
|
|
@@ -13915,7 +13644,8 @@ var AssetsPallet = /*#__PURE__*/function (_BaseAssetsPallet) {
|
|
|
13915
13644
|
case 5:
|
|
13916
13645
|
throw _t;
|
|
13917
13646
|
case 6:
|
|
13918
|
-
|
|
13647
|
+
value = (_balance2 = balance) === null || _balance2 === void 0 ? void 0 : _balance2.balance;
|
|
13648
|
+
return _context.a(2, value !== undefined ? BigInt(value) : 0n);
|
|
13919
13649
|
}
|
|
13920
13650
|
}, _callee, null, [[1, 3]]);
|
|
13921
13651
|
}));
|
|
@@ -14028,7 +13758,6 @@ var ForeignAssetsPallet = /*#__PURE__*/function (_BaseAssetsPallet) {
|
|
|
14028
13758
|
return _createClass(ForeignAssetsPallet, [{
|
|
14029
13759
|
key: "mint",
|
|
14030
13760
|
value: function mint(address, asset) {
|
|
14031
|
-
assertHasLocation(asset);
|
|
14032
13761
|
var location = asset.location,
|
|
14033
13762
|
amount = asset.amount;
|
|
14034
13763
|
return Promise.resolve({
|
|
@@ -14075,7 +13804,6 @@ var ForeignAssetsPallet = /*#__PURE__*/function (_BaseAssetsPallet) {
|
|
|
14075
13804
|
return _regenerator().w(function (_context) {
|
|
14076
13805
|
while (1) switch (_context.n) {
|
|
14077
13806
|
case 0:
|
|
14078
|
-
assertHasLocation(asset);
|
|
14079
13807
|
_context.n = 1;
|
|
14080
13808
|
return api.queryState({
|
|
14081
13809
|
module: this.palletName,
|
|
@@ -14112,7 +13840,6 @@ var FungiblesPallet = /*#__PURE__*/function (_AssetsPallet) {
|
|
|
14112
13840
|
return _regenerator().w(function (_context) {
|
|
14113
13841
|
while (1) switch (_context.n) {
|
|
14114
13842
|
case 0:
|
|
14115
|
-
assertHasLocation(asset);
|
|
14116
13843
|
_context.n = 1;
|
|
14117
13844
|
return api.queryState({
|
|
14118
13845
|
module: this.palletName,
|
|
@@ -14221,7 +13948,7 @@ var resolveId = function resolveId(asset, chain) {
|
|
|
14221
13948
|
if (chain === 'BifrostPolkadot' || chain === 'BifrostKusama' || chain === 'BifrostPaseo') {
|
|
14222
13949
|
var _asset$assetId;
|
|
14223
13950
|
var isEthAsset = !asset.isNative && ((_asset$assetId = asset.assetId) === null || _asset$assetId === void 0 ? void 0 : _asset$assetId.startsWith('0x'));
|
|
14224
|
-
var resolvedAsset = isEthAsset
|
|
13951
|
+
var resolvedAsset = isEthAsset ? findAssetInfoOrThrow(chain, {
|
|
14225
13952
|
location: asset.location
|
|
14226
13953
|
}, null) : asset;
|
|
14227
13954
|
return getChain(chain).getCustomCurrencyId(resolvedAsset);
|
|
@@ -14482,4 +14209,4 @@ var getMoonbeamErc20Balance = /*#__PURE__*/function () {
|
|
|
14482
14209
|
};
|
|
14483
14210
|
}();
|
|
14484
14211
|
|
|
14485
|
-
export { AmountTooLowError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiUnavailableError, ScenarioNotSupportedError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId,
|
|
14212
|
+
export { AmountTooLowError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiUnavailableError, ScenarioNotSupportedError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertSender, assertSenderAddress, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, compareAddresses, computeFeeFromDryRun, computeFeeFromDryRunPjs, computeOverridenAmount, constructTypeAndThenCall, convertSs58, createAsset, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createClientCache, createClientPoolHelpers, createDestination, createDirectExecuteXcm, createExecuteCall, createExecuteExchangeXcm, createId, createTx, createTypeAndThenCall, createTypeThenAutoReserve, createVersionedAssets, createVersionedDestination, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, formatAssetIdToERC20, formatUnits, getAssetBalanceInternal, getAssetReserveChain, getBalance, getBalanceInternal, getBridgeStatus, getChain, getChainConfig, getChainLocation, getChainProviders, getChainVersion, getEthErc20Balance, getEvmPrivateKeyHex, getFailureInfo$1 as getFailureInfo, getLocalTransferAmount, getMinTransferableAmount, getMinTransferableAmountInternal, getMoonbeamErc20Balance, getOriginXcmFee, getOriginXcmFeeEstimate, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getRelayChainOf, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, getXcmFeeInternal, getXcmFeeOnce, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, isSenderSigner, keyFromWs, localizeLocation, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, overrideTxAmount, padFee, padValueBy, parseUnits, pickCompatibleXcmVersion, pickRouterCompatibleXcmVersion, resolveDestChain, resolveModuleError, resolveParaId, resolveSendParams, reverseTransformLocation, selectXcmVersion, send, sortAssets, throwUnsupportedCurrency, transferMoonbeamEvm, transferMoonbeamToEth, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, validateDestinationAddress, validateTransact, verifyEdOnDestination, wrapTxBypass };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-core",
|
|
3
|
-
"version": "12.6.
|
|
3
|
+
"version": "12.6.3",
|
|
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": "^2.0.1",
|
|
27
27
|
"@scure/base": "^2.0.0",
|
|
28
28
|
"viem": "2.45.0",
|
|
29
|
-
"@paraspell/assets": "12.6.
|
|
30
|
-
"@paraspell/
|
|
31
|
-
"@paraspell/
|
|
29
|
+
"@paraspell/assets": "12.6.3",
|
|
30
|
+
"@paraspell/pallets": "12.6.3",
|
|
31
|
+
"@paraspell/sdk-common": "12.6.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-syntax-import-attributes": "^7.28.6",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"test": "vitest run",
|
|
59
59
|
"test:cov": "vitest run --coverage",
|
|
60
60
|
"test:watch": "vitest",
|
|
61
|
-
"updateChainConfigs": "node --loader ts-node/esm --experimental-specifier-resolution=node ./scripts/
|
|
61
|
+
"updateChainConfigs": "node --loader ts-node/esm --experimental-specifier-resolution=node ./scripts/fetchChainConfigs.ts",
|
|
62
62
|
"runAll": "pnpm compile && pnpm format:write && pnpm lint && pnpm test"
|
|
63
63
|
}
|
|
64
64
|
}
|