@matterlabs/zksync-js 0.0.23 → 0.0.25

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.
Files changed (34) hide show
  1. package/dist/adapters/ethers/client.js +4 -4
  2. package/dist/adapters/ethers/index.cjs +155 -82
  3. package/dist/adapters/ethers/index.cjs.map +1 -1
  4. package/dist/adapters/ethers/index.js +7 -7
  5. package/dist/adapters/ethers/resources/deposits/services/fee.d.ts +1 -0
  6. package/dist/adapters/ethers/resources/deposits/services/gas.d.ts +9 -2
  7. package/dist/adapters/ethers/sdk.cjs +155 -91
  8. package/dist/adapters/ethers/sdk.cjs.map +1 -1
  9. package/dist/adapters/ethers/sdk.js +6 -6
  10. package/dist/adapters/viem/client.js +4 -4
  11. package/dist/adapters/viem/index.cjs +182 -122
  12. package/dist/adapters/viem/index.cjs.map +1 -1
  13. package/dist/adapters/viem/index.js +7 -7
  14. package/dist/adapters/viem/resources/deposits/services/fee.d.ts +1 -0
  15. package/dist/adapters/viem/resources/deposits/services/gas.d.ts +9 -2
  16. package/dist/adapters/viem/sdk.cjs +182 -135
  17. package/dist/adapters/viem/sdk.cjs.map +1 -1
  18. package/dist/adapters/viem/sdk.js +6 -6
  19. package/dist/{chunk-4GPIHYVF.js → chunk-4ZANKNIK.js} +1 -1
  20. package/dist/{chunk-JJ523MOL.js → chunk-BQ2YCWV2.js} +1 -1
  21. package/dist/{chunk-4M7VNYGC.js → chunk-H5A6GU3D.js} +2 -2
  22. package/dist/{chunk-2DDJFHHD.js → chunk-JNS4XZE2.js} +1 -1
  23. package/dist/{chunk-WPCZNITC.js → chunk-JWN26CQ6.js} +31 -11
  24. package/dist/{chunk-V2TDNGI5.js → chunk-N5E4FLBF.js} +127 -74
  25. package/dist/{chunk-NVOFHV3A.js → chunk-NFRRRT5X.js} +155 -120
  26. package/dist/{chunk-URHDNDFN.js → chunk-PNTR5FTL.js} +2 -2
  27. package/dist/{chunk-TUN6NH5D.js → chunk-RZH7HBH3.js} +2 -2
  28. package/dist/{chunk-6WIAMFIW.js → chunk-YEA74D2L.js} +2 -2
  29. package/dist/{chunk-X2JJDQ4O.js → chunk-YGXEIOK6.js} +1 -1
  30. package/dist/core/index.js +3 -3
  31. package/dist/core/resources/deposits/gas.d.ts +11 -1
  32. package/dist/core/types/errors.d.ts +1 -1
  33. package/dist/index.js +2 -2
  34. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- export { buildDirectRequestStruct, createContractsResource, createDepositsResource, createFinalizationServices, createInteropFinalizationServices, createInteropResource, createTokensResource, createViemSdk, createWithdrawalProtocolService, createWithdrawalsResource, encodeNativeTokenVaultTransferData, encodeSecondBridgeArgs, encodeSecondBridgeDataV1, encodeSecondBridgeErc20Args, encodeSecondBridgeEthArgs, getL2TransactionHashFromLogs } from '../../chunk-NVOFHV3A.js';
2
- import '../../chunk-WPCZNITC.js';
3
- import '../../chunk-JJ523MOL.js';
1
+ export { buildDirectRequestStruct, createContractsResource, createDepositsResource, createFinalizationServices, createInteropFinalizationServices, createInteropResource, createTokensResource, createViemSdk, createWithdrawalProtocolService, createWithdrawalsResource, encodeNativeTokenVaultTransferData, encodeSecondBridgeArgs, encodeSecondBridgeDataV1, encodeSecondBridgeErc20Args, encodeSecondBridgeEthArgs, getL2TransactionHashFromLogs } from '../../chunk-NFRRRT5X.js';
2
+ import '../../chunk-JWN26CQ6.js';
3
+ import '../../chunk-BQ2YCWV2.js';
4
4
  import '../../chunk-OEUDZFXH.js';
5
- export { createViemClient as createClient, createViemClient } from '../../chunk-6WIAMFIW.js';
6
- export { classifyReadinessFromRevert, createErrorHandlers, decodeRevert, registerErrorAbi, toZKsyncError } from '../../chunk-4M7VNYGC.js';
5
+ export { createViemClient as createClient, createViemClient } from '../../chunk-YEA74D2L.js';
6
+ export { classifyReadinessFromRevert, createErrorHandlers, decodeRevert, registerErrorAbi, toZKsyncError } from '../../chunk-H5A6GU3D.js';
7
7
  import '../../chunk-UMPAKZCQ.js';
8
8
  import '../../chunk-BWKWWLY4.js';
9
- import '../../chunk-4GPIHYVF.js';
10
- import '../../chunk-2DDJFHHD.js';
9
+ import '../../chunk-4ZANKNIK.js';
10
+ import '../../chunk-JNS4XZE2.js';
11
11
  import '../../chunk-3IPSDGHO.js';
@@ -2,5 +2,6 @@ import type { BuildCtx } from '../context';
2
2
  export type QuoteL2BaseCostInput = {
3
3
  ctx: BuildCtx;
4
4
  l2GasLimit: bigint;
5
+ l1GasPrice: bigint;
5
6
  };
6
7
  export declare function quoteL2BaseCost(input: QuoteL2BaseCostInput): Promise<bigint>;
@@ -3,9 +3,9 @@ import type { BuildCtx } from '../context';
3
3
  import type { DepositRoute } from '../../../../../core/types/flows/deposits';
4
4
  import type { TxGasOverrides } from '../../../../../core/types/fees';
5
5
  import type { Address } from '../../../../../core/types/primitives';
6
- import { type GasQuote } from '../../../../../core/resources/deposits/gas';
6
+ import { type GasQuote, type L1Fees } from '../../../../../core/resources/deposits/gas';
7
7
  import { type PriorityTxL2Leg } from '../../../../../core/resources/deposits/priority.ts';
8
- export type { GasQuote };
8
+ export type { GasQuote, L1Fees };
9
9
  export type QuoteL1GasInput = {
10
10
  ctx: BuildCtx;
11
11
  tx: TransactionRequest;
@@ -19,6 +19,13 @@ export type QuoteL2GasInput = {
19
19
  overrideGasLimit?: bigint;
20
20
  stateOverrides?: Record<string, unknown>;
21
21
  };
22
+ /**
23
+ * Resolve the fees the deposit's L1 bridge tx is sent with.
24
+ * The L2 base cost must be quoted at the returned maxFeePerGas.
25
+ */
26
+ export declare function quoteL1Fees(input: {
27
+ ctx: BuildCtx;
28
+ }): Promise<L1Fees>;
22
29
  /**
23
30
  * Quote L1 gas for a deposit transaction.
24
31
  */