@paraspell/sdk-core 10.0.0 → 10.0.1

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
@@ -403,7 +403,11 @@ type TGetTransferableAmountOptionsBase<TRes> = {
403
403
  /**
404
404
  * The node on which to query the balance.
405
405
  */
406
- node: TNodeDotKsmWithRelayChains;
406
+ origin: TNodeDotKsmWithRelayChains;
407
+ /**
408
+ * The destination node.
409
+ */
410
+ destination: TNodeWithRelayChains;
407
411
  /**
408
412
  * The currency to query.
409
413
  */
@@ -412,6 +416,7 @@ type TGetTransferableAmountOptionsBase<TRes> = {
412
416
  * The transaction to calculate the fee for
413
417
  */
414
418
  tx: TRes;
419
+ feeAsset?: TCurrencyInput;
415
420
  };
416
421
  type TGetTransferableAmountOptions<TApi, TRes> = WithApi<TGetTransferableAmountOptionsBase<TRes>, TApi, TRes>;
417
422
  type TVerifyEdOnDestinationOptionsBase<TRes> = {
@@ -439,6 +444,7 @@ type TVerifyEdOnDestinationOptionsBase<TRes> = {
439
444
  * The transaction to calculate the fee for
440
445
  */
441
446
  tx: TRes;
447
+ feeAsset?: TCurrencyInput;
442
448
  };
443
449
  type TVerifyEdOnDestinationOptions<TApi, TRes> = WithApi<TVerifyEdOnDestinationOptionsBase<TRes>, TApi, TRes>;
444
450
 
@@ -529,6 +535,7 @@ type TDryRunBaseOptions<TRes> = {
529
535
  senderAddress: string;
530
536
  address: string;
531
537
  currency: TCurrencyInputWithAmount;
538
+ feeAsset?: TCurrencyInput;
532
539
  };
533
540
  type TDryRunOptions<TApi, TRes> = WithApi<TDryRunBaseOptions<TRes>, TApi, TRes>;
534
541
  type TDryRunCallBaseOptions<TRes> = {
@@ -544,6 +551,7 @@ type TDryRunCallBaseOptions<TRes> = {
544
551
  * The address to dry-run with
545
552
  */
546
553
  address: string;
554
+ isFeeAsset: boolean;
547
555
  };
548
556
  type TDryRunCallOptions<TApi, TRes> = WithApi<TDryRunCallBaseOptions<TRes>, TApi, TRes>;
549
557
  type TDryRunXcmBaseOptions = {
@@ -560,6 +568,10 @@ type TDryRunXcmBaseOptions = {
560
568
  * The origin node
561
569
  */
562
570
  origin: TNodeDotKsmWithRelayChains;
571
+ asset: TAsset;
572
+ feeAsset?: TAsset;
573
+ amount: bigint;
574
+ originFee: bigint;
563
575
  };
564
576
  type TDryRunXcmOptions<TApi, TRes> = WithApi<TDryRunXcmBaseOptions, TApi, TRes>;
565
577
  type TDryRunNodeSuccess = {
@@ -779,6 +791,7 @@ type TTransferInfo = {
779
791
  destination: {
780
792
  receivedCurrency: {
781
793
  sufficient: boolean | UnableToComputeError;
794
+ receivedAmount: bigint | UnableToComputeError;
782
795
  balance: bigint;
783
796
  balanceAfter: bigint | UnableToComputeError;
784
797
  currencySymbol: string;
@@ -787,7 +800,7 @@ type TTransferInfo = {
787
800
  xcmFee: {
788
801
  fee: bigint;
789
802
  balance: bigint;
790
- balanceAfter: bigint;
803
+ balanceAfter: bigint | UnableToComputeError;
791
804
  currencySymbol: string;
792
805
  };
793
806
  };
@@ -803,6 +816,7 @@ type TGetTransferInfoOptionsBase<TRes> = {
803
816
  senderAddress: string;
804
817
  address: string;
805
818
  currency: WithAmount<TCurrencyCore>;
819
+ feeAsset?: TCurrencyCore;
806
820
  };
807
821
  type TGetTransferInfoOptions<TApi, TRes> = WithApi<TGetTransferInfoOptionsBase<TRes>, TApi, TRes>;
808
822
 
@@ -825,6 +839,7 @@ type TGetXcmFeeBaseOptions<TRes> = {
825
839
  senderAddress: string;
826
840
  address: string;
827
841
  currency: TCurrencyInputWithAmount;
842
+ feeAsset?: TCurrencyInput;
828
843
  disableFallback: boolean;
829
844
  };
830
845
  type TGetXcmFeeOptions<TApi, TRes> = WithApi<TGetXcmFeeBaseOptions<TRes>, TApi, TRes>;
@@ -838,6 +853,8 @@ type TGetOriginXcmFeeBaseOptions<TRes> = {
838
853
  origin: TNodeDotKsmWithRelayChains;
839
854
  destination: TNodeDotKsmWithRelayChains;
840
855
  senderAddress: string;
856
+ currency: TCurrencyInput;
857
+ feeAsset?: TCurrencyInput;
841
858
  disableFallback: boolean;
842
859
  };
843
860
  type TGetOriginXcmFeeOptions<TApi, TRes> = WithApi<TGetOriginXcmFeeBaseOptions<TRes>, TApi, TRes>;
@@ -848,6 +865,9 @@ type TGetFeeForDestNodeBaseOptions = {
848
865
  address: string;
849
866
  currency: TCurrencyInputWithAmount;
850
867
  forwardedXcms: any;
868
+ asset: TAsset;
869
+ originFee: bigint;
870
+ feeAsset?: TCurrencyInput;
851
871
  disableFallback: boolean;
852
872
  };
853
873
  type TGetFeeForDestNodeOptions<TApi, TRes> = WithApi<TGetFeeForDestNodeBaseOptions, TApi, TRes>;
@@ -1761,10 +1781,10 @@ declare const getBalanceNative: <TApi, TRes>(options: TGetBalanceNativeOptions<T
1761
1781
  declare const getOriginFeeDetailsInternal: <TApi, TRes>({ api, account, accountDestination, ahAddress, currency, origin, destination, feeMarginPercentage }: TGetOriginFeeDetailsOptions<TApi, TRes>) => Promise<TOriginFeeDetails>;
1762
1782
  declare const getOriginFeeDetails: <TApi, TRes>(options: TGetOriginFeeDetailsOptions<TApi, TRes>) => Promise<TOriginFeeDetails>;
1763
1783
 
1764
- declare const getTransferableAmountInternal: <TApi, TRes>({ api, senderAddress, node, currency, tx }: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
1784
+ declare const getTransferableAmountInternal: <TApi, TRes>({ api, senderAddress, origin: node, destination, currency, tx, feeAsset }: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
1765
1785
  declare const getTransferableAmount: <TApi, TRes>(options: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
1766
1786
 
1767
- declare const getTransferInfo: <TApi, TRes>({ api, tx, origin, destination, senderAddress, address, currency }: TGetTransferInfoOptions<TApi, TRes>) => Promise<TTransferInfo>;
1787
+ declare const getTransferInfo: <TApi, TRes>({ api, tx, origin, destination, senderAddress, address, currency, feeAsset }: TGetTransferInfoOptions<TApi, TRes>) => Promise<TTransferInfo>;
1768
1788
 
1769
1789
  declare const verifyEdOnDestination: <TApi, TRes>(options: TVerifyEdOnDestinationOptions<TApi, TRes>) => Promise<boolean>;
1770
1790
 
@@ -1781,14 +1801,14 @@ declare const transferMoonbeamToEth: <TApi, TRes>({ api, from, to, signer, addre
1781
1801
  declare const isEthersSigner: (signer: Signer | WalletClient) => signer is Signer;
1782
1802
  declare const isEthersContract: (contract: Contract | GetContractReturnType<Abi | readonly unknown[]>) => contract is Contract;
1783
1803
 
1784
- declare const getOriginXcmFee: <TApi, TRes>({ api, tx, origin, destination, senderAddress, disableFallback }: TGetOriginXcmFeeOptions<TApi, TRes>) => Promise<TXcmFeeDetail & {
1804
+ declare const getOriginXcmFee: <TApi, TRes>({ api, tx, origin, destination, senderAddress, disableFallback, feeAsset, currency }: TGetOriginXcmFeeOptions<TApi, TRes>) => Promise<TXcmFeeDetail & {
1785
1805
  forwardedXcms?: any;
1786
1806
  destParaId?: number;
1787
1807
  }>;
1788
1808
 
1789
1809
  declare const getOriginXcmFeeEstimate: <TApi, TRes>({ api, tx, origin, destination, senderAddress }: TGetOriginXcmFeeEstimateOptions<TApi, TRes>) => Promise<TGetXcmFeeEstimateDetail>;
1790
1810
 
1791
- declare const getXcmFee: <TApi, TRes>({ api, tx, origin, destination, senderAddress, address, currency, disableFallback }: TGetXcmFeeOptions<TApi, TRes>) => Promise<TGetXcmFeeResult>;
1811
+ declare const getXcmFee: <TApi, TRes>({ api, tx, origin, destination, senderAddress, address, currency, feeAsset, disableFallback }: TGetXcmFeeOptions<TApi, TRes>) => Promise<TGetXcmFeeResult>;
1792
1812
 
1793
1813
  declare const getXcmFeeEstimate: <TApi, TRes>(options: TGetXcmFeeEstimateOptions<TApi, TRes>) => Promise<TGetXcmFeeEstimateResult>;
1794
1814
 
@@ -1804,7 +1824,7 @@ declare const createVersionedBeneficiary: <TApi, TRes>(options: TCreateBeneficia
1804
1824
 
1805
1825
  declare const createX1Payload: (version: Version, junction: TJunction) => TJunctions;
1806
1826
 
1807
- declare const computeFeeFromDryRun: (dryRun: any, node: TNodeDotKsmWithRelayChains, executionFee: bigint) => bigint;
1827
+ declare const computeFeeFromDryRun: (dryRun: any, node: TNodeDotKsmWithRelayChains, executionFee: bigint, isFeeAsset?: boolean) => bigint;
1808
1828
 
1809
1829
  declare const computeFeeFromDryRunPjs: (dryRun: any, node: TNodeDotKsmWithRelayChains, executionFee: bigint) => bigint;
1810
1830