@dzapio/sdk 2.0.48 → 2.0.50

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
@@ -3,6 +3,8 @@ import { WalletCallReceipt as WalletCallReceipt$1, TypedDataDomain, Prettify, Wa
3
3
  import { Signer } from 'ethers';
4
4
  import * as viemChains from 'viem/chains';
5
5
  import { Chain as Chain$2 } from 'viem/chains';
6
+ import { ChainId } from '@bigmi/core';
7
+ export { bitcoin } from '@bigmi/core';
6
8
 
7
9
  declare const STATUS: {
8
10
  pending: string;
@@ -153,6 +155,21 @@ declare const AllowanceTypes: {
153
155
  };
154
156
  type AllowanceType = (typeof AllowanceTypes)[keyof typeof AllowanceTypes];
155
157
 
158
+ declare const zapFeeType: {
159
+ readonly fee: "fee";
160
+ readonly ata: "ata";
161
+ readonly nftMint: "nft_mint";
162
+ readonly position: "position";
163
+ readonly protocolPosition: "protocol_position";
164
+ readonly tickArray: "tick_array";
165
+ readonly binArray: "bin_array";
166
+ readonly bitmapExtension: "bitmap_extension";
167
+ };
168
+ declare const zapRefundType: {
169
+ readonly dust: "dust";
170
+ readonly rent: "rent";
171
+ };
172
+
156
173
  declare const zapPathAction: {
157
174
  readonly swap: "swap";
158
175
  readonly bridge: "bridge";
@@ -164,12 +181,9 @@ declare const zapPathAction: {
164
181
  readonly harvest: "harvest";
165
182
  };
166
183
 
167
- type ZapFee = {
168
- amount: string;
169
- amountUSD: string;
170
- asset: ZapPathAsset;
171
- included: boolean;
172
- refundable: boolean;
184
+ type ZapRefundType = (typeof zapRefundType)[keyof typeof zapRefundType];
185
+ type ZapRefund = ZapOutput & {
186
+ type: ZapRefundType;
173
187
  };
174
188
 
175
189
  type ZapPathAction = keyof typeof zapPathAction;
@@ -185,22 +199,29 @@ type ZapPathAsset = {
185
199
  provider?: ProviderDetails;
186
200
  underlyingTokens?: ZapUnderlyingToken[];
187
201
  };
202
+ type ZapAsset = {
203
+ asset: ZapPathAsset;
204
+ amount: string;
205
+ amountUSD: string;
206
+ };
207
+ type ZapOutput = ZapAsset & {
208
+ minAmount: string;
209
+ };
188
210
  type ZapPath = {
189
211
  action: ZapPathAction;
190
212
  protocol: ProviderDetails;
191
213
  fee: ZapFee[];
214
+ refund: ZapRefund[];
192
215
  estimatedDuration: number;
193
- input: {
194
- asset: ZapPathAsset;
195
- amount: string;
196
- amountUSD: string;
197
- }[];
198
- output: {
199
- asset: ZapPathAsset;
200
- amount: string;
201
- amountUSD: string;
202
- minAmount: string;
203
- }[];
216
+ input: ZapAsset[];
217
+ output: ZapOutput[];
218
+ };
219
+
220
+ type ZapFeeType = (typeof zapFeeType)[keyof typeof zapFeeType];
221
+ type ZapFee = ZapAsset & {
222
+ included: boolean;
223
+ refundable: boolean;
224
+ type: ZapFeeType;
204
225
  };
205
226
 
206
227
  declare const chainTypes: {
@@ -272,8 +293,9 @@ type ZapBuildTxnResponse = {
272
293
  approveTo: HexString;
273
294
  amount: string;
274
295
  }[];
275
- dust: ZapPath['output'];
276
- output: ZapPath['output'];
296
+ refund: ZapRefund[];
297
+ fees: ZapFee[];
298
+ output: ZapOutput[];
277
299
  steps: ZapStep[];
278
300
  path: ZapPath[];
279
301
  };
@@ -395,26 +417,21 @@ type ZapQuoteRequest = Omit<ZapBuildTxnRequest, 'refundee' | 'recipient' | 'acco
395
417
  }>;
396
418
 
397
419
  type ZapStatus = 'PENDING' | 'COMPLETED' | 'FAILED' | 'REFUNDED';
398
- type ZapStatusAsset = {
399
- asset: ZapPathAsset;
400
- amount: string;
401
- amountUSD: string;
402
- };
403
420
  type ZapStatusStep = {
404
421
  chainId: number;
405
422
  hash?: string;
406
423
  status: ZapStatus;
407
424
  action: string;
408
425
  protocol: ProviderDetails;
409
- input: ZapStatusAsset[];
410
- output: ZapStatusAsset[];
426
+ input: ZapAsset[];
427
+ output: ZapAsset[];
411
428
  };
412
429
  type ZapStatusResponse = {
413
430
  status: ZapStatus;
414
431
  account: string;
415
432
  recipient: string;
416
- input: ZapStatusAsset[];
417
- output: ZapStatusAsset[];
433
+ input: ZapAsset[];
434
+ output: ZapAsset[];
418
435
  steps: ZapStatusStep[];
419
436
  timestamp: number;
420
437
  completedAt: number;
@@ -642,6 +659,7 @@ type TradeQuote = {
642
659
  gasless: boolean;
643
660
  steps: TradeStep[];
644
661
  path: TradePath[];
662
+ simulated?: boolean;
645
663
  tags?: Tag[];
646
664
  additionalInfo?: AdditionalInfo;
647
665
  };
@@ -2210,6 +2228,76 @@ declare const astralisTestnet: {
2210
2228
  verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
2211
2229
  };
2212
2230
 
2231
+ declare const bitlayer: {
2232
+ blockExplorers: {
2233
+ readonly default: {
2234
+ readonly name: "bitlayer mainnet scan";
2235
+ readonly url: "https://www.btrscan.com";
2236
+ };
2237
+ };
2238
+ blockTime?: number | undefined | undefined;
2239
+ contracts: {
2240
+ readonly multicall3: {
2241
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
2242
+ readonly blockCreated: 3225645;
2243
+ };
2244
+ };
2245
+ ensTlds?: readonly string[] | undefined;
2246
+ id: 200901;
2247
+ name: "Bitlayer Mainnet";
2248
+ nativeCurrency: {
2249
+ readonly name: "BTC";
2250
+ readonly symbol: "BTC";
2251
+ readonly decimals: 18;
2252
+ };
2253
+ experimental_preconfirmationTime?: number | undefined | undefined;
2254
+ rpcUrls: {
2255
+ readonly default: {
2256
+ readonly http: readonly ["https://rpc.bitlayer.org"];
2257
+ readonly webSocket: readonly ["wss://ws.bitlayer.org"];
2258
+ };
2259
+ };
2260
+ sourceId?: number | undefined | undefined;
2261
+ testnet?: boolean | undefined | undefined;
2262
+ custom?: Record<string, unknown> | undefined;
2263
+ extendSchema?: Record<string, unknown> | undefined;
2264
+ fees?: viem.ChainFees<undefined> | undefined;
2265
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
2266
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2267
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
2268
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2269
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
2270
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
2271
+ }] | undefined;
2272
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable<bigint, number>> | undefined;
2273
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
2274
+ formatters?: undefined | undefined;
2275
+ };
2276
+
2277
+ declare const bitcoinTestnet: {
2278
+ blockExplorers: {
2279
+ readonly default: {
2280
+ readonly name: "Mempool";
2281
+ readonly url: "https://mempool.space/testnet4";
2282
+ };
2283
+ };
2284
+ id: ChainId.BITCOIN_TESTNET4;
2285
+ name: "Bitcoin Testnet";
2286
+ rpcUrls: {
2287
+ readonly default: {
2288
+ readonly http: readonly ["https://bitcoin-testnet4.gateway.tatum.io"];
2289
+ };
2290
+ };
2291
+ testnet: true;
2292
+ custom?: Record<string, unknown> | undefined;
2293
+ formatters?: undefined;
2294
+ readonly nativeCurrency: {
2295
+ readonly name: "Bitcoin";
2296
+ readonly symbol: "BTC";
2297
+ readonly decimals: 8;
2298
+ };
2299
+ };
2300
+
2213
2301
  declare const citrea: {
2214
2302
  blockExplorers: {
2215
2303
  readonly default: {
@@ -2437,6 +2525,98 @@ declare const hyperliquid: {
2437
2525
  verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
2438
2526
  };
2439
2527
 
2528
+ declare const katana: {
2529
+ blockExplorers: {
2530
+ readonly default: {
2531
+ readonly name: "katana explorer";
2532
+ readonly url: "https://katanascan.com";
2533
+ };
2534
+ };
2535
+ blockTime?: number | undefined | undefined;
2536
+ contracts: {
2537
+ readonly multicall3: {
2538
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
2539
+ readonly blockCreated: 1898013;
2540
+ };
2541
+ };
2542
+ ensTlds?: readonly string[] | undefined;
2543
+ id: 747474;
2544
+ name: "Katana";
2545
+ nativeCurrency: {
2546
+ readonly name: "Ether";
2547
+ readonly symbol: "ETH";
2548
+ readonly decimals: 18;
2549
+ };
2550
+ experimental_preconfirmationTime?: number | undefined | undefined;
2551
+ rpcUrls: {
2552
+ readonly default: {
2553
+ readonly http: readonly ["https://rpc.katana.network"];
2554
+ };
2555
+ };
2556
+ sourceId?: number | undefined | undefined;
2557
+ testnet: false;
2558
+ custom?: Record<string, unknown> | undefined;
2559
+ extendSchema?: Record<string, unknown> | undefined;
2560
+ fees?: viem.ChainFees<undefined> | undefined;
2561
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
2562
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2563
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
2564
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2565
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
2566
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
2567
+ }] | undefined;
2568
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable<bigint, number>> | undefined;
2569
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
2570
+ formatters?: undefined | undefined;
2571
+ readonly network: "katana";
2572
+ };
2573
+
2574
+ declare const merlin: {
2575
+ blockExplorers: {
2576
+ readonly default: {
2577
+ readonly name: "blockscout";
2578
+ readonly url: "https://scan.merlinchain.io";
2579
+ readonly apiUrl: "https://scan.merlinchain.io/api";
2580
+ };
2581
+ };
2582
+ blockTime?: number | undefined | undefined;
2583
+ contracts: {
2584
+ readonly multicall3: {
2585
+ readonly address: "0xa8DceBAd1ea2fCf86De386462C14D7629237CC88";
2586
+ readonly blockCreated: 11997883;
2587
+ };
2588
+ };
2589
+ ensTlds?: readonly string[] | undefined;
2590
+ id: 4200;
2591
+ name: "Merlin";
2592
+ nativeCurrency: {
2593
+ readonly name: "BTC";
2594
+ readonly symbol: "BTC";
2595
+ readonly decimals: 18;
2596
+ };
2597
+ experimental_preconfirmationTime?: number | undefined | undefined;
2598
+ rpcUrls: {
2599
+ readonly default: {
2600
+ readonly http: readonly ["https://rpc.merlinchain.io"];
2601
+ };
2602
+ };
2603
+ sourceId?: number | undefined | undefined;
2604
+ testnet?: boolean | undefined | undefined;
2605
+ custom?: Record<string, unknown> | undefined;
2606
+ extendSchema?: Record<string, unknown> | undefined;
2607
+ fees?: viem.ChainFees<undefined> | undefined;
2608
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
2609
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2610
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
2611
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2612
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
2613
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
2614
+ }] | undefined;
2615
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable<bigint, number>> | undefined;
2616
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
2617
+ formatters?: undefined | undefined;
2618
+ };
2619
+
2440
2620
  declare const pushTestnet: {
2441
2621
  blockExplorers: {
2442
2622
  readonly default: {
@@ -2578,4 +2758,4 @@ declare const robinhood: {
2578
2758
  declare const customViemChains: viemChains.Chain[];
2579
2759
  declare const viemChainsById: Record<number, viemChains.Chain>;
2580
2760
 
2581
- 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 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 SwapInfo, SwapInputDataDecoder, 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 ZapBuildTxnRequest, type ZapBuildTxnResponse, type ZapBundleAction, type ZapBundleRequest, type ZapBundleSrcToken, type ZapBvmTxnDetails, type ZapChains, type ZapEvmTxnDetails, type ZapFee, type ZapIntegratorConfig, 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 ZapRouteRequestPoolDetails, type ZapRouteRequestPositionDetails, type ZapStatus, type ZapStatusAsset, type ZapStatusRequest, type ZapStatusResponse, type ZapStatusStep, type ZapStep, type ZapTransactionStep, type ZapTxnDetails, type ZapUnderlyingToken, type ZapUnderlyingTokenWithAmount, arcTestnet, arthera, astralisTestnet, checkEIP2612PermitSupport, citrea, classifyAddress, contractErrorActions, customViemChains, erc20Functions, extendViemChain, fiveIre, formatToken, getTokensPairKey, hemi, hyperEvm, hyperliquid, pushTestnet, robinhood, stableChain, tempo, viemChainsById, zapPathAction, zapStepAction };
2761
+ 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 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 SwapInfo, SwapInputDataDecoder, 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, pushTestnet, robinhood, stableChain, tempo, viemChainsById, zapFeeType, zapPathAction, zapRefundType, zapStepAction };
package/dist/index.d.ts CHANGED
@@ -3,6 +3,8 @@ import { WalletCallReceipt as WalletCallReceipt$1, TypedDataDomain, Prettify, Wa
3
3
  import { Signer } from 'ethers';
4
4
  import * as viemChains from 'viem/chains';
5
5
  import { Chain as Chain$2 } from 'viem/chains';
6
+ import { ChainId } from '@bigmi/core';
7
+ export { bitcoin } from '@bigmi/core';
6
8
 
7
9
  declare const STATUS: {
8
10
  pending: string;
@@ -153,6 +155,21 @@ declare const AllowanceTypes: {
153
155
  };
154
156
  type AllowanceType = (typeof AllowanceTypes)[keyof typeof AllowanceTypes];
155
157
 
158
+ declare const zapFeeType: {
159
+ readonly fee: "fee";
160
+ readonly ata: "ata";
161
+ readonly nftMint: "nft_mint";
162
+ readonly position: "position";
163
+ readonly protocolPosition: "protocol_position";
164
+ readonly tickArray: "tick_array";
165
+ readonly binArray: "bin_array";
166
+ readonly bitmapExtension: "bitmap_extension";
167
+ };
168
+ declare const zapRefundType: {
169
+ readonly dust: "dust";
170
+ readonly rent: "rent";
171
+ };
172
+
156
173
  declare const zapPathAction: {
157
174
  readonly swap: "swap";
158
175
  readonly bridge: "bridge";
@@ -164,12 +181,9 @@ declare const zapPathAction: {
164
181
  readonly harvest: "harvest";
165
182
  };
166
183
 
167
- type ZapFee = {
168
- amount: string;
169
- amountUSD: string;
170
- asset: ZapPathAsset;
171
- included: boolean;
172
- refundable: boolean;
184
+ type ZapRefundType = (typeof zapRefundType)[keyof typeof zapRefundType];
185
+ type ZapRefund = ZapOutput & {
186
+ type: ZapRefundType;
173
187
  };
174
188
 
175
189
  type ZapPathAction = keyof typeof zapPathAction;
@@ -185,22 +199,29 @@ type ZapPathAsset = {
185
199
  provider?: ProviderDetails;
186
200
  underlyingTokens?: ZapUnderlyingToken[];
187
201
  };
202
+ type ZapAsset = {
203
+ asset: ZapPathAsset;
204
+ amount: string;
205
+ amountUSD: string;
206
+ };
207
+ type ZapOutput = ZapAsset & {
208
+ minAmount: string;
209
+ };
188
210
  type ZapPath = {
189
211
  action: ZapPathAction;
190
212
  protocol: ProviderDetails;
191
213
  fee: ZapFee[];
214
+ refund: ZapRefund[];
192
215
  estimatedDuration: number;
193
- input: {
194
- asset: ZapPathAsset;
195
- amount: string;
196
- amountUSD: string;
197
- }[];
198
- output: {
199
- asset: ZapPathAsset;
200
- amount: string;
201
- amountUSD: string;
202
- minAmount: string;
203
- }[];
216
+ input: ZapAsset[];
217
+ output: ZapOutput[];
218
+ };
219
+
220
+ type ZapFeeType = (typeof zapFeeType)[keyof typeof zapFeeType];
221
+ type ZapFee = ZapAsset & {
222
+ included: boolean;
223
+ refundable: boolean;
224
+ type: ZapFeeType;
204
225
  };
205
226
 
206
227
  declare const chainTypes: {
@@ -272,8 +293,9 @@ type ZapBuildTxnResponse = {
272
293
  approveTo: HexString;
273
294
  amount: string;
274
295
  }[];
275
- dust: ZapPath['output'];
276
- output: ZapPath['output'];
296
+ refund: ZapRefund[];
297
+ fees: ZapFee[];
298
+ output: ZapOutput[];
277
299
  steps: ZapStep[];
278
300
  path: ZapPath[];
279
301
  };
@@ -395,26 +417,21 @@ type ZapQuoteRequest = Omit<ZapBuildTxnRequest, 'refundee' | 'recipient' | 'acco
395
417
  }>;
396
418
 
397
419
  type ZapStatus = 'PENDING' | 'COMPLETED' | 'FAILED' | 'REFUNDED';
398
- type ZapStatusAsset = {
399
- asset: ZapPathAsset;
400
- amount: string;
401
- amountUSD: string;
402
- };
403
420
  type ZapStatusStep = {
404
421
  chainId: number;
405
422
  hash?: string;
406
423
  status: ZapStatus;
407
424
  action: string;
408
425
  protocol: ProviderDetails;
409
- input: ZapStatusAsset[];
410
- output: ZapStatusAsset[];
426
+ input: ZapAsset[];
427
+ output: ZapAsset[];
411
428
  };
412
429
  type ZapStatusResponse = {
413
430
  status: ZapStatus;
414
431
  account: string;
415
432
  recipient: string;
416
- input: ZapStatusAsset[];
417
- output: ZapStatusAsset[];
433
+ input: ZapAsset[];
434
+ output: ZapAsset[];
418
435
  steps: ZapStatusStep[];
419
436
  timestamp: number;
420
437
  completedAt: number;
@@ -642,6 +659,7 @@ type TradeQuote = {
642
659
  gasless: boolean;
643
660
  steps: TradeStep[];
644
661
  path: TradePath[];
662
+ simulated?: boolean;
645
663
  tags?: Tag[];
646
664
  additionalInfo?: AdditionalInfo;
647
665
  };
@@ -2210,6 +2228,76 @@ declare const astralisTestnet: {
2210
2228
  verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
2211
2229
  };
2212
2230
 
2231
+ declare const bitlayer: {
2232
+ blockExplorers: {
2233
+ readonly default: {
2234
+ readonly name: "bitlayer mainnet scan";
2235
+ readonly url: "https://www.btrscan.com";
2236
+ };
2237
+ };
2238
+ blockTime?: number | undefined | undefined;
2239
+ contracts: {
2240
+ readonly multicall3: {
2241
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
2242
+ readonly blockCreated: 3225645;
2243
+ };
2244
+ };
2245
+ ensTlds?: readonly string[] | undefined;
2246
+ id: 200901;
2247
+ name: "Bitlayer Mainnet";
2248
+ nativeCurrency: {
2249
+ readonly name: "BTC";
2250
+ readonly symbol: "BTC";
2251
+ readonly decimals: 18;
2252
+ };
2253
+ experimental_preconfirmationTime?: number | undefined | undefined;
2254
+ rpcUrls: {
2255
+ readonly default: {
2256
+ readonly http: readonly ["https://rpc.bitlayer.org"];
2257
+ readonly webSocket: readonly ["wss://ws.bitlayer.org"];
2258
+ };
2259
+ };
2260
+ sourceId?: number | undefined | undefined;
2261
+ testnet?: boolean | undefined | undefined;
2262
+ custom?: Record<string, unknown> | undefined;
2263
+ extendSchema?: Record<string, unknown> | undefined;
2264
+ fees?: viem.ChainFees<undefined> | undefined;
2265
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
2266
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2267
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
2268
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2269
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
2270
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
2271
+ }] | undefined;
2272
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable<bigint, number>> | undefined;
2273
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
2274
+ formatters?: undefined | undefined;
2275
+ };
2276
+
2277
+ declare const bitcoinTestnet: {
2278
+ blockExplorers: {
2279
+ readonly default: {
2280
+ readonly name: "Mempool";
2281
+ readonly url: "https://mempool.space/testnet4";
2282
+ };
2283
+ };
2284
+ id: ChainId.BITCOIN_TESTNET4;
2285
+ name: "Bitcoin Testnet";
2286
+ rpcUrls: {
2287
+ readonly default: {
2288
+ readonly http: readonly ["https://bitcoin-testnet4.gateway.tatum.io"];
2289
+ };
2290
+ };
2291
+ testnet: true;
2292
+ custom?: Record<string, unknown> | undefined;
2293
+ formatters?: undefined;
2294
+ readonly nativeCurrency: {
2295
+ readonly name: "Bitcoin";
2296
+ readonly symbol: "BTC";
2297
+ readonly decimals: 8;
2298
+ };
2299
+ };
2300
+
2213
2301
  declare const citrea: {
2214
2302
  blockExplorers: {
2215
2303
  readonly default: {
@@ -2437,6 +2525,98 @@ declare const hyperliquid: {
2437
2525
  verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
2438
2526
  };
2439
2527
 
2528
+ declare const katana: {
2529
+ blockExplorers: {
2530
+ readonly default: {
2531
+ readonly name: "katana explorer";
2532
+ readonly url: "https://katanascan.com";
2533
+ };
2534
+ };
2535
+ blockTime?: number | undefined | undefined;
2536
+ contracts: {
2537
+ readonly multicall3: {
2538
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
2539
+ readonly blockCreated: 1898013;
2540
+ };
2541
+ };
2542
+ ensTlds?: readonly string[] | undefined;
2543
+ id: 747474;
2544
+ name: "Katana";
2545
+ nativeCurrency: {
2546
+ readonly name: "Ether";
2547
+ readonly symbol: "ETH";
2548
+ readonly decimals: 18;
2549
+ };
2550
+ experimental_preconfirmationTime?: number | undefined | undefined;
2551
+ rpcUrls: {
2552
+ readonly default: {
2553
+ readonly http: readonly ["https://rpc.katana.network"];
2554
+ };
2555
+ };
2556
+ sourceId?: number | undefined | undefined;
2557
+ testnet: false;
2558
+ custom?: Record<string, unknown> | undefined;
2559
+ extendSchema?: Record<string, unknown> | undefined;
2560
+ fees?: viem.ChainFees<undefined> | undefined;
2561
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
2562
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2563
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
2564
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2565
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
2566
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
2567
+ }] | undefined;
2568
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable<bigint, number>> | undefined;
2569
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
2570
+ formatters?: undefined | undefined;
2571
+ readonly network: "katana";
2572
+ };
2573
+
2574
+ declare const merlin: {
2575
+ blockExplorers: {
2576
+ readonly default: {
2577
+ readonly name: "blockscout";
2578
+ readonly url: "https://scan.merlinchain.io";
2579
+ readonly apiUrl: "https://scan.merlinchain.io/api";
2580
+ };
2581
+ };
2582
+ blockTime?: number | undefined | undefined;
2583
+ contracts: {
2584
+ readonly multicall3: {
2585
+ readonly address: "0xa8DceBAd1ea2fCf86De386462C14D7629237CC88";
2586
+ readonly blockCreated: 11997883;
2587
+ };
2588
+ };
2589
+ ensTlds?: readonly string[] | undefined;
2590
+ id: 4200;
2591
+ name: "Merlin";
2592
+ nativeCurrency: {
2593
+ readonly name: "BTC";
2594
+ readonly symbol: "BTC";
2595
+ readonly decimals: 18;
2596
+ };
2597
+ experimental_preconfirmationTime?: number | undefined | undefined;
2598
+ rpcUrls: {
2599
+ readonly default: {
2600
+ readonly http: readonly ["https://rpc.merlinchain.io"];
2601
+ };
2602
+ };
2603
+ sourceId?: number | undefined | undefined;
2604
+ testnet?: boolean | undefined | undefined;
2605
+ custom?: Record<string, unknown> | undefined;
2606
+ extendSchema?: Record<string, unknown> | undefined;
2607
+ fees?: viem.ChainFees<undefined> | undefined;
2608
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
2609
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2610
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
2611
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2612
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
2613
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
2614
+ }] | undefined;
2615
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable<bigint, number>> | undefined;
2616
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
2617
+ formatters?: undefined | undefined;
2618
+ };
2619
+
2440
2620
  declare const pushTestnet: {
2441
2621
  blockExplorers: {
2442
2622
  readonly default: {
@@ -2578,4 +2758,4 @@ declare const robinhood: {
2578
2758
  declare const customViemChains: viemChains.Chain[];
2579
2759
  declare const viemChainsById: Record<number, viemChains.Chain>;
2580
2760
 
2581
- 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 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 SwapInfo, SwapInputDataDecoder, 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 ZapBuildTxnRequest, type ZapBuildTxnResponse, type ZapBundleAction, type ZapBundleRequest, type ZapBundleSrcToken, type ZapBvmTxnDetails, type ZapChains, type ZapEvmTxnDetails, type ZapFee, type ZapIntegratorConfig, 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 ZapRouteRequestPoolDetails, type ZapRouteRequestPositionDetails, type ZapStatus, type ZapStatusAsset, type ZapStatusRequest, type ZapStatusResponse, type ZapStatusStep, type ZapStep, type ZapTransactionStep, type ZapTxnDetails, type ZapUnderlyingToken, type ZapUnderlyingTokenWithAmount, arcTestnet, arthera, astralisTestnet, checkEIP2612PermitSupport, citrea, classifyAddress, contractErrorActions, customViemChains, erc20Functions, extendViemChain, fiveIre, formatToken, getTokensPairKey, hemi, hyperEvm, hyperliquid, pushTestnet, robinhood, stableChain, tempo, viemChainsById, zapPathAction, zapStepAction };
2761
+ 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 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 SwapInfo, SwapInputDataDecoder, 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, pushTestnet, robinhood, stableChain, tempo, viemChainsById, zapFeeType, zapPathAction, zapRefundType, zapStepAction };
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ var viem = require('viem');
4
4
  var Axios = require('axios');
5
5
  var ethers = require('ethers');
6
6
  var viemChains = require('viem/chains');
7
+ var core = require('@bigmi/core');
7
8
  var utils = require('viem/utils');
8
9
  var actions = require('viem/actions');
9
10
  var Decimal = require('decimal.js');
@@ -10683,6 +10684,14 @@ var astralisTestnet = /* @__PURE__ */ viem.defineChain({
10683
10684
  }
10684
10685
  }
10685
10686
  });
10687
+ var bitlayer = extendViemChain(viemChains.bitlayer, {
10688
+ contracts: {
10689
+ multicall3: {
10690
+ address: "0xcA11bde05977b3631167028862bE2a173976CA11",
10691
+ blockCreated: 3225645
10692
+ }
10693
+ }
10694
+ });
10686
10695
  var citrea = extendViemChain(viemChains.citrea, {
10687
10696
  contracts: {
10688
10697
  multicall3: {
@@ -10767,6 +10776,22 @@ var hyperliquid = /* @__PURE__ */ viem.defineChain({
10767
10776
  }
10768
10777
  }
10769
10778
  });
10779
+ var katana = extendViemChain(viemChains.katana, {
10780
+ contracts: {
10781
+ multicall3: {
10782
+ address: "0xcA11bde05977b3631167028862bE2a173976CA11",
10783
+ blockCreated: 1898013
10784
+ }
10785
+ }
10786
+ });
10787
+ var merlin = extendViemChain(viemChains.merlin, {
10788
+ contracts: {
10789
+ multicall3: {
10790
+ address: "0xa8DceBAd1ea2fCf86De386462C14D7629237CC88",
10791
+ blockCreated: 11997883
10792
+ }
10793
+ }
10794
+ });
10770
10795
  var pushTestnet = /* @__PURE__ */ viem.defineChain({
10771
10796
  id: 42101,
10772
10797
  name: "Push Testnet",
@@ -10851,6 +10876,23 @@ var tempo = viemChains.tempo.extend({
10851
10876
  }
10852
10877
  }
10853
10878
  });
10879
+ var bitcoinTestnet = /* @__PURE__ */ core.defineChain({
10880
+ id: core.ChainId.BITCOIN_TESTNET4,
10881
+ name: "Bitcoin Testnet",
10882
+ nativeCurrency: { name: "Bitcoin", symbol: "BTC", decimals: 8 },
10883
+ rpcUrls: {
10884
+ default: {
10885
+ http: ["https://bitcoin-testnet4.gateway.tatum.io"]
10886
+ }
10887
+ },
10888
+ blockExplorers: {
10889
+ default: {
10890
+ name: "Mempool",
10891
+ url: "https://mempool.space/testnet4"
10892
+ }
10893
+ },
10894
+ testnet: true
10895
+ });
10854
10896
 
10855
10897
  // src/chains/index.ts
10856
10898
  var customViemChains = [
@@ -10865,7 +10907,10 @@ var customViemChains = [
10865
10907
  hemi,
10866
10908
  citrea,
10867
10909
  robinhood,
10868
- arcTestnet
10910
+ arcTestnet,
10911
+ bitlayer,
10912
+ merlin,
10913
+ katana
10869
10914
  ];
10870
10915
  var viemChainsById = [...Object.values(viemChains__namespace), ...customViemChains].reduce((acc, chainData) => {
10871
10916
  return chainData.id ? {
@@ -17053,6 +17098,36 @@ var zapPathAction = {
17053
17098
  harvest: "harvest"
17054
17099
  };
17055
17100
 
17101
+ // src/zap/constants/fee.ts
17102
+ var zapFeeType = {
17103
+ /** protocol or integrator fee taken out of the traded amount */
17104
+ fee: "fee",
17105
+ /** Associated Token Account — holds the user's balance for one mint. Created once per (wallet, mint); reused after that. */
17106
+ ata: "ata",
17107
+ /** NFT Mint — on-chain identity of a CLMM LP position. Burned and its rent recovered when the position closes. */
17108
+ nftMint: "nft_mint",
17109
+ /** Personal Position PDA — the user's LP state. Always created on open; rent refunded on close. */
17110
+ position: "position",
17111
+ /** Protocol Position PDA — pool-level tick range state, shared across every LP in that range. Rent is not refundable. */
17112
+ protocolPosition: "protocol_position",
17113
+ /** Tick Array PDA — tick data for a chunk of ticks, shared across the pool. Rent is not refundable. */
17114
+ tickArray: "tick_array",
17115
+ /** Bin Array PDA — bin data for a chunk of bins, shared across the pool. Rent is not refundable. */
17116
+ binArray: "bin_array",
17117
+ /** Bin Array Bitmap Extension PDA — bitmap state for bins outside the default range. Rent is not refundable. */
17118
+ bitmapExtension: "bitmap_extension"
17119
+ };
17120
+ var zapRefundType = {
17121
+ /** extra tokens the route ended up with because slippage came out in the user's favour */
17122
+ dust: "dust",
17123
+ /** account rent returned to the payer, e.g. when a position is closed */
17124
+ rent: "rent"
17125
+ };
17126
+
17127
+ Object.defineProperty(exports, "bitcoin", {
17128
+ enumerable: true,
17129
+ get: function () { return core.bitcoin; }
17130
+ });
17056
17131
  exports.AllowanceTypes = AllowanceTypes;
17057
17132
  exports.ApprovalModes = ApprovalModes;
17058
17133
  exports.DZapClient = dZapClient_default;
@@ -17069,6 +17144,8 @@ exports.TxnStatus = TxnStatus;
17069
17144
  exports.arcTestnet = arcTestnet;
17070
17145
  exports.arthera = arthera;
17071
17146
  exports.astralisTestnet = astralisTestnet;
17147
+ exports.bitcoinTestnet = bitcoinTestnet;
17148
+ exports.bitlayer = bitlayer;
17072
17149
  exports.checkEIP2612PermitSupport = checkEIP2612PermitSupport;
17073
17150
  exports.citrea = citrea;
17074
17151
  exports.classifyAddress = classifyAddress;
@@ -17082,10 +17159,14 @@ exports.getTokensPairKey = getTokensPairKey;
17082
17159
  exports.hemi = hemi;
17083
17160
  exports.hyperEvm = hyperEvm;
17084
17161
  exports.hyperliquid = hyperliquid;
17162
+ exports.katana = katana;
17163
+ exports.merlin = merlin;
17085
17164
  exports.pushTestnet = pushTestnet;
17086
17165
  exports.robinhood = robinhood;
17087
17166
  exports.stableChain = stableChain;
17088
17167
  exports.tempo = tempo;
17089
17168
  exports.viemChainsById = viemChainsById;
17169
+ exports.zapFeeType = zapFeeType;
17090
17170
  exports.zapPathAction = zapPathAction;
17171
+ exports.zapRefundType = zapRefundType;
17091
17172
  exports.zapStepAction = zapStepAction;
package/dist/index.mjs CHANGED
@@ -1,8 +1,10 @@
1
- import { encodeAbiParameters, parseAbiParameters, keccak256, encodePacked, stringToHex, defineChain, zeroAddress as zeroAddress$1, isAddress, getAddress, formatUnits, http, createPublicClient, fallback, parseEventLogs, maxUint256, encodeFunctionData, maxUint48, getContract, decodeAbiParameters } from 'viem';
1
+ import { encodeAbiParameters, parseAbiParameters, keccak256, encodePacked, stringToHex, defineChain as defineChain$1, zeroAddress as zeroAddress$1, isAddress, getAddress, formatUnits, http, createPublicClient, fallback, parseEventLogs, maxUint256, encodeFunctionData, maxUint48, getContract, decodeAbiParameters } from 'viem';
2
2
  import Axios from 'axios';
3
3
  import { Signer, ethers } from 'ethers';
4
4
  import * as viemChains from 'viem/chains';
5
- import { arcTestnet as arcTestnet$1, tempo as tempo$1, hemi as hemi$1, citrea as citrea$1 } from 'viem/chains';
5
+ import { arcTestnet as arcTestnet$1, tempo as tempo$1, hemi as hemi$1, citrea as citrea$1, bitlayer as bitlayer$1, merlin as merlin$1, katana as katana$1 } from 'viem/chains';
6
+ import { defineChain, ChainId } from '@bigmi/core';
7
+ export { bitcoin } from '@bigmi/core';
6
8
  import { decodeFunctionData, getAction } from 'viem/utils';
7
9
  import { waitForCallsStatus, sendCalls } from 'viem/actions';
8
10
  import Decimal from 'decimal.js';
@@ -10609,7 +10611,7 @@ var arcTestnet = extendViemChain(arcTestnet$1, {
10609
10611
  }
10610
10612
  }
10611
10613
  });
10612
- var arthera = /* @__PURE__ */ defineChain({
10614
+ var arthera = /* @__PURE__ */ defineChain$1({
10613
10615
  id: 10242,
10614
10616
  name: "Arthera",
10615
10617
  nativeCurrency: {
@@ -10633,7 +10635,7 @@ var arthera = /* @__PURE__ */ defineChain({
10633
10635
  }
10634
10636
  }
10635
10637
  });
10636
- var astralisTestnet = /* @__PURE__ */ defineChain({
10638
+ var astralisTestnet = /* @__PURE__ */ defineChain$1({
10637
10639
  id: 71261,
10638
10640
  name: "Astralis Chain",
10639
10641
  nativeCurrency: {
@@ -10657,6 +10659,14 @@ var astralisTestnet = /* @__PURE__ */ defineChain({
10657
10659
  }
10658
10660
  }
10659
10661
  });
10662
+ var bitlayer = extendViemChain(bitlayer$1, {
10663
+ contracts: {
10664
+ multicall3: {
10665
+ address: "0xcA11bde05977b3631167028862bE2a173976CA11",
10666
+ blockCreated: 3225645
10667
+ }
10668
+ }
10669
+ });
10660
10670
  var citrea = extendViemChain(citrea$1, {
10661
10671
  contracts: {
10662
10672
  multicall3: {
@@ -10665,7 +10675,7 @@ var citrea = extendViemChain(citrea$1, {
10665
10675
  }
10666
10676
  }
10667
10677
  });
10668
- var fiveIre = /* @__PURE__ */ defineChain({
10678
+ var fiveIre = /* @__PURE__ */ defineChain$1({
10669
10679
  id: 995,
10670
10680
  name: "5ire",
10671
10681
  nativeCurrency: {
@@ -10697,7 +10707,7 @@ var hemi = extendViemChain(hemi$1, {
10697
10707
  }
10698
10708
  }
10699
10709
  });
10700
- var hyperEvm = /* @__PURE__ */ defineChain({
10710
+ var hyperEvm = /* @__PURE__ */ defineChain$1({
10701
10711
  id: 999,
10702
10712
  name: "HyperEVM",
10703
10713
  nativeCurrency: { name: "HYPE", symbol: "HYPE", decimals: 18 },
@@ -10719,7 +10729,7 @@ var hyperEvm = /* @__PURE__ */ defineChain({
10719
10729
  }
10720
10730
  }
10721
10731
  });
10722
- var hyperliquid = /* @__PURE__ */ defineChain({
10732
+ var hyperliquid = /* @__PURE__ */ defineChain$1({
10723
10733
  id: 1337,
10724
10734
  name: "Hyperliquid",
10725
10735
  nativeCurrency: { name: "HYPE", symbol: "HYPE", decimals: 18 },
@@ -10741,7 +10751,23 @@ var hyperliquid = /* @__PURE__ */ defineChain({
10741
10751
  }
10742
10752
  }
10743
10753
  });
10744
- var pushTestnet = /* @__PURE__ */ defineChain({
10754
+ var katana = extendViemChain(katana$1, {
10755
+ contracts: {
10756
+ multicall3: {
10757
+ address: "0xcA11bde05977b3631167028862bE2a173976CA11",
10758
+ blockCreated: 1898013
10759
+ }
10760
+ }
10761
+ });
10762
+ var merlin = extendViemChain(merlin$1, {
10763
+ contracts: {
10764
+ multicall3: {
10765
+ address: "0xa8DceBAd1ea2fCf86De386462C14D7629237CC88",
10766
+ blockCreated: 11997883
10767
+ }
10768
+ }
10769
+ });
10770
+ var pushTestnet = /* @__PURE__ */ defineChain$1({
10745
10771
  id: 42101,
10746
10772
  name: "Push Testnet",
10747
10773
  nativeCurrency: {
@@ -10765,7 +10791,7 @@ var pushTestnet = /* @__PURE__ */ defineChain({
10765
10791
  }
10766
10792
  }
10767
10793
  });
10768
- var robinhood = /* @__PURE__ */ defineChain({
10794
+ var robinhood = /* @__PURE__ */ defineChain$1({
10769
10795
  id: 4663,
10770
10796
  name: "Robinhood",
10771
10797
  nativeCurrency: {
@@ -10789,7 +10815,7 @@ var robinhood = /* @__PURE__ */ defineChain({
10789
10815
  }
10790
10816
  }
10791
10817
  });
10792
- var stableChain = /* @__PURE__ */ defineChain({
10818
+ var stableChain = /* @__PURE__ */ defineChain$1({
10793
10819
  id: 988,
10794
10820
  name: "Stable",
10795
10821
  nativeCurrency: {
@@ -10825,6 +10851,23 @@ var tempo = tempo$1.extend({
10825
10851
  }
10826
10852
  }
10827
10853
  });
10854
+ var bitcoinTestnet = /* @__PURE__ */ defineChain({
10855
+ id: ChainId.BITCOIN_TESTNET4,
10856
+ name: "Bitcoin Testnet",
10857
+ nativeCurrency: { name: "Bitcoin", symbol: "BTC", decimals: 8 },
10858
+ rpcUrls: {
10859
+ default: {
10860
+ http: ["https://bitcoin-testnet4.gateway.tatum.io"]
10861
+ }
10862
+ },
10863
+ blockExplorers: {
10864
+ default: {
10865
+ name: "Mempool",
10866
+ url: "https://mempool.space/testnet4"
10867
+ }
10868
+ },
10869
+ testnet: true
10870
+ });
10828
10871
 
10829
10872
  // src/chains/index.ts
10830
10873
  var customViemChains = [
@@ -10839,7 +10882,10 @@ var customViemChains = [
10839
10882
  hemi,
10840
10883
  citrea,
10841
10884
  robinhood,
10842
- arcTestnet
10885
+ arcTestnet,
10886
+ bitlayer,
10887
+ merlin,
10888
+ katana
10843
10889
  ];
10844
10890
  var viemChainsById = [...Object.values(viemChains), ...customViemChains].reduce((acc, chainData) => {
10845
10891
  return chainData.id ? {
@@ -17027,4 +17073,30 @@ var zapPathAction = {
17027
17073
  harvest: "harvest"
17028
17074
  };
17029
17075
 
17030
- export { AllowanceTypes, ApprovalModes, dZapClient_default as DZapClient, DZapPermitMode, OtherAbis, PermitTypes, QuoteFilters, STATUS, Services, SignatureExpiryInSecs, StatusCodes, SwapInputDataDecoder, TxnStatus, arcTestnet, arthera, astralisTestnet, checkEIP2612PermitSupport, citrea, classifyAddress, contractErrorActions, customViemChains, erc20Functions, extendViemChain, fiveIre, formatToken, getTokensPairKey, hemi, hyperEvm, hyperliquid, pushTestnet, robinhood, stableChain, tempo, viemChainsById, zapPathAction, zapStepAction };
17076
+ // src/zap/constants/fee.ts
17077
+ var zapFeeType = {
17078
+ /** protocol or integrator fee taken out of the traded amount */
17079
+ fee: "fee",
17080
+ /** Associated Token Account — holds the user's balance for one mint. Created once per (wallet, mint); reused after that. */
17081
+ ata: "ata",
17082
+ /** NFT Mint — on-chain identity of a CLMM LP position. Burned and its rent recovered when the position closes. */
17083
+ nftMint: "nft_mint",
17084
+ /** Personal Position PDA — the user's LP state. Always created on open; rent refunded on close. */
17085
+ position: "position",
17086
+ /** Protocol Position PDA — pool-level tick range state, shared across every LP in that range. Rent is not refundable. */
17087
+ protocolPosition: "protocol_position",
17088
+ /** Tick Array PDA — tick data for a chunk of ticks, shared across the pool. Rent is not refundable. */
17089
+ tickArray: "tick_array",
17090
+ /** Bin Array PDA — bin data for a chunk of bins, shared across the pool. Rent is not refundable. */
17091
+ binArray: "bin_array",
17092
+ /** Bin Array Bitmap Extension PDA — bitmap state for bins outside the default range. Rent is not refundable. */
17093
+ bitmapExtension: "bitmap_extension"
17094
+ };
17095
+ var zapRefundType = {
17096
+ /** extra tokens the route ended up with because slippage came out in the user's favour */
17097
+ dust: "dust",
17098
+ /** account rent returned to the payer, e.g. when a position is closed */
17099
+ rent: "rent"
17100
+ };
17101
+
17102
+ export { AllowanceTypes, ApprovalModes, dZapClient_default as DZapClient, DZapPermitMode, OtherAbis, PermitTypes, QuoteFilters, STATUS, Services, SignatureExpiryInSecs, StatusCodes, SwapInputDataDecoder, TxnStatus, arcTestnet, arthera, astralisTestnet, bitcoinTestnet, bitlayer, checkEIP2612PermitSupport, citrea, classifyAddress, contractErrorActions, customViemChains, erc20Functions, extendViemChain, fiveIre, formatToken, getTokensPairKey, hemi, hyperEvm, hyperliquid, katana, merlin, pushTestnet, robinhood, stableChain, tempo, viemChainsById, zapFeeType, zapPathAction, zapRefundType, zapStepAction };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dzapio/sdk",
3
- "version": "2.0.48",
3
+ "version": "2.0.50",
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",
@@ -106,6 +106,7 @@
106
106
  "dependencies": {
107
107
  "@solana/web3.js": "1.95.8",
108
108
  "axios": "^1.2.1",
109
+ "@bigmi/core": "^0.6.0",
109
110
  "bitcoin-address-validation": "^2.2.3",
110
111
  "decimal.js": "^10.4.3",
111
112
  "ethers": "5.7.2",