@dzapio/sdk 2.0.33 → 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 +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +8 -14
- package/dist/index.mjs +8 -14
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -458,6 +458,7 @@ type TxRequestData<T> = {
|
|
|
458
458
|
type TradeGasBuildTxnResponse<T = TxData> = TxRequestData<T> & {
|
|
459
459
|
quotes: Record<string, ParamQuotes>;
|
|
460
460
|
gasless: false;
|
|
461
|
+
private: boolean;
|
|
461
462
|
};
|
|
462
463
|
type TradeBuildTxnResponse = TradeGasBuildTxnResponse & {
|
|
463
464
|
data: string;
|
|
@@ -702,6 +703,10 @@ type SVMTxnDetails = {
|
|
|
702
703
|
type: typeof chainTypes.svm;
|
|
703
704
|
txnId: HexString;
|
|
704
705
|
data: string[];
|
|
706
|
+
blockhash?: {
|
|
707
|
+
blockhash: string;
|
|
708
|
+
lastValidBlockHeight: number;
|
|
709
|
+
};
|
|
705
710
|
estimatedGas: string;
|
|
706
711
|
isJitoTx?: boolean;
|
|
707
712
|
};
|
|
@@ -1787,13 +1792,17 @@ declare class DZapClient {
|
|
|
1787
1792
|
}];
|
|
1788
1793
|
getTradeQuotes(request: TradeQuotesRequest): Promise<TradeQuotesResponse>;
|
|
1789
1794
|
buildTradeTxn(request: TradeBuildTxnRequest): Promise<TradeBuildTxnResponse>;
|
|
1790
|
-
getTradeTxnStatus(
|
|
1795
|
+
getTradeTxnStatus(params: {
|
|
1791
1796
|
txHash: string;
|
|
1792
1797
|
chainId: number;
|
|
1798
|
+
} | {
|
|
1799
|
+
txId: string;
|
|
1793
1800
|
}): Promise<TradeStatusResponse>;
|
|
1794
|
-
getTradeMultiTxnStatus(
|
|
1801
|
+
getTradeMultiTxnStatus(params: {
|
|
1795
1802
|
txHashes: string;
|
|
1796
1803
|
chainIds: string;
|
|
1804
|
+
} | {
|
|
1805
|
+
txIds: string;
|
|
1797
1806
|
}): Promise<TradeStatusResponse[]>;
|
|
1798
1807
|
getAllSupportedChains(): Promise<ChainData>;
|
|
1799
1808
|
getAllTokens(chainId: number, source?: string, account?: string): Promise<any>;
|
package/dist/index.d.ts
CHANGED
|
@@ -458,6 +458,7 @@ type TxRequestData<T> = {
|
|
|
458
458
|
type TradeGasBuildTxnResponse<T = TxData> = TxRequestData<T> & {
|
|
459
459
|
quotes: Record<string, ParamQuotes>;
|
|
460
460
|
gasless: false;
|
|
461
|
+
private: boolean;
|
|
461
462
|
};
|
|
462
463
|
type TradeBuildTxnResponse = TradeGasBuildTxnResponse & {
|
|
463
464
|
data: string;
|
|
@@ -702,6 +703,10 @@ type SVMTxnDetails = {
|
|
|
702
703
|
type: typeof chainTypes.svm;
|
|
703
704
|
txnId: HexString;
|
|
704
705
|
data: string[];
|
|
706
|
+
blockhash?: {
|
|
707
|
+
blockhash: string;
|
|
708
|
+
lastValidBlockHeight: number;
|
|
709
|
+
};
|
|
705
710
|
estimatedGas: string;
|
|
706
711
|
isJitoTx?: boolean;
|
|
707
712
|
};
|
|
@@ -1787,13 +1792,17 @@ declare class DZapClient {
|
|
|
1787
1792
|
}];
|
|
1788
1793
|
getTradeQuotes(request: TradeQuotesRequest): Promise<TradeQuotesResponse>;
|
|
1789
1794
|
buildTradeTxn(request: TradeBuildTxnRequest): Promise<TradeBuildTxnResponse>;
|
|
1790
|
-
getTradeTxnStatus(
|
|
1795
|
+
getTradeTxnStatus(params: {
|
|
1791
1796
|
txHash: string;
|
|
1792
1797
|
chainId: number;
|
|
1798
|
+
} | {
|
|
1799
|
+
txId: string;
|
|
1793
1800
|
}): Promise<TradeStatusResponse>;
|
|
1794
|
-
getTradeMultiTxnStatus(
|
|
1801
|
+
getTradeMultiTxnStatus(params: {
|
|
1795
1802
|
txHashes: string;
|
|
1796
1803
|
chainIds: string;
|
|
1804
|
+
} | {
|
|
1805
|
+
txIds: string;
|
|
1797
1806
|
}): Promise<TradeStatusResponse[]>;
|
|
1798
1807
|
getAllSupportedChains(): Promise<ChainData>;
|
|
1799
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 = (
|
|
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 = (
|
|
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(
|
|
15450
|
-
return fetchStatus(
|
|
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(
|
|
15473
|
-
return fetchMultiTxStatus(
|
|
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 = (
|
|
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 = (
|
|
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(
|
|
15425
|
-
return fetchStatus(
|
|
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(
|
|
15448
|
-
return fetchMultiTxStatus(
|
|
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.
|
|
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",
|