@dzapio/sdk 2.0.32 → 2.0.34

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.mts CHANGED
@@ -421,6 +421,7 @@ type ParamQuotes = {
421
421
  destAmount: string;
422
422
  provider: string;
423
423
  minDestAmount: string;
424
+ priceImpact?: string | null;
424
425
  };
425
426
  type EvmTxData = {
426
427
  from: HexString;
@@ -457,6 +458,7 @@ type TxRequestData<T> = {
457
458
  type TradeGasBuildTxnResponse<T = TxData> = TxRequestData<T> & {
458
459
  quotes: Record<string, ParamQuotes>;
459
460
  gasless: false;
461
+ private: boolean;
460
462
  };
461
463
  type TradeBuildTxnResponse = TradeGasBuildTxnResponse & {
462
464
  data: string;
@@ -701,6 +703,10 @@ type SVMTxnDetails = {
701
703
  type: typeof chainTypes.svm;
702
704
  txnId: HexString;
703
705
  data: string[];
706
+ blockhash?: {
707
+ blockhash: string;
708
+ lastValidBlockHeight: number;
709
+ };
704
710
  estimatedGas: string;
705
711
  isJitoTx?: boolean;
706
712
  };
@@ -1786,13 +1792,17 @@ declare class DZapClient {
1786
1792
  }];
1787
1793
  getTradeQuotes(request: TradeQuotesRequest): Promise<TradeQuotesResponse>;
1788
1794
  buildTradeTxn(request: TradeBuildTxnRequest): Promise<TradeBuildTxnResponse>;
1789
- getTradeTxnStatus({ txHash, chainId }: {
1795
+ getTradeTxnStatus(params: {
1790
1796
  txHash: string;
1791
1797
  chainId: number;
1798
+ } | {
1799
+ txId: string;
1792
1800
  }): Promise<TradeStatusResponse>;
1793
- getTradeMultiTxnStatus({ txHashes, chainIds }: {
1801
+ getTradeMultiTxnStatus(params: {
1794
1802
  txHashes: string;
1795
1803
  chainIds: string;
1804
+ } | {
1805
+ txIds: string;
1796
1806
  }): Promise<TradeStatusResponse[]>;
1797
1807
  getAllSupportedChains(): Promise<ChainData>;
1798
1808
  getAllTokens(chainId: number, source?: string, account?: string): Promise<any>;
package/dist/index.d.ts CHANGED
@@ -421,6 +421,7 @@ type ParamQuotes = {
421
421
  destAmount: string;
422
422
  provider: string;
423
423
  minDestAmount: string;
424
+ priceImpact?: string | null;
424
425
  };
425
426
  type EvmTxData = {
426
427
  from: HexString;
@@ -457,6 +458,7 @@ type TxRequestData<T> = {
457
458
  type TradeGasBuildTxnResponse<T = TxData> = TxRequestData<T> & {
458
459
  quotes: Record<string, ParamQuotes>;
459
460
  gasless: false;
461
+ private: boolean;
460
462
  };
461
463
  type TradeBuildTxnResponse = TradeGasBuildTxnResponse & {
462
464
  data: string;
@@ -701,6 +703,10 @@ type SVMTxnDetails = {
701
703
  type: typeof chainTypes.svm;
702
704
  txnId: HexString;
703
705
  data: string[];
706
+ blockhash?: {
707
+ blockhash: string;
708
+ lastValidBlockHeight: number;
709
+ };
704
710
  estimatedGas: string;
705
711
  isJitoTx?: boolean;
706
712
  };
@@ -1786,13 +1792,17 @@ declare class DZapClient {
1786
1792
  }];
1787
1793
  getTradeQuotes(request: TradeQuotesRequest): Promise<TradeQuotesResponse>;
1788
1794
  buildTradeTxn(request: TradeBuildTxnRequest): Promise<TradeBuildTxnResponse>;
1789
- getTradeTxnStatus({ txHash, chainId }: {
1795
+ getTradeTxnStatus(params: {
1790
1796
  txHash: string;
1791
1797
  chainId: number;
1798
+ } | {
1799
+ txId: string;
1792
1800
  }): Promise<TradeStatusResponse>;
1793
- getTradeMultiTxnStatus({ txHashes, chainIds }: {
1801
+ getTradeMultiTxnStatus(params: {
1794
1802
  txHashes: string;
1795
1803
  chainIds: string;
1804
+ } | {
1805
+ txIds: string;
1796
1806
  }): Promise<TradeStatusResponse[]>;
1797
1807
  getAllSupportedChains(): Promise<ChainData>;
1798
1808
  getAllTokens(chainId: number, source?: string, account?: string): Promise<any>;
package/dist/index.js CHANGED
@@ -459,20 +459,14 @@ var fetchTokenPrice = (tokenAddresses, chainId) => invoke({
459
459
  data: { tokenAddresses, chainId },
460
460
  method: GET
461
461
  });
462
- var fetchStatus = ({ txHash, chainId }) => invoke({
462
+ var fetchStatus = (params) => invoke({
463
463
  endpoint: GET_STATUS,
464
- data: {
465
- txHash,
466
- chainId
467
- },
464
+ data: params,
468
465
  method: GET
469
466
  });
470
- var fetchMultiTxStatus = ({ txHashes, chainIds }) => invoke({
467
+ var fetchMultiTxStatus = (params) => invoke({
471
468
  endpoint: GET_MULTI_STATUS,
472
- data: {
473
- txHashes,
474
- chainIds
475
- },
469
+ data: params,
476
470
  method: GET
477
471
  });
478
472
  var fetchCalculatedPoints = (request) => invoke({
@@ -15446,8 +15440,8 @@ var _DZapClient = class _DZapClient {
15446
15440
  * });
15447
15441
  * ```
15448
15442
  */
15449
- getTradeTxnStatus({ txHash, chainId }) {
15450
- return fetchStatus({ txHash, chainId });
15443
+ getTradeTxnStatus(params) {
15444
+ return fetchStatus(params);
15451
15445
  }
15452
15446
  /**
15453
15447
  * Fetches the current status of trade transactions including swaps and bridges.
@@ -15469,8 +15463,8 @@ var _DZapClient = class _DZapClient {
15469
15463
  * });
15470
15464
  * ```
15471
15465
  */
15472
- getTradeMultiTxnStatus({ txHashes, chainIds }) {
15473
- return fetchMultiTxStatus({ txHashes, chainIds });
15466
+ getTradeMultiTxnStatus(params) {
15467
+ return fetchMultiTxStatus(params);
15474
15468
  }
15475
15469
  /**
15476
15470
  * Fetches all blockchain networks supported by the DZap protocol.
package/dist/index.mjs CHANGED
@@ -434,20 +434,14 @@ var fetchTokenPrice = (tokenAddresses, chainId) => invoke({
434
434
  data: { tokenAddresses, chainId },
435
435
  method: GET
436
436
  });
437
- var fetchStatus = ({ txHash, chainId }) => invoke({
437
+ var fetchStatus = (params) => invoke({
438
438
  endpoint: GET_STATUS,
439
- data: {
440
- txHash,
441
- chainId
442
- },
439
+ data: params,
443
440
  method: GET
444
441
  });
445
- var fetchMultiTxStatus = ({ txHashes, chainIds }) => invoke({
442
+ var fetchMultiTxStatus = (params) => invoke({
446
443
  endpoint: GET_MULTI_STATUS,
447
- data: {
448
- txHashes,
449
- chainIds
450
- },
444
+ data: params,
451
445
  method: GET
452
446
  });
453
447
  var fetchCalculatedPoints = (request) => invoke({
@@ -15421,8 +15415,8 @@ var _DZapClient = class _DZapClient {
15421
15415
  * });
15422
15416
  * ```
15423
15417
  */
15424
- getTradeTxnStatus({ txHash, chainId }) {
15425
- return fetchStatus({ txHash, chainId });
15418
+ getTradeTxnStatus(params) {
15419
+ return fetchStatus(params);
15426
15420
  }
15427
15421
  /**
15428
15422
  * Fetches the current status of trade transactions including swaps and bridges.
@@ -15444,8 +15438,8 @@ var _DZapClient = class _DZapClient {
15444
15438
  * });
15445
15439
  * ```
15446
15440
  */
15447
- getTradeMultiTxnStatus({ txHashes, chainIds }) {
15448
- return fetchMultiTxStatus({ txHashes, chainIds });
15441
+ getTradeMultiTxnStatus(params) {
15442
+ return fetchMultiTxStatus(params);
15449
15443
  }
15450
15444
  /**
15451
15445
  * Fetches all blockchain networks supported by the DZap protocol.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dzapio/sdk",
3
- "version": "2.0.32",
3
+ "version": "2.0.34",
4
4
  "description": "A TypeScript/JavaScript SDK for interacting with the DZap protocol, providing utilities for DeFi operations including Swaps, Bridges, and Zaps.",
5
5
  "main": "dist/index.js",
6
6
  "source": "src/index.ts",