@paraspell/sdk-core 11.12.5 → 11.12.7

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
@@ -464,7 +464,7 @@ declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = o
464
464
  private maybePerformXcmFormatCheck;
465
465
  dryRun(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>): Promise<TDryRunResult>;
466
466
  dryRunPreview(this: GeneralBuilder<TApi, TRes, TSendBaseOptionsWithSenderAddress>, dryRunOptions?: TDryRunPreviewOptions): Promise<TDryRunResult>;
467
- private createTxFactory;
467
+ protected createTxFactory<TOptions extends TSendBaseOptions>(this: GeneralBuilder<TApi, TRes, TOptions>): TTxFactory<TRes>;
468
468
  /**
469
469
  * Returns the XCM fee for the transfer using dryRun or paymentInfo function.
470
470
  *
@@ -643,9 +643,12 @@ type TDryRunResult = {
643
643
  bridgeHub?: TDryRunChainResult;
644
644
  hops: THopInfo[];
645
645
  };
646
- type TResolveHopParams = {
646
+ type TResolveHopParams<TApi, TRes> = {
647
+ api: IPolkadotApi<TApi, TRes>;
648
+ tx: TRes;
647
649
  originChain: TSubstrateChain;
648
650
  currentChain: TSubstrateChain;
651
+ destination: TDestination;
649
652
  asset: TAssetInfo;
650
653
  currency: TCurrencyInputWithAmount;
651
654
  swapConfig?: TSwapConfig;
@@ -752,7 +755,7 @@ type TModuleError = {
752
755
  type TXcmFeeSwapConfig = TSwapConfig & {
753
756
  amountOut: bigint;
754
757
  };
755
- type TTxFactory<TRes> = (amount?: string) => Promise<TRes>;
758
+ type TTxFactory<TRes> = (amount?: string, relative?: boolean) => Promise<TRes>;
756
759
  type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
757
760
  /**
758
761
  * The transaction factory
@@ -1112,7 +1115,7 @@ type TBuilderConfig<TApi> = Partial<{
1112
1115
  }>;
1113
1116
  type TCreateTxsOptions<TApi, TRes> = Pick<TSendOptions<TApi, TRes>, 'api' | 'from' | 'to' | 'currency'>;
1114
1117
  type TBatchedSendOptions<TApi, TRes> = Omit<TSendOptions<TApi, TRes>, 'isAmountAll'> & {
1115
- buildTx: TTxFactory<TRes>;
1118
+ builder: GeneralBuilder<TApi, TRes, TSendBaseOptions>;
1116
1119
  };
1117
1120
  type TBuildInternalRes<TApi, TRes, TOptions extends TSendBaseOptions = TSendBaseOptions> = {
1118
1121
  tx: TRes;
@@ -1453,6 +1456,7 @@ interface IPolkadotApi<TApi, TRes> {
1453
1456
  hexToUint8a(hex: string): Uint8Array;
1454
1457
  stringToUint8a(str: string): Uint8Array;
1455
1458
  getMethod(tx: TRes): string;
1459
+ getTypeThenAssetCount(tx: TRes): number | undefined;
1456
1460
  hasMethod(pallet: TPallet, method: string): Promise<boolean>;
1457
1461
  calculateTransactionFee(tx: TRes, address: string): Promise<bigint>;
1458
1462
  quoteAhPrice(fromMl: TLocation, toMl: TLocation, amountIn: bigint, includeFee?: boolean): Promise<bigint | undefined>;
@@ -1887,6 +1891,8 @@ declare class Manta<TApi, TRes> extends Parachain<TApi, TRes> implements IXToken
1887
1891
  constructor();
1888
1892
  private getAssetId;
1889
1893
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1894
+ isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
1895
+ isReceivingTempDisabled(_scenario: TScenario): boolean;
1890
1896
  transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
1891
1897
  }
1892
1898
 
@@ -2249,9 +2255,9 @@ declare const maybeOverrideAsset: (version: Version, amount: bigint, asset: TAss
2249
2255
 
2250
2256
  declare const sortAssets: (assets: TAsset[]) => TAsset[];
2251
2257
 
2252
- declare const computeOverridenAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, increaseAmount: string) => number | bigint;
2253
- declare const overrideTxAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, builder: GeneralBuilder<TApi, TRes, TSendBaseOptions>, amount: string) => Promise<TRes>;
2254
- declare const createTx: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, builder: GeneralBuilder<TApi, TRes, TSendBaseOptions>, amount: string | undefined) => Promise<TRes>;
2258
+ declare const computeOverridenAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, increaseAmount: string, relative?: boolean) => number | bigint;
2259
+ declare const overrideTxAmount: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, builder: GeneralBuilder<TApi, TRes, TSendBaseOptions>, amount: string, relative?: boolean) => Promise<TRes>;
2260
+ declare const createTx: <TApi, TRes>(options: TCreateTxsOptions<TApi, TRes>, builder: GeneralBuilder<TApi, TRes, TSendBaseOptions>, amount?: string, relative?: boolean) => Promise<TRes>;
2255
2261
 
2256
2262
  declare const isConfig: <TApi>(value: any) => value is TBuilderConfig<TApi>;
2257
2263