@paraspell/sdk 7.2.5 → 7.2.6
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/README.md +15 -4
- package/dist/index.cjs +2707 -1995
- package/dist/index.d.ts +75 -10
- package/dist/index.mjs +2704 -1995
- package/dist/papi/index.cjs +2709 -1996
- package/dist/papi/index.d.ts +75 -10
- package/dist/papi/index.mjs +2706 -1996
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -102,6 +102,7 @@ declare class Centrifuge<TApi, TRes> extends ParachainNode<TApi, TRes> implement
|
|
|
102
102
|
constructor();
|
|
103
103
|
private getCurrencySelection;
|
|
104
104
|
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
105
|
+
getProvider(): string;
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
declare class ComposableFinance<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -420,6 +421,7 @@ type TBaseAsset = {
|
|
|
420
421
|
decimals?: number;
|
|
421
422
|
manuallyAdded?: boolean;
|
|
422
423
|
alias?: string;
|
|
424
|
+
existentialDeposit?: string;
|
|
423
425
|
};
|
|
424
426
|
type TNativeAsset = TBaseAsset;
|
|
425
427
|
type TForeignAsset = TBaseAsset & AtLeastOne<{
|
|
@@ -1035,6 +1037,7 @@ interface IPolkadotApi<TApi, TRes> {
|
|
|
1035
1037
|
callTxMethod(serializedCall: TSerializedApiCall): TRes;
|
|
1036
1038
|
calculateTransactionFee(tx: TRes, address: string): Promise<bigint>;
|
|
1037
1039
|
getBalanceNative(address: string): Promise<bigint>;
|
|
1040
|
+
getBalanceNativeAcala(address: string, symbol: string): Promise<bigint>;
|
|
1038
1041
|
getBalanceForeignPolkadotXcm(address: string, id?: string): Promise<bigint>;
|
|
1039
1042
|
getMythosForeignBalance(address: string): Promise<bigint>;
|
|
1040
1043
|
getAssetHubForeignBalance(address: string, multiLocation: TMultiLocation): Promise<bigint>;
|
|
@@ -1108,6 +1111,12 @@ type TGetBalanceNativeOptionsBase = {
|
|
|
1108
1111
|
* The node on which to query the balance.
|
|
1109
1112
|
*/
|
|
1110
1113
|
node: TNodeDotKsmWithRelayChains;
|
|
1114
|
+
/**
|
|
1115
|
+
* The native currency to query.
|
|
1116
|
+
*/
|
|
1117
|
+
currency?: {
|
|
1118
|
+
symbol: string;
|
|
1119
|
+
};
|
|
1111
1120
|
};
|
|
1112
1121
|
/**
|
|
1113
1122
|
* Retrieves the balance of a foreign asset for a given account on a specified node.
|
|
@@ -1170,6 +1179,58 @@ type TGetOriginFeeDetailsOptionsBase = {
|
|
|
1170
1179
|
*/
|
|
1171
1180
|
feeMarginPercentage?: number;
|
|
1172
1181
|
};
|
|
1182
|
+
type TGetMaxNativeTransferableAmountOptionsBase = {
|
|
1183
|
+
/**
|
|
1184
|
+
* The address of the account.
|
|
1185
|
+
*/
|
|
1186
|
+
address: string;
|
|
1187
|
+
/**
|
|
1188
|
+
* The node on which to query the balance.
|
|
1189
|
+
*/
|
|
1190
|
+
node: TNodeDotKsmWithRelayChains;
|
|
1191
|
+
/**
|
|
1192
|
+
* The currency to query.
|
|
1193
|
+
*/
|
|
1194
|
+
currency?: {
|
|
1195
|
+
symbol: string;
|
|
1196
|
+
};
|
|
1197
|
+
};
|
|
1198
|
+
type TGetMaxForeignTransferableAmountOptionsBase = {
|
|
1199
|
+
/**
|
|
1200
|
+
* The address of the account.
|
|
1201
|
+
*/
|
|
1202
|
+
address: string;
|
|
1203
|
+
/**
|
|
1204
|
+
* The node on which to query the balance.
|
|
1205
|
+
*/
|
|
1206
|
+
node: TNodePolkadotKusama;
|
|
1207
|
+
/**
|
|
1208
|
+
* The currency to query.
|
|
1209
|
+
*/
|
|
1210
|
+
currency: TCurrencyCore;
|
|
1211
|
+
};
|
|
1212
|
+
type TGetTransferableAmountOptionsBase = {
|
|
1213
|
+
/**
|
|
1214
|
+
* The address of the account.
|
|
1215
|
+
*/
|
|
1216
|
+
address: string;
|
|
1217
|
+
/**
|
|
1218
|
+
* The node on which to query the balance.
|
|
1219
|
+
*/
|
|
1220
|
+
node: TNodeDotKsmWithRelayChains;
|
|
1221
|
+
/**
|
|
1222
|
+
* The currency to query.
|
|
1223
|
+
*/
|
|
1224
|
+
currency: TCurrencyCore;
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* Retrieves the existential deposit value for a given node.
|
|
1229
|
+
*
|
|
1230
|
+
* @param node - The node for which to get the existential deposit.
|
|
1231
|
+
* @returns The existential deposit as a string if available; otherwise, null.
|
|
1232
|
+
*/
|
|
1233
|
+
declare const getExistentialDeposit: (node: TNodeWithRelayChains, currency?: TCurrencyCore) => string | null;
|
|
1173
1234
|
|
|
1174
1235
|
/**
|
|
1175
1236
|
* Retrieves the assets object for a given node containing the native and foreign assets.
|
|
@@ -1253,14 +1314,6 @@ declare const getAssetDecimals: (node: TNodeWithRelayChains, symbol: string) =>
|
|
|
1253
1314
|
*/
|
|
1254
1315
|
declare const getTNode: (paraId: number, ecosystem: TRelayChainType) => TNodeDotKsmWithRelayChains | null;
|
|
1255
1316
|
|
|
1256
|
-
/**
|
|
1257
|
-
* Retrieves the existential deposit value for a given node.
|
|
1258
|
-
*
|
|
1259
|
-
* @param node - The node for which to get the existential deposit.
|
|
1260
|
-
* @returns The existential deposit as a string if available; otherwise, null.
|
|
1261
|
-
*/
|
|
1262
|
-
declare const getExistentialDeposit: (node: TNodeDotKsmWithRelayChains) => string | null;
|
|
1263
|
-
|
|
1264
1317
|
declare const Native: (symbol: string) => TSymbolSpecifier;
|
|
1265
1318
|
declare const Foreign: (symbol: string) => TSymbolSpecifier;
|
|
1266
1319
|
declare const ForeignAbstract: (symbol: string) => TSymbolSpecifier;
|
|
@@ -1319,6 +1372,15 @@ declare const claimAssets: (options: TAssetClaimOptionsBase & {
|
|
|
1319
1372
|
declare const getOriginFeeDetails: (options: TGetOriginFeeDetailsOptionsBase & {
|
|
1320
1373
|
api?: TPjsApiOrUrl;
|
|
1321
1374
|
}) => Promise<TOriginFeeDetails>;
|
|
1375
|
+
declare const getMaxNativeTransferableAmount: (options: TGetMaxNativeTransferableAmountOptionsBase & {
|
|
1376
|
+
api?: TPjsApiOrUrl;
|
|
1377
|
+
}) => Promise<bigint>;
|
|
1378
|
+
declare const getMaxForeignTransferableAmount: (options: TGetMaxForeignTransferableAmountOptionsBase & {
|
|
1379
|
+
api?: TPjsApiOrUrl;
|
|
1380
|
+
}) => Promise<bigint>;
|
|
1381
|
+
declare const getTransferableAmount: (options: TGetTransferableAmountOptionsBase & {
|
|
1382
|
+
api?: TPjsApiOrUrl;
|
|
1383
|
+
}) => Promise<bigint>;
|
|
1322
1384
|
|
|
1323
1385
|
declare const assets_Foreign: typeof Foreign;
|
|
1324
1386
|
declare const assets_ForeignAbstract: typeof ForeignAbstract;
|
|
@@ -1334,6 +1396,8 @@ declare const assets_getAssetsObject: typeof getAssetsObject;
|
|
|
1334
1396
|
declare const assets_getBalanceForeign: typeof getBalanceForeign;
|
|
1335
1397
|
declare const assets_getBalanceNative: typeof getBalanceNative;
|
|
1336
1398
|
declare const assets_getExistentialDeposit: typeof getExistentialDeposit;
|
|
1399
|
+
declare const assets_getMaxForeignTransferableAmount: typeof getMaxForeignTransferableAmount;
|
|
1400
|
+
declare const assets_getMaxNativeTransferableAmount: typeof getMaxNativeTransferableAmount;
|
|
1337
1401
|
declare const assets_getNativeAssetSymbol: typeof getNativeAssetSymbol;
|
|
1338
1402
|
declare const assets_getNativeAssets: typeof getNativeAssets;
|
|
1339
1403
|
declare const assets_getOriginFeeDetails: typeof getOriginFeeDetails;
|
|
@@ -1342,10 +1406,11 @@ declare const assets_getRelayChainSymbol: typeof getRelayChainSymbol;
|
|
|
1342
1406
|
declare const assets_getSupportedAssets: typeof getSupportedAssets;
|
|
1343
1407
|
declare const assets_getTNode: typeof getTNode;
|
|
1344
1408
|
declare const assets_getTransferInfo: typeof getTransferInfo;
|
|
1409
|
+
declare const assets_getTransferableAmount: typeof getTransferableAmount;
|
|
1345
1410
|
declare const assets_hasSupportForAsset: typeof hasSupportForAsset;
|
|
1346
1411
|
declare const assets_isNodeEvm: typeof isNodeEvm;
|
|
1347
1412
|
declare namespace assets {
|
|
1348
|
-
export { assets_Foreign as Foreign, assets_ForeignAbstract as ForeignAbstract, assets_Native as Native, assets_Override as Override, assets_claimAssets as claimAssets, assets_getAllAssetsSymbols as getAllAssetsSymbols, assets_getAssetBalance as getAssetBalance, assets_getAssetDecimals as getAssetDecimals, assets_getAssetId as getAssetId, assets_getAssets as getAssets, assets_getAssetsObject as getAssetsObject, assets_getBalanceForeign as getBalanceForeign, assets_getBalanceNative as getBalanceNative, assets_getExistentialDeposit as getExistentialDeposit, assets_getNativeAssetSymbol as getNativeAssetSymbol, assets_getNativeAssets as getNativeAssets, assets_getOriginFeeDetails as getOriginFeeDetails, assets_getOtherAssets as getOtherAssets, assets_getRelayChainSymbol as getRelayChainSymbol, assets_getSupportedAssets as getSupportedAssets, assets_getTNode as getTNode, assets_getTransferInfo as getTransferInfo, assets_hasSupportForAsset as hasSupportForAsset, assets_isNodeEvm as isNodeEvm };
|
|
1413
|
+
export { assets_Foreign as Foreign, assets_ForeignAbstract as ForeignAbstract, assets_Native as Native, assets_Override as Override, assets_claimAssets as claimAssets, assets_getAllAssetsSymbols as getAllAssetsSymbols, assets_getAssetBalance as getAssetBalance, assets_getAssetDecimals as getAssetDecimals, assets_getAssetId as getAssetId, assets_getAssets as getAssets, assets_getAssetsObject as getAssetsObject, assets_getBalanceForeign as getBalanceForeign, assets_getBalanceNative as getBalanceNative, assets_getExistentialDeposit as getExistentialDeposit, assets_getMaxForeignTransferableAmount as getMaxForeignTransferableAmount, assets_getMaxNativeTransferableAmount as getMaxNativeTransferableAmount, assets_getNativeAssetSymbol as getNativeAssetSymbol, assets_getNativeAssets as getNativeAssets, assets_getOriginFeeDetails as getOriginFeeDetails, assets_getOtherAssets as getOtherAssets, assets_getRelayChainSymbol as getRelayChainSymbol, assets_getSupportedAssets as getSupportedAssets, assets_getTNode as getTNode, assets_getTransferInfo as getTransferInfo, assets_getTransferableAmount as getTransferableAmount, assets_hasSupportForAsset as hasSupportForAsset, assets_isNodeEvm as isNodeEvm };
|
|
1349
1414
|
}
|
|
1350
1415
|
|
|
1351
1416
|
/**
|
|
@@ -1709,4 +1774,4 @@ declare const getNodeProvider: (node: TNodeDotKsmWithRelayChains) => string;
|
|
|
1709
1774
|
*/
|
|
1710
1775
|
declare const getParaId: (node: TNodeDotKsmWithRelayChains) => number;
|
|
1711
1776
|
|
|
1712
|
-
export { BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, EvmBuilder, type Extrinsic, Foreign, ForeignAbstract, GeneralBuilder, type IPolkadotXCMTransfer, 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, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TAsset, type TAssetJsonMap, type TBatchOptions, type TBifrostToken, type TCheckKeepAliveOptions, type TCurrency, type TCurrencyCore, type TCurrencyCoreV1, type TCurrencyInput, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TCurrencySelectionV4, type TCurrencySymbol, type TCurrencySymbolValue, type TDestWeight, type TDestination, type TEdJsonMap, type TEvmBuilderOptions, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type THexString$1 as THexString, type TJunction, type TJunctionParachain, type TJunctionType, type TJunctions, type TMantaAsset, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, 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 TPalletJsonMap, type TPalletMap, type TPjsApi, type TPjsApiOrUrl, type TPolkadotXCMTransferOptions, type TPolkadotXcmSection, type TProviderEntry, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaDestination, type TRelayToParaOptions, type TRelayToParaOverrides, 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, type UseKeepAliveFinalBuilder, Version, assets, buildEthTransferOptions, claimAssets, createApiInstanceForNode, createPolkadotJsApiCall, determineRelayChain, getAllAssetsSymbols, getAssetBalance, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProvider, getNodeProviders, getOriginFeeDetails, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, isForeignAsset, isNodeEvm, isRelayChain, send, transferRelayToPara, transfer as xcmPallet };
|
|
1777
|
+
export { BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, EvmBuilder, type Extrinsic, Foreign, ForeignAbstract, GeneralBuilder, type IPolkadotXCMTransfer, 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, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TAsset, type TAssetJsonMap, type TBatchOptions, type TBifrostToken, type TCheckKeepAliveOptions, type TCurrency, type TCurrencyCore, type TCurrencyCoreV1, type TCurrencyInput, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TCurrencySelectionV4, type TCurrencySymbol, type TCurrencySymbolValue, type TDestWeight, type TDestination, type TEdJsonMap, type TEvmBuilderOptions, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type THexString$1 as THexString, type TJunction, type TJunctionParachain, type TJunctionType, type TJunctions, type TMantaAsset, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, 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 TPalletJsonMap, type TPalletMap, type TPjsApi, type TPjsApiOrUrl, type TPolkadotXCMTransferOptions, type TPolkadotXcmSection, type TProviderEntry, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaDestination, type TRelayToParaOptions, type TRelayToParaOverrides, 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, type UseKeepAliveFinalBuilder, Version, assets, buildEthTransferOptions, claimAssets, createApiInstanceForNode, createPolkadotJsApiCall, determineRelayChain, getAllAssetsSymbols, getAssetBalance, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProvider, getNodeProviders, getOriginFeeDetails, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getTNode, getTransferInfo, getTransferableAmount, hasSupportForAsset, isForeignAsset, isNodeEvm, isRelayChain, send, transferRelayToPara, transfer as xcmPallet };
|