@matterlabs/zksync-js 0.0.21 → 0.0.23

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 (77) hide show
  1. package/dist/adapters/ethers/client.cjs +31 -8
  2. package/dist/adapters/ethers/client.cjs.map +1 -1
  3. package/dist/adapters/ethers/client.d.ts +11 -0
  4. package/dist/adapters/ethers/client.js +6 -5
  5. package/dist/adapters/ethers/index.cjs +1194 -364
  6. package/dist/adapters/ethers/index.cjs.map +1 -1
  7. package/dist/adapters/ethers/index.d.ts +2 -1
  8. package/dist/adapters/ethers/index.js +10 -8
  9. package/dist/adapters/ethers/resources/deposits/context.d.ts +2 -0
  10. package/dist/adapters/ethers/resources/deposits/services/gas.d.ts +3 -0
  11. package/dist/adapters/ethers/resources/withdrawals/context.d.ts +12 -1
  12. package/dist/adapters/ethers/resources/withdrawals/index.d.ts +17 -1
  13. package/dist/adapters/ethers/resources/withdrawals/routes/interop-bundle.d.ts +2 -0
  14. package/dist/adapters/ethers/resources/withdrawals/services/finalization.d.ts +35 -17
  15. package/dist/adapters/ethers/resources/withdrawals/services/protocol.d.ts +11 -0
  16. package/dist/adapters/ethers/sdk.cjs +1166 -370
  17. package/dist/adapters/ethers/sdk.cjs.map +1 -1
  18. package/dist/adapters/ethers/sdk.d.ts +3 -1
  19. package/dist/adapters/ethers/sdk.js +8 -7
  20. package/dist/adapters/viem/client.cjs +44 -7
  21. package/dist/adapters/viem/client.cjs.map +1 -1
  22. package/dist/adapters/viem/client.d.ts +11 -0
  23. package/dist/adapters/viem/client.js +6 -5
  24. package/dist/adapters/viem/index.cjs +1237 -383
  25. package/dist/adapters/viem/index.cjs.map +1 -1
  26. package/dist/adapters/viem/index.d.ts +2 -1
  27. package/dist/adapters/viem/index.js +10 -8
  28. package/dist/adapters/viem/resources/deposits/context.d.ts +2 -0
  29. package/dist/adapters/viem/resources/deposits/services/gas.d.ts +3 -0
  30. package/dist/adapters/viem/resources/withdrawals/context.d.ts +12 -1
  31. package/dist/adapters/viem/resources/withdrawals/index.d.ts +17 -1
  32. package/dist/adapters/viem/resources/withdrawals/routes/interop-bundle.d.ts +2 -0
  33. package/dist/adapters/viem/resources/withdrawals/services/finalization.d.ts +36 -18
  34. package/dist/adapters/viem/resources/withdrawals/services/protocol.d.ts +11 -0
  35. package/dist/adapters/viem/sdk.cjs +1191 -385
  36. package/dist/adapters/viem/sdk.cjs.map +1 -1
  37. package/dist/adapters/viem/sdk.d.ts +3 -1
  38. package/dist/adapters/viem/sdk.js +8 -7
  39. package/dist/{chunk-UEKFQAOS.js → chunk-2DDJFHHD.js} +304 -9
  40. package/dist/{chunk-MT4X5FEO.js → chunk-3IPSDGHO.js} +19 -1
  41. package/dist/{chunk-JSBMIT4S.js → chunk-4GPIHYVF.js} +1 -1
  42. package/dist/{chunk-SBGBYZJM.js → chunk-4M7VNYGC.js} +2 -2
  43. package/dist/{chunk-CK5UFAZK.js → chunk-6WIAMFIW.js} +37 -3
  44. package/dist/chunk-JJ523MOL.js +157 -0
  45. package/dist/{chunk-7GZDTLHX.js → chunk-NVOFHV3A.js} +666 -304
  46. package/dist/{chunk-LGTYM5XP.js → chunk-OEUDZFXH.js} +1 -1
  47. package/dist/{chunk-NJK325XV.js → chunk-TUN6NH5D.js} +2 -2
  48. package/dist/chunk-UMPAKZCQ.js +19 -0
  49. package/dist/{chunk-24TE2NNJ.js → chunk-URHDNDFN.js} +24 -4
  50. package/dist/{chunk-2CGBLD5H.js → chunk-V2TDNGI5.js} +642 -288
  51. package/dist/{chunk-IDXSGCGF.js → chunk-WPCZNITC.js} +63 -50
  52. package/dist/{chunk-TYYUG5GA.js → chunk-X2JJDQ4O.js} +1 -1
  53. package/dist/core/abi.d.ts +1 -0
  54. package/dist/core/adapters/interfaces.d.ts +2 -0
  55. package/dist/core/constants.cjs +18 -0
  56. package/dist/core/constants.cjs.map +1 -1
  57. package/dist/core/constants.d.ts +17 -0
  58. package/dist/core/constants.js +1 -1
  59. package/dist/core/index.cjs +504 -7
  60. package/dist/core/index.cjs.map +1 -1
  61. package/dist/core/index.d.ts +6 -1
  62. package/dist/core/index.js +6 -4
  63. package/dist/core/internal/abis/IERC7786Attributes.d.ts +10 -0
  64. package/dist/core/internal/abis/IL1NullifierV32.d.ts +221 -0
  65. package/dist/core/internal/abis/IL2AssetRouter.d.ts +0 -14
  66. package/dist/core/resources/deposits/priority.d.ts +30 -0
  67. package/dist/core/resources/interop/attributes/bundle.d.ts +1 -0
  68. package/dist/core/resources/interop/attributes/resource.d.ts +1 -0
  69. package/dist/core/resources/protocol/semver.d.ts +18 -0
  70. package/dist/core/resources/withdrawals/bundle.d.ts +80 -0
  71. package/dist/core/resources/withdrawals/finalization.d.ts +142 -0
  72. package/dist/core/resources/withdrawals/protocol.d.ts +55 -0
  73. package/dist/core/types/flows/withdrawals.d.ts +30 -0
  74. package/dist/index.cjs +320 -7
  75. package/dist/index.cjs.map +1 -1
  76. package/dist/index.js +4 -4
  77. package/package.json +1 -1
@@ -50,6 +50,17 @@ export interface EthersClient {
50
50
  baseToken(chainId: bigint): Promise<Address>;
51
51
  /** Read semver protocol version for the CTM of a chain. */
52
52
  getProtocolVersion(chainId?: bigint): Promise<ProtocolVersion>;
53
+ /**
54
+ * Read the protocol version of a specific chain, as recorded by its CTM.
55
+ *
56
+ * Prefer this over {@link getProtocolVersion} when gating behaviour on chain capabilities: the
57
+ * CTM-wide value moves as soon as the ecosystem is upgraded, while a given chain adopts the new
58
+ * version only once its own upgrade executes.
59
+ *
60
+ * Returns `undefined` rather than throwing when the version cannot be read (no registered CTM,
61
+ * unreachable Bridgehub, restricted RPC), so callers can fall back to other probes.
62
+ */
63
+ getChainProtocolVersion(chainId?: bigint): Promise<ProtocolVersion | undefined>;
53
64
  /** Get a signer connected to a specific provider */
54
65
  signerFor(target?: 'l1' | AbstractProvider): Signer;
55
66
  }
@@ -1,6 +1,7 @@
1
- export { createEthersClient } from '../../chunk-24TE2NNJ.js';
2
- import '../../chunk-NJK325XV.js';
1
+ export { createEthersClient } from '../../chunk-URHDNDFN.js';
2
+ import '../../chunk-TUN6NH5D.js';
3
+ import '../../chunk-UMPAKZCQ.js';
3
4
  import '../../chunk-BWKWWLY4.js';
4
- import '../../chunk-JSBMIT4S.js';
5
- import '../../chunk-UEKFQAOS.js';
6
- import '../../chunk-MT4X5FEO.js';
5
+ import '../../chunk-4GPIHYVF.js';
6
+ import '../../chunk-2DDJFHHD.js';
7
+ import '../../chunk-3IPSDGHO.js';