@dzapio/sdk 2.0.52 → 2.0.53

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
@@ -1,6 +1,6 @@
1
- import * as viem from 'viem';
2
- import { TypedDataDomain, Prettify, WalletClient, TransactionReceipt, WalletCallReceipt as WalletCallReceipt$1, ChainFormatters, Chain as Chain$1, Assign } from 'viem';
3
1
  import { Signer } from 'ethers';
2
+ import * as viem from 'viem';
3
+ import { TypedDataDomain, TypedData, Prettify, WalletClient, TransactionReceipt, WalletCallReceipt as WalletCallReceipt$1, ChainFormatters, Chain as Chain$1, Assign } from 'viem';
4
4
  import * as viemChains from 'viem/chains';
5
5
  import { Chain as Chain$2 } from 'viem/chains';
6
6
  import { ChainId } from '@bigmi/core';
@@ -153,6 +153,85 @@ declare const AllowanceTypes: {
153
153
  };
154
154
  type AllowanceType = (typeof AllowanceTypes)[keyof typeof AllowanceTypes];
155
155
 
156
+ declare const chainTypes: {
157
+ readonly evm: "evm";
158
+ readonly bvm: "bvm";
159
+ readonly svm: "svm";
160
+ readonly aptosvm: "aptosvm";
161
+ readonly cosmos: "cosmos";
162
+ readonly nearvm: "nearvm";
163
+ readonly starknetvm: "starknetvm";
164
+ readonly stellarvm: "stellarvm";
165
+ readonly suivm: "suivm";
166
+ readonly tonvm: "tonvm";
167
+ readonly tronvm: "tronvm";
168
+ };
169
+
170
+ declare const zapStepAction: {
171
+ readonly execute: "execute";
172
+ readonly approve: "approve";
173
+ };
174
+ declare const zapPreExecutionStepType: {
175
+ readonly sign: "sign";
176
+ };
177
+
178
+ type StepAction = keyof typeof zapStepAction;
179
+ type ZapPreExecutionStepType = keyof typeof zapPreExecutionStepType;
180
+ type ZapEvmTxnDetails = {
181
+ type: typeof chainTypes.evm;
182
+ txnId: HexString;
183
+ callData: HexString;
184
+ callTo: HexString;
185
+ value: string;
186
+ estimatedGas: string;
187
+ };
188
+ type ZapBvmTxnDetails = {
189
+ type: typeof chainTypes.bvm;
190
+ txnId: HexString;
191
+ data: string;
192
+ };
193
+ type SVMTxnDetails = {
194
+ type: typeof chainTypes.svm;
195
+ txnId: HexString;
196
+ data: string[];
197
+ blockhash?: {
198
+ blockhash: string;
199
+ lastValidBlockHeight: number;
200
+ };
201
+ estimatedGas: string;
202
+ isJitoTx?: boolean;
203
+ };
204
+ type ZapTxnDetails = ZapEvmTxnDetails | ZapBvmTxnDetails | SVMTxnDetails;
205
+ type ZapTypedDataPayload = {
206
+ domain: TypedDataDomain;
207
+ types: TypedData;
208
+ primaryType: string;
209
+ message: Record<string, unknown>;
210
+ };
211
+ type ZapSignPreExecutionStep = {
212
+ id: string;
213
+ type: typeof zapPreExecutionStepType.sign;
214
+ data: ZapTypedDataPayload;
215
+ };
216
+ type ZapPreExecutionStep = ZapSignPreExecutionStep;
217
+ type ZapSignPreExecutionStepData = {
218
+ id: string;
219
+ type: typeof zapPreExecutionStepType.sign;
220
+ signature: HexString;
221
+ message: Record<string, unknown>;
222
+ };
223
+ type ZapPreExecutionResult = {
224
+ status: TxnStatus.success;
225
+ code: StatusCodes | number;
226
+ preExecutionStepsData: ZapPreExecutionStepData[];
227
+ } | DZapTransactionResponse;
228
+ type ZapPreExecutionStepData = ZapSignPreExecutionStepData;
229
+ type ZapTransactionStep<T extends ZapTxnDetails = ZapTxnDetails> = {
230
+ action: StepAction;
231
+ data: T;
232
+ };
233
+ type ZapStep = ZapTransactionStep;
234
+
156
235
  declare const zapFeeType: {
157
236
  readonly fee: "fee";
158
237
  readonly ata: "ata";
@@ -173,10 +252,13 @@ declare const zapPathAction: {
173
252
  readonly bridge: "bridge";
174
253
  readonly deposit: "deposit";
175
254
  readonly withdraw: "withdraw";
255
+ readonly borrow: "borrow";
176
256
  readonly stake: "stake";
177
257
  readonly unstake: "unstake";
178
258
  readonly increase: "increase";
179
259
  readonly harvest: "harvest";
260
+ readonly long: "long";
261
+ readonly short: "short";
180
262
  };
181
263
 
182
264
  type ZapRefundType = (typeof zapRefundType)[keyof typeof zapRefundType];
@@ -222,56 +304,6 @@ type ZapFee = ZapAsset & {
222
304
  type: ZapFeeType;
223
305
  };
224
306
 
225
- declare const chainTypes: {
226
- readonly evm: "evm";
227
- readonly bvm: "bvm";
228
- readonly svm: "svm";
229
- readonly aptosvm: "aptosvm";
230
- readonly cosmos: "cosmos";
231
- readonly nearvm: "nearvm";
232
- readonly starknetvm: "starknetvm";
233
- readonly stellarvm: "stellarvm";
234
- readonly suivm: "suivm";
235
- readonly tonvm: "tonvm";
236
- readonly tronvm: "tronvm";
237
- };
238
-
239
- declare const zapStepAction: {
240
- readonly execute: "execute";
241
- };
242
-
243
- type StepAction = keyof typeof zapStepAction;
244
- type ZapEvmTxnDetails = {
245
- type: typeof chainTypes.evm;
246
- txnId: HexString;
247
- callData: HexString;
248
- callTo: HexString;
249
- value: string;
250
- estimatedGas: string;
251
- };
252
- type ZapBvmTxnDetails = {
253
- type: typeof chainTypes.bvm;
254
- txnId: HexString;
255
- data: string;
256
- };
257
- type SVMTxnDetails = {
258
- type: typeof chainTypes.svm;
259
- txnId: HexString;
260
- data: string[];
261
- blockhash?: {
262
- blockhash: string;
263
- lastValidBlockHeight: number;
264
- };
265
- estimatedGas: string;
266
- isJitoTx?: boolean;
267
- };
268
- type ZapTxnDetails = ZapEvmTxnDetails | ZapBvmTxnDetails | SVMTxnDetails;
269
- type ZapTransactionStep<T extends ZapTxnDetails = ZapTxnDetails> = {
270
- action: StepAction;
271
- data: T;
272
- };
273
- type ZapStep = ZapTransactionStep;
274
-
275
307
  type ZapRouteRequestPositionDetails = {
276
308
  nftId: string;
277
309
  };
@@ -296,6 +328,7 @@ type ZapBuildTxnResponse = {
296
328
  output: ZapOutput[];
297
329
  steps: ZapStep[];
298
330
  path: ZapPath[];
331
+ preExecutionSteps?: ZapPreExecutionStep[];
299
332
  };
300
333
  type ZapBuildTxnRequest = {
301
334
  srcToken: string;
@@ -308,6 +341,7 @@ type ZapBuildTxnRequest = {
308
341
  account: string;
309
342
  integrator?: ZapIntegratorConfig;
310
343
  permitData?: string;
344
+ preExecutionStepsData?: ZapPreExecutionStepData[];
311
345
  amount?: string;
312
346
  estimateGas?: boolean;
313
347
  positionDetails?: ZapRouteRequestPositionDetails;
@@ -326,9 +360,12 @@ type ZapBundleAction = {
326
360
  srcChainId: number;
327
361
  destToken?: string;
328
362
  destChainId?: number;
363
+ destAmount?: string;
329
364
  positionDetails?: ZapRouteRequestPositionDetails;
330
365
  poolDetails?: ZapRouteRequestPoolDetails;
331
366
  protocol?: string;
367
+ permitData?: HexString;
368
+ batchPermitData?: HexString;
332
369
  };
333
370
  type ZapBundleRequest = {
334
371
  actions: ZapBundleAction[];
@@ -341,6 +378,7 @@ type ZapBundleRequest = {
341
378
  integrator?: ZapIntegratorConfig;
342
379
  allowedDexes?: string[];
343
380
  allowedBridges?: string[];
381
+ preExecutionStepsData?: ZapPreExecutionStepData[];
344
382
  };
345
383
 
346
384
  type ZapPoolDetailsRequest = {
@@ -1019,6 +1057,12 @@ type BroadcastTxResponse = {
1019
1057
  message: string;
1020
1058
  };
1021
1059
 
1060
+ type ZapStepsResult = {
1061
+ status: TxnStatus.success;
1062
+ code: StatusCodes | number;
1063
+ txnHash?: string;
1064
+ } | DZapTransactionResponse;
1065
+
1022
1066
  type DecodeTransactionParameters = {
1023
1067
  txHash: string;
1024
1068
  chainId: number;
@@ -2046,15 +2090,18 @@ declare class DZapClient {
2046
2090
  rpcUrls?: string[];
2047
2091
  service: AvailableDZapServices;
2048
2092
  }>): Promise<SignPermitResponse<T>>;
2049
- zap({ request, steps, signer, }: {
2093
+ zap({ request, steps, preExecutionSteps, signer, rpcUrls, }: {
2050
2094
  request: ZapBuildTxnRequest | ZapBundleRequest;
2051
2095
  signer: WalletClient | Signer;
2052
2096
  steps?: ZapTransactionStep[];
2053
- }): Promise<DZapTransactionResponse | {
2054
- status: TxnStatus.success;
2055
- code: StatusCodes | number;
2056
- txnHash: HexString;
2057
- }>;
2097
+ preExecutionSteps?: ZapPreExecutionStep[];
2098
+ rpcUrls?: string[];
2099
+ }): Promise<ZapStepsResult>;
2100
+ prepareZapPreExecutionData({ preExecutionSteps, signer, account, }: {
2101
+ preExecutionSteps?: ZapPreExecutionStep[];
2102
+ signer: WalletClient | Signer;
2103
+ account?: string;
2104
+ }): Promise<ZapPreExecutionResult>;
2058
2105
  buildZapTxn(request: ZapBuildTxnRequest): Promise<ZapBuildTxnResponse>;
2059
2106
  getZapQuote(request: ZapQuoteRequest): Promise<ZapQuoteResponse>;
2060
2107
  getZapBundleQuote(request: ZapBundleRequest): Promise<ZapQuoteResponse>;
@@ -2824,4 +2871,4 @@ declare const robinhood: {
2824
2871
  declare const customViemChains: viemChains.Chain[];
2825
2872
  declare const viemChainsById: Record<number, viemChains.Chain>;
2826
2873
 
2827
- export { type AllowanceType, AllowanceTypes, type ApiRpcResponse, type ApprovalMode, ApprovalModes, type BatchPermitCallbackParams, type BtcTxData, type BtclnTxData, type Chain, type ChainData, type ContractErrorResponse, DZapClient, DZapPermitMode, type DZapTransactionResponse, type DecodeTxnDataClientParams, type DecodeTxnDataClientParamsWithoutService, type DecodeTxnDataResponse, type EvmTxData, type Fee, type FeeDetails, type GaslessTradeBuildTxnResponse, type HexString, type HyperLiquidTxData, OtherAbis, type ParamQuotes, type PermitMode, PermitTypes, type ProtocolAmountErrorDetails, type ProtocolAmountReason, type ProtocolErrorInfo, type ProtocolErrorType, type ProtocolRouteErrorDetails, type ProtocolRouteReason, type ProtocolSlippageErrorDetails, type ProtocolUnknownErrorDetails, type ProviderDetails, type PsbtInput, type PsbtOutput, type QuoteFilter, QuoteFilters, STATUS, type SVMTxnDetails, Services, type SignPermitResponse, type SignatureCallbackParams, SignatureExpiryInSecs, type SinglePermitCallbackParams, StatusCodes, type StepAction, type SvmTxData, type SwapAmountsPatchResult, type SwapInfo, type Token, type TokenInfo, type TokenPermitData, type TokenResponse, type TradeBuildTxnRequest, type TradeBuildTxnRequestData, type TradeBuildTxnResponse, type TradeGasBuildTxnResponse, type TradePath, type TradeQuotesRequest, type TradeQuotesRequestData, type TradeQuotesResponse, type TradeStatusResponse, type TradeStep, TxnStatus, type UnavailableRoutes, type ZapAsset, type ZapBuildTxnRequest, type ZapBuildTxnResponse, type ZapBundleAction, type ZapBundleRequest, type ZapBundleSrcToken, type ZapBvmTxnDetails, type ZapChains, type ZapEvmTxnDetails, type ZapFee, type ZapFeeType, type ZapIntegratorConfig, type ZapOutput, type ZapPath, type ZapPathAction, type ZapPathAsset, type ZapPool, type ZapPoolDetails, type ZapPoolDetailsRequest, type ZapPoolsRequest, type ZapPoolsResponse, type ZapPosition, type ZapPositionsRequest, type ZapPositionsResponse, type ZapProviders, type ZapQuoteRequest, type ZapQuoteResponse, type ZapRefund, type ZapRefundType, type ZapRouteRequestPoolDetails, type ZapRouteRequestPositionDetails, type ZapStatus, type ZapStatusRequest, type ZapStatusResponse, type ZapStatusStep, type ZapStep, type ZapTransactionStep, type ZapTxnDetails, type ZapUnderlyingToken, type ZapUnderlyingTokenWithAmount, arcTestnet, arthera, astralisTestnet, bitcoinTestnet, bitlayer, checkEIP2612PermitSupport, citrea, classifyAddress, contractErrorActions, customViemChains, erc20Functions, extendViemChain, fiveIre, formatToken, getTokensPairKey, hemi, hyperEvm, hyperliquid, katana, merlin, patchSwapAmountsFromTx, pushTestnet, robinhood, stableChain, tempo, viemChainsById, zapFeeType, zapPathAction, zapRefundType, zapStepAction };
2874
+ export { type AllowanceType, AllowanceTypes, type ApiRpcResponse, type ApprovalMode, ApprovalModes, type BatchPermitCallbackParams, type BtcTxData, type BtclnTxData, type Chain, type ChainData, type ContractErrorResponse, DZapClient, DZapPermitMode, type DZapTransactionResponse, type DecodeTxnDataClientParams, type DecodeTxnDataClientParamsWithoutService, type DecodeTxnDataResponse, type EvmTxData, type Fee, type FeeDetails, type GaslessTradeBuildTxnResponse, type HexString, type HyperLiquidTxData, OtherAbis, type ParamQuotes, type PermitMode, PermitTypes, type ProtocolAmountErrorDetails, type ProtocolAmountReason, type ProtocolErrorInfo, type ProtocolErrorType, type ProtocolRouteErrorDetails, type ProtocolRouteReason, type ProtocolSlippageErrorDetails, type ProtocolUnknownErrorDetails, type ProviderDetails, type PsbtInput, type PsbtOutput, type QuoteFilter, QuoteFilters, STATUS, type SVMTxnDetails, Services, type SignPermitResponse, type SignatureCallbackParams, SignatureExpiryInSecs, type SinglePermitCallbackParams, StatusCodes, type StepAction, type SvmTxData, type SwapAmountsPatchResult, type SwapInfo, type Token, type TokenInfo, type TokenPermitData, type TokenResponse, type TradeBuildTxnRequest, type TradeBuildTxnRequestData, type TradeBuildTxnResponse, type TradeGasBuildTxnResponse, type TradePath, type TradeQuotesRequest, type TradeQuotesRequestData, type TradeQuotesResponse, type TradeStatusResponse, type TradeStep, TxnStatus, type UnavailableRoutes, type ZapAsset, type ZapBuildTxnRequest, type ZapBuildTxnResponse, type ZapBundleAction, type ZapBundleRequest, type ZapBundleSrcToken, type ZapBvmTxnDetails, type ZapChains, type ZapEvmTxnDetails, type ZapFee, type ZapFeeType, type ZapIntegratorConfig, type ZapOutput, type ZapPath, type ZapPathAction, type ZapPathAsset, type ZapPool, type ZapPoolDetails, type ZapPoolDetailsRequest, type ZapPoolsRequest, type ZapPoolsResponse, type ZapPosition, type ZapPositionsRequest, type ZapPositionsResponse, type ZapPreExecutionResult, type ZapPreExecutionStep, type ZapPreExecutionStepData, type ZapPreExecutionStepType, type ZapProviders, type ZapQuoteRequest, type ZapQuoteResponse, type ZapRefund, type ZapRefundType, type ZapRouteRequestPoolDetails, type ZapRouteRequestPositionDetails, type ZapSignPreExecutionStep, type ZapSignPreExecutionStepData, type ZapStatus, type ZapStatusRequest, type ZapStatusResponse, type ZapStatusStep, type ZapStep, type ZapTransactionStep, type ZapTxnDetails, type ZapTypedDataPayload, type ZapUnderlyingToken, type ZapUnderlyingTokenWithAmount, arcTestnet, arthera, astralisTestnet, bitcoinTestnet, bitlayer, checkEIP2612PermitSupport, citrea, classifyAddress, contractErrorActions, customViemChains, erc20Functions, extendViemChain, fiveIre, formatToken, getTokensPairKey, hemi, hyperEvm, hyperliquid, katana, merlin, patchSwapAmountsFromTx, pushTestnet, robinhood, stableChain, tempo, viemChainsById, zapFeeType, zapPathAction, zapPreExecutionStepType, zapRefundType, zapStepAction };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import * as viem from 'viem';
2
- import { TypedDataDomain, Prettify, WalletClient, TransactionReceipt, WalletCallReceipt as WalletCallReceipt$1, ChainFormatters, Chain as Chain$1, Assign } from 'viem';
3
1
  import { Signer } from 'ethers';
2
+ import * as viem from 'viem';
3
+ import { TypedDataDomain, TypedData, Prettify, WalletClient, TransactionReceipt, WalletCallReceipt as WalletCallReceipt$1, ChainFormatters, Chain as Chain$1, Assign } from 'viem';
4
4
  import * as viemChains from 'viem/chains';
5
5
  import { Chain as Chain$2 } from 'viem/chains';
6
6
  import { ChainId } from '@bigmi/core';
@@ -153,6 +153,85 @@ declare const AllowanceTypes: {
153
153
  };
154
154
  type AllowanceType = (typeof AllowanceTypes)[keyof typeof AllowanceTypes];
155
155
 
156
+ declare const chainTypes: {
157
+ readonly evm: "evm";
158
+ readonly bvm: "bvm";
159
+ readonly svm: "svm";
160
+ readonly aptosvm: "aptosvm";
161
+ readonly cosmos: "cosmos";
162
+ readonly nearvm: "nearvm";
163
+ readonly starknetvm: "starknetvm";
164
+ readonly stellarvm: "stellarvm";
165
+ readonly suivm: "suivm";
166
+ readonly tonvm: "tonvm";
167
+ readonly tronvm: "tronvm";
168
+ };
169
+
170
+ declare const zapStepAction: {
171
+ readonly execute: "execute";
172
+ readonly approve: "approve";
173
+ };
174
+ declare const zapPreExecutionStepType: {
175
+ readonly sign: "sign";
176
+ };
177
+
178
+ type StepAction = keyof typeof zapStepAction;
179
+ type ZapPreExecutionStepType = keyof typeof zapPreExecutionStepType;
180
+ type ZapEvmTxnDetails = {
181
+ type: typeof chainTypes.evm;
182
+ txnId: HexString;
183
+ callData: HexString;
184
+ callTo: HexString;
185
+ value: string;
186
+ estimatedGas: string;
187
+ };
188
+ type ZapBvmTxnDetails = {
189
+ type: typeof chainTypes.bvm;
190
+ txnId: HexString;
191
+ data: string;
192
+ };
193
+ type SVMTxnDetails = {
194
+ type: typeof chainTypes.svm;
195
+ txnId: HexString;
196
+ data: string[];
197
+ blockhash?: {
198
+ blockhash: string;
199
+ lastValidBlockHeight: number;
200
+ };
201
+ estimatedGas: string;
202
+ isJitoTx?: boolean;
203
+ };
204
+ type ZapTxnDetails = ZapEvmTxnDetails | ZapBvmTxnDetails | SVMTxnDetails;
205
+ type ZapTypedDataPayload = {
206
+ domain: TypedDataDomain;
207
+ types: TypedData;
208
+ primaryType: string;
209
+ message: Record<string, unknown>;
210
+ };
211
+ type ZapSignPreExecutionStep = {
212
+ id: string;
213
+ type: typeof zapPreExecutionStepType.sign;
214
+ data: ZapTypedDataPayload;
215
+ };
216
+ type ZapPreExecutionStep = ZapSignPreExecutionStep;
217
+ type ZapSignPreExecutionStepData = {
218
+ id: string;
219
+ type: typeof zapPreExecutionStepType.sign;
220
+ signature: HexString;
221
+ message: Record<string, unknown>;
222
+ };
223
+ type ZapPreExecutionResult = {
224
+ status: TxnStatus.success;
225
+ code: StatusCodes | number;
226
+ preExecutionStepsData: ZapPreExecutionStepData[];
227
+ } | DZapTransactionResponse;
228
+ type ZapPreExecutionStepData = ZapSignPreExecutionStepData;
229
+ type ZapTransactionStep<T extends ZapTxnDetails = ZapTxnDetails> = {
230
+ action: StepAction;
231
+ data: T;
232
+ };
233
+ type ZapStep = ZapTransactionStep;
234
+
156
235
  declare const zapFeeType: {
157
236
  readonly fee: "fee";
158
237
  readonly ata: "ata";
@@ -173,10 +252,13 @@ declare const zapPathAction: {
173
252
  readonly bridge: "bridge";
174
253
  readonly deposit: "deposit";
175
254
  readonly withdraw: "withdraw";
255
+ readonly borrow: "borrow";
176
256
  readonly stake: "stake";
177
257
  readonly unstake: "unstake";
178
258
  readonly increase: "increase";
179
259
  readonly harvest: "harvest";
260
+ readonly long: "long";
261
+ readonly short: "short";
180
262
  };
181
263
 
182
264
  type ZapRefundType = (typeof zapRefundType)[keyof typeof zapRefundType];
@@ -222,56 +304,6 @@ type ZapFee = ZapAsset & {
222
304
  type: ZapFeeType;
223
305
  };
224
306
 
225
- declare const chainTypes: {
226
- readonly evm: "evm";
227
- readonly bvm: "bvm";
228
- readonly svm: "svm";
229
- readonly aptosvm: "aptosvm";
230
- readonly cosmos: "cosmos";
231
- readonly nearvm: "nearvm";
232
- readonly starknetvm: "starknetvm";
233
- readonly stellarvm: "stellarvm";
234
- readonly suivm: "suivm";
235
- readonly tonvm: "tonvm";
236
- readonly tronvm: "tronvm";
237
- };
238
-
239
- declare const zapStepAction: {
240
- readonly execute: "execute";
241
- };
242
-
243
- type StepAction = keyof typeof zapStepAction;
244
- type ZapEvmTxnDetails = {
245
- type: typeof chainTypes.evm;
246
- txnId: HexString;
247
- callData: HexString;
248
- callTo: HexString;
249
- value: string;
250
- estimatedGas: string;
251
- };
252
- type ZapBvmTxnDetails = {
253
- type: typeof chainTypes.bvm;
254
- txnId: HexString;
255
- data: string;
256
- };
257
- type SVMTxnDetails = {
258
- type: typeof chainTypes.svm;
259
- txnId: HexString;
260
- data: string[];
261
- blockhash?: {
262
- blockhash: string;
263
- lastValidBlockHeight: number;
264
- };
265
- estimatedGas: string;
266
- isJitoTx?: boolean;
267
- };
268
- type ZapTxnDetails = ZapEvmTxnDetails | ZapBvmTxnDetails | SVMTxnDetails;
269
- type ZapTransactionStep<T extends ZapTxnDetails = ZapTxnDetails> = {
270
- action: StepAction;
271
- data: T;
272
- };
273
- type ZapStep = ZapTransactionStep;
274
-
275
307
  type ZapRouteRequestPositionDetails = {
276
308
  nftId: string;
277
309
  };
@@ -296,6 +328,7 @@ type ZapBuildTxnResponse = {
296
328
  output: ZapOutput[];
297
329
  steps: ZapStep[];
298
330
  path: ZapPath[];
331
+ preExecutionSteps?: ZapPreExecutionStep[];
299
332
  };
300
333
  type ZapBuildTxnRequest = {
301
334
  srcToken: string;
@@ -308,6 +341,7 @@ type ZapBuildTxnRequest = {
308
341
  account: string;
309
342
  integrator?: ZapIntegratorConfig;
310
343
  permitData?: string;
344
+ preExecutionStepsData?: ZapPreExecutionStepData[];
311
345
  amount?: string;
312
346
  estimateGas?: boolean;
313
347
  positionDetails?: ZapRouteRequestPositionDetails;
@@ -326,9 +360,12 @@ type ZapBundleAction = {
326
360
  srcChainId: number;
327
361
  destToken?: string;
328
362
  destChainId?: number;
363
+ destAmount?: string;
329
364
  positionDetails?: ZapRouteRequestPositionDetails;
330
365
  poolDetails?: ZapRouteRequestPoolDetails;
331
366
  protocol?: string;
367
+ permitData?: HexString;
368
+ batchPermitData?: HexString;
332
369
  };
333
370
  type ZapBundleRequest = {
334
371
  actions: ZapBundleAction[];
@@ -341,6 +378,7 @@ type ZapBundleRequest = {
341
378
  integrator?: ZapIntegratorConfig;
342
379
  allowedDexes?: string[];
343
380
  allowedBridges?: string[];
381
+ preExecutionStepsData?: ZapPreExecutionStepData[];
344
382
  };
345
383
 
346
384
  type ZapPoolDetailsRequest = {
@@ -1019,6 +1057,12 @@ type BroadcastTxResponse = {
1019
1057
  message: string;
1020
1058
  };
1021
1059
 
1060
+ type ZapStepsResult = {
1061
+ status: TxnStatus.success;
1062
+ code: StatusCodes | number;
1063
+ txnHash?: string;
1064
+ } | DZapTransactionResponse;
1065
+
1022
1066
  type DecodeTransactionParameters = {
1023
1067
  txHash: string;
1024
1068
  chainId: number;
@@ -2046,15 +2090,18 @@ declare class DZapClient {
2046
2090
  rpcUrls?: string[];
2047
2091
  service: AvailableDZapServices;
2048
2092
  }>): Promise<SignPermitResponse<T>>;
2049
- zap({ request, steps, signer, }: {
2093
+ zap({ request, steps, preExecutionSteps, signer, rpcUrls, }: {
2050
2094
  request: ZapBuildTxnRequest | ZapBundleRequest;
2051
2095
  signer: WalletClient | Signer;
2052
2096
  steps?: ZapTransactionStep[];
2053
- }): Promise<DZapTransactionResponse | {
2054
- status: TxnStatus.success;
2055
- code: StatusCodes | number;
2056
- txnHash: HexString;
2057
- }>;
2097
+ preExecutionSteps?: ZapPreExecutionStep[];
2098
+ rpcUrls?: string[];
2099
+ }): Promise<ZapStepsResult>;
2100
+ prepareZapPreExecutionData({ preExecutionSteps, signer, account, }: {
2101
+ preExecutionSteps?: ZapPreExecutionStep[];
2102
+ signer: WalletClient | Signer;
2103
+ account?: string;
2104
+ }): Promise<ZapPreExecutionResult>;
2058
2105
  buildZapTxn(request: ZapBuildTxnRequest): Promise<ZapBuildTxnResponse>;
2059
2106
  getZapQuote(request: ZapQuoteRequest): Promise<ZapQuoteResponse>;
2060
2107
  getZapBundleQuote(request: ZapBundleRequest): Promise<ZapQuoteResponse>;
@@ -2824,4 +2871,4 @@ declare const robinhood: {
2824
2871
  declare const customViemChains: viemChains.Chain[];
2825
2872
  declare const viemChainsById: Record<number, viemChains.Chain>;
2826
2873
 
2827
- export { type AllowanceType, AllowanceTypes, type ApiRpcResponse, type ApprovalMode, ApprovalModes, type BatchPermitCallbackParams, type BtcTxData, type BtclnTxData, type Chain, type ChainData, type ContractErrorResponse, DZapClient, DZapPermitMode, type DZapTransactionResponse, type DecodeTxnDataClientParams, type DecodeTxnDataClientParamsWithoutService, type DecodeTxnDataResponse, type EvmTxData, type Fee, type FeeDetails, type GaslessTradeBuildTxnResponse, type HexString, type HyperLiquidTxData, OtherAbis, type ParamQuotes, type PermitMode, PermitTypes, type ProtocolAmountErrorDetails, type ProtocolAmountReason, type ProtocolErrorInfo, type ProtocolErrorType, type ProtocolRouteErrorDetails, type ProtocolRouteReason, type ProtocolSlippageErrorDetails, type ProtocolUnknownErrorDetails, type ProviderDetails, type PsbtInput, type PsbtOutput, type QuoteFilter, QuoteFilters, STATUS, type SVMTxnDetails, Services, type SignPermitResponse, type SignatureCallbackParams, SignatureExpiryInSecs, type SinglePermitCallbackParams, StatusCodes, type StepAction, type SvmTxData, type SwapAmountsPatchResult, type SwapInfo, type Token, type TokenInfo, type TokenPermitData, type TokenResponse, type TradeBuildTxnRequest, type TradeBuildTxnRequestData, type TradeBuildTxnResponse, type TradeGasBuildTxnResponse, type TradePath, type TradeQuotesRequest, type TradeQuotesRequestData, type TradeQuotesResponse, type TradeStatusResponse, type TradeStep, TxnStatus, type UnavailableRoutes, type ZapAsset, type ZapBuildTxnRequest, type ZapBuildTxnResponse, type ZapBundleAction, type ZapBundleRequest, type ZapBundleSrcToken, type ZapBvmTxnDetails, type ZapChains, type ZapEvmTxnDetails, type ZapFee, type ZapFeeType, type ZapIntegratorConfig, type ZapOutput, type ZapPath, type ZapPathAction, type ZapPathAsset, type ZapPool, type ZapPoolDetails, type ZapPoolDetailsRequest, type ZapPoolsRequest, type ZapPoolsResponse, type ZapPosition, type ZapPositionsRequest, type ZapPositionsResponse, type ZapProviders, type ZapQuoteRequest, type ZapQuoteResponse, type ZapRefund, type ZapRefundType, type ZapRouteRequestPoolDetails, type ZapRouteRequestPositionDetails, type ZapStatus, type ZapStatusRequest, type ZapStatusResponse, type ZapStatusStep, type ZapStep, type ZapTransactionStep, type ZapTxnDetails, type ZapUnderlyingToken, type ZapUnderlyingTokenWithAmount, arcTestnet, arthera, astralisTestnet, bitcoinTestnet, bitlayer, checkEIP2612PermitSupport, citrea, classifyAddress, contractErrorActions, customViemChains, erc20Functions, extendViemChain, fiveIre, formatToken, getTokensPairKey, hemi, hyperEvm, hyperliquid, katana, merlin, patchSwapAmountsFromTx, pushTestnet, robinhood, stableChain, tempo, viemChainsById, zapFeeType, zapPathAction, zapRefundType, zapStepAction };
2874
+ export { type AllowanceType, AllowanceTypes, type ApiRpcResponse, type ApprovalMode, ApprovalModes, type BatchPermitCallbackParams, type BtcTxData, type BtclnTxData, type Chain, type ChainData, type ContractErrorResponse, DZapClient, DZapPermitMode, type DZapTransactionResponse, type DecodeTxnDataClientParams, type DecodeTxnDataClientParamsWithoutService, type DecodeTxnDataResponse, type EvmTxData, type Fee, type FeeDetails, type GaslessTradeBuildTxnResponse, type HexString, type HyperLiquidTxData, OtherAbis, type ParamQuotes, type PermitMode, PermitTypes, type ProtocolAmountErrorDetails, type ProtocolAmountReason, type ProtocolErrorInfo, type ProtocolErrorType, type ProtocolRouteErrorDetails, type ProtocolRouteReason, type ProtocolSlippageErrorDetails, type ProtocolUnknownErrorDetails, type ProviderDetails, type PsbtInput, type PsbtOutput, type QuoteFilter, QuoteFilters, STATUS, type SVMTxnDetails, Services, type SignPermitResponse, type SignatureCallbackParams, SignatureExpiryInSecs, type SinglePermitCallbackParams, StatusCodes, type StepAction, type SvmTxData, type SwapAmountsPatchResult, type SwapInfo, type Token, type TokenInfo, type TokenPermitData, type TokenResponse, type TradeBuildTxnRequest, type TradeBuildTxnRequestData, type TradeBuildTxnResponse, type TradeGasBuildTxnResponse, type TradePath, type TradeQuotesRequest, type TradeQuotesRequestData, type TradeQuotesResponse, type TradeStatusResponse, type TradeStep, TxnStatus, type UnavailableRoutes, type ZapAsset, type ZapBuildTxnRequest, type ZapBuildTxnResponse, type ZapBundleAction, type ZapBundleRequest, type ZapBundleSrcToken, type ZapBvmTxnDetails, type ZapChains, type ZapEvmTxnDetails, type ZapFee, type ZapFeeType, type ZapIntegratorConfig, type ZapOutput, type ZapPath, type ZapPathAction, type ZapPathAsset, type ZapPool, type ZapPoolDetails, type ZapPoolDetailsRequest, type ZapPoolsRequest, type ZapPoolsResponse, type ZapPosition, type ZapPositionsRequest, type ZapPositionsResponse, type ZapPreExecutionResult, type ZapPreExecutionStep, type ZapPreExecutionStepData, type ZapPreExecutionStepType, type ZapProviders, type ZapQuoteRequest, type ZapQuoteResponse, type ZapRefund, type ZapRefundType, type ZapRouteRequestPoolDetails, type ZapRouteRequestPositionDetails, type ZapSignPreExecutionStep, type ZapSignPreExecutionStepData, type ZapStatus, type ZapStatusRequest, type ZapStatusResponse, type ZapStatusStep, type ZapStep, type ZapTransactionStep, type ZapTxnDetails, type ZapTypedDataPayload, type ZapUnderlyingToken, type ZapUnderlyingTokenWithAmount, arcTestnet, arthera, astralisTestnet, bitcoinTestnet, bitlayer, checkEIP2612PermitSupport, citrea, classifyAddress, contractErrorActions, customViemChains, erc20Functions, extendViemChain, fiveIre, formatToken, getTokensPairKey, hemi, hyperEvm, hyperliquid, katana, merlin, patchSwapAmountsFromTx, pushTestnet, robinhood, stableChain, tempo, viemChainsById, zapFeeType, zapPathAction, zapPreExecutionStepType, zapRefundType, zapStepAction };