@paraspell/evm 13.4.0 → 13.5.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.d.ts CHANGED
@@ -1,7 +1,10 @@
1
- import { TEvmTransferOptions } from '@paraspell/sdk-core';
1
+ import { TBuildEvmTransferOptions, TEvmTransferOptions } from '@paraspell/sdk-core';
2
+ import { TransactionSerializableEIP1559 } from 'viem';
3
+
4
+ declare const buildEvmTransfer: <TApi, TRes, TSigner>(options: TBuildEvmTransferOptions<TApi, TRes, TSigner>) => Promise<TransactionSerializableEIP1559>;
2
5
 
3
6
  declare const executeEvmTransfer: <TApi, TRes, TSigner>(options: TEvmTransferOptions<TApi, TRes, TSigner>) => Promise<string>;
4
7
 
5
8
  declare const EVM_ORIGIN_CHAINS: readonly ["Moonbeam", "Moonriver", "Darwinia"];
6
9
 
7
- export { EVM_ORIGIN_CHAINS, executeEvmTransfer };
10
+ export { EVM_ORIGIN_CHAINS, buildEvmTransfer, executeEvmTransfer };
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
- import { getAssetsObject, getChainConfig, assertHasId, findAssetInfoOrThrow, formatAssetIdToERC20, InvalidCurrencyError, getNativeAssetSymbol, abstractDecimals, isOverrideLocationSpecifier, UnsupportedOperationError, getParaId, getParaEthTransferFees, Version, createCustomXcmOnDest, generateMessageId, assertSender, TX_CLIENT_TIMEOUT_MS, BridgeHaltedError, getBridgeStatus, MissingParameterError, NumberFormatError, validateAddress, registerEvmExtension } from '@paraspell/sdk-core';
2
- import { getContract, createPublicClient, http } from 'viem';
1
+ import { UnsupportedOperationError, assertHasId, assertEvmAddress, getAssetsObject, getParaId, isOverrideLocationSpecifier, findAssetInfoOrThrow, abstractDecimals, getNativeAssetSymbol, InvalidCurrencyError, formatAssetIdToERC20, parseUnits, getParaEthTransferFees, pickCompatibleXcmVersion, createCustomXcmOnDest, createAsset, generateMessageId, TX_CLIENT_TIMEOUT_MS, BridgeHaltedError, getBridgeStatus, MissingParameterError, NumberFormatError, registerEvmExtension } from '@paraspell/sdk-core';
2
+ import { encodeFunctionData, maxUint64 } from 'viem';
3
+ import { darwinia, moonriver, moonbeam } from 'viem/chains';
3
4
 
4
5
  function _arrayLikeToArray(r, a) {
5
6
  (null == a || a > r.length) && (a = r.length);
@@ -223,6 +224,19 @@ function _unsupportedIterableToArray(r, a) {
223
224
  }
224
225
  }
225
226
 
227
+ var EVM_VIEM_CHAIN_BY_ORIGIN = {
228
+ Moonbeam: moonbeam,
229
+ Moonriver: moonriver,
230
+ Darwinia: darwinia
231
+ };
232
+ var getViemChain = function getViemChain(chain) {
233
+ var viemChain = EVM_VIEM_CHAIN_BY_ORIGIN[chain];
234
+ if (!viemChain) {
235
+ throw new UnsupportedOperationError("No viem chain registered for '".concat(chain, "'."));
236
+ }
237
+ return viemChain;
238
+ };
239
+
226
240
  var abi$2 = [
227
241
  {
228
242
  inputs: [
@@ -320,19 +334,6 @@ var abi$2 = [
320
334
  }
321
335
  ];
322
336
 
323
- // Partially inspired by Moonbeam XCM-SDK
324
- // https://github.com/moonbeam-foundation/xcm-sdk/blob/ab835c15bf41612604b1c858d956a9f07705ed65/packages/builder/src/contract/contracts/Xtokens/Xtokens.ts#L126
325
- var getDestinationLocation = function getDestinationLocation(api, address, destination) {
326
- var _getAssetsObject = getAssetsObject(destination),
327
- isEVM = _getAssetsObject.isEVM;
328
- var accountType = isEVM ? '03' : '01';
329
- var addressHex = api.accountToHex(address, false);
330
- var acc = "0x".concat(accountType).concat(addressHex, "00");
331
- var _getChainConfig = getChainConfig(destination),
332
- paraId = _getChainConfig.paraId;
333
- return [1, paraId ? ["0x0000000".concat(paraId.toString(16)), acc] : [acc]];
334
- };
335
-
336
337
  var abi$1 = [{
337
338
  inputs: [{
338
339
  internalType: 'address',
@@ -352,132 +353,94 @@ var abi$1 = [{
352
353
  stateMutability: 'nonpayable',
353
354
  type: 'function'
354
355
  }];
355
- var transferMoonbeamLocal = /*#__PURE__*/function () {
356
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(client, assetInfo, _ref) {
357
- var signer, recipient, contract;
358
- return _regenerator().w(function (_context) {
359
- while (1) switch (_context.n) {
360
- case 0:
361
- signer = _ref.signer, recipient = _ref.recipient;
362
- assertHasId(assetInfo);
363
- contract = getContract({
364
- abi: abi$1,
365
- address: assetInfo.assetId,
366
- client: {
367
- "public": client,
368
- wallet: signer
369
- }
370
- });
371
- return _context.a(2, contract.write.transfer([recipient, assetInfo.amount]));
372
- }
373
- }, _callee);
374
- }));
375
- return function transferMoonbeamLocal(_x, _x2, _x3) {
376
- return _ref2.apply(this, arguments);
356
+ var buildMoonbeamLocal = function buildMoonbeamLocal(from, assetInfo, recipient) {
357
+ assertHasId(assetInfo);
358
+ assertEvmAddress(recipient);
359
+ assertEvmAddress(assetInfo.assetId);
360
+ var data = encodeFunctionData({
361
+ abi: abi$1,
362
+ functionName: 'transfer',
363
+ args: [recipient, assetInfo.amount]
364
+ });
365
+ return {
366
+ type: 'eip1559',
367
+ chainId: getViemChain(from).id,
368
+ to: assetInfo.assetId,
369
+ data: data,
370
+ value: 0n
377
371
  };
378
- }();
372
+ };
373
+
374
+ // Partially inspired by Moonbeam XCM-SDK
375
+ // https://github.com/moonbeam-foundation/xcm-sdk/blob/ab835c15bf41612604b1c858d956a9f07705ed65/packages/builder/src/contract/contracts/Xtokens/Xtokens.ts#L126
376
+ var getDestinationLocation = function getDestinationLocation(api, address, destination) {
377
+ var _getAssetsObject = getAssetsObject(destination),
378
+ isEVM = _getAssetsObject.isEVM;
379
+ var accountType = isEVM ? '03' : '01';
380
+ var addressHex = api.accountToHex(address, false);
381
+ var acc = "0x".concat(accountType).concat(addressHex, "00");
382
+ var paraId = getParaId(destination);
383
+ return [1, paraId ? ["0x0000000".concat(paraId.toString(16)), acc] : [acc]];
384
+ };
379
385
 
380
- var U_64_MAX = 18446744073709551615n;
381
386
  var CONTRACT_ADDRESS = '0x0000000000000000000000000000000000000804';
382
387
  var NATIVE_ASSET_ID = '0x0000000000000000000000000000000000000802';
383
- // Partially inspired by Moonbeam XCM-SDK
384
- var transferMoonbeamEvm = /*#__PURE__*/function () {
385
- var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(options) {
386
- var _usdtAsset$assetId;
387
- var api, from, to, signer, recipient, currency, foundAsset, amount, client, contract, asset, destLocation, weight, createTx, multiCurrencySymbols, useMultiAssets, usdtAsset, tx, _t;
388
- return _regenerator().w(function (_context) {
389
- while (1) switch (_context.n) {
390
- case 0:
391
- api = options.api, from = options.from, to = options.to, signer = options.signer, recipient = options.recipient, currency = options.currency;
392
- if (!Array.isArray(currency)) {
393
- _context.n = 1;
394
- break;
395
- }
396
- throw new UnsupportedOperationError('Multi-assets are not yet supported for EVM transfers');
397
- case 1:
398
- if (!('location' in currency && isOverrideLocationSpecifier(currency.location))) {
399
- _context.n = 2;
400
- break;
401
- }
402
- throw new UnsupportedOperationError('Override location is not supported for EVM transfers');
403
- case 2:
404
- foundAsset = findAssetInfoOrThrow(from, currency, to);
405
- amount = abstractDecimals(currency.amount, foundAsset.decimals, api);
406
- client = createPublicClient({
407
- chain: signer.chain,
408
- transport: http()
409
- });
410
- if (!(from === to)) {
411
- _context.n = 3;
412
- break;
413
- }
414
- return _context.a(2, transferMoonbeamLocal(client, _objectSpread2(_objectSpread2({}, foundAsset), {}, {
415
- amount: amount
416
- }), options));
417
- case 3:
418
- contract = getContract({
419
- abi: abi$2,
420
- address: CONTRACT_ADDRESS,
421
- client: {
422
- "public": client,
423
- wallet: signer
424
- }
425
- });
426
- if (!(foundAsset.symbol === getNativeAssetSymbol(from))) {
427
- _context.n = 4;
428
- break;
429
- }
430
- asset = NATIVE_ASSET_ID;
431
- _context.n = 6;
432
- break;
433
- case 4:
434
- if (!(foundAsset.assetId === undefined)) {
435
- _context.n = 5;
436
- break;
437
- }
438
- throw new InvalidCurrencyError('Currency must be a foreign asset with valid assetId');
439
- case 5:
440
- asset = formatAssetIdToERC20(foundAsset.assetId);
441
- case 6:
442
- destLocation = getDestinationLocation(api, recipient, to);
443
- weight = U_64_MAX; // Partially inspired by Moonbeam XCM-SDK
444
- // https://github.com/moonbeam-foundation/xcm-sdk/blob/ab835c15bf41612604b1c858d956a9f07705ed65/packages/sdk/src/contract/contracts/Xtokens/Xtokens.ts#L53
445
- createTx = function createTx(func, args) {
446
- return contract.write[func](args);
447
- };
448
- multiCurrencySymbols = ['xcPINK', 'xcDED', 'xcSTINK', 'xcWIFD', 'xcNCTR'];
449
- useMultiAssets = from === 'Moonbeam' && to === 'AssetHubPolkadot' && multiCurrencySymbols.includes(foundAsset.symbol);
450
- usdtAsset = findAssetInfoOrThrow(from, {
451
- symbol: 'xcUSDT'
452
- }, to);
453
- assertHasId(usdtAsset);
454
- if (!useMultiAssets) {
455
- _context.n = 8;
456
- break;
457
- }
458
- _context.n = 7;
459
- return createTx('transferMultiCurrencies', [[[asset, amount.toString()], [formatAssetIdToERC20((_usdtAsset$assetId = usdtAsset.assetId) !== null && _usdtAsset$assetId !== void 0 ? _usdtAsset$assetId : ''), '200000']], 1,
460
- // index of the fee asset
461
- destLocation, weight]);
462
- case 7:
463
- _t = _context.v;
464
- _context.n = 10;
465
- break;
466
- case 8:
467
- _context.n = 9;
468
- return createTx('transfer', [asset, amount.toString(), destLocation, weight]);
469
- case 9:
470
- _t = _context.v;
471
- case 10:
472
- tx = _t;
473
- return _context.a(2, tx);
474
- }
475
- }, _callee);
476
- }));
477
- return function transferMoonbeamEvm(_x) {
478
- return _ref.apply(this, arguments);
388
+ var buildMoonbeamEvm = function buildMoonbeamEvm(options) {
389
+ var api = options.api,
390
+ from = options.from,
391
+ to = options.to,
392
+ recipient = options.recipient,
393
+ currency = options.currency;
394
+ if (Array.isArray(currency)) {
395
+ throw new UnsupportedOperationError('Multi-assets are not yet supported for EVM transfers');
396
+ }
397
+ if ('location' in currency && isOverrideLocationSpecifier(currency.location)) {
398
+ throw new UnsupportedOperationError('Override location is not supported for EVM transfers');
399
+ }
400
+ var foundAsset = findAssetInfoOrThrow(from, currency, to);
401
+ var amount = abstractDecimals(currency.amount, foundAsset.decimals, api);
402
+ if (from === to) {
403
+ return buildMoonbeamLocal(from, _objectSpread2(_objectSpread2({}, foundAsset), {}, {
404
+ amount: amount
405
+ }), recipient);
406
+ }
407
+ var asset;
408
+ if (foundAsset.symbol === getNativeAssetSymbol(from)) {
409
+ asset = NATIVE_ASSET_ID;
410
+ } else {
411
+ if (foundAsset.assetId === undefined) {
412
+ throw new InvalidCurrencyError('Currency must be a foreign asset with valid assetId');
413
+ }
414
+ asset = formatAssetIdToERC20(foundAsset.assetId);
415
+ }
416
+ var destLocation = getDestinationLocation(api, recipient, to);
417
+ var weight = maxUint64;
418
+ var multiCurrencySymbols = ['xcPINK', 'xcDED', 'xcSTINK', 'xcWIFD', 'xcNCTR'];
419
+ var useMultiAssets = from === 'Moonbeam' && to === 'AssetHubPolkadot' && multiCurrencySymbols.includes(foundAsset.symbol);
420
+ var usdtAsset = findAssetInfoOrThrow(from, {
421
+ symbol: 'xcUSDT'
422
+ }, to);
423
+ assertHasId(usdtAsset);
424
+ var usdtAmount = parseUnits('0.2', usdtAsset.decimals);
425
+ var data = useMultiAssets ? encodeFunctionData({
426
+ abi: abi$2,
427
+ functionName: 'transferMultiCurrencies',
428
+ args: [[[asset, amount.toString()], [formatAssetIdToERC20(usdtAsset.assetId), usdtAmount.toString()]], 1,
429
+ // index of the fee asset
430
+ destLocation, weight]
431
+ }) : encodeFunctionData({
432
+ abi: abi$2,
433
+ functionName: 'transfer',
434
+ args: [asset, amount.toString(), destLocation, weight]
435
+ });
436
+ return {
437
+ type: 'eip1559',
438
+ chainId: getViemChain(from).id,
439
+ to: CONTRACT_ADDRESS,
440
+ data: data,
441
+ value: 0n
479
442
  };
480
- }();
443
+ };
481
444
 
482
445
  var abi = [
483
446
  {
@@ -548,14 +511,13 @@ var abi = [
548
511
  // https://github.com/moonbeam-foundation/moonbeam/blob/b2b1bde7ced13aad4bd2928effc415c521fd48cb/runtime/moonbeam/src/precompiles.rs#L281
549
512
  var xcmInterfacePrecompile = '0x000000000000000000000000000000000000081A';
550
513
  var XCDOT = '0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080';
551
- var transferMoonbeamToEth = /*#__PURE__*/function () {
552
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(from, _ref) {
553
- var _signer$account;
554
- var api, to, signer, recipient, ahAddress, currency, bridgeStatus, foundAsset, amount, ethAsset, contract, sender, messageId, version, customXcm, customXcmOnDest, assetHubApi, _yield$getParaEthTran, _yield$getParaEthTran2, bridgeFee, executionFee, transferFee, createTx, numberToHex32, tx;
514
+ var buildMoonbeamToEth = /*#__PURE__*/function () {
515
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(from, options) {
516
+ var api, to, sender, recipient, ahAddress, currency, bridgeStatus, foundAsset, amount, ethAsset, messageId, version, customXcm, customXcmOnDest, assetHubApi, _yield$getParaEthTran, _yield$getParaEthTran2, bridgeFee, executionFee, transferFee, numberToHex32, data;
555
517
  return _regenerator().w(function (_context) {
556
518
  while (1) switch (_context.n) {
557
519
  case 0:
558
- api = _ref.api, to = _ref.to, signer = _ref.signer, recipient = _ref.recipient, ahAddress = _ref.ahAddress, currency = _ref.currency;
520
+ api = options.api, to = options.to, sender = options.sender, recipient = options.recipient, ahAddress = options.ahAddress, currency = options.currency;
559
521
  if (ahAddress) {
560
522
  _context.n = 1;
561
523
  break;
@@ -589,19 +551,6 @@ var transferMoonbeamToEth = /*#__PURE__*/function () {
589
551
  ethAsset = findAssetInfoOrThrow('Ethereum', {
590
552
  symbol: foundAsset.symbol
591
553
  });
592
- contract = getContract({
593
- abi: abi,
594
- address: xcmInterfacePrecompile,
595
- client: {
596
- "public": createPublicClient({
597
- chain: signer.chain,
598
- transport: http()
599
- }),
600
- wallet: signer
601
- }
602
- });
603
- sender = (_signer$account = signer.account) === null || _signer$account === void 0 ? void 0 : _signer$account.address;
604
- assertSender(sender);
605
554
  assertHasId(ethAsset);
606
555
  _context.n = 6;
607
556
  return api.init(from, TX_CLIENT_TIMEOUT_MS);
@@ -610,7 +559,7 @@ var transferMoonbeamToEth = /*#__PURE__*/function () {
610
559
  return generateMessageId(api, sender, getParaId(from), ethAsset.assetId, recipient, amount);
611
560
  case 7:
612
561
  messageId = _context.v;
613
- version = Version.V4;
562
+ version = pickCompatibleXcmVersion(from, to);
614
563
  customXcm = createCustomXcmOnDest({
615
564
  api: api,
616
565
  chain: from,
@@ -623,7 +572,7 @@ var transferMoonbeamToEth = /*#__PURE__*/function () {
623
572
  amount: amount
624
573
  }),
625
574
  currency: currency,
626
- asset: {},
575
+ asset: createAsset(version, amount, ethAsset.location),
627
576
  beneficiaryLocation: {},
628
577
  version: version
629
578
  }, from, messageId, ethAsset);
@@ -642,58 +591,61 @@ var transferMoonbeamToEth = /*#__PURE__*/function () {
642
591
  _yield$getParaEthTran2 = _slicedToArray(_yield$getParaEthTran, 2);
643
592
  bridgeFee = _yield$getParaEthTran2[0];
644
593
  executionFee = _yield$getParaEthTran2[1];
645
- transferFee = (bridgeFee + executionFee).toString(); // Partially inspired by Moonbeam XCM-SDK
646
- // https://github.com/moonbeam-foundation/xcm-sdk/blob/ab835c15bf41612604b1c858d956a9f07705ed65/packages/sdk/src/contract/contracts/Xtokens/Xtokens.ts#L53
647
- createTx = function createTx(func, args) {
648
- return contract.write[func](args);
649
- };
594
+ transferFee = (bridgeFee + executionFee).toString();
650
595
  numberToHex32 = function numberToHex32(num) {
651
- return typeof num !== 'number' || isNaN(num) ? function () {
596
+ if (typeof num !== 'number' || isNaN(num)) {
652
597
  throw new NumberFormatError('Input must be a valid number');
653
- }() : "0x".concat((num >>> 0).toString(16).padStart(8, '0'));
654
- }; // Execute the custom XCM message with the precompile
655
- _context.n = 11;
656
- return createTx('transferAssetsUsingTypeAndThenAddress', [
657
- // This represents (1,X1(Parachain(1000)))
658
- [1, ['0x00' + numberToHex32(getParaId('AssetHubPolkadot')).slice(2)]],
659
- // Assets including fee and the ERC20 asset, with fee be the first
660
- [[XCDOT, transferFee], [ethAsset.assetId, amount.toString()]],
661
- // The TransferType corresponding to asset being sent, 2 represents `DestinationReserve`
662
- 2,
663
- // index for the fee
664
- 0,
665
- // The TransferType corresponding to fee asset
666
- 2, customXcmOnDest]);
667
- case 11:
668
- tx = _context.v;
669
- return _context.a(2, tx);
598
+ }
599
+ return "0x".concat((num >>> 0).toString(16).padStart(8, '0'));
600
+ };
601
+ data = encodeFunctionData({
602
+ abi: abi,
603
+ functionName: 'transferAssetsUsingTypeAndThenAddress',
604
+ args: [
605
+ // (1, X1(Parachain(1000)))
606
+ [1, ['0x00' + numberToHex32(getParaId('AssetHubPolkadot')).slice(2)]],
607
+ // Assets including fee and the ERC20 asset, with fee first
608
+ [[XCDOT, transferFee], [ethAsset.assetId, amount.toString()]],
609
+ // 2 == DestinationReserve
610
+ 2,
611
+ // index of the fee asset
612
+ 0,
613
+ // TransferType for fee asset (DestinationReserve)
614
+ 2, customXcmOnDest]
615
+ });
616
+ return _context.a(2, {
617
+ type: 'eip1559',
618
+ chainId: getViemChain(from).id,
619
+ to: xcmInterfacePrecompile,
620
+ data: data,
621
+ value: 0n
622
+ });
670
623
  }
671
624
  }, _callee);
672
625
  }));
673
- return function transferMoonbeamToEth(_x, _x2) {
674
- return _ref2.apply(this, arguments);
626
+ return function buildMoonbeamToEth(_x, _x2) {
627
+ return _ref.apply(this, arguments);
675
628
  };
676
629
  }();
677
630
 
678
- var executeEvmTransfer = /*#__PURE__*/function () {
631
+ var buildEvmTransfer = /*#__PURE__*/function () {
679
632
  var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(options) {
680
- var api, from, to, recipient;
633
+ var from, to;
681
634
  return _regenerator().w(function (_context) {
682
635
  while (1) switch (_context.n) {
683
636
  case 0:
684
- api = options.api, from = options.from, to = options.to, recipient = options.recipient;
685
- validateAddress(api, recipient, to);
637
+ from = options.from, to = options.to;
686
638
  if (!(from === 'Moonbeam' && to === 'Ethereum')) {
687
639
  _context.n = 1;
688
640
  break;
689
641
  }
690
- return _context.a(2, transferMoonbeamToEth(from, options));
642
+ return _context.a(2, buildMoonbeamToEth(from, options));
691
643
  case 1:
692
644
  if (!(from === 'Moonbeam' || from === 'Moonriver' || from === 'Darwinia')) {
693
645
  _context.n = 2;
694
646
  break;
695
647
  }
696
- return _context.a(2, transferMoonbeamEvm(options));
648
+ return _context.a(2, buildMoonbeamEvm(options));
697
649
  case 2:
698
650
  throw new UnsupportedOperationError("EVM transfer from '".concat(from, "' to '").concat(to, "' is not supported by @paraspell/evm."));
699
651
  case 3:
@@ -701,14 +653,48 @@ var executeEvmTransfer = /*#__PURE__*/function () {
701
653
  }
702
654
  }, _callee);
703
655
  }));
656
+ return function buildEvmTransfer(_x) {
657
+ return _ref.apply(this, arguments);
658
+ };
659
+ }();
660
+
661
+ var executeEvmTransfer = /*#__PURE__*/function () {
662
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(options) {
663
+ var signer, account, sender, tx;
664
+ return _regenerator().w(function (_context) {
665
+ while (1) switch (_context.n) {
666
+ case 0:
667
+ signer = options.signer;
668
+ account = signer.account;
669
+ if (account) {
670
+ _context.n = 1;
671
+ break;
672
+ }
673
+ throw new MissingParameterError('signer.account', 'viem WalletClient must have an account configured.');
674
+ case 1:
675
+ sender = account.address;
676
+ _context.n = 2;
677
+ return buildEvmTransfer(_objectSpread2(_objectSpread2({}, options), {}, {
678
+ sender: sender
679
+ }));
680
+ case 2:
681
+ tx = _context.v;
682
+ return _context.a(2, signer.sendTransaction(_objectSpread2(_objectSpread2({}, tx), {}, {
683
+ chain: signer.chain,
684
+ account: account
685
+ })));
686
+ }
687
+ }, _callee);
688
+ }));
704
689
  return function executeEvmTransfer(_x) {
705
690
  return _ref.apply(this, arguments);
706
691
  };
707
692
  }();
708
693
 
709
694
  registerEvmExtension({
710
- executeEvmTransfer: executeEvmTransfer
695
+ executeTransfer: executeEvmTransfer,
696
+ buildTransfer: buildEvmTransfer
711
697
  });
712
698
  var EVM_ORIGIN_CHAINS = ['Moonbeam', 'Moonriver', 'Darwinia'];
713
699
 
714
- export { EVM_ORIGIN_CHAINS, executeEvmTransfer };
700
+ export { EVM_ORIGIN_CHAINS, buildEvmTransfer, executeEvmTransfer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/evm",
3
- "version": "13.4.0",
3
+ "version": "13.5.0",
4
4
  "description": "Optional EVM extension for @paraspell/sdk enabling interaction with EVM-compatible chains.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,19 +24,19 @@
24
24
  "keywords": [],
25
25
  "author": "",
26
26
  "dependencies": {
27
- "viem": "^2.47.6",
28
- "@paraspell/sdk-core": "13.4.0"
27
+ "viem": "^2.48.4",
28
+ "@paraspell/sdk-core": "13.5.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@babel/plugin-syntax-import-attributes": "^7.28.6",
32
32
  "@babel/preset-env": "^7.29.2",
33
- "@codecov/rollup-plugin": "^1.9.1",
33
+ "@codecov/rollup-plugin": "^2.0.1",
34
34
  "@rollup/plugin-babel": "^7.0.0",
35
35
  "@rollup/plugin-json": "^6.1.0",
36
36
  "@rollup/plugin-typescript": "^12.3.0",
37
- "@vitest/coverage-v8": "^4.1.2",
38
- "dotenv": "^17.3.1",
39
- "rollup": "^4.60.1",
37
+ "@vitest/coverage-v8": "^4.1.5",
38
+ "dotenv": "^17.4.2",
39
+ "rollup": "^4.60.2",
40
40
  "rollup-plugin-dts": "^6.4.1",
41
41
  "tslib": "^2.8.1"
42
42
  },