@paraspell/sdk-core 10.4.3 → 10.4.5
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 +238 -241
- package/dist/index.d.ts +11 -24
- package/dist/index.mjs +223 -225
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _paraspell_sdk_common from '@paraspell/sdk-common';
|
|
2
|
-
import { TMultiLocation, TNodeDotKsmWithRelayChains, TNodeWithRelayChains, TNodePolkadotKusama, TNode, TJunction, TEcosystemType, TJunctions } from '@paraspell/sdk-common';
|
|
2
|
+
import { Version, TMultiLocation, TNodeDotKsmWithRelayChains, TNodeWithRelayChains, TNodePolkadotKusama, TNode, TJunction, TEcosystemType, TJunctions } from '@paraspell/sdk-common';
|
|
3
3
|
export * from '@paraspell/sdk-common';
|
|
4
4
|
import * as _paraspell_assets from '@paraspell/assets';
|
|
5
5
|
import { TMultiAsset, TCurrencyInputWithAmount, TCurrencyInput, WithAmount, TAsset, TMultiAssetWithFee, TCurrencyCore, TAmount } from '@paraspell/assets';
|
|
@@ -75,7 +75,7 @@ type TPolkadotXCMTransferOptions<TApi, TRes> = {
|
|
|
75
75
|
feeAsset?: TAsset;
|
|
76
76
|
destination: TDestination;
|
|
77
77
|
paraIdTo?: number;
|
|
78
|
-
version
|
|
78
|
+
version: Version;
|
|
79
79
|
senderAddress?: string;
|
|
80
80
|
ahAddress?: string;
|
|
81
81
|
pallet?: string;
|
|
@@ -117,18 +117,6 @@ interface IXTransferTransfer {
|
|
|
117
117
|
transferXTransfer: <TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>) => TRes;
|
|
118
118
|
}
|
|
119
119
|
type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
|
|
120
|
-
/**
|
|
121
|
-
* The XCM version.
|
|
122
|
-
*/
|
|
123
|
-
declare enum Version {
|
|
124
|
-
V3 = "V3",
|
|
125
|
-
V4 = "V4",
|
|
126
|
-
V5 = "V5"
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* The supported XCM versions for asset claims.
|
|
130
|
-
*/
|
|
131
|
-
type TVersionClaimAssets = Version.V3;
|
|
132
120
|
type TAddress = string | TMultiLocation;
|
|
133
121
|
type TDestination = TNodeWithRelayChains | TMultiLocation;
|
|
134
122
|
type TRelayToParaDestination = TNodePolkadotKusama | TMultiLocation;
|
|
@@ -189,11 +177,12 @@ type WithRequiredSenderAddress<TBase> = Omit<TBase, 'senderAddress'> & {
|
|
|
189
177
|
senderAddress: string;
|
|
190
178
|
};
|
|
191
179
|
type TSendBaseOptionsWithSenderAddress = WithRequiredSenderAddress<TSendBaseOptions>;
|
|
192
|
-
type TSendInternalOptions<TApi, TRes> = Omit<TSendBaseOptions, 'from' | 'feeAsset'> & {
|
|
180
|
+
type TSendInternalOptions<TApi, TRes> = Omit<TSendBaseOptions, 'from' | 'feeAsset' | 'version'> & {
|
|
193
181
|
api: IPolkadotApi<TApi, TRes>;
|
|
194
182
|
asset: WithAmount<TAsset>;
|
|
195
183
|
feeAsset?: TAsset;
|
|
196
184
|
overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
|
|
185
|
+
version: Version;
|
|
197
186
|
};
|
|
198
187
|
type TRelayToParaBaseOptions = {
|
|
199
188
|
/**
|
|
@@ -215,7 +204,7 @@ type TRelayToParaBaseOptions = {
|
|
|
215
204
|
/**
|
|
216
205
|
* The optional overrided XCM version
|
|
217
206
|
*/
|
|
218
|
-
version
|
|
207
|
+
version: Version;
|
|
219
208
|
/**
|
|
220
209
|
* The DOT or KSM asset to transfer
|
|
221
210
|
*/
|
|
@@ -271,7 +260,7 @@ type TAssetClaimOptionsBase = {
|
|
|
271
260
|
node: TNodeWithRelayChains;
|
|
272
261
|
multiAssets: TMultiAsset[];
|
|
273
262
|
address: TAddress;
|
|
274
|
-
version?:
|
|
263
|
+
version?: Version;
|
|
275
264
|
};
|
|
276
265
|
type TAssetClaimOptions<TApi, TRes> = WithApi<TAssetClaimOptionsBase, TApi, TRes>;
|
|
277
266
|
|
|
@@ -997,8 +986,8 @@ declare class AssetClaimBuilder<TApi, TRes, T extends Partial<TAssetClaimOptions
|
|
|
997
986
|
* @param version - The XCM version.
|
|
998
987
|
* @returns An instance of Builder
|
|
999
988
|
*/
|
|
1000
|
-
xcmVersion(version:
|
|
1001
|
-
version:
|
|
989
|
+
xcmVersion(version: Version): AssetClaimBuilder<TApi, TRes, T & {
|
|
990
|
+
version: Version;
|
|
1002
991
|
}>;
|
|
1003
992
|
/**
|
|
1004
993
|
* Builds and returns the asset claim extrinsic.
|
|
@@ -1794,7 +1783,7 @@ declare const transferRelayToPara: <TApi, TRes>(options: TRelayToParaOptions<TAp
|
|
|
1794
1783
|
declare const createApiInstanceForNode: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, node: TNodeDotKsmWithRelayChains) => Promise<TApi>;
|
|
1795
1784
|
|
|
1796
1785
|
declare const createBeneficiary: <TApi, TRes>(options: TCreateBeneficiaryOptions<TApi, TRes>) => _paraspell_sdk_common.TMultiLocation;
|
|
1797
|
-
declare const createVersionedBeneficiary: <TApi, TRes>(options: TCreateBeneficiaryOptions<TApi, TRes>) => OneKey<Version, _paraspell_sdk_common.TMultiLocation>;
|
|
1786
|
+
declare const createVersionedBeneficiary: <TApi, TRes>(options: TCreateBeneficiaryOptions<TApi, TRes>) => OneKey<_paraspell_sdk_common.Version, _paraspell_sdk_common.TMultiLocation>;
|
|
1798
1787
|
|
|
1799
1788
|
declare const createX1Payload: (version: Version, junction: TJunction) => TJunctions;
|
|
1800
1789
|
|
|
@@ -1804,8 +1793,6 @@ declare const computeFeeFromDryRunPjs: (dryRun: any, node: TNodeDotKsmWithRelayC
|
|
|
1804
1793
|
|
|
1805
1794
|
declare const resolveModuleError: (node: TNodeDotKsmWithRelayChains, error: TModuleError) => XTokensError | PolkadotXcmError;
|
|
1806
1795
|
|
|
1807
|
-
declare const generateAddressMultiLocationV4: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, address: TAddress) => TXcmVersioned<TMultiLocation>;
|
|
1808
|
-
|
|
1809
1796
|
declare const getFees: (scenario: TScenario) => number;
|
|
1810
1797
|
|
|
1811
1798
|
/**
|
|
@@ -1843,5 +1830,5 @@ declare const validateAddress: (address: TAddress, node: TNodeWithRelayChains, i
|
|
|
1843
1830
|
*/
|
|
1844
1831
|
declare const determineRelayChain: (node: TNodeWithRelayChains) => TRelaychain;
|
|
1845
1832
|
|
|
1846
|
-
export { AssetClaimBuilder, BatchMode, BridgeHaltedError, Builder, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleNodesError, InvalidAddressError, InvalidParameterError, NoXCMSupportImplementedError, NodeNotSupportedError, PolkadotXcmError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError,
|
|
1847
|
-
export type { IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, IXTransferTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimOptions, TAssetClaimOptionsBase, TBalanceResponse, TBatchOptions, TBifrostToken, TBridgeStatus, TCreateBeneficiaryOptions, TDestWeight, TDestination, TDryRunBaseOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChain, TDryRunNodeFailure, TDryRunNodeResult, TDryRunNodeResultInternal, TDryRunNodeSuccess, TDryRunOptions, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEdJsonMap, TEvmBuilderOptions, TEvmBuilderOptionsBase, TEvmNodeFrom, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceForeignOptions, TGetBalanceForeignOptionsBase, TGetBalanceNativeOptions, TGetBalanceNativeOptionsBase, TGetFeeForDestNodeBaseOptions, TGetFeeForDestNodeOptions, TGetMaxForeignTransferableAmountOptions, TGetMaxForeignTransferableAmountOptionsBase, TGetMaxNativeTransferableAmountOptions, TGetMaxNativeTransferableAmountOptionsBase, TGetOriginFeeDetailsOptions, TGetOriginFeeDetailsOptionsBase, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeEstimateOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeEstimateDetail, TGetXcmFeeEstimateOptions, TGetXcmFeeEstimateResult, TGetXcmFeeOptions, TGetXcmFeeResult, THubKey, TMantaAsset, TModuleError, TNativeTokenAsset, TNodeConfig, TNodeConfigMap, TNodleAsset, TOriginFeeDetails, TOtherReserveAsset, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TRelayToParaDestination, TRelayToParaOptions, TRelayToParaOverrides, TRelaychain, TReserveAsset, TScenario, TSelfReserveAsset, TSendBaseOptions, TSendBaseOptionsWithSenderAddress, TSendInternalOptions, TSendOptions, TSerializeEthTransferOptions, TSerializedApiCall, TSerializedEthTransfer, TTransferInfo, TTransferLocalOptions, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase,
|
|
1833
|
+
export { AssetClaimBuilder, BatchMode, BridgeHaltedError, Builder, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleNodesError, InvalidAddressError, InvalidParameterError, NoXCMSupportImplementedError, NodeNotSupportedError, PolkadotXcmError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, XTokensError, blake2b256, blake2b512, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, convertSs58, createApiInstanceForNode, createBeneficiary, createBeneficiaryMultiLocation, createVersionedBeneficiary, createX1Payload, deriveAccountId, determineRelayChain, dryRun, dryRunOrigin, encodeSs58, getAssetBalance, getAssetBalanceInternal, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getBridgeStatus, getFees, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOriginXcmFee, getOriginXcmFeeEstimate, getParaEthTransferFees, getParaId, getTNode, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, replaceBigInt, resolveModuleError, resolveParaId, reverseTransformMultiLocation, send, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, transformMultiLocation, validateAddress, verifyEdOnDestination };
|
|
1834
|
+
export type { IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, IXTransferTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimOptions, TAssetClaimOptionsBase, TBalanceResponse, TBatchOptions, TBifrostToken, TBridgeStatus, TCreateBeneficiaryOptions, TDestWeight, TDestination, TDryRunBaseOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChain, TDryRunNodeFailure, TDryRunNodeResult, TDryRunNodeResultInternal, TDryRunNodeSuccess, TDryRunOptions, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEdJsonMap, TEvmBuilderOptions, TEvmBuilderOptionsBase, TEvmNodeFrom, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceForeignOptions, TGetBalanceForeignOptionsBase, TGetBalanceNativeOptions, TGetBalanceNativeOptionsBase, TGetFeeForDestNodeBaseOptions, TGetFeeForDestNodeOptions, TGetMaxForeignTransferableAmountOptions, TGetMaxForeignTransferableAmountOptionsBase, TGetMaxNativeTransferableAmountOptions, TGetMaxNativeTransferableAmountOptionsBase, TGetOriginFeeDetailsOptions, TGetOriginFeeDetailsOptionsBase, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeEstimateOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeEstimateDetail, TGetXcmFeeEstimateOptions, TGetXcmFeeEstimateResult, TGetXcmFeeOptions, TGetXcmFeeResult, THubKey, TMantaAsset, TModuleError, TNativeTokenAsset, TNodeConfig, TNodeConfigMap, TNodleAsset, TOriginFeeDetails, TOtherReserveAsset, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TRelayToParaDestination, TRelayToParaOptions, TRelayToParaOverrides, TRelaychain, TReserveAsset, TScenario, TSelfReserveAsset, TSendBaseOptions, TSendBaseOptionsWithSenderAddress, TSendInternalOptions, TSendOptions, TSerializeEthTransferOptions, TSerializedApiCall, TSerializedEthTransfer, TTransferInfo, TTransferLocalOptions, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXTransferMethod, TXTransferTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeChain, TXcmFeeDetail, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSenderAddress };
|