@paraspell/sdk-core 13.9.0 → 13.10.1
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 +8 -9
- package/dist/index.mjs +146 -132
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -156,6 +156,7 @@ declare abstract class Chain<TApi, TRes, TSigner, TCustomChain extends string =
|
|
|
156
156
|
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
157
157
|
canReceiveFrom<TCustomChain extends string = never>(_origin: TChain | TCustomChain): boolean;
|
|
158
158
|
shouldUseNativeAssetTeleport({ api, assetInfo: asset, to }: TTransferInternalOptions<TApi, TRes, TSigner, TCustomChain>): boolean;
|
|
159
|
+
shouldUseExecuteTransfer(_options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner, TCustomChain>): boolean;
|
|
159
160
|
createAsset(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, asset: WithAmount<TAssetInfo>, version: Version): TAsset;
|
|
160
161
|
getNativeAssetSymbol<TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>): string;
|
|
161
162
|
transferLocal(options: TTransferInternalOptions<TApi, TRes, TSigner, TCustomChain>): Promise<TRes>;
|
|
@@ -201,6 +202,7 @@ declare class AssetHubKusama<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSig
|
|
|
201
202
|
|
|
202
203
|
declare class AssetHubPolkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
203
204
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
205
|
+
shouldUseExecuteTransfer(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): boolean;
|
|
204
206
|
transferPolkadotXCM(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
205
207
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
206
208
|
getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
@@ -225,6 +227,7 @@ declare class Astar<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> impl
|
|
|
225
227
|
declare class Hydration<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
226
228
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
227
229
|
protected getMintConfig(): TMintConfig;
|
|
230
|
+
shouldUseExecuteTransfer(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): boolean;
|
|
228
231
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
229
232
|
transferMoonbeamWhAsset<TApi, TRes, TSigner>(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
230
233
|
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
@@ -1584,10 +1587,6 @@ declare class SubmitTransactionError extends Error {
|
|
|
1584
1587
|
constructor(message: string);
|
|
1585
1588
|
}
|
|
1586
1589
|
|
|
1587
|
-
declare class TransferToAhNotSupported extends Error {
|
|
1588
|
-
constructor(message?: string);
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
1590
|
declare class TypeAndThenUnavailableError extends Error {
|
|
1592
1591
|
constructor(message: string);
|
|
1593
1592
|
}
|
|
@@ -2179,8 +2178,7 @@ type TDestWeight = {
|
|
|
2179
2178
|
proof_size: bigint;
|
|
2180
2179
|
};
|
|
2181
2180
|
type TXTokensMethod = 'transfer' | 'transfer_multiasset' | 'transfer_multiassets';
|
|
2182
|
-
type TPolkadotXcmMethod = 'limited_teleport_assets' | '
|
|
2183
|
-
type TXcmPalletMethod = 'limited_teleport_assets' | 'limited_reserve_transfer_assets' | 'transfer_assets_using_type_and_then';
|
|
2181
|
+
type TPolkadotXcmMethod = 'limited_teleport_assets' | 'transfer_assets_using_type_and_then';
|
|
2184
2182
|
type TWeight<TWeightType = bigint> = {
|
|
2185
2183
|
refTime: TWeightType;
|
|
2186
2184
|
proofSize: TWeightType;
|
|
@@ -2218,7 +2216,6 @@ type TCreateBaseTransferXcmOptions<TRes, TCustomChain extends string = never> =
|
|
|
2218
2216
|
version: Version;
|
|
2219
2217
|
useJitWithdraw?: boolean;
|
|
2220
2218
|
useFeeAssetOnHops?: boolean;
|
|
2221
|
-
forceBuyExecution?: boolean;
|
|
2222
2219
|
paraIdTo?: number;
|
|
2223
2220
|
transactOptions?: TTransactOptions<TRes>;
|
|
2224
2221
|
};
|
|
@@ -2684,6 +2681,8 @@ declare const getLocalTransferAmount: <TApi, TRes, TSigner>({ assetInfo, balance
|
|
|
2684
2681
|
|
|
2685
2682
|
declare const handleToAhTeleport: <TApi, TRes, TSigner>(origin: TParachain, input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>, defaultTx: TRes) => Promise<TRes>;
|
|
2686
2683
|
|
|
2684
|
+
declare const isNativeAssetTeleport: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, origin: TChain | TCustomChain, dest: TChain | TCustomChain, asset: TAssetInfo) => boolean;
|
|
2685
|
+
|
|
2687
2686
|
declare const throwUnsupportedCurrency: (currency: TCurrencyInput, chain: string, { isDestination }?: {
|
|
2688
2687
|
isDestination: boolean;
|
|
2689
2688
|
}) => never;
|
|
@@ -2696,5 +2695,5 @@ declare const selectXcmVersion: (forcedVersion: Version | undefined, originVersi
|
|
|
2696
2695
|
declare const pickCompatibleXcmVersion: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, origin: TSubstrateChain | TCustomChain, destination: TDestination, override?: Version) => Version;
|
|
2697
2696
|
declare const pickRouterCompatibleXcmVersion: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, origin: TSubstrateChain | undefined, exchangeChain: TSubstrateChain, destination: TChain | undefined) => Version;
|
|
2698
2697
|
|
|
2699
|
-
export { API_TYPES, AmountTooLowError, ApiNotInitializedError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, CustomChainConflictError, CustomChainInvalidError, DEFAULT_TTL_MS, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, EXCHANGE_CHAINS, EXTENSION_MS, ExtensionNotInstalledError, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MAX_CLIENTS, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotApi, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiError, RuntimeApiUnavailableError, ScenarioNotSupportedError, SubmitTransactionError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS,
|
|
2700
|
-
export type { BuildHopInfoOptions, ClientCache, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotXCMTransfer, IXTokensTransfer, OneKey, TAddress, TApiOrUrl, TApiType, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedTransferOptions, TBifrostToken, TBridgeStatus, TBuildAllInternalRes, TBuildDestInfoOptions, TBuildEvmTransferOptions, TBuildInternalRes, TBuildInternalResBase, TBuildOriginInfoOptions, TBuilderConfig, TBuilderInternalOptions, TBuilderOptions, TBypassOptions, TCacheItem, TChainConfig, TChainConfigMap, TChainEndpoint, TChainWithApi, TClientEntry, TClientKey, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateEthBridgeInstructionsOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TCustomChainEntry, TCustomChainEntryHydrated, TCustomChainFrom, TCustomChainInput, TCustomChainPalletsInput, TCustomChainsCtx, TCustomChainsMap, TDestWeight, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunError, TDryRunFailureInfo, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmExtension, TEvmSnowbridgeExtension, TEvmTransferOptions, TEvmTransferOptionsBase, TExchangeChain, TExchangeInput, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TFullCustomCtx, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceCommonOptions, TGetBalanceOptions, TGetBalanceOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, TMintConfig, TModuleError, TNativeTokenAsset, TOriginFeeDetails, TOriginXcmFeeInfo, TOtherReserveAsset, TPaymentInfo, TPerAssetResult, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TReceivedCurrencyInfo, TReserveAsset, TResolveHopParams, TResolvedCurrency, TRuntimeApi, TScenario, TSelectedCurrencyInfo, TSelfReserveAsset, TSender, TSerializedExtrinsics, TSerializedRuntimeApiQuery, TSerializedStateQuery, TSetBalanceRes, TStatusChangeCallback, TSubstrateTransferBaseOptions, TSubstrateTransferBaseOptionsWithSender, TSubstrateTransferOptions, TSwapBuilder, TSwapBuilderFactory, TSwapConfig, TSwapEvent, TSwapEventType, TSwapExtension, TSwapFeeEstimates, TSwapOptions, TSystemProperties, TTransactOptions, TTransactOrigin, TTransactionContext, TTransactionType, TTransferBaseOptions, TTransferBaseOptionsWithSender, TTransferBaseOptionsWithSwap, TTransferFeeEstimates, TTransferInfo, TTransferInternalOptions, TTransferLocalOptions, TTransferOptions, TTransferOptionsWithSwap, TTxFactory, TTypeAndThenCallContext, TTypeAndThenFees, TTypeAndThenOverrides, TUrl, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeDetailWithForwardedXcm, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmFeeSwapConfig, TXcmForeignAsset,
|
|
2698
|
+
export { API_TYPES, AmountTooLowError, ApiNotInitializedError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, CustomChainConflictError, CustomChainInvalidError, DEFAULT_TTL_MS, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, EXCHANGE_CHAINS, EXTENSION_MS, ExtensionNotInstalledError, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MAX_CLIENTS, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotApi, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiError, RuntimeApiUnavailableError, ScenarioNotSupportedError, SubmitTransactionError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, aggregateHopFees, applyDecimalAbstraction, assertAddressIsString, assertCurrencyCore, assertEvmAddress, assertExtensionInstalled, assertHasId, assertNotEvmTransfer, assertNotRawAssets, assertSender, assertSenderSource, assertSubstrateOrigin, assertSwapSupport, assertToIsString, blake2b256, blake2b512, buildCustomChainAssetsInfo, buildCustomChainConfig, buildDestInfo, buildHopInfo, buildOriginInfo, calcPreviewMintAmount, claimAssets, compareAddresses, computeOverridenAmount, constructTypeAndThenCall, convertBuilderConfig, convertSs58, createAsset, createAssetId, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createClientCache, createClientPoolHelpers, createCustomXcmOnDest, createDestination, createDirectExecuteXcm, createEthereumBridgeInstructions, createExecuteCall, createExecuteExchangeXcm, createSwapBuilder, createTransfer, createTransferOrSwap, createTransferOrSwapAll, createTxOverrideAmount, createTypeAndThenCall, createTypeThenAutoReserve, createVersionedAssets, createVersionedDestination, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, executeWithSwap, formatAssetIdToERC20, formatUnits, generateMessageId, getAssetBalanceInternal, getAssetReserveChain, getAssetReserveChainImpl, getBalance, getBalanceInternal, getBridgeStatus, getChain, getChainConfig, getChainConfigImpl, getChainLocation, getChainProviders, getChainProvidersImpl, getChainVersion, getEthErc20Balance, getEvmExtensionOrThrow, getEvmPrivateKeyHex, getEvmSnowbridgeExtensionOrThrow, getFailureInfo, getLocalTransferAmount, getMinTransferableAmount, getMinTransferableAmountInternal, getMoonbeamErc20Balance, getOriginXcmFee, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getParaIdImpl, getRelayChainOf, getRelayChainOfImpl, getRelayChainSymbolOf, getSwapExtensionOrThrow, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeInternal, getXcmFeeOnce, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, isExchange, isNativeAssetTeleport, isSenderSigner, isViemSigner, keyFromWs, localizeLocation, localizeLocationImpl, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, normalizeCustomChains, normalizeExchange, overrideTxAmount, padFee, padValueBy, parseUnits, pickCompatibleXcmVersion, pickOtherMintPallet, pickRouterCompatibleXcmVersion, registerEvmExtension, registerEvmSnowbridgeExtension, registerSwapExtension, resolveAssetCount, resolveDestChain, resolveModuleError, resolveParaId, resolveTransferParams, reverseTransformLocation, selectXcmVersion, sortAssets, throwUnsupportedCurrency, transferMoonbeamEvm, transferMoonbeamToEth, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, validateDestinationAddress, validateTransact, verifyEdOnDestination, wrapTxBypass };
|
|
2699
|
+
export type { BuildHopInfoOptions, ClientCache, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotXCMTransfer, IXTokensTransfer, OneKey, TAddress, TApiOrUrl, TApiType, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedTransferOptions, TBifrostToken, TBridgeStatus, TBuildAllInternalRes, TBuildDestInfoOptions, TBuildEvmTransferOptions, TBuildInternalRes, TBuildInternalResBase, TBuildOriginInfoOptions, TBuilderConfig, TBuilderInternalOptions, TBuilderOptions, TBypassOptions, TCacheItem, TChainConfig, TChainConfigMap, TChainEndpoint, TChainWithApi, TClientEntry, TClientKey, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateEthBridgeInstructionsOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TCustomChainEntry, TCustomChainEntryHydrated, TCustomChainFrom, TCustomChainInput, TCustomChainPalletsInput, TCustomChainsCtx, TCustomChainsMap, TDestWeight, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunError, TDryRunFailureInfo, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmExtension, TEvmSnowbridgeExtension, TEvmTransferOptions, TEvmTransferOptionsBase, TExchangeChain, TExchangeInput, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TFullCustomCtx, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceCommonOptions, TGetBalanceOptions, TGetBalanceOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, TMintConfig, TModuleError, TNativeTokenAsset, TOriginFeeDetails, TOriginXcmFeeInfo, TOtherReserveAsset, TPaymentInfo, TPerAssetResult, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TReceivedCurrencyInfo, TReserveAsset, TResolveHopParams, TResolvedCurrency, TRuntimeApi, TScenario, TSelectedCurrencyInfo, TSelfReserveAsset, TSender, TSerializedExtrinsics, TSerializedRuntimeApiQuery, TSerializedStateQuery, TSetBalanceRes, TStatusChangeCallback, TSubstrateTransferBaseOptions, TSubstrateTransferBaseOptionsWithSender, TSubstrateTransferOptions, TSwapBuilder, TSwapBuilderFactory, TSwapConfig, TSwapEvent, TSwapEventType, TSwapExtension, TSwapFeeEstimates, TSwapOptions, TSystemProperties, TTransactOptions, TTransactOrigin, TTransactionContext, TTransactionType, TTransferBaseOptions, TTransferBaseOptionsWithSender, TTransferBaseOptionsWithSwap, TTransferFeeEstimates, TTransferInfo, TTransferInternalOptions, TTransferLocalOptions, TTransferOptions, TTransferOptionsWithSwap, TTxFactory, TTypeAndThenCallContext, TTypeAndThenFees, TTypeAndThenOverrides, TUrl, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeDetailWithForwardedXcm, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmFeeSwapConfig, TXcmForeignAsset, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSender, WithRequiredSwapOptions };
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { blake2b } from '@noble/hashes/blake2.js';
|
|
2
|
-
import { isChainEvm, getAssetsObject, isChainEvmImpl, InvalidCurrencyError, isOverrideLocationSpecifier, isTAsset, getOtherAssets,
|
|
2
|
+
import { isChainEvm, getAssetsObject, isChainEvmImpl, InvalidCurrencyError, isOverrideLocationSpecifier, isTAsset, getOtherAssets, getNativeAssetSymbolImpl, isSymbolMatch, getRelayChainSymbolImpl, isAssetEqual, isSymbolSpecifier, isStableCoinAsset, isBridgedSystemAsset, normalizeLocation, getNativeAssetSymbol, getEdFromAssetOrThrow, getExistentialDepositOrThrowImpl, extractAssetLocation, hasDryRunSupport, normalizeSymbol, Native, canonicalizeLocation, getAssetsObjectImpl, getAssetsImpl, getNativeAssetsImpl, getOtherAssetsImpl, findAssetInfoImpl, findAssetInfoOrThrowImpl, findAssetInfoOnDestImpl, findAssetOnDestOrThrowImpl, findNativeAssetInfoImpl, findNativeAssetInfoOrThrowImpl, hasDryRunSupportImpl, hasXcmPaymentApiSupportImpl, normalizeCustomAssets } from '@paraspell/assets';
|
|
3
3
|
export * from '@paraspell/assets';
|
|
4
4
|
import { base58 } from '@scure/base';
|
|
5
5
|
import { isAddress, pad, toHex, getAddress, concat, keccak256, isHex, createPublicClient, http, getContract, formatUnits as formatUnits$1, parseUnits as parseUnits$1 } from 'viem';
|
|
6
|
-
import { isTLocation, replaceBigInt, isExternalChain, Version, isRelayChain, Parents, isSubstrateBridge, isSnowbridge, isCustomChain, getJunctionValue, deepEqual, hasJunction, RELAYCHAINS,
|
|
6
|
+
import { isTLocation, replaceBigInt, isExternalChain, Version, isRelayChain, Parents, isSubstrateBridge, isSnowbridge, isCustomChain, getJunctionValue, deepEqual, hasJunction, RELAYCHAINS, isTrustedChain, ETHEREUM_BRIDGE_ORIGINS, isBridge, PARACHAINS, DEFAULT_SS58_PREFIX, CHAINS } from '@paraspell/sdk-common';
|
|
7
7
|
export * from '@paraspell/sdk-common';
|
|
8
8
|
import { getXcmPallet, getSupportedPallets, getOtherAssetsPallets, getNativeAssetsPallet, hasPalletImpl, getXcmPalletImpl, getSupportedPalletsDetails, ASSETS_PALLETS, NATIVE_ASSETS_PALLET_PRIORITY, OTHER_ASSETS_PALLET_PRIORITY } from '@paraspell/pallets';
|
|
9
9
|
export * from '@paraspell/pallets';
|
|
@@ -803,18 +803,6 @@ var SubmitTransactionError = /*#__PURE__*/function (_Error) {
|
|
|
803
803
|
return _createClass(SubmitTransactionError);
|
|
804
804
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
805
805
|
|
|
806
|
-
var TransferToAhNotSupported = /*#__PURE__*/function (_Error) {
|
|
807
|
-
function TransferToAhNotSupported(message) {
|
|
808
|
-
var _this;
|
|
809
|
-
_classCallCheck(this, TransferToAhNotSupported);
|
|
810
|
-
_this = _callSuper(this, TransferToAhNotSupported, [message]);
|
|
811
|
-
_this.name = 'TransferToAhNotSupported';
|
|
812
|
-
return _this;
|
|
813
|
-
}
|
|
814
|
-
_inherits(TransferToAhNotSupported, _Error);
|
|
815
|
-
return _createClass(TransferToAhNotSupported);
|
|
816
|
-
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
817
|
-
|
|
818
806
|
var TypeAndThenUnavailableError = /*#__PURE__*/function (_Error) {
|
|
819
807
|
function TypeAndThenUnavailableError(message) {
|
|
820
808
|
var _this;
|
|
@@ -1117,8 +1105,7 @@ var assertExtensionInstalled = function assertExtensionInstalled(extension, exte
|
|
|
1117
1105
|
|
|
1118
1106
|
var createPayFees = function createPayFees(version, asset, weight) {
|
|
1119
1107
|
var includeRefundSurplus = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
1120
|
-
|
|
1121
|
-
if (forceBuyExecution || version < Version.V5) {
|
|
1108
|
+
if (version < Version.V5) {
|
|
1122
1109
|
return [{
|
|
1123
1110
|
BuyExecution: {
|
|
1124
1111
|
fees: asset,
|
|
@@ -2156,6 +2143,10 @@ var AssetHubPolkadot$1 = {
|
|
|
2156
2143
|
name: "Dwellir",
|
|
2157
2144
|
endpoint: "wss://asset-hub-polkadot-rpc.n.dwellir.com"
|
|
2158
2145
|
},
|
|
2146
|
+
{
|
|
2147
|
+
name: "Helixstreet",
|
|
2148
|
+
endpoint: "wss://rpc-asset-hub-polkadot.helixstreet.io"
|
|
2149
|
+
},
|
|
2159
2150
|
{
|
|
2160
2151
|
name: "LuckyFriday",
|
|
2161
2152
|
endpoint: "wss://rpc-asset-hub-polkadot.luckyfriday.io"
|
|
@@ -2167,6 +2158,10 @@ var AssetHubPolkadot$1 = {
|
|
|
2167
2158
|
{
|
|
2168
2159
|
name: "Parity",
|
|
2169
2160
|
endpoint: "wss://polkadot-asset-hub-rpc.polkadot.io"
|
|
2161
|
+
},
|
|
2162
|
+
{
|
|
2163
|
+
name: "Stakeworld",
|
|
2164
|
+
endpoint: "wss://rpc-asset-hub-polkadot.stakeworld.io"
|
|
2170
2165
|
}
|
|
2171
2166
|
]
|
|
2172
2167
|
};
|
|
@@ -2262,6 +2257,10 @@ var BridgeHubPolkadot$1 = {
|
|
|
2262
2257
|
{
|
|
2263
2258
|
name: "Spectrum",
|
|
2264
2259
|
endpoint: "wss://spectrum-03.simplystaking.xyz/cG9sa2Fkb3QtMDMtOTFkMmYwZGYtcG9sa2Fkb3Q/mgX--uWlEtmNKw/polkadotbridgehub/mainnet/"
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
name: "Stakeworld",
|
|
2263
|
+
endpoint: "wss://rpc-bridge-hub-polkadot.stakeworld.io"
|
|
2265
2264
|
}
|
|
2266
2265
|
]
|
|
2267
2266
|
};
|
|
@@ -2311,6 +2310,10 @@ var Hydration$1 = {
|
|
|
2311
2310
|
info: "hydradx",
|
|
2312
2311
|
paraId: 2034,
|
|
2313
2312
|
providers: [
|
|
2313
|
+
{
|
|
2314
|
+
name: "Galactic Council",
|
|
2315
|
+
endpoint: "wss://rpc.hydradx.cloud"
|
|
2316
|
+
},
|
|
2314
2317
|
{
|
|
2315
2318
|
name: "Dwellir",
|
|
2316
2319
|
endpoint: "wss://hydration-rpc.n.dwellir.com"
|
|
@@ -2511,6 +2514,10 @@ var PeoplePolkadot$1 = {
|
|
|
2511
2514
|
name: "Dwellir",
|
|
2512
2515
|
endpoint: "wss://people-polkadot-rpc.n.dwellir.com"
|
|
2513
2516
|
},
|
|
2517
|
+
{
|
|
2518
|
+
name: "Helixstreet",
|
|
2519
|
+
endpoint: "wss://rpc-people-polkadot.helixstreet.io"
|
|
2520
|
+
},
|
|
2514
2521
|
{
|
|
2515
2522
|
name: "LuckyFriday",
|
|
2516
2523
|
endpoint: "wss://rpc-people-polkadot.luckyfriday.io"
|
|
@@ -2522,6 +2529,10 @@ var PeoplePolkadot$1 = {
|
|
|
2522
2529
|
{
|
|
2523
2530
|
name: "Parity",
|
|
2524
2531
|
endpoint: "wss://polkadot-people-rpc.polkadot.io"
|
|
2532
|
+
},
|
|
2533
|
+
{
|
|
2534
|
+
name: "Stakeworld",
|
|
2535
|
+
endpoint: "wss://rpc-people-polkadot.stakeworld.io"
|
|
2525
2536
|
}
|
|
2526
2537
|
]
|
|
2527
2538
|
};
|
|
@@ -3068,6 +3079,10 @@ var PeoplePaseo$1 = {
|
|
|
3068
3079
|
{
|
|
3069
3080
|
name: "Zondax",
|
|
3070
3081
|
endpoint: "wss://api2.zondax.ch/pas/people/node/rpc"
|
|
3082
|
+
},
|
|
3083
|
+
{
|
|
3084
|
+
name: "interweb",
|
|
3085
|
+
endpoint: "wss://rpc.interweb-it.com/people-paseo"
|
|
3071
3086
|
}
|
|
3072
3087
|
]
|
|
3073
3088
|
};
|
|
@@ -3111,13 +3126,13 @@ var Polkadot$1 = {
|
|
|
3111
3126
|
name: "Spectrum",
|
|
3112
3127
|
endpoint: "wss://spectrum-03.simplystaking.xyz/cG9sa2Fkb3QtMDMtOTFkMmYwZGYtcG9sa2Fkb3Q/LjwBJpV3dIKyWQ/polkadot/mainnet/"
|
|
3113
3128
|
},
|
|
3114
|
-
{
|
|
3115
|
-
name: "Stakeworld",
|
|
3116
|
-
endpoint: "wss://rpc-polkadot.stakeworld.io"
|
|
3117
|
-
},
|
|
3118
3129
|
{
|
|
3119
3130
|
name: "SubQuery",
|
|
3120
3131
|
endpoint: "wss://polkadot.rpc.subquery.network/public/ws"
|
|
3132
|
+
},
|
|
3133
|
+
{
|
|
3134
|
+
name: "interweb",
|
|
3135
|
+
endpoint: "wss://rpc.interweb-it.com/polkadot"
|
|
3121
3136
|
}
|
|
3122
3137
|
]
|
|
3123
3138
|
};
|
|
@@ -3149,10 +3164,6 @@ var Kusama$1 = {
|
|
|
3149
3164
|
{
|
|
3150
3165
|
name: "Spectrum",
|
|
3151
3166
|
endpoint: "wss://spectrum-03.simplystaking.xyz/cG9sa2Fkb3QtMDMtOTFkMmYwZGYtcG9sa2Fkb3Q/QXq7QZ6Q60NDzA/kusama/mainnet/"
|
|
3152
|
-
},
|
|
3153
|
-
{
|
|
3154
|
-
name: "Stakeworld",
|
|
3155
|
-
endpoint: "wss://rpc-kusama.stakeworld.io"
|
|
3156
3167
|
}
|
|
3157
3168
|
]
|
|
3158
3169
|
};
|
|
@@ -3188,9 +3199,17 @@ var Paseo$1 = {
|
|
|
3188
3199
|
name: "Dwellir",
|
|
3189
3200
|
endpoint: "wss://paseo-rpc.n.dwellir.com"
|
|
3190
3201
|
},
|
|
3202
|
+
{
|
|
3203
|
+
name: "StakeWorld",
|
|
3204
|
+
endpoint: "wss://rpc-paseo.stakeworld.io"
|
|
3205
|
+
},
|
|
3191
3206
|
{
|
|
3192
3207
|
name: "Zondax",
|
|
3193
3208
|
endpoint: "wss://api2.zondax.ch/pas/relay/node/rpc"
|
|
3209
|
+
},
|
|
3210
|
+
{
|
|
3211
|
+
name: "interweb",
|
|
3212
|
+
endpoint: "wss://rpc.interweb-it.com/paseo"
|
|
3194
3213
|
}
|
|
3195
3214
|
]
|
|
3196
3215
|
};
|
|
@@ -3280,9 +3299,12 @@ var getChainProvidersImpl = function getChainProvidersImpl(chain, ctx) {
|
|
|
3280
3299
|
throw new ProviderUnavailableError("No providers found for chain ".concat(chain));
|
|
3281
3300
|
}
|
|
3282
3301
|
// Prefer Dwellir provider
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3302
|
+
// TODO: Look into this - check whether preferring Dwellir is still up to date for other chains
|
|
3303
|
+
if (chain !== 'Hydration') {
|
|
3304
|
+
providers.sort(function (a, b) {
|
|
3305
|
+
return (a.name === 'Dwellir' ? 0 : 1) - (b.name === 'Dwellir' ? 0 : 1);
|
|
3306
|
+
});
|
|
3307
|
+
}
|
|
3286
3308
|
return providers.map(function (p) {
|
|
3287
3309
|
return p.endpoint;
|
|
3288
3310
|
});
|
|
@@ -3506,7 +3528,7 @@ var Chain = /*#__PURE__*/function () {
|
|
|
3506
3528
|
key: "transfer",
|
|
3507
3529
|
value: function () {
|
|
3508
3530
|
var _transfer = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(transferOptions) {
|
|
3509
|
-
var api, asset, currency, feeAsset, feeCurrency, recipient, destination, paraIdTo, overriddenAsset, version, sender, ahAddress, pallet, method, keepAlive, transactOptions, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, mythAsset, isMythAsset, assetNeedsTypeThen, supportsTypeThen, isSubBridge, useTypeAndThen, options, promise,
|
|
3531
|
+
var api, asset, currency, feeAsset, feeCurrency, recipient, destination, paraIdTo, overriddenAsset, version, sender, ahAddress, pallet, method, keepAlive, transactOptions, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, mythAsset, isMythAsset, assetNeedsTypeThen, supportsTypeThen, isSubBridge, useTypeAndThen, options, promise, isAHOrigin, isAHDest, isExternalAsset, isEthDest, isExternalAssetViaAh, isExternalAssetToAh, call, isBifrostOrigin, isJamtonOrigin, isAssetHubDest, useMultiAssets, input, _t;
|
|
3510
3532
|
return _regenerator().w(function (_context) {
|
|
3511
3533
|
while (1) switch (_context.n) {
|
|
3512
3534
|
case 0:
|
|
@@ -3533,7 +3555,7 @@ var Chain = /*#__PURE__*/function () {
|
|
|
3533
3555
|
this.throwIfCantReceive(destChain);
|
|
3534
3556
|
isRelayAsset = deepEqual(asset.location, RELAY_LOCATION) && isSymbolMatch(getRelayChainSymbolImpl(this.chain, api._customCtx), asset.symbol);
|
|
3535
3557
|
mythAsset = api.findNativeAssetInfoOrThrow('Mythos');
|
|
3536
|
-
isMythAsset =
|
|
3558
|
+
isMythAsset = isAssetEqual(mythAsset, asset);
|
|
3537
3559
|
assetNeedsTypeThen = isRelayAsset || isMythAsset;
|
|
3538
3560
|
_context.n = 3;
|
|
3539
3561
|
return api.hasMethod(hasPalletImpl(this.chain, 'XcmPallet', api._customCtx) ? 'XcmPallet' : 'PolkadotXcm', 'transfer_assets_using_type_and_then');
|
|
@@ -3595,18 +3617,6 @@ var Chain = /*#__PURE__*/function () {
|
|
|
3595
3617
|
case 6:
|
|
3596
3618
|
return _context.a(2, _t.deserializeExtrinsics.call(_t, _context.v));
|
|
3597
3619
|
case 7:
|
|
3598
|
-
shouldUseTeleport = this.shouldUseNativeAssetTeleport(transferOptions);
|
|
3599
|
-
isAhToOtherPara = this.chain.startsWith('AssetHub') && destChain && !isTrustedChain(destChain);
|
|
3600
|
-
isOtherParaToAh = (destChain === null || destChain === void 0 ? void 0 : destChain.startsWith('AssetHub')) && !isTrustedChain(this.chain);
|
|
3601
|
-
isAllowedAhTransfer = function isAllowedAhTransfer(chain) {
|
|
3602
|
-
return chain === null || chain === void 0 ? void 0 : chain.startsWith('Integritee');
|
|
3603
|
-
};
|
|
3604
|
-
if (!((isAhToOtherPara || isOtherParaToAh) && shouldUseTeleport && !isAllowedAhTransfer(destChain) && !isAllowedAhTransfer(this.chain))) {
|
|
3605
|
-
_context.n = 8;
|
|
3606
|
-
break;
|
|
3607
|
-
}
|
|
3608
|
-
throw new TransferToAhNotSupported('Native asset transfers to or from AssetHub are temporarily disabled');
|
|
3609
|
-
case 8:
|
|
3610
3620
|
isAHOrigin = this.chain.includes('AssetHub');
|
|
3611
3621
|
isAHDest = !isTLocation(destination) && destination.includes('AssetHub'); // Handle common cases
|
|
3612
3622
|
isExternalAsset = asset.location.parents === Parents.TWO;
|
|
@@ -3614,26 +3624,32 @@ var Chain = /*#__PURE__*/function () {
|
|
|
3614
3624
|
isExternalAssetViaAh = isExternalAsset && !isAHOrigin && !isAHDest && !isEthDest && !feeAsset; // External asset - Any origin to AHP - DestinationReserve - one DepositAsset instruction
|
|
3615
3625
|
isExternalAssetToAh = isExternalAsset && isAHDest && !isAHOrigin && !isEthDest && !feeAsset;
|
|
3616
3626
|
if (!(isExternalAssetViaAh || isExternalAssetToAh || useTypeAndThen)) {
|
|
3617
|
-
_context.n =
|
|
3627
|
+
_context.n = 10;
|
|
3618
3628
|
break;
|
|
3619
3629
|
}
|
|
3620
3630
|
if (!(useTypeAndThen && supportsPolkadotXCM(this) && !isSubBridge)) {
|
|
3621
|
-
_context.n =
|
|
3631
|
+
_context.n = 8;
|
|
3622
3632
|
break;
|
|
3623
3633
|
}
|
|
3624
|
-
_context.n =
|
|
3634
|
+
_context.n = 8;
|
|
3625
3635
|
return this.transferPolkadotXCM(options);
|
|
3626
|
-
case
|
|
3627
|
-
_context.n =
|
|
3636
|
+
case 8:
|
|
3637
|
+
_context.n = 9;
|
|
3628
3638
|
return createTypeAndThenCall(options);
|
|
3629
|
-
case
|
|
3639
|
+
case 9:
|
|
3630
3640
|
call = _context.v;
|
|
3631
3641
|
return _context.a(2, api.deserializeExtrinsics(call));
|
|
3632
|
-
case
|
|
3642
|
+
case 10:
|
|
3633
3643
|
if (!supportsPolkadotXCM(this)) {
|
|
3634
3644
|
_context.n = 12;
|
|
3635
3645
|
break;
|
|
3636
3646
|
}
|
|
3647
|
+
if (!(this.shouldUseNativeAssetTeleport(transferOptions) && !this.shouldUseExecuteTransfer(options))) {
|
|
3648
|
+
_context.n = 11;
|
|
3649
|
+
break;
|
|
3650
|
+
}
|
|
3651
|
+
return _context.a(2, transferPolkadotXcm(options, 'limited_teleport_assets', 'Unlimited'));
|
|
3652
|
+
case 11:
|
|
3637
3653
|
return _context.a(2, this.transferPolkadotXCM(options));
|
|
3638
3654
|
case 12:
|
|
3639
3655
|
_context.n = 15;
|
|
@@ -3726,27 +3742,16 @@ var Chain = /*#__PURE__*/function () {
|
|
|
3726
3742
|
}, {
|
|
3727
3743
|
key: "shouldUseNativeAssetTeleport",
|
|
3728
3744
|
value: function shouldUseNativeAssetTeleport(_ref) {
|
|
3729
|
-
var _this = this;
|
|
3730
3745
|
var api = _ref.api,
|
|
3731
3746
|
asset = _ref.assetInfo,
|
|
3732
3747
|
to = _ref.to;
|
|
3733
|
-
if (isTLocation(to) || isSubstrateBridge(this.chain, to)
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
});
|
|
3741
|
-
var isSomeChainNativeAsset = nativeSymbols.some(function (symbol) {
|
|
3742
|
-
return isSymbolMatch(asset.symbol, symbol);
|
|
3743
|
-
});
|
|
3744
|
-
var isNativeAsset = !isTLocation(to) && (isAHPOrigin && !asset.isNative && isSymbolMatch(asset.symbol, getNativeAssetSymbolImpl(to, api._customCtx)) || isAHPDest && isSomeChainNativeAsset);
|
|
3745
|
-
var assetHubChain = "AssetHub".concat(this.ecosystem);
|
|
3746
|
-
var isRegisteredOnAh = api.findAssetInfo(assetHubChain, {
|
|
3747
|
-
location: asset.location
|
|
3748
|
-
});
|
|
3749
|
-
return Boolean(isNativeAsset) && Boolean(isRegisteredOnAh) && (isAHPOrigin || isAHPDest);
|
|
3748
|
+
if (isTLocation(to) || isSubstrateBridge(this.chain, to)) return false;
|
|
3749
|
+
return isNativeAssetTeleport(api, this.chain, to, asset);
|
|
3750
|
+
}
|
|
3751
|
+
}, {
|
|
3752
|
+
key: "shouldUseExecuteTransfer",
|
|
3753
|
+
value: function shouldUseExecuteTransfer(_options) {
|
|
3754
|
+
return false;
|
|
3750
3755
|
}
|
|
3751
3756
|
}, {
|
|
3752
3757
|
key: "createAsset",
|
|
@@ -7779,7 +7784,7 @@ var mintBonusForSent = function mintBonusForSent(chain, sent, feeAsset, mintFeeA
|
|
|
7779
7784
|
return true;
|
|
7780
7785
|
});
|
|
7781
7786
|
return preminted.some(function (a) {
|
|
7782
|
-
return
|
|
7787
|
+
return isAssetEqual(a, sent);
|
|
7783
7788
|
}) ? parseUnits(resolveBypassMintAmount(chain), sent.decimals) : 0n;
|
|
7784
7789
|
};
|
|
7785
7790
|
var wrapTxBypass = /*#__PURE__*/function () {
|
|
@@ -7827,7 +7832,7 @@ var wrapTxBypass = /*#__PURE__*/function () {
|
|
|
7827
7832
|
};
|
|
7828
7833
|
nativeInfo = mintFeeAssets ? api.findNativeAssetInfo(chain) : null;
|
|
7829
7834
|
relayInfo = mintFeeAssets ? api.findAssetInfo(chain, relayCurrency) : null;
|
|
7830
|
-
sameNativeRelay = !!(nativeInfo && relayInfo &&
|
|
7835
|
+
sameNativeRelay = !!(nativeInfo && relayInfo && isAssetEqual(nativeInfo, relayInfo));
|
|
7831
7836
|
if (!mintFeeAssets) {
|
|
7832
7837
|
_context2.n = 2;
|
|
7833
7838
|
break;
|
|
@@ -8762,7 +8767,7 @@ var getXcmFee = /*#__PURE__*/function () {
|
|
|
8762
8767
|
var aggregateHopFees = function aggregateHopFees(hops, matchAsset) {
|
|
8763
8768
|
var totalHopFee = hops.reduce(function (acc, hop) {
|
|
8764
8769
|
var _hop$result$fee;
|
|
8765
|
-
return
|
|
8770
|
+
return isAssetEqual(hop.result.asset, matchAsset) ? acc + ((_hop$result$fee = hop.result.fee) !== null && _hop$result$fee !== void 0 ? _hop$result$fee : 0n) : acc;
|
|
8766
8771
|
}, 0n);
|
|
8767
8772
|
var bridgeHop = hops.find(function (hop) {
|
|
8768
8773
|
return hop.chain.startsWith('BridgeHub');
|
|
@@ -9593,12 +9598,14 @@ var resolveTransferType = function resolveTransferType(_ref) {
|
|
|
9593
9598
|
var origin = _ref.origin,
|
|
9594
9599
|
reserve = _ref.reserve,
|
|
9595
9600
|
dest = _ref.dest,
|
|
9596
|
-
isSubBridge = _ref.isSubBridge
|
|
9601
|
+
isSubBridge = _ref.isSubBridge,
|
|
9602
|
+
assetInfo = _ref.assetInfo;
|
|
9597
9603
|
// Direct A → C: when origin is reserve OR dest is reserve, check origin <-> dest trust
|
|
9598
9604
|
// Hop A → B → C: when reserve differs from both, check origin <-> reserve trust
|
|
9599
9605
|
var isDirect = origin.chain === reserve.chain || dest.chain === reserve.chain;
|
|
9600
9606
|
var chainToCheck = isDirect ? dest.chain : reserve.chain;
|
|
9601
|
-
|
|
9607
|
+
var canTeleport = isTrustedChain(origin.chain) && isTrustedChain(chainToCheck) || isNativeAssetTeleport(origin.api, origin.chain, chainToCheck, assetInfo);
|
|
9608
|
+
if (canTeleport && !isSubBridge) return 'Teleport';
|
|
9602
9609
|
if (origin.chain === reserve.chain) return 'LocalReserve';
|
|
9603
9610
|
return 'DestinationReserve';
|
|
9604
9611
|
};
|
|
@@ -9917,7 +9924,7 @@ var createCustomXcm = /*#__PURE__*/function () {
|
|
|
9917
9924
|
case 3:
|
|
9918
9925
|
destLoc = createDestination(origin.api, version, origin.chain, destination, paraIdTo); // If both reserve (B) and destination (C) are trusted chains,
|
|
9919
9926
|
// use teleport instead of DepositReserveAsset
|
|
9920
|
-
if (!(isTrustedChain(reserve.chain) && isTrustedChain(dest.chain))) {
|
|
9927
|
+
if (!(isTrustedChain(reserve.chain) && isTrustedChain(dest.chain) || isNativeAssetTeleport(origin.api, reserve.chain, dest.chain, assetInfo))) {
|
|
9921
9928
|
_context.n = 4;
|
|
9922
9929
|
break;
|
|
9923
9930
|
}
|
|
@@ -10252,9 +10259,9 @@ var createTypeThenAutoReserve = /*#__PURE__*/function () {
|
|
|
10252
10259
|
|
|
10253
10260
|
var calculateTotalXcmFee = function calculateTotalXcmFee(asset, feeResult) {
|
|
10254
10261
|
var totalHopFee = feeResult.hops.reduce(function (acc, hop) {
|
|
10255
|
-
return
|
|
10262
|
+
return isAssetEqual(hop.result.asset, asset) ? acc + hop.result.fee : acc;
|
|
10256
10263
|
}, 0n);
|
|
10257
|
-
var destFee =
|
|
10264
|
+
var destFee = isAssetEqual(feeResult.destination.asset, asset) ? feeResult.destination.fee : 0n;
|
|
10258
10265
|
return totalHopFee + destFee;
|
|
10259
10266
|
};
|
|
10260
10267
|
var verifyEdOnDestinationInternal = /*#__PURE__*/function () {
|
|
@@ -10537,6 +10544,15 @@ var createAssetsFilter = function createAssetsFilter(asset, version) {
|
|
|
10537
10544
|
};
|
|
10538
10545
|
};
|
|
10539
10546
|
|
|
10547
|
+
var isNativeAssetTeleport = function isNativeAssetTeleport(api, origin, dest, asset) {
|
|
10548
|
+
if (isExternalChain(origin) || isExternalChain(dest)) return false;
|
|
10549
|
+
var isOriginAh = origin.includes('AssetHub');
|
|
10550
|
+
var isDestAh = dest.includes('AssetHub');
|
|
10551
|
+
if (isOriginAh === isDestAh) return false;
|
|
10552
|
+
var para = isDestAh ? origin : dest;
|
|
10553
|
+
return isAssetEqual(api.findNativeAssetInfoOrThrow(para), asset);
|
|
10554
|
+
};
|
|
10555
|
+
|
|
10540
10556
|
var prepareExecuteContext = function prepareExecuteContext(_ref) {
|
|
10541
10557
|
var api = _ref.api,
|
|
10542
10558
|
chain = _ref.chain,
|
|
@@ -10576,15 +10592,15 @@ var updateAsset = function updateAsset(asset, amount) {
|
|
|
10576
10592
|
}
|
|
10577
10593
|
});
|
|
10578
10594
|
};
|
|
10579
|
-
var getInstructionType = function getInstructionType(version, origin, destination, reserveChain, transactOptions) {
|
|
10595
|
+
var getInstructionType = function getInstructionType(api, version, origin, destination, assetInfo, reserveChain, transactOptions) {
|
|
10580
10596
|
if (version >= Version.V5 && transactOptions !== null && transactOptions !== void 0 && transactOptions.call) {
|
|
10581
10597
|
return 'InitiateTransfer';
|
|
10582
10598
|
}
|
|
10583
10599
|
if (reserveChain !== undefined && origin !== reserveChain && isTrustedChain(origin) && isTrustedChain(reserveChain)) {
|
|
10584
10600
|
return 'InitiateTeleportToReserve';
|
|
10585
10601
|
}
|
|
10586
|
-
// Trusted chains can teleport
|
|
10587
|
-
if (isTrustedChain(origin) && isTrustedChain(destination)) {
|
|
10602
|
+
// Trusted chains (or native-asset teleports to/from AssetHub) can teleport
|
|
10603
|
+
if (isTrustedChain(origin) && isTrustedChain(destination) || isNativeAssetTeleport(api, origin, destination, assetInfo)) {
|
|
10588
10604
|
return 'InitiateTeleport';
|
|
10589
10605
|
}
|
|
10590
10606
|
// If we need intermediary reserve (not on reserve chain)
|
|
@@ -10594,8 +10610,8 @@ var getInstructionType = function getInstructionType(version, origin, destinatio
|
|
|
10594
10610
|
// Direct deposit (either no reserve or we're on reserve)
|
|
10595
10611
|
return 'DepositAsset';
|
|
10596
10612
|
};
|
|
10597
|
-
var getInitiateTransferType = function getInitiateTransferType(origin, destination, reserveChain) {
|
|
10598
|
-
if (isTrustedChain(origin) && isTrustedChain(destination)) {
|
|
10613
|
+
var getInitiateTransferType = function getInitiateTransferType(api, origin, destination, assetInfo, reserveChain) {
|
|
10614
|
+
if (isTrustedChain(origin) && isTrustedChain(destination) || isNativeAssetTeleport(api, origin, destination, assetInfo)) {
|
|
10599
10615
|
return 'Teleport';
|
|
10600
10616
|
}
|
|
10601
10617
|
if (origin === reserveChain) return 'ReserveDeposit';
|
|
@@ -10605,6 +10621,7 @@ var createBaseExecuteXcm = function createBaseExecuteXcm(options) {
|
|
|
10605
10621
|
var api = options.api,
|
|
10606
10622
|
chain = options.chain,
|
|
10607
10623
|
destChain = options.destChain,
|
|
10624
|
+
assetInfo = options.assetInfo,
|
|
10608
10625
|
_options$fees = options.fees,
|
|
10609
10626
|
originFee = _options$fees.originFee,
|
|
10610
10627
|
reserveFee = _options$fees.reserveFee,
|
|
@@ -10612,8 +10629,6 @@ var createBaseExecuteXcm = function createBaseExecuteXcm(options) {
|
|
|
10612
10629
|
paraIdTo = options.paraIdTo,
|
|
10613
10630
|
transactOptions = options.transactOptions,
|
|
10614
10631
|
useFeeAssetOnHops = options.useFeeAssetOnHops,
|
|
10615
|
-
_options$forceBuyExec = options.forceBuyExecution,
|
|
10616
|
-
forceBuyExecution = _options$forceBuyExec === void 0 ? false : _options$forceBuyExec,
|
|
10617
10632
|
_options$suffixXcm = options.suffixXcm,
|
|
10618
10633
|
suffixXcm = _options$suffixXcm === void 0 ? [] : _options$suffixXcm;
|
|
10619
10634
|
var _prepareExecuteContex = prepareExecuteContext(options),
|
|
@@ -10634,7 +10649,7 @@ var createBaseExecuteXcm = function createBaseExecuteXcm(options) {
|
|
|
10634
10649
|
if (chain !== 'AssetHubPolkadot' && reserveChain === undefined) {
|
|
10635
10650
|
throw new UnsupportedOperationError('Sending local reserve assets with custom fee asset is not yet supported for this chain.');
|
|
10636
10651
|
}
|
|
10637
|
-
var transferType = getInstructionType(version, chain, destChain, reserveChain, transactOptions);
|
|
10652
|
+
var transferType = getInstructionType(api, version, chain, destChain, assetInfo, reserveChain, transactOptions);
|
|
10638
10653
|
var routingAssetsFilter = feeAsset ? {
|
|
10639
10654
|
Wild: {
|
|
10640
10655
|
AllCounted: 2
|
|
@@ -10645,14 +10660,14 @@ var createBaseExecuteXcm = function createBaseExecuteXcm(options) {
|
|
|
10645
10660
|
DepositReserveAsset: {
|
|
10646
10661
|
assets: createAssetsFilter(assetLocalizedToReserve, version),
|
|
10647
10662
|
dest: createDestination(api, version, reserveChain !== null && reserveChain !== void 0 ? reserveChain : chain, destChain, paraIdTo),
|
|
10648
|
-
xcm: [].concat(_toConsumableArray(createPayFees(version, hopFeeAssetToDest !== null && hopFeeAssetToDest !== void 0 ? hopFeeAssetToDest : updateAsset(assetLocalizedToDest, reserveFee === 1000n ? amount / 2n : amount - originFeeDeduction - reserveFee)
|
|
10663
|
+
xcm: [].concat(_toConsumableArray(createPayFees(version, hopFeeAssetToDest !== null && hopFeeAssetToDest !== void 0 ? hopFeeAssetToDest : updateAsset(assetLocalizedToDest, reserveFee === 1000n ? amount / 2n : amount - originFeeDeduction - reserveFee))), _toConsumableArray(suffixXcm))
|
|
10649
10664
|
}
|
|
10650
10665
|
}];
|
|
10651
10666
|
var mainInstructions;
|
|
10652
10667
|
switch (transferType) {
|
|
10653
10668
|
case 'InitiateTransfer':
|
|
10654
10669
|
{
|
|
10655
|
-
var transferFilter = getInitiateTransferType(chain, destChain, reserveChain);
|
|
10670
|
+
var transferFilter = getInitiateTransferType(api, chain, destChain, assetInfo, reserveChain);
|
|
10656
10671
|
mainInstructions = [{
|
|
10657
10672
|
InitiateTransfer: {
|
|
10658
10673
|
destination: destLocation,
|
|
@@ -10672,7 +10687,7 @@ var createBaseExecuteXcm = function createBaseExecuteXcm(options) {
|
|
|
10672
10687
|
InitiateTeleport: {
|
|
10673
10688
|
assets: routingAssetsFilter,
|
|
10674
10689
|
dest: destLocation,
|
|
10675
|
-
xcm: [].concat(_toConsumableArray(createPayFees(version, hopFeeAssetToDest !== null && hopFeeAssetToDest !== void 0 ? hopFeeAssetToDest : updateAsset(assetLocalizedToDest, amount - originFeeDeduction)
|
|
10690
|
+
xcm: [].concat(_toConsumableArray(createPayFees(version, hopFeeAssetToDest !== null && hopFeeAssetToDest !== void 0 ? hopFeeAssetToDest : updateAsset(assetLocalizedToDest, amount - originFeeDeduction))), _toConsumableArray(suffixXcm))
|
|
10676
10691
|
}
|
|
10677
10692
|
}];
|
|
10678
10693
|
break;
|
|
@@ -10682,7 +10697,7 @@ var createBaseExecuteXcm = function createBaseExecuteXcm(options) {
|
|
|
10682
10697
|
InitiateTeleport: {
|
|
10683
10698
|
assets: routingAssetsFilter,
|
|
10684
10699
|
dest: getChainLocation(chain, reserveChain, api._customCtx),
|
|
10685
|
-
xcm: [].concat(_toConsumableArray(createPayFees(version, hopFeeAssetToReserve !== null && hopFeeAssetToReserve !== void 0 ? hopFeeAssetToReserve : updateAsset(assetLocalizedToReserve, amount - originFeeDeduction)
|
|
10700
|
+
xcm: [].concat(_toConsumableArray(createPayFees(version, hopFeeAssetToReserve !== null && hopFeeAssetToReserve !== void 0 ? hopFeeAssetToReserve : updateAsset(assetLocalizedToReserve, amount - originFeeDeduction))), _toConsumableArray(resolvedDepositInstruction))
|
|
10686
10701
|
}
|
|
10687
10702
|
}];
|
|
10688
10703
|
break;
|
|
@@ -10694,7 +10709,7 @@ var createBaseExecuteXcm = function createBaseExecuteXcm(options) {
|
|
|
10694
10709
|
reserve: getChainLocation(chain, reserveChain, api._customCtx),
|
|
10695
10710
|
xcm: [].concat(_toConsumableArray(createPayFees(version, // Decrease amount by 2 units because for some reason polkadot withdraws 2 units less
|
|
10696
10711
|
// than requested, so we need to account for that
|
|
10697
|
-
hopFeeAssetToReserve !== null && hopFeeAssetToReserve !== void 0 ? hopFeeAssetToReserve : updateAsset(assetLocalizedToReserve, amount - 2n)
|
|
10712
|
+
hopFeeAssetToReserve !== null && hopFeeAssetToReserve !== void 0 ? hopFeeAssetToReserve : updateAsset(assetLocalizedToReserve, amount - 2n))), _toConsumableArray(resolvedDepositInstruction))
|
|
10698
10713
|
}
|
|
10699
10714
|
}];
|
|
10700
10715
|
break;
|
|
@@ -10811,12 +10826,9 @@ var createExecuteExchangeXcm = function createExecuteExchangeXcm(input, origin,
|
|
|
10811
10826
|
|
|
10812
10827
|
var prepareCommonExecuteXcm = function prepareCommonExecuteXcm(options, assetToDeposit) {
|
|
10813
10828
|
var api = options.api,
|
|
10814
|
-
feeAsset = options.feeAssetInfo,
|
|
10815
10829
|
useJitWithdraw = options.useJitWithdraw,
|
|
10816
10830
|
recipient = options.recipient,
|
|
10817
|
-
version = options.version
|
|
10818
|
-
_options$forceBuyExec = options.forceBuyExecution,
|
|
10819
|
-
forceBuyExecution = _options$forceBuyExec === void 0 ? false : _options$forceBuyExec;
|
|
10831
|
+
version = options.version;
|
|
10820
10832
|
var context = prepareExecuteContext(options);
|
|
10821
10833
|
var assetLocalized = context.assetLocalized,
|
|
10822
10834
|
assetLocalizedToDest = context.assetLocalizedToDest,
|
|
@@ -10826,11 +10838,8 @@ var prepareCommonExecuteXcm = function prepareCommonExecuteXcm(options, assetToD
|
|
|
10826
10838
|
prefix.push({
|
|
10827
10839
|
WithdrawAsset: withdrawAssets
|
|
10828
10840
|
});
|
|
10829
|
-
if (
|
|
10830
|
-
prefix.push.apply(prefix, _toConsumableArray(createPayFees(version, feeAssetLocalized
|
|
10831
|
-
refTime: 450n,
|
|
10832
|
-
proofSize: 0n
|
|
10833
|
-
}, false, forceBuyExecution)));
|
|
10841
|
+
if (feeAssetLocalized && !useJitWithdraw) {
|
|
10842
|
+
prefix.push.apply(prefix, _toConsumableArray(createPayFees(version, feeAssetLocalized, undefined, false)));
|
|
10834
10843
|
} else {
|
|
10835
10844
|
prefix.push({
|
|
10836
10845
|
SetFeesMode: {
|
|
@@ -11098,8 +11107,7 @@ var createSwapExecuteXcm = /*#__PURE__*/function () {
|
|
|
11098
11107
|
originFee: hasSeparateFeeAsset ? ethBridgeFee || originFee : originFee,
|
|
11099
11108
|
reserveFee: originReserveFee
|
|
11100
11109
|
},
|
|
11101
|
-
version: version
|
|
11102
|
-
forceBuyExecution: true
|
|
11110
|
+
version: version
|
|
11103
11111
|
}, assetToLocalizedToDest), prefix = _prepareCommonExecute.prefix, depositInstruction = _prepareCommonExecute.depositInstruction;
|
|
11104
11112
|
_context2.n = 4;
|
|
11105
11113
|
return createExchangeInstructions(options, assetFrom, assetTo, isEthereumDest && hasSeparateFeeAsset);
|
|
@@ -11137,7 +11145,6 @@ var createSwapExecuteXcm = /*#__PURE__*/function () {
|
|
|
11137
11145
|
originFee: hasSeparateFeeAsset ? ethBridgeFee : 0n,
|
|
11138
11146
|
reserveFee: destReserveFee
|
|
11139
11147
|
},
|
|
11140
|
-
forceBuyExecution: true,
|
|
11141
11148
|
suffixXcm: snowbridgeInstructions
|
|
11142
11149
|
});
|
|
11143
11150
|
_context2.n = 7;
|
|
@@ -11156,7 +11163,6 @@ var createSwapExecuteXcm = /*#__PURE__*/function () {
|
|
|
11156
11163
|
originFee: 0n,
|
|
11157
11164
|
reserveFee: destReserveFee
|
|
11158
11165
|
},
|
|
11159
|
-
forceBuyExecution: true,
|
|
11160
11166
|
suffixXcm: [depositInstruction]
|
|
11161
11167
|
});
|
|
11162
11168
|
} else {
|
|
@@ -11176,7 +11182,6 @@ var createSwapExecuteXcm = /*#__PURE__*/function () {
|
|
|
11176
11182
|
originFee: hasSeparateFeeAsset ? ethBridgeFee : 0n,
|
|
11177
11183
|
reserveFee: originReserveFee
|
|
11178
11184
|
},
|
|
11179
|
-
forceBuyExecution: true,
|
|
11180
11185
|
suffixXcm: [].concat(_toConsumableArray(exchangeInstructions), _toConsumableArray(exchangeToDestXcm))
|
|
11181
11186
|
}) : [].concat(_toConsumableArray(exchangeInstructions), _toConsumableArray(exchangeToDestXcm));
|
|
11182
11187
|
fullXcm = [].concat(_toConsumableArray(prefix), _toConsumableArray(finalXcm));
|
|
@@ -11783,36 +11788,38 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Chain) {
|
|
|
11783
11788
|
}
|
|
11784
11789
|
_inherits(AssetHubPolkadot, _Chain);
|
|
11785
11790
|
return _createClass(AssetHubPolkadot, [{
|
|
11791
|
+
key: "shouldUseExecuteTransfer",
|
|
11792
|
+
value: function shouldUseExecuteTransfer(options) {
|
|
11793
|
+
var api = options.api,
|
|
11794
|
+
assetInfo = options.assetInfo,
|
|
11795
|
+
feeAssetInfo = options.feeAssetInfo,
|
|
11796
|
+
overriddenAsset = options.overriddenAsset;
|
|
11797
|
+
if (!feeAssetInfo || overriddenAsset) return false;
|
|
11798
|
+
if (isSymbolMatch(assetInfo.symbol, 'KSM')) return false;
|
|
11799
|
+
var nativeAsset = api.findNativeAssetInfoOrThrow(this.chain);
|
|
11800
|
+
var isNativeAsset = isAssetEqual(nativeAsset, assetInfo);
|
|
11801
|
+
var isNativeFeeAsset = isAssetEqual(nativeAsset, feeAssetInfo);
|
|
11802
|
+
return !isNativeAsset || !isNativeFeeAsset;
|
|
11803
|
+
}
|
|
11804
|
+
}, {
|
|
11786
11805
|
key: "transferPolkadotXCM",
|
|
11787
11806
|
value: function () {
|
|
11788
11807
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(options) {
|
|
11789
|
-
var api,
|
|
11808
|
+
var api, _t;
|
|
11790
11809
|
return _regenerator().w(function (_context) {
|
|
11791
11810
|
while (1) switch (_context.n) {
|
|
11792
11811
|
case 0:
|
|
11793
|
-
api = options.api
|
|
11794
|
-
if (!(
|
|
11795
|
-
_context.n =
|
|
11796
|
-
break;
|
|
11797
|
-
}
|
|
11798
|
-
if (!isSymbolMatch(assetInfo.symbol, 'KSM')) {
|
|
11799
|
-
_context.n = 1;
|
|
11800
|
-
break;
|
|
11801
|
-
}
|
|
11802
|
-
return _context.a(2, transferPolkadotXcm(options));
|
|
11803
|
-
case 1:
|
|
11804
|
-
isNativeAsset = isSymbolMatch(assetInfo.symbol, this.getNativeAssetSymbol(api));
|
|
11805
|
-
isNativeFeeAsset = isSymbolMatch(feeAssetInfo.symbol, this.getNativeAssetSymbol(api));
|
|
11806
|
-
if (!(!isNativeAsset || !isNativeFeeAsset)) {
|
|
11807
|
-
_context.n = 3;
|
|
11812
|
+
api = options.api;
|
|
11813
|
+
if (!this.shouldUseExecuteTransfer(options)) {
|
|
11814
|
+
_context.n = 2;
|
|
11808
11815
|
break;
|
|
11809
11816
|
}
|
|
11810
11817
|
_t = api;
|
|
11811
|
-
_context.n =
|
|
11818
|
+
_context.n = 1;
|
|
11812
11819
|
return handleExecuteTransfer(options);
|
|
11813
|
-
case
|
|
11820
|
+
case 1:
|
|
11814
11821
|
return _context.a(2, _t.deserializeExtrinsics.call(_t, _context.v));
|
|
11815
|
-
case
|
|
11822
|
+
case 2:
|
|
11816
11823
|
return _context.a(2, transferPolkadotXcm(options));
|
|
11817
11824
|
}
|
|
11818
11825
|
}, _callee, this);
|
|
@@ -11993,22 +12000,29 @@ var Hydration = /*#__PURE__*/function (_Chain) {
|
|
|
11993
12000
|
useIdPrefix: false
|
|
11994
12001
|
};
|
|
11995
12002
|
}
|
|
12003
|
+
}, {
|
|
12004
|
+
key: "shouldUseExecuteTransfer",
|
|
12005
|
+
value: function shouldUseExecuteTransfer(input) {
|
|
12006
|
+
var asset = input.assetInfo,
|
|
12007
|
+
feeAsset = input.feeAssetInfo,
|
|
12008
|
+
overriddenAsset = input.overriddenAsset,
|
|
12009
|
+
api = input.api;
|
|
12010
|
+
if (!feeAsset || overriddenAsset) return false;
|
|
12011
|
+
var nativeAsset = api.findNativeAssetInfoOrThrow(this.chain);
|
|
12012
|
+
var isNativeAsset = isAssetEqual(nativeAsset, asset);
|
|
12013
|
+
var isNativeFeeAsset = isAssetEqual(nativeAsset, feeAsset);
|
|
12014
|
+
return !isNativeAsset || !isNativeFeeAsset;
|
|
12015
|
+
}
|
|
11996
12016
|
}, {
|
|
11997
12017
|
key: "transferPolkadotXCM",
|
|
11998
12018
|
value: function () {
|
|
11999
12019
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
12000
|
-
var destination, asset,
|
|
12020
|
+
var destination, asset, api, _t;
|
|
12001
12021
|
return _regenerator().w(function (_context) {
|
|
12002
12022
|
while (1) switch (_context.n) {
|
|
12003
12023
|
case 0:
|
|
12004
|
-
destination = input.destination, asset = input.assetInfo,
|
|
12005
|
-
if (!(
|
|
12006
|
-
_context.n = 2;
|
|
12007
|
-
break;
|
|
12008
|
-
}
|
|
12009
|
-
isNativeAsset = isSymbolMatch(asset.symbol, this.getNativeAssetSymbol(api));
|
|
12010
|
-
isNativeFeeAsset = isSymbolMatch(feeAsset.symbol, this.getNativeAssetSymbol(api));
|
|
12011
|
-
if (!(!isNativeAsset || !isNativeFeeAsset)) {
|
|
12024
|
+
destination = input.destination, asset = input.assetInfo, api = input.api;
|
|
12025
|
+
if (!this.shouldUseExecuteTransfer(input)) {
|
|
12012
12026
|
_context.n = 2;
|
|
12013
12027
|
break;
|
|
12014
12028
|
}
|
|
@@ -12671,7 +12685,7 @@ var EnergyWebX = /*#__PURE__*/function (_Chain) {
|
|
|
12671
12685
|
scenario: scenario
|
|
12672
12686
|
});
|
|
12673
12687
|
}
|
|
12674
|
-
return transferPolkadotXcm(input
|
|
12688
|
+
return transferPolkadotXcm(input);
|
|
12675
12689
|
}
|
|
12676
12690
|
}, {
|
|
12677
12691
|
key: "isRelayToParaEnabled",
|
|
@@ -13452,7 +13466,7 @@ var Quartz = /*#__PURE__*/function (_Chain) {
|
|
|
13452
13466
|
var RobonomicsPolkadot = /*#__PURE__*/function (_Chain) {
|
|
13453
13467
|
function RobonomicsPolkadot() {
|
|
13454
13468
|
_classCallCheck(this, RobonomicsPolkadot);
|
|
13455
|
-
return _callSuper(this, RobonomicsPolkadot, ['RobonomicsPolkadot', 'robonomics', 'Polkadot', Version.
|
|
13469
|
+
return _callSuper(this, RobonomicsPolkadot, ['RobonomicsPolkadot', 'robonomics', 'Polkadot', Version.V5]);
|
|
13456
13470
|
}
|
|
13457
13471
|
_inherits(RobonomicsPolkadot, _Chain);
|
|
13458
13472
|
return _createClass(RobonomicsPolkadot, [{
|
|
@@ -14998,4 +15012,4 @@ var createClientCache = function createClientCache(maxSize, pingClient, onEvicti
|
|
|
14998
15012
|
};
|
|
14999
15013
|
};
|
|
15000
15014
|
|
|
15001
|
-
export { API_TYPES, AmountTooLowError, ApiNotInitializedError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, CustomChainConflictError, CustomChainInvalidError, DEFAULT_TTL_MS, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, EXCHANGE_CHAINS, EXTENSION_MS, ExtensionNotInstalledError, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MAX_CLIENTS, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotApi, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiError, RuntimeApiUnavailableError, ScenarioNotSupportedError, SubmitTransactionError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS,
|
|
15015
|
+
export { API_TYPES, AmountTooLowError, ApiNotInitializedError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, CustomChainConflictError, CustomChainInvalidError, DEFAULT_TTL_MS, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, EXCHANGE_CHAINS, EXTENSION_MS, ExtensionNotInstalledError, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MAX_CLIENTS, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotApi, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiError, RuntimeApiUnavailableError, ScenarioNotSupportedError, SubmitTransactionError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, aggregateHopFees, applyDecimalAbstraction, assertAddressIsString, assertCurrencyCore, assertEvmAddress, assertExtensionInstalled, assertHasId, assertNotEvmTransfer, assertNotRawAssets, assertSender, assertSenderSource, assertSubstrateOrigin, assertSwapSupport, assertToIsString, blake2b256, blake2b512, buildCustomChainAssetsInfo, buildCustomChainConfig, buildDestInfo, buildHopInfo, buildOriginInfo, calcPreviewMintAmount, claimAssets, compareAddresses, computeOverridenAmount, constructTypeAndThenCall, convertBuilderConfig, convertSs58, createAsset, createAssetId, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createClientCache, createClientPoolHelpers, createCustomXcmOnDest, createDestination, createDirectExecuteXcm, createEthereumBridgeInstructions, createExecuteCall, createExecuteExchangeXcm, createSwapBuilder, createTransfer, createTransferOrSwap, createTransferOrSwapAll, createTxOverrideAmount, createTypeAndThenCall, createTypeThenAutoReserve, createVersionedAssets, createVersionedDestination, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, executeWithSwap, formatAssetIdToERC20, formatUnits, generateMessageId, getAssetBalanceInternal, getAssetReserveChain, getAssetReserveChainImpl, getBalance, getBalanceInternal, getBridgeStatus, getChain, getChainConfig, getChainConfigImpl, getChainLocation, getChainProviders, getChainProvidersImpl, getChainVersion, getEthErc20Balance, getEvmExtensionOrThrow, getEvmPrivateKeyHex, getEvmSnowbridgeExtensionOrThrow, getFailureInfo$1 as getFailureInfo, getLocalTransferAmount, getMinTransferableAmount, getMinTransferableAmountInternal, getMoonbeamErc20Balance, getOriginXcmFee, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getParaIdImpl, getRelayChainOf, getRelayChainOfImpl, getRelayChainSymbolOf, getSwapExtensionOrThrow, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeInternal, getXcmFeeOnce, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, isExchange, isNativeAssetTeleport, isSenderSigner, isViemSigner, keyFromWs, localizeLocation, localizeLocationImpl, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, normalizeCustomChains, normalizeExchange, overrideTxAmount, padFee, padValueBy, parseUnits, pickCompatibleXcmVersion, pickOtherMintPallet, pickRouterCompatibleXcmVersion, registerEvmExtension, registerEvmSnowbridgeExtension, registerSwapExtension, resolveAssetCount, resolveDestChain, resolveModuleError, resolveParaId, resolveTransferParams, reverseTransformLocation, selectXcmVersion, 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": "13.
|
|
3
|
+
"version": "13.10.1",
|
|
4
4
|
"description": "SDK core for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,22 +24,22 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@noble/hashes": "^2.2.0",
|
|
26
26
|
"@scure/base": "^2.2.0",
|
|
27
|
-
"viem": "^2.
|
|
28
|
-
"@paraspell/assets": "13.
|
|
29
|
-
"@paraspell/pallets": "13.
|
|
30
|
-
"@paraspell/sdk-common": "13.
|
|
27
|
+
"viem": "^2.53.1",
|
|
28
|
+
"@paraspell/assets": "13.10.1",
|
|
29
|
+
"@paraspell/pallets": "13.10.1",
|
|
30
|
+
"@paraspell/sdk-common": "13.10.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@babel/plugin-syntax-import-attributes": "^7.29.7",
|
|
34
34
|
"@babel/preset-env": "^7.29.7",
|
|
35
35
|
"@codecov/rollup-plugin": "^2.0.1",
|
|
36
|
-
"@rollup/plugin-babel": "^7.
|
|
36
|
+
"@rollup/plugin-babel": "^7.1.0",
|
|
37
37
|
"@rollup/plugin-json": "^6.1.0",
|
|
38
38
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
39
|
-
"@vitest/coverage-v8": "^4.1.
|
|
40
|
-
"axios": "^1.
|
|
39
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
40
|
+
"axios": "^1.18.1",
|
|
41
41
|
"dotenv": "^17.4.2",
|
|
42
|
-
"rollup": "^4.
|
|
42
|
+
"rollup": "^4.62.2",
|
|
43
43
|
"rollup-plugin-dts": "^6.4.1",
|
|
44
44
|
"ts-morph": "^28.0.0",
|
|
45
45
|
"tsx": "^4.22.4"
|