@paraspell/sdk-core 8.0.3 → 8.2.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 +557 -191
- package/dist/index.d.ts +13 -7
- package/dist/index.mjs +557 -191
- package/package.json +10 -10
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ declare class Acala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXT
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
declare class Unique<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
57
|
+
private static NATIVE_ASSET_ID;
|
|
57
58
|
constructor();
|
|
58
59
|
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
59
60
|
}
|
|
@@ -144,9 +145,9 @@ declare class Interlay<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
144
145
|
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
145
146
|
}
|
|
146
147
|
|
|
147
|
-
declare class Litentry<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
148
|
+
declare class Litentry<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
148
149
|
constructor();
|
|
149
|
-
|
|
150
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
150
151
|
}
|
|
151
152
|
|
|
152
153
|
declare class Moonbeam<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
@@ -640,8 +641,8 @@ type TSerializedApiCall = {
|
|
|
640
641
|
parameters: Record<string, unknown>;
|
|
641
642
|
};
|
|
642
643
|
type TDestWeight = {
|
|
643
|
-
|
|
644
|
-
|
|
644
|
+
ref_time: bigint;
|
|
645
|
+
proof_size: bigint;
|
|
645
646
|
};
|
|
646
647
|
type TXTransferSection = 'transfer';
|
|
647
648
|
type TXTokensSection = 'transfer' | 'transfer_multiasset' | 'transfer_multiassets';
|
|
@@ -736,8 +737,8 @@ declare class Crab<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPol
|
|
|
736
737
|
}
|
|
737
738
|
|
|
738
739
|
declare class Quartz<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
740
|
+
private static NATIVE_ASSET_ID;
|
|
739
741
|
constructor();
|
|
740
|
-
_assetCheckEnabled: boolean;
|
|
741
742
|
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
742
743
|
}
|
|
743
744
|
|
|
@@ -1059,6 +1060,7 @@ interface IFromBuilder<TApi, TRes> {
|
|
|
1059
1060
|
from: (node: TNodeDotKsmWithRelayChains) => IToBuilder<TApi, TRes>;
|
|
1060
1061
|
claimFrom: (node: TNodeWithRelayChains) => IFungibleBuilder<TRes>;
|
|
1061
1062
|
buildBatch: (options?: TBatchOptions) => Promise<TRes>;
|
|
1063
|
+
disconnect: () => Promise<void>;
|
|
1062
1064
|
}
|
|
1063
1065
|
interface IToBuilder<TApi, TRes> {
|
|
1064
1066
|
to: (node: TDestination, paraIdTo?: number) => ICurrencyBuilder<TApi, TRes>;
|
|
@@ -1067,6 +1069,7 @@ interface ICurrencyBuilder<TApi, TRes> {
|
|
|
1067
1069
|
currency: (currency: TCurrencyInputWithAmount) => IAddressBuilder<TApi, TRes>;
|
|
1068
1070
|
}
|
|
1069
1071
|
interface IFinalBuilder<TRes> {
|
|
1072
|
+
disconnect: () => Promise<void>;
|
|
1070
1073
|
build: () => Promise<TRes>;
|
|
1071
1074
|
}
|
|
1072
1075
|
interface IAddressBuilder<TApi, TRes> {
|
|
@@ -1087,6 +1090,7 @@ interface IAddToBatchBuilder<TApi, TRes> {
|
|
|
1087
1090
|
interface IFinalBuilderWithOptions<TApi, TRes> extends IAddToBatchBuilder<TApi, TRes> {
|
|
1088
1091
|
xcmVersion: (version: Version) => this;
|
|
1089
1092
|
customPallet: (pallet: string, method: string) => this;
|
|
1093
|
+
disconnect: () => Promise<void>;
|
|
1090
1094
|
build: () => Promise<TRes>;
|
|
1091
1095
|
dryRun: () => Promise<TDryRunResult>;
|
|
1092
1096
|
}
|
|
@@ -1285,6 +1289,7 @@ interface IPolkadotApi<TApi, TRes> {
|
|
|
1285
1289
|
createAccountId(address: string): string;
|
|
1286
1290
|
accountToHex(address: string, isPrefixed?: boolean): string;
|
|
1287
1291
|
callTxMethod(serializedCall: TSerializedApiCall): TRes;
|
|
1292
|
+
callBatchMethod(calls: TRes[], mode: BatchMode): TRes;
|
|
1288
1293
|
calculateTransactionFee(tx: TRes, address: string): Promise<bigint>;
|
|
1289
1294
|
getBalanceNative(address: string): Promise<bigint>;
|
|
1290
1295
|
getBalanceNativeAcala(address: string, symbol: string): Promise<bigint>;
|
|
@@ -1301,7 +1306,7 @@ interface IPolkadotApi<TApi, TRes> {
|
|
|
1301
1306
|
getDryRun(options: TDryRunBaseOptions<TRes>): Promise<TDryRunResult>;
|
|
1302
1307
|
setDisconnectAllowed(allowed: boolean): void;
|
|
1303
1308
|
getDisconnectAllowed(): boolean;
|
|
1304
|
-
disconnect(): Promise<void>;
|
|
1309
|
+
disconnect(force?: boolean): Promise<void>;
|
|
1305
1310
|
}
|
|
1306
1311
|
|
|
1307
1312
|
declare const send: <TApi, TRes>(options: TSendOptions<TApi, TRes>) => Promise<TRes>;
|
|
@@ -1557,6 +1562,7 @@ declare class GeneralBuilder<TApi, TRes> implements IToBuilder<TApi, TRes>, ICur
|
|
|
1557
1562
|
*/
|
|
1558
1563
|
build(): Promise<TRes>;
|
|
1559
1564
|
dryRun(): Promise<TDryRunResult>;
|
|
1565
|
+
disconnect(): Promise<void>;
|
|
1560
1566
|
}
|
|
1561
1567
|
/**
|
|
1562
1568
|
* Creates a new Builder instance.
|
|
@@ -1723,4 +1729,4 @@ declare const getNodeProviders: (node: TNodeDotKsmWithRelayChains) => string[];
|
|
|
1723
1729
|
*/
|
|
1724
1730
|
declare const getParaId: (node: TNodeDotKsmWithRelayChains) => number;
|
|
1725
1731
|
|
|
1726
|
-
export { BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, GeneralBuilder, type IAccountBuilder, type IAddToBatchBuilder, type IAddressBuilder, type ICurrencyBuilder, type IFinalBuilder, type IFinalBuilderWithOptions, type IFromBuilder, type IFungibleBuilder, type IPolkadotApi, type IPolkadotXCMTransfer, type IToBuilder, type IVersionBuilder, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, Override, Parents, PolkadotXcmError, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TApiOrUrl, type TAsset, type TAssetJsonMap, type TBalanceResponse, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyCoreV1, type TCurrencyCoreV1WithAmount, type TCurrencyCoreWithFee, type TCurrencyInput, type TCurrencyInputWithAmount, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TCurrencySelectionV4, type TCurrencySymbol, type TCurrencySymbolValue, type TDestWeight, type TDestination, type TDryRunBaseOptions, type TDryRunOptions, type TDryRunResult, type TEdJsonMap, type TEvmBuilderOptions, type TEvmBuilderOptionsBase, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetAssetBalanceOptions, type TGetAssetBalanceOptionsBase, type TGetBalanceForeignOptions, type TGetBalanceForeignOptionsBase, type TGetBalanceNativeOptions, type TGetBalanceNativeOptionsBase, type TGetMaxForeignTransferableAmountOptions, type TGetMaxForeignTransferableAmountOptionsBase, type TGetMaxNativeTransferableAmountOptions, type TGetMaxNativeTransferableAmountOptionsBase, type TGetOriginFeeDetailsOptions, type TGetOriginFeeDetailsOptionsBase, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TGetTransferableAmountOptions, type TGetTransferableAmountOptionsBase, type TJunction, type TJunctionParachain, type TJunctionType, type TJunctions, type TMantaAsset, type TModuleError, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiAssetWithFee, type TMultiLocation, type TMultiLocationHeader, type TMultiLocationValue, type TMultiLocationValueWithOverride, type TNativeAsset, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeConfig, type TNodeConfigMap, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOptionalEvmBuilderOptions, type TOriginFeeDetails, type TOtherReserveAsset, type TOverrideMultiLocationSpecifier, type TPallet, type TPalletDetails, type TPalletJsonMap, type TPalletMap, type TPolkadotXCMTransferOptions, type TPolkadotXcmSection, type TProviderEntry, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaDestination, type TRelayToParaOptions, type TRelayToParaOverrides, type TRelaychain, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedEthTransfer, type TSymbolSpecifier, type TTransferInfo, type TVersionClaimAssets, type TXTokensCurrencySelection, type TXTokensSection, type TXTokensTransferOptions, type TXTransferSection, type TXTransferTransferOptions, type TXcmAsset, type TXcmForeignAsset, type TXcmPalletSection, type TZeitgeistAsset, Version, type WithAmount, type WithApi, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createX1Payload, deepEqual, determineRelayChain, generateAddressMultiLocationV4, generateAddressPayload, getAllAssetsSymbols, getAssetBalance, getAssetBalanceInternal, getAssetBySymbolOrId, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDefaultPallet, getDryRun, getExistentialDeposit, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getSupportedPalletsDetails, getTNode, getTransferInfo, getTransferableAmount, hasSupportForAsset, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isRelayChain, resolveModuleError, resolveParaId, send, transferMoonbeamEvm, transferRelayToPara };
|
|
1732
|
+
export { BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, Foreign, ForeignAbstract, GeneralBuilder, type IAccountBuilder, type IAddToBatchBuilder, type IAddressBuilder, type ICurrencyBuilder, type IFinalBuilder, type IFinalBuilderWithOptions, type IFromBuilder, type IFungibleBuilder, type IPolkadotApi, type IPolkadotXCMTransfer, type IToBuilder, type IVersionBuilder, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, Override, Parents, PolkadotXcmError, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TApiOrUrl, type TAsset, type TAssetJsonMap, type TBalanceResponse, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyCoreV1, type TCurrencyCoreV1WithAmount, type TCurrencyCoreWithFee, type TCurrencyInput, type TCurrencyInputWithAmount, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TCurrencySelectionV4, type TCurrencySymbol, type TCurrencySymbolValue, type TDestWeight, type TDestination, type TDryRunBaseOptions, type TDryRunOptions, type TDryRunResult, type TEdJsonMap, type TEvmBuilderOptions, type TEvmBuilderOptionsBase, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetAssetBalanceOptions, type TGetAssetBalanceOptionsBase, type TGetBalanceForeignOptions, type TGetBalanceForeignOptionsBase, type TGetBalanceNativeOptions, type TGetBalanceNativeOptionsBase, type TGetMaxForeignTransferableAmountOptions, type TGetMaxForeignTransferableAmountOptionsBase, type TGetMaxNativeTransferableAmountOptions, type TGetMaxNativeTransferableAmountOptionsBase, type TGetOriginFeeDetailsOptions, type TGetOriginFeeDetailsOptionsBase, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TGetTransferableAmountOptions, type TGetTransferableAmountOptionsBase, type TJunction, type TJunctionGeneralIndex, type TJunctionParachain, type TJunctionType, type TJunctions, type TMantaAsset, type TModuleError, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiAssetWithFee, type TMultiLocation, type TMultiLocationHeader, type TMultiLocationValue, type TMultiLocationValueWithOverride, type TNativeAsset, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeConfig, type TNodeConfigMap, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOptionalEvmBuilderOptions, type TOriginFeeDetails, type TOtherReserveAsset, type TOverrideMultiLocationSpecifier, type TPallet, type TPalletDetails, type TPalletJsonMap, type TPalletMap, type TPolkadotXCMTransferOptions, type TPolkadotXcmSection, type TProviderEntry, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaDestination, type TRelayToParaOptions, type TRelayToParaOverrides, type TRelaychain, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedEthTransfer, type TSymbolSpecifier, type TTransferInfo, type TVersionClaimAssets, type TXTokensCurrencySelection, type TXTokensSection, type TXTokensTransferOptions, type TXTransferSection, type TXTransferTransferOptions, type TXcmAsset, type TXcmForeignAsset, type TXcmPalletSection, type TZeitgeistAsset, Version, type WithAmount, type WithApi, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createX1Payload, deepEqual, determineRelayChain, generateAddressMultiLocationV4, generateAddressPayload, getAllAssetsSymbols, getAssetBalance, getAssetBalanceInternal, getAssetBySymbolOrId, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDefaultPallet, getDryRun, getExistentialDeposit, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getSupportedPalletsDetails, getTNode, getTransferInfo, getTransferableAmount, hasSupportForAsset, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isRelayChain, resolveModuleError, resolveParaId, send, transferMoonbeamEvm, transferRelayToPara };
|