@chainstream-io/sdk 2.0.3 → 2.0.5
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/{chainstream-D0e9CplQ.d.cts → chainstream-CEzLVb40.d.cts} +8 -0
- package/dist/{chainstream-D0e9CplQ.d.ts → chainstream-CEzLVb40.d.ts} +8 -0
- package/dist/chainstream.cjs +13 -5
- package/dist/chainstream.cjs.map +1 -1
- package/dist/chainstream.d.cts +1 -1
- package/dist/chainstream.d.ts +1 -1
- package/dist/chainstream.mjs +13 -5
- package/dist/chainstream.mjs.map +1 -1
- package/dist/index.cjs +13 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +13 -5
- package/dist/index.mjs.map +1 -1
- package/dist/stream/index.d.cts +1 -1
- package/dist/stream/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3419,6 +3419,14 @@ interface SwapRouteInput {
|
|
|
3419
3419
|
tipFee?: string;
|
|
3420
3420
|
/** DTO.DEX.BASE.IS_ANTI_MEV */
|
|
3421
3421
|
isAntiMev?: boolean;
|
|
3422
|
+
/** DTO.DEX.SWAP.MAX_FEE_PER_GAS */
|
|
3423
|
+
maxFeePerGas?: string;
|
|
3424
|
+
/** DTO.DEX.SWAP.MAX_PRIORITY_FEE_PER_GAS */
|
|
3425
|
+
maxPriorityFeePerGas?: string;
|
|
3426
|
+
/** DTO.DEX.SWAP.GAS_PRICE */
|
|
3427
|
+
gasPrice?: string;
|
|
3428
|
+
/** DTO.DEX.SWAP.GAS_LIMIT */
|
|
3429
|
+
gasLimit?: string;
|
|
3422
3430
|
}
|
|
3423
3431
|
/**
|
|
3424
3432
|
* DTO.DEX.SWAP.ROUTE_INFO
|
|
@@ -3419,6 +3419,14 @@ interface SwapRouteInput {
|
|
|
3419
3419
|
tipFee?: string;
|
|
3420
3420
|
/** DTO.DEX.BASE.IS_ANTI_MEV */
|
|
3421
3421
|
isAntiMev?: boolean;
|
|
3422
|
+
/** DTO.DEX.SWAP.MAX_FEE_PER_GAS */
|
|
3423
|
+
maxFeePerGas?: string;
|
|
3424
|
+
/** DTO.DEX.SWAP.MAX_PRIORITY_FEE_PER_GAS */
|
|
3425
|
+
maxPriorityFeePerGas?: string;
|
|
3426
|
+
/** DTO.DEX.SWAP.GAS_PRICE */
|
|
3427
|
+
gasPrice?: string;
|
|
3428
|
+
/** DTO.DEX.SWAP.GAS_LIMIT */
|
|
3429
|
+
gasLimit?: string;
|
|
3422
3430
|
}
|
|
3423
3431
|
/**
|
|
3424
3432
|
* DTO.DEX.SWAP.ROUTE_INFO
|
package/dist/chainstream.cjs
CHANGED
|
@@ -2374,13 +2374,21 @@ var ChainStreamClient = class {
|
|
|
2374
2374
|
try {
|
|
2375
2375
|
console.log("event.data: ", event.data);
|
|
2376
2376
|
const data = JSON.parse(event.data);
|
|
2377
|
+
if (data.status === "pending") return;
|
|
2378
|
+
clearTimeout(timeoutId);
|
|
2379
|
+
sse.close();
|
|
2377
2380
|
if (data.status === "error") {
|
|
2378
|
-
|
|
2379
|
-
|
|
2381
|
+
reject(new Error(data.error || data.message || "Unknown error"));
|
|
2382
|
+
} else if (data.status === "failed") {
|
|
2383
|
+
reject(new Error(data.error || "Job failed"));
|
|
2380
2384
|
} else if (data.status === "completed") {
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2385
|
+
if (data.success === false) {
|
|
2386
|
+
reject(new Error(data.error || "Transaction failed"));
|
|
2387
|
+
} else {
|
|
2388
|
+
resolve(data);
|
|
2389
|
+
}
|
|
2390
|
+
} else {
|
|
2391
|
+
reject(new Error(`Unexpected job status: ${data.status}`));
|
|
2384
2392
|
}
|
|
2385
2393
|
} catch {
|
|
2386
2394
|
clearTimeout(timeoutId);
|