@paraspell/sdk 12.8.3 → 12.8.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/README.md CHANGED
@@ -45,34 +45,40 @@ pnpm | npm install || yarn add polkadot-api
45
45
  pnpm | npm install || yarn add @paraspell/sdk
46
46
  ```
47
47
 
48
+ ### Install Swap extension
49
+
50
+ If you plan to do Swap XCMs you can install Swap package which allows you to do cross-chain swaps on popular Polkadot, Kusama, Paseo, Westend exchanges. Only available in PAPI version of SDK.
51
+
52
+ > [!IMPORTANT]
53
+ > - ⚠️ **WebAssembly (Wasm) must be enabled in your project** because of the Hydration SDK (One of the exchanges implemented in XCM Router). Wasm can be enabled either through the web application configuration or through the appropriate plugin. Additionally, Hydration requires the use of the **augment package** (see: https://github.com/galacticcouncil/sdk/issues/114).
54
+ >
55
+ > - ⚠️ **XCM Router has been migrated to the PAPI library.** If you used XCM Router prior to migration, replace the legacy Polkadot.js (PJS) injector with the PAPI signer and install the newly required peer dependency. Follow the setup guide for more information.
56
+
57
+ ```bash
58
+ pnpm | npm install || yarn add @paraspell/swap
59
+ ```
60
+
48
61
  ### Importing package to your project
49
62
 
50
- Builder pattern:
63
+ Named import:
51
64
  ```ts
52
- // Polkadot API version
53
65
  import { Builder } from '@paraspell/sdk'
54
66
  ```
55
67
 
56
- Other patterns:
68
+ Default import:
57
69
  ```ts
58
70
  // ESM
59
71
  import * as paraspell from '@paraspell/sdk'
60
72
  ```
61
73
 
62
- Interaction with further asset symbol abstraction:
63
- ```ts
64
- import { Native, Foreign, ForeignAbstract } from '@paraspell/sdk'; //Only needed when advanced asset symbol selection is used.
65
- ```
66
74
  ## Implementation
67
75
 
68
76
  > [!NOTE]
69
- > - Brand new asset decimal abstraction introduced. It can be turned on in Builder config. Will be turned on by default in next major release.
70
- > - V11 > V12 Migration guide https://paraspell.github.io/docs/migration/v11-to-v12.html
71
- >
72
- > **Latest news:**
73
- > - You can now pass signer directly into senderAddress parameter
74
77
  > - The local transfers now have additional builder parameter called keepAlive
75
78
  > - Transact is here! Find out more: https://paraspell.github.io/docs/sdk/xcmPallet.html#transact
79
+ >
80
+ > **Latest news:**
81
+ > - Swap is here! Find out more: https://paraspell.github.io/docs/sdk/xcmPallet.html#swap
76
82
 
77
83
  ### Sending XCM
78
84
  For full documentation on XCM Transfers head over to [official documentation](https://paraspell.github.io/docs/sdk/xcmPallet.html).
@@ -155,7 +161,7 @@ await builder.disconnect()
155
161
  const builder = Builder(/*client | builder_config | ws_url | [ws_url, ws_url,..] - Optional*/)
156
162
  .from(TSubstrateChain) // 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
157
163
  .to(TChain) // Has to be same as origin (from)
158
- .currency(CURRENCY_SPEC) // Refer to currency spec options below
164
+ .currency({id: currencyID, amount: amount /*Use "ALL" to transfer everything*/} | {symbol: currencySymbol, amount: amount /*Use "ALL" to transfer everything*/} | {symbol: Native('currencySymbol'), amount: amount /*Use "ALL" to transfer everything*/} | {symbol: Foreign('currencySymbol'), amount: amount /*Use "ALL" to transfer everything*/} | {symbol: ForeignAbstract('currencySymbol'), amount: amount /*Use "ALL" to transfer everything*/} | {location: AssetLocationString, amount: amount /*Use "ALL" to transfer everything*/ | AssetLocationJson, amount: amount /*Use "ALL" to transfer everything*/} | {location: Override('Custom Location'), amount: amount /*Use "ALL" to transfer everything*/})
159
165
  .senderAddress(senderAddress | PAPI SIGNER)
160
166
  .address(address)
161
167
  .transact(hex, /* originType, TWeight - Optional */)
@@ -168,6 +174,32 @@ const tx = await builder.build()
168
174
  await builder.disconnect()
169
175
  ```
170
176
 
177
+ #### Swap
178
+
179
+ ```ts
180
+ const builder = Builder(/*client | builder_config |ws_url | [ws_url, ws_url,..] - Optional*/)
181
+ .from(TSubstrateChain) // 'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
182
+ .to(TChain /*,customParaId - optional*/ | Location object /*Only works for PolkadotXCM pallet*/) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
183
+ .currency({id: currencyID, amount: amount /*Use "ALL" to transfer everything*/} | {symbol: currencySymbol, amount: amount /*Use "ALL" to transfer everything*/} | {symbol: Native('currencySymbol'), amount: amount /*Use "ALL" to transfer everything*/} | {symbol: Foreign('currencySymbol'), amount: amount /*Use "ALL" to transfer everything*/} | {symbol: ForeignAbstract('currencySymbol'), amount: amount /*Use "ALL" to transfer everything*/} | {location: AssetLocationString, amount: amount /*Use "ALL" to transfer everything*/ | AssetLocationJson, amount: amount /*Use "ALL" to transfer everything*/} | {location: Override('Custom Location'), amount: amount /*Use "ALL" to transfer everything*/})
184
+ .address(address | Location object /*If you are sending through xTokens, you need to pass the destination and address location in one object (x2)*/)
185
+ .senderAddress(address | PAPI_SIGNER /*Only in PAPI SDK*/ | {address, PJS_SIGNER} /*Only in PJS SDK*/) // - OPTIONAL but strongly recommended as it is automatically ignored when not needed - Used when origin is AssetHub/Hydration with feeAsset or when sending to AssetHub to prevent asset traps by auto-swapping to DOT to have DOT ED.
186
+ .swap({
187
+ currencyTo: {id: currencyID, amount: amount /*Use "ALL" to transfer everything*/} | {symbol: currencySymbol, amount: amount /*Use "ALL" to transfer everything*/} | {symbol: Native('currencySymbol'), amount: amount /*Use "ALL" to transfer everything*/} | {symbol: Foreign('currencySymbol'), amount: amount /*Use "ALL" to transfer everything*/} | {symbol: ForeignAbstract('currencySymbol'), amount: amount /*Use "ALL" to transfer everything*/} | {location: AssetLocationString, amount: amount /*Use "ALL" to transfer everything*/ | AssetLocationJson, amount: amount /*Use "ALL" to transfer everything*/} | {location: Override('Custom Location'), amount: amount /*Use "ALL" to transfer everything*/}
188
+ // exchange: ['AssetHubPolkadotDex'], - Optional parameter - 'HydrationDex' | 'AcalaDex' | 'AssetHubPolkadotDex' | ...
189
+ // slippage: 1, - Optional - 1 by default
190
+ // evmSenderAddress: '0x000', - Optional parameter when origin CHAIN is EVM based (Required with evmSigner)
191
+ // evmSigner: Signer, - Optional parameter when origin CHAIN is EVM based (Required with evmInjectorAddress)
192
+ // onStatusChange: (event) => void - Optional parameter for callback events when sender address is supplied as signer
193
+ })
194
+
195
+ const tx = await builder.buildAll()
196
+ // Or if you use signers in senderAddress:
197
+ // await builder.signAndSubmit() - Signs and submits the transaction; returns TX hash for tracking
198
+
199
+ // Make sure to disconnect API after it is no longer used (eg. after transaction)
200
+ await builder.disconnect()
201
+ ```
202
+
171
203
  #### Dry run your XCM Calls:
172
204
 
173
205
  ```ts
@@ -176,7 +208,15 @@ const result = await Builder(/*chain api/builder_config/ws_url_string/ws_url_arr
176
208
  .from(TSubstrateChain)
177
209
  .to(TChain)
178
210
  .currency({id: currencyID, amount: amount /*Use "ALL" to transfer everything*/} | {symbol: currencySymbol, amount: amount /*Use "ALL" to transfer everything*/} | {symbol: Native('currencySymbol'), amount: amount /*Use "ALL" to transfer everything*/} | {symbol: Foreign('currencySymbol'), amount: amount /*Use "ALL" to transfer everything*/} | {symbol: ForeignAbstract('currencySymbol'), amount: amount /*Use "ALL" to transfer everything*/} | {location: AssetLocationString, amount: amount /*Use "ALL" to transfer everything*/ | AssetLocationJson, amount: amount /*Use "ALL" to transfer everything*/} | {location: Override('Custom Location'), amount: amount /*Use "ALL" to transfer everything*/} | {[{currencySelection, isFeeAsset?: true /* for example symbol: symbol or id: id, or Location: Location*/, amount: amount /*Use "ALL" to transfer everything*/}]})
179
- /*.feeAsset(CURRENCY) - Optional parameter when origin === AssetHubPolkadot and TX is supposed to be paid in same fee asset as selected currency.*/
211
+ /*.feeAsset(CURRENCY) - Optional parameter when origin === AssetHubPolkadot and TX is supposed to be paid in the same fee asset as selected currency.
212
+ .swap({
213
+ currencyTo: CURRENCY_SPEC, //Reffer to currency spec options above
214
+ // exchange: ['AssetHubPolkadotDex'], - Optional parameter - 'HydrationDex' | 'AcalaDex' | 'AssetHubPolkadotDex' | ...
215
+ // slippage: 1, - Optional - 1 by default
216
+ // evmSenderAddress: '0x000', - Optional parameter when origin CHAIN is EVM based (Required with evmSigner)
217
+ // evmSigner: Signer, - Optional parameter when origin CHAIN is EVM based (Required with evmInjectorAddress)
218
+ // onStatusChange: (event) => void - Optional parameter for callback events when sender address is supplied as signer
219
+ })*/
180
220
  .address(ADDRESS)
181
221
  .senderAddress(address | PAPI_SIGNER)
182
222
  .dryRun()
@@ -280,7 +320,15 @@ const fee = await Builder(/*chain api/builder_config/ws_url_string/ws_url_array
280
320
  .from(TSubstrateChain)
281
321
  .to(TChain)
282
322
  .currency(CURRENCY_SPEC)
283
- /*.feeAsset(CURRENCY) - Optional parameter when origin === AssetHubPolkadot and TX is supposed to be paid in the same fee asset as selected currency.*/
323
+ /*.feeAsset(CURRENCY) - Optional parameter when origin === AssetHubPolkadot and TX is supposed to be paid in the same fee asset as selected currency.
324
+ .swap({
325
+ currencyTo: CURRENCY_SPEC, //Reffer to currency spec options above
326
+ // exchange: ['AssetHubPolkadotDex'], - Optional parameter - 'HydrationDex' | 'AcalaDex' | 'AssetHubPolkadotDex' | ...
327
+ // slippage: 1, - Optional - 1 by default
328
+ // evmSenderAddress: '0x000', - Optional parameter when origin CHAIN is EVM based (Required with evmSigner)
329
+ // evmSigner: Signer, - Optional parameter when origin CHAIN is EVM based (Required with evmInjectorAddress)
330
+ // onStatusChange: (event) => void - Optional parameter for callback events when sender address is supplied as signer
331
+ })*/
284
332
  .address(RECIPIENT_ADDRESS)
285
333
  .senderAddress(address | PAPI_SIGNER)
286
334
  .getXcmFee(/*{disableFallback: true / false}*/) //Fallback is optional. When fallback is disabled, you only get notified of a DryRun error, but no Payment info query fallback is performed. Payment info is still performed if Origin or Destination chain do not support DryRun out of the box.
@@ -317,7 +365,15 @@ const transferable = await Builder(/*chain api/builder_config/ws_url_string/ws_u
317
365
  .from(TSubstrateChain)
318
366
  .to(TChain)
319
367
  .currency(CURRENCY_SPEC)
320
- /*.feeAsset(CURRENCY) - Optional parameter when origin === AssetHubPolkadot and TX is supposed to be paid in the same fee asset as selected currency.*/
368
+ /*.feeAsset(CURRENCY) - Optional parameter when origin === AssetHubPolkadot and TX is supposed to be paid in the same fee asset as selected currency.
369
+ .swap({
370
+ currencyTo: CURRENCY_SPEC, //Reffer to currency spec options above
371
+ // exchange: ['AssetHubPolkadotDex'], - Optional parameter - 'HydrationDex' | 'AcalaDex' | 'AssetHubPolkadotDex' | ...
372
+ // slippage: 1, - Optional - 1 by default
373
+ // evmSenderAddress: '0x000', - Optional parameter when origin CHAIN is EVM based (Required with evmSigner)
374
+ // evmSigner: Signer, - Optional parameter when origin CHAIN is EVM based (Required with evmInjectorAddress)
375
+ // onStatusChange: (event) => void - Optional parameter for callback events when sender address is supplied as signer
376
+ })*/
321
377
  .address(RECIPIENT_ADDRESS)
322
378
  .senderAddress(address | PAPI_SIGNER)
323
379
  .getTransferableAmount()
@@ -329,7 +385,15 @@ const transferable = await Builder(/*chain api/builder_config/ws_url_string/ws_u
329
385
  .from(TSubstrateChain)
330
386
  .to(TChain)
331
387
  .currency(CURRENCY_SPEC)
332
- /*.feeAsset(CURRENCY) - Optional parameter when origin === AssetHubPolkadot and TX is supposed to be paid in the same fee asset as selected currency.*/
388
+ /*.feeAsset(CURRENCY) - Optional parameter when origin === AssetHubPolkadot and TX is supposed to be paid in the same fee asset as selected currency.
389
+ .swap({
390
+ currencyTo: CURRENCY_SPEC, //Reffer to currency spec options above
391
+ // exchange: ['AssetHubPolkadotDex'], - Optional parameter - 'HydrationDex' | 'AcalaDex' | 'AssetHubPolkadotDex' | ...
392
+ // slippage: 1, - Optional - 1 by default
393
+ // evmSenderAddress: '0x000', - Optional parameter when origin CHAIN is EVM based (Required with evmSigner)
394
+ // evmSigner: Signer, - Optional parameter when origin CHAIN is EVM based (Required with evmInjectorAddress)
395
+ // onStatusChange: (event) => void - Optional parameter for callback events when sender address is supplied as signer
396
+ })*/
333
397
  .address(RECIPIENT_ADDRESS)
334
398
  .senderAddress(address | PAPI_SIGNER)
335
399
  .getMinTransferableAmount()
@@ -359,6 +423,26 @@ const ed = await Builder(/*chain api/builder_config/ws_url_string/ws_url_array -
359
423
  .verifyEdOnDestination()
360
424
  ```
361
425
 
426
+ #### Get best amount out
427
+
428
+ ```ts
429
+ const result = await Builder(/*chain api/builder_config/ws_url_string/ws_url_array - optional*/)
430
+ .from(TSubstrateChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
431
+ .to(TChain) //'AssetHubPolkadot' | 'Hydration' | 'Moonbeam' | 'Polkadot' | ... https://paraspell.github.io/docs/sdk/AssetPallet.html#import-chains-as-types
432
+ .currency(CURRENCY_SPEC)
433
+ .address(RECIPIENT_ADDRESS)
434
+ .senderAddress(SENDER_ADDRESS)
435
+ .swap({
436
+ currencyTo: CURRENCY_SPEC,
437
+ // exchange: ['AssetHubPolkadotDex'], - Optional parameter - 'HydrationDex' | 'AcalaDex' | 'AssetHubPolkadotDex' | ...
438
+ // slippage: 1, - Optional - 1 by default
439
+ // evmSenderAddress: '0x000', - Optional parameter when origin CHAIN is EVM based (Required with evmSigner)
440
+ // evmSigner: Signer, - Optional parameter when origin CHAIN is EVM based (Required with evmInjectorAddress)
441
+ // onStatusChange: (event) => void - Optional parameter for callback events when sender address is supplied as signer
442
+ })
443
+ .getBestAmountOut();
444
+ ```
445
+
362
446
  #### Asset balance
363
447
  ```ts
364
448
  import { getBalance } from "@paraspell/sdk";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _paraspell_sdk_core from '@paraspell/sdk-core';
2
- import { TApiOrUrl, TEvmChainFrom, Foreign, ForeignAbstract, Native, Override, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, TSubstrateChain, TEvmBuilderOptions, TChain, TCurrencyInputWithAmount, TBuilderOptions, GeneralBuilder as GeneralBuilder$1, TSendBaseOptions, TGetXcmFeeBaseOptions, TCreateBaseSwapXcmOptions } from '@paraspell/sdk-core';
2
+ import { TApiOrUrl, TEvmChainFrom, TSwapEvent as TSwapEvent$1, Foreign, ForeignAbstract, Native, Override, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, TSubstrateChain, TEvmBuilderOptions, TChain, TCurrencyInputWithAmount, TBuilderOptions, GeneralBuilder as GeneralBuilder$1, TSendBaseOptions, TGetXcmFeeBaseOptions, TCreateBaseSwapXcmOptions } from '@paraspell/sdk-core';
3
3
  export * from '@paraspell/sdk-core';
4
4
  import * as polkadot_api from 'polkadot-api';
5
5
  import { PolkadotClient, UnsafeTransaction, PolkadotSigner } from 'polkadot-api';
@@ -10,6 +10,7 @@ type TPapiApiOrUrl = TApiOrUrl<PolkadotClient>;
10
10
  type TPapiSigner = PolkadotSigner;
11
11
  type TPapiTransaction = UnsafeTransaction<any, string, string, any>;
12
12
  type TEvmChainFromPapi = Extract<TEvmChainFrom, 'Moonbeam' | 'Moonriver' | 'Darwinia'>;
13
+ type TSwapEvent = TSwapEvent$1<TPapiApi, TPapiTransaction>;
13
14
 
14
15
  /**
15
16
  * Retrieves the asset balance for a given account on a specified chain.
@@ -148,21 +149,11 @@ declare class EvmBuilderCore<TApi, TRes, TSigner, T extends Partial<TEvmBuilderO
148
149
  * @returns A new Builder instance.
149
150
  */
150
151
  declare const Builder: (api?: TBuilderOptions<TPapiApiOrUrl>) => GeneralBuilder$1<PolkadotClient, TPapiTransaction, PolkadotSigner, object>;
151
- type GeneralBuilder<T extends Partial<TSendBaseOptions<TPapiTransaction>> = object> = GeneralBuilder$1<PolkadotClient, TPapiTransaction, PolkadotSigner, T>;
152
+ type GeneralBuilder<T extends Partial<TSendBaseOptions<TPapiApi, TPapiTransaction, TPapiSigner>> = object> = GeneralBuilder$1<PolkadotClient, TPapiTransaction, PolkadotSigner, T>;
152
153
  declare const EvmBuilder: (api?: TBuilderOptions<TPapiApiOrUrl>) => EvmBuilderCore<unknown, unknown, unknown, {
153
154
  api: _paraspell_sdk_core.IPolkadotApi<PolkadotClient, TPapiTransaction, PolkadotSigner>;
154
155
  }>;
155
156
 
156
- /**
157
- * Transfers assets from parachain to another parachain or from/to relay chain.
158
- * @param options - The transfer options.
159
- * @returns An extrinsic to be signed and sent.
160
- */
161
- declare const send: (options: _paraspell_sdk_core.TSendBaseOptions<TPapiTransaction> & {
162
- isAmountAll: boolean;
163
- } & {
164
- api?: TPapiApiOrUrl;
165
- }) => Promise<TPapiTransaction>;
166
157
  declare const dryRun: (options: _paraspell_sdk_core.TDryRunBaseOptions<TPapiTransaction> & {
167
158
  api?: TPapiApiOrUrl;
168
159
  }) => Promise<_paraspell_sdk_core.TDryRunResult>;
@@ -190,7 +181,6 @@ declare const transfer_getOriginXcmFee: typeof getOriginXcmFee;
190
181
  declare const transfer_getParaEthTransferFees: typeof getParaEthTransferFees;
191
182
  declare const transfer_getXcmFee: typeof getXcmFee;
192
183
  declare const transfer_handleSwapExecuteTransfer: typeof handleSwapExecuteTransfer;
193
- declare const transfer_send: typeof send;
194
184
  declare namespace transfer {
195
185
  export {
196
186
  transfer_dryRun as dryRun,
@@ -200,7 +190,6 @@ declare namespace transfer {
200
190
  transfer_getParaEthTransferFees as getParaEthTransferFees,
201
191
  transfer_getXcmFee as getXcmFee,
202
192
  transfer_handleSwapExecuteTransfer as handleSwapExecuteTransfer,
203
- transfer_send as send,
204
193
  };
205
194
  }
206
195
 
@@ -209,5 +198,5 @@ declare const createChainClient: (chain: TSubstrateChain, api?: TBuilderOptions<
209
198
  declare const checkAndConvertToNumberOrBigInt: (input: string) => number | bigint;
210
199
  declare const transform: (obj: any) => any;
211
200
 
212
- export { Builder, EvmBuilder, assets, checkAndConvertToNumberOrBigInt, claimAssets, convertSs58, createChainClient, dryRun, dryRunOrigin, getBalance, getBridgeStatus, getOriginXcmFee, getParaEthTransferFees, getXcmFee, handleSwapExecuteTransfer, send, transform, transfer as xcmPallet };
213
- export type { GeneralBuilder, TEvmChainFromPapi, TPapiApi, TPapiApiOrUrl, TPapiSigner, TPapiTransaction };
201
+ export { Builder, EvmBuilder, assets, checkAndConvertToNumberOrBigInt, claimAssets, convertSs58, createChainClient, dryRun, dryRunOrigin, getBalance, getBridgeStatus, getOriginXcmFee, getParaEthTransferFees, getXcmFee, handleSwapExecuteTransfer, transform, transfer as xcmPallet };
202
+ export type { GeneralBuilder, TEvmChainFromPapi, TPapiApi, TPapiApiOrUrl, TPapiSigner, TPapiTransaction, TSwapEvent };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { isSenderSigner, getEvmPrivateKeyHex, NumberFormatError, createClientCache, createClientPoolHelpers, isConfig, getChainProviders, InvalidAddressError, BatchMode, findNativeAssetInfoOrThrow, MissingChainApiError, isExternalChain, Parents, findAssetInfoOrThrow, computeFeeFromDryRun, hasXcmPaymentApiSupport, replaceBigInt, getAssetsObject, RuntimeApiUnavailableError, wrapTxBypass, localizeLocation, isAssetXcEqual, addXcmVersionHeader, RELAY_LOCATION, getRelayChainOf, isRelayChain, padValueBy, isAssetEqual, createChainClient as createChainClient$1, getBalance as getBalance$1, claimAssets as claimAssets$1, Foreign, ForeignAbstract, Native, Override, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, convertSs58 as convertSs58$1, transferMoonbeamEvm, validateAddress, transferMoonbeamToEth, Builder as Builder$1, handleSwapExecuteTransfer as handleSwapExecuteTransfer$1, getBridgeStatus as getBridgeStatus$1, getParaEthTransferFees as getParaEthTransferFees$1, getXcmFee as getXcmFee$1, send as send$1, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1, getOriginXcmFee as getOriginXcmFee$1 } from '@paraspell/sdk-core';
1
+ import { isSenderSigner, getEvmPrivateKeyHex, NumberFormatError, createClientCache, createClientPoolHelpers, isConfig, getChainProviders, InvalidAddressError, BatchMode, findNativeAssetInfoOrThrow, MissingChainApiError, isExternalChain, Parents, findAssetInfoOrThrow, computeFeeFromDryRun, hasXcmPaymentApiSupport, replaceBigInt, getAssetsObject, RuntimeApiUnavailableError, wrapTxBypass, localizeLocation, isAssetXcEqual, addXcmVersionHeader, RELAY_LOCATION, getRelayChainOf, isRelayChain, padValueBy, isAssetEqual, createChainClient as createChainClient$1, getBalance as getBalance$1, claimAssets as claimAssets$1, Foreign, ForeignAbstract, Native, Override, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, convertSs58 as convertSs58$1, transferMoonbeamEvm, validateAddress, transferMoonbeamToEth, Builder as Builder$1, handleSwapExecuteTransfer as handleSwapExecuteTransfer$1, getBridgeStatus as getBridgeStatus$1, getParaEthTransferFees as getParaEthTransferFees$1, getXcmFee as getXcmFee$1, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1, getOriginXcmFee as getOriginXcmFee$1 } from '@paraspell/sdk-core';
2
2
  export * from '@paraspell/sdk-core';
3
3
  import { secp256k1 } from '@noble/curves/secp256k1.js';
4
4
  import { keccak_256 } from '@noble/hashes/sha3.js';
@@ -626,6 +626,11 @@ var PapiApi = /*#__PURE__*/function () {
626
626
  this._config = config;
627
627
  }
628
628
  return _createClass(PapiApi, [{
629
+ key: "getType",
630
+ value: function getType() {
631
+ return 'PAPI';
632
+ }
633
+ }, {
629
634
  key: "getConfig",
630
635
  value: function getConfig() {
631
636
  return this._config;
@@ -1947,12 +1952,6 @@ var EvmBuilder = function EvmBuilder(api) {
1947
1952
  return EvmBuilder$1(papiApi);
1948
1953
  };
1949
1954
 
1950
- /**
1951
- * Transfers assets from parachain to another parachain or from/to relay chain.
1952
- * @param options - The transfer options.
1953
- * @returns An extrinsic to be signed and sent.
1954
- */
1955
- var send = createPapiApiCall(send$1);
1956
1955
  var dryRun = createPapiApiCall(dryRun$1);
1957
1956
  var dryRunOrigin = createPapiApiCall(dryRunOrigin$1);
1958
1957
  var getParaEthTransferFees = /*#__PURE__*/function () {
@@ -2024,8 +2023,7 @@ var transfer = /*#__PURE__*/Object.freeze({
2024
2023
  getOriginXcmFee: getOriginXcmFee,
2025
2024
  getParaEthTransferFees: getParaEthTransferFees,
2026
2025
  getXcmFee: getXcmFee,
2027
- handleSwapExecuteTransfer: handleSwapExecuteTransfer,
2028
- send: send
2026
+ handleSwapExecuteTransfer: handleSwapExecuteTransfer
2029
2027
  });
2030
2028
 
2031
- export { Builder, EvmBuilder, assets, checkAndConvertToNumberOrBigInt, claimAssets, convertSs58, createChainClient, dryRun, dryRunOrigin, getBalance, getBridgeStatus, getOriginXcmFee, getParaEthTransferFees, getXcmFee, handleSwapExecuteTransfer, send, _transform as transform, transfer as xcmPallet };
2029
+ export { Builder, EvmBuilder, assets, checkAndConvertToNumberOrBigInt, claimAssets, convertSs58, createChainClient, dryRun, dryRunOrigin, getBalance, getBridgeStatus, getOriginXcmFee, getParaEthTransferFees, getXcmFee, handleSwapExecuteTransfer, _transform as transform, transfer as xcmPallet };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk",
3
- "version": "12.8.3",
3
+ "version": "12.8.5",
4
4
  "description": "SDK for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "@polkadot-labs/hdkd": "^0.0.26",
29
29
  "@polkadot-labs/hdkd-helpers": "^0.0.27",
30
30
  "viem": "2.46.3",
31
- "@paraspell/sdk-core": "12.8.3"
31
+ "@paraspell/sdk-core": "12.8.5"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "polkadot-api": ">= 1.23.3 < 2"