@paraspell/sdk-core 11.12.14 → 11.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +32 -406
- package/dist/index.d.ts +6 -29
- package/dist/index.mjs +33 -406
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as _paraspell_sdk_common from '@paraspell/sdk-common';
|
|
2
2
|
import { TChain, TLocation, TSubstrateChain, Version, TRelaychain, TParachain, TExternalChain, TJunction, TJunctions } from '@paraspell/sdk-common';
|
|
3
3
|
export * from '@paraspell/sdk-common';
|
|
4
|
-
import * as _paraspell_assets from '@paraspell/assets';
|
|
5
4
|
import { TCurrencyInputWithAmount, TCurrencyInput, WithAmount, TAssetInfo, TAsset, TAssetWithFee, WithComplexAmount, TCurrencyCore, TAmount, TAssetWithLocation, TForeignAssetWithId, TForeignAssetInfo } from '@paraspell/assets';
|
|
6
5
|
export * from '@paraspell/assets';
|
|
7
6
|
import { TPallet } from '@paraspell/pallets';
|
|
@@ -1534,7 +1533,7 @@ declare abstract class Parachain<TApi, TRes> {
|
|
|
1534
1533
|
shouldUseNativeAssetTeleport({ assetInfo: asset, to }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1535
1534
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
1536
1535
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): Promise<TSerializedApiCall>;
|
|
1537
|
-
|
|
1536
|
+
createAsset(asset: WithAmount<TAssetInfo>, version: Version): TAsset;
|
|
1538
1537
|
getNativeAssetSymbol(): string;
|
|
1539
1538
|
transferLocal(options: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
|
|
1540
1539
|
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes>): Promise<TRes>;
|
|
@@ -1580,7 +1579,6 @@ declare class AssetHubKusama<TApi, TRes> extends Parachain<TApi, TRes> implement
|
|
|
1580
1579
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1581
1580
|
getMethod(scenario: TScenario, destination: TDestination): TPolkadotXcmMethod;
|
|
1582
1581
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
1583
|
-
createCurrencySpec(amount: bigint, scenario: TScenario, version: Version, asset?: TAssetInfo, isOverridenAsset?: boolean): _paraspell_assets.TAsset;
|
|
1584
1582
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1585
1583
|
}
|
|
1586
1584
|
|
|
@@ -1593,7 +1591,6 @@ declare class AssetHubPolkadot<TApi, TRes> extends Parachain<TApi, TRes> impleme
|
|
|
1593
1591
|
private getMethod;
|
|
1594
1592
|
transferPolkadotXCM<TApi, TRes>(options: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1595
1593
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
1596
|
-
createCurrencySpec(amount: bigint, scenario: TScenario, version: Version, asset?: TAssetInfo, isOverriddenAsset?: boolean): _paraspell_assets.TAsset;
|
|
1597
1594
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1598
1595
|
}
|
|
1599
1596
|
|
|
@@ -1672,7 +1669,6 @@ declare class BifrostPolkadot<TApi, TRes> extends Parachain<TApi, TRes> implemen
|
|
|
1672
1669
|
VToken2?: undefined;
|
|
1673
1670
|
};
|
|
1674
1671
|
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
1675
|
-
transferToAssetHub<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1676
1672
|
transferPolkadotXCM<TApi, TRes>(options: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1677
1673
|
canUseXTokens({ assetInfo, to: destination }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1678
1674
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
@@ -1719,13 +1715,6 @@ declare class CollectivesWestend<TApi, TRes> extends Collectives<TApi, TRes> {
|
|
|
1719
1715
|
constructor();
|
|
1720
1716
|
}
|
|
1721
1717
|
|
|
1722
|
-
declare class ComposableFinance<TApi, TRes> extends Parachain<TApi, TRes> implements IXTokensTransfer {
|
|
1723
|
-
constructor();
|
|
1724
|
-
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
1725
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1726
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1727
|
-
}
|
|
1728
|
-
|
|
1729
1718
|
declare class CoretimeKusama<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
1730
1719
|
constructor();
|
|
1731
1720
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
@@ -1751,7 +1740,6 @@ declare class Crab<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkado
|
|
|
1751
1740
|
constructor();
|
|
1752
1741
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1753
1742
|
transferRelayToPara(): Promise<TSerializedApiCall>;
|
|
1754
|
-
createCurrencySpec(amount: bigint, scenario: TScenario, version: Version, _asset?: TAssetInfo): _paraspell_assets.TAsset;
|
|
1755
1743
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1756
1744
|
}
|
|
1757
1745
|
|
|
@@ -1779,7 +1767,6 @@ declare class Curio<TApi, TRes> extends Parachain<TApi, TRes> implements IXToken
|
|
|
1779
1767
|
declare class Darwinia<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
1780
1768
|
constructor();
|
|
1781
1769
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1782
|
-
createCurrencySpec(amount: bigint, scenario: TScenario, version: Version, _asset?: TAssetInfo): _paraspell_assets.TAsset;
|
|
1783
1770
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1784
1771
|
}
|
|
1785
1772
|
|
|
@@ -1897,15 +1884,13 @@ declare class Manta<TApi, TRes> extends Parachain<TApi, TRes> implements IXToken
|
|
|
1897
1884
|
|
|
1898
1885
|
declare class Moonbeam<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
1899
1886
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
1900
|
-
|
|
1901
|
-
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1887
|
+
transferPolkadotXCM<TApi, TRes>(options: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1902
1888
|
transferLocalNonNativeAsset(_options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1903
1889
|
}
|
|
1904
1890
|
|
|
1905
1891
|
declare class Moonriver<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
1906
1892
|
constructor();
|
|
1907
|
-
|
|
1908
|
-
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1893
|
+
transferPolkadotXCM<TApi, TRes>(options: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1909
1894
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1910
1895
|
}
|
|
1911
1896
|
|
|
@@ -2050,7 +2035,6 @@ declare const chains: <TApi, TRes>() => {
|
|
|
2050
2035
|
BifrostPolkadot: BifrostPolkadot<TApi, TRes>;
|
|
2051
2036
|
BridgeHubPolkadot: BridgeHubPolkadot<TApi, TRes>;
|
|
2052
2037
|
Centrifuge: Centrifuge<TApi, TRes>;
|
|
2053
|
-
ComposableFinance: ComposableFinance<TApi, TRes>;
|
|
2054
2038
|
Darwinia: Darwinia<TApi, TRes>;
|
|
2055
2039
|
EnergyWebX: EnergyWebX<TApi, TRes>;
|
|
2056
2040
|
Hydration: Hydration<TApi, TRes>;
|
|
@@ -2209,13 +2193,6 @@ declare const transferRelayToPara: <TApi, TRes>(options: TRelayToParaOptions<TAp
|
|
|
2209
2193
|
*/
|
|
2210
2194
|
declare const createTypeAndThenCall: <TApi, TRes>(chain: TSubstrateChain, options: TPolkadotXCMTransferOptions<TApi, TRes>, overrideReserve?: TSubstrateChain) => Promise<TSerializedApiCall>;
|
|
2211
2195
|
|
|
2212
|
-
/**
|
|
2213
|
-
* Creates a type-and-then call but auto-selects the asset reserve between AssetHub and the Relay chain
|
|
2214
|
-
* by dry-running both variants and preferring the one that succeeds. If both fail, returns the
|
|
2215
|
-
* AssetHub variant. Supports only relaychain assets.
|
|
2216
|
-
*/
|
|
2217
|
-
declare const createTypeThenAutoReserve: <TApi, TRes>(chain: TSubstrateChain, options: TPolkadotXCMTransferOptions<TApi, TRes>) => Promise<TSerializedApiCall>;
|
|
2218
|
-
|
|
2219
2196
|
declare const validateCurrency: (currency: TCurrencyInput, feeAsset?: TCurrencyInput) => void;
|
|
2220
2197
|
declare const validateDestination: (origin: TSubstrateChain, destination: TDestination) => void;
|
|
2221
2198
|
declare const validateAssetSpecifiers: (assetCheckEnabled: boolean, currency: TCurrencyInput) => void;
|
|
@@ -2298,7 +2275,7 @@ declare const reverseTransformLocation: (location: TLocation) => TLocation;
|
|
|
2298
2275
|
|
|
2299
2276
|
declare const normalizeAmount: (amount: bigint) => bigint;
|
|
2300
2277
|
|
|
2301
|
-
declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "
|
|
2278
|
+
declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "Darwinia" | "EnergyWebX" | "Hydration" | "IntegriteePolkadot" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "Phala" | "KiltSpiritnet" | "Curio" | "Mythos" | "Peaq" | "RobonomicsPolkadot" | "PeoplePolkadot" | "Unique" | "Xode" | "AssetHubKusama" | "BridgeHubKusama" | "IntegriteeKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Altair" | "Amplitude" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Laos" | "Quartz" | "RobonomicsKusama" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "IntegriteePaseo" | "KiltPaseo" | "LaosPaseo" | "NeuroWebPaseo" | "NodlePaseo" | "PAssetHub" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
|
|
2302
2279
|
|
|
2303
2280
|
declare const resolveParaId: (paraId: number | undefined, destination: TDestination) => number | undefined;
|
|
2304
2281
|
|
|
@@ -2324,7 +2301,7 @@ declare const createExecuteExchangeXcm: <TApi, TRes>(input: TPolkadotXCMTransfer
|
|
|
2324
2301
|
|
|
2325
2302
|
declare const createDirectExecuteXcm: <TApi, TRes>(options: TCreateTransferXcmOptions<TApi, TRes>) => OneKey<_paraspell_sdk_common.Version, unknown[]>;
|
|
2326
2303
|
|
|
2327
|
-
declare const getAssetReserveChain: (chain: TSubstrateChain,
|
|
2304
|
+
declare const getAssetReserveChain: (chain: TSubstrateChain, assetLocation: TLocation) => TSubstrateChain;
|
|
2328
2305
|
|
|
2329
2306
|
declare const handleExecuteTransfer: <TApi, TRes>(chain: TParachain, options: TPolkadotXCMTransferOptions<TApi, TRes>) => Promise<TSerializedApiCall>;
|
|
2330
2307
|
|
|
@@ -2337,5 +2314,5 @@ declare const formatUnits: typeof formatUnits$1;
|
|
|
2337
2314
|
|
|
2338
2315
|
declare const validateAddress: (address: TAddress, chain: TChain, isDestination?: boolean) => void;
|
|
2339
2316
|
|
|
2340
|
-
export { AmountTooLowError, AssetClaimBuilder, AssetsPallet, BatchMode, BridgeHaltedError, Builder, ChainNotSupportedError, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleChainsError, InvalidAddressError, InvalidParameterError, MissingChainApiError, NoXCMSupportImplementedError, PolkadotXcmError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertHasLocation, assertIsForeign, assertSenderAddress, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, computeOverridenAmount, convertSs58, createAsset, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createDirectExecuteXcm, createExecuteCall, createExecuteExchangeXcm, createTx, createTypeAndThenCall,
|
|
2317
|
+
export { AmountTooLowError, AssetClaimBuilder, AssetsPallet, BatchMode, BridgeHaltedError, Builder, ChainNotSupportedError, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleChainsError, InvalidAddressError, InvalidParameterError, MissingChainApiError, NoXCMSupportImplementedError, PolkadotXcmError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertHasLocation, assertIsForeign, assertSenderAddress, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, computeOverridenAmount, convertSs58, createAsset, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createDirectExecuteXcm, createExecuteCall, createExecuteExchangeXcm, createTx, createTypeAndThenCall, createVersionedAssets, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, formatUnits, getAssetBalance, getAssetBalanceInternal, getAssetReserveChain, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getBridgeStatus, getChain, getChainConfig, getChainLocation, getChainProviders, getChainVersion, getCurrencySelection, getFailureInfo, getMinTransferableAmount, getMinTransferableAmountInternal, getOriginFeeDetails, getOriginFeeDetailsInternal, getOriginXcmFee, getOriginXcmFeeEstimate, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getRelayChainOf, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, getXcmFeeInternal, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, localizeLocation, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, overrideTxAmount, padFee, padValueBy, parseUnits, resolveDestChain, resolveModuleError, resolveParaId, reverseTransformLocation, send, sortAssets, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, verifyEdOnDestination, wrapTxBypass };
|
|
2341
2318
|
export type { BuildHopInfoOptions, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, IXTransferTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedSendOptions, TBifrostToken, TBridgeStatus, TBuildDestInfoOptions, TBuildInternalRes, TBuilderConfig, TBuilderOptions, TBypassOptions, TChainConfig, TChainConfigMap, TChainWithApi, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TDestWeight, TDestXcmFeeDetail, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChain, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmBuilderOptions, TEvmBuilderOptionsBase, TEvmChainFrom, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceForeignByAssetOptions, TGetBalanceForeignOptions, TGetBalanceForeignOptionsBase, TGetBalanceNativeOptions, TGetBalanceNativeOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginFeeDetailsOptions, TGetOriginFeeDetailsOptionsBase, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeEstimateOptions, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeEstimateDetail, TGetXcmFeeEstimateOptions, TGetXcmFeeEstimateResult, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, THubKey, TMantaAsset, TModuleError, TNativeTokenAsset, TNodleAsset, TOriginFeeDetails, TOtherReserveAsset, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TRelayToParaDestination, TRelayToParaOptions, TRelayToParaOverrides, TReserveAsset, TResolveHopParams, TScenario, TSelfReserveAsset, TSendBaseOptions, TSendBaseOptionsWithSenderAddress, TSendInternalOptions, TSendOptions, TSerializeEthTransferOptions, TSerializedApiCall, TSerializedEthTransfer, TSwapConfig, TSwapFeeEstimates, TTransferFeeEstimates, TTransferInfo, TTransferLocalOptions, TTxFactory, TTypeAndThenCallContext, TTypeAndThenFees, TUrl, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXTransferMethod, TXTransferTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeChain, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmFeeSwapConfig, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSenderAddress };
|