@matterlabs/zksync-js 0.0.1 → 0.0.3

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 (103) hide show
  1. package/README.md +12 -12
  2. package/dist/adapters/ethers/client.cjs +642 -1
  3. package/dist/adapters/ethers/client.cjs.map +1 -1
  4. package/dist/adapters/ethers/client.js +6 -5
  5. package/dist/adapters/ethers/estimator.d.ts +4 -0
  6. package/dist/adapters/ethers/index.cjs +1279 -925
  7. package/dist/adapters/ethers/index.cjs.map +1 -1
  8. package/dist/adapters/ethers/index.d.ts +1 -0
  9. package/dist/adapters/ethers/index.js +9 -8
  10. package/dist/adapters/ethers/resources/contracts/contracts.d.ts +9 -0
  11. package/dist/adapters/ethers/resources/contracts/index.d.ts +2 -0
  12. package/dist/adapters/ethers/resources/contracts/types.d.ts +60 -0
  13. package/dist/adapters/ethers/resources/deposits/context.d.ts +21 -7
  14. package/dist/adapters/ethers/resources/deposits/index.d.ts +3 -1
  15. package/dist/adapters/ethers/resources/deposits/routes/types.d.ts +2 -6
  16. package/dist/adapters/ethers/resources/deposits/services/fee.d.ts +6 -0
  17. package/dist/adapters/ethers/resources/deposits/services/gas.d.ts +41 -0
  18. package/dist/adapters/ethers/resources/tokens/index.d.ts +1 -0
  19. package/dist/adapters/ethers/resources/tokens/tokens.d.ts +10 -0
  20. package/dist/adapters/ethers/resources/utils.d.ts +3 -17
  21. package/dist/adapters/ethers/resources/withdrawals/context.d.ts +15 -7
  22. package/dist/adapters/ethers/resources/withdrawals/index.d.ts +3 -1
  23. package/dist/adapters/ethers/resources/withdrawals/routes/types.d.ts +2 -2
  24. package/dist/adapters/ethers/resources/withdrawals/services/fees.d.ts +14 -0
  25. package/dist/adapters/ethers/resources/withdrawals/services/gas.d.ts +12 -0
  26. package/dist/adapters/ethers/sdk.cjs +1388 -1501
  27. package/dist/adapters/ethers/sdk.cjs.map +1 -1
  28. package/dist/adapters/ethers/sdk.d.ts +5 -22
  29. package/dist/adapters/ethers/sdk.js +7 -6
  30. package/dist/adapters/viem/client.cjs.map +1 -1
  31. package/dist/adapters/viem/client.d.ts +1 -1
  32. package/dist/adapters/viem/client.js +4 -5
  33. package/dist/adapters/viem/estimator.d.ts +4 -0
  34. package/dist/adapters/viem/index.cjs +1233 -744
  35. package/dist/adapters/viem/index.cjs.map +1 -1
  36. package/dist/adapters/viem/index.d.ts +3 -0
  37. package/dist/adapters/viem/index.js +8 -8
  38. package/dist/adapters/viem/resources/contracts/contracts.d.ts +9 -0
  39. package/dist/adapters/viem/resources/contracts/index.d.ts +2 -0
  40. package/dist/adapters/viem/resources/contracts/types.d.ts +61 -0
  41. package/dist/adapters/viem/resources/deposits/context.d.ts +21 -7
  42. package/dist/adapters/viem/resources/deposits/index.d.ts +3 -1
  43. package/dist/adapters/viem/resources/deposits/routes/types.d.ts +2 -6
  44. package/dist/adapters/viem/resources/deposits/services/fee.d.ts +6 -0
  45. package/dist/adapters/viem/resources/deposits/services/gas.d.ts +37 -0
  46. package/dist/adapters/viem/resources/tokens/index.d.ts +1 -0
  47. package/dist/adapters/viem/resources/tokens/tokens.d.ts +3 -0
  48. package/dist/adapters/viem/resources/utils.d.ts +3 -19
  49. package/dist/adapters/viem/resources/withdrawals/context.d.ts +14 -9
  50. package/dist/adapters/viem/resources/withdrawals/index.d.ts +3 -1
  51. package/dist/adapters/viem/resources/withdrawals/routes/types.d.ts +12 -2
  52. package/dist/adapters/viem/resources/withdrawals/services/fee.d.ts +17 -0
  53. package/dist/adapters/viem/resources/withdrawals/services/gas.d.ts +12 -0
  54. package/dist/adapters/viem/sdk.cjs +1225 -699
  55. package/dist/adapters/viem/sdk.cjs.map +1 -1
  56. package/dist/adapters/viem/sdk.d.ts +5 -25
  57. package/dist/adapters/viem/sdk.js +6 -6
  58. package/dist/{chunk-3LALBFFE.js → chunk-3MRGU4HV.js} +9 -5
  59. package/dist/{chunk-CGO27P7F.js → chunk-5YWP4CZP.js} +849 -835
  60. package/dist/{chunk-4HLJJKIY.js → chunk-6K6VJQAL.js} +2 -2
  61. package/dist/{chunk-6GCT6TLS.js → chunk-F2ENUV3A.js} +13 -1
  62. package/dist/{chunk-7M4V3FMT.js → chunk-JXUFGIJG.js} +986 -678
  63. package/dist/chunk-LL3WKCFJ.js +231 -0
  64. package/dist/{chunk-Y75OMFK6.js → chunk-M5J2MM2U.js} +351 -1
  65. package/dist/{chunk-263G6636.js → chunk-NCAIVYBR.js} +1 -14
  66. package/dist/{chunk-DI2CJDPZ.js → chunk-NEC2ZKHI.js} +5 -13
  67. package/dist/chunk-NTEIA5KA.js +13 -0
  68. package/dist/chunk-XRE7H466.js +157 -0
  69. package/dist/{chunk-BD2LUO5T.js → chunk-YUK547UF.js} +3 -3
  70. package/dist/core/abi.d.ts +9 -0
  71. package/dist/core/adapters/interfaces.d.ts +25 -0
  72. package/dist/core/codec/ntv.d.ts +48 -0
  73. package/dist/core/constants.cjs +12 -0
  74. package/dist/core/constants.cjs.map +1 -1
  75. package/dist/core/constants.d.ts +6 -0
  76. package/dist/core/constants.js +1 -1
  77. package/dist/core/index.cjs +4508 -1
  78. package/dist/core/index.cjs.map +1 -1
  79. package/dist/core/index.d.ts +2 -0
  80. package/dist/core/index.js +5 -4
  81. package/dist/core/resources/deposits/fee.d.ts +15 -0
  82. package/dist/core/resources/deposits/gas.d.ts +38 -0
  83. package/dist/core/resources/withdrawals/gas.d.ts +14 -0
  84. package/dist/core/types/errors.d.ts +1 -1
  85. package/dist/core/types/fees.d.ts +40 -0
  86. package/dist/core/types/flows/base.d.ts +0 -10
  87. package/dist/core/types/flows/deposits.d.ts +20 -6
  88. package/dist/core/types/flows/route.d.ts +2 -3
  89. package/dist/core/types/flows/token.d.ts +192 -0
  90. package/dist/core/types/flows/withdrawals.d.ts +12 -6
  91. package/dist/core/utils/addr.d.ts +2 -0
  92. package/dist/index.cjs +4520 -1
  93. package/dist/index.cjs.map +1 -1
  94. package/dist/index.d.ts +2 -0
  95. package/dist/index.js +5 -4
  96. package/package.json +5 -1
  97. package/dist/adapters/ethers/resources/token-info.d.ts +0 -31
  98. package/dist/adapters/ethers/resources/withdrawals/routes/eth-nonbase.d.ts +0 -2
  99. package/dist/adapters/viem/resources/token-info.d.ts +0 -34
  100. package/dist/adapters/viem/resources/withdrawals/routes/eth-nonbase.d.ts +0 -2
  101. package/dist/chunk-B77GWPO5.js +0 -339
  102. package/dist/core/internal/abi-registry.d.ts +0 -9
  103. package/dist/core/utils/gas.d.ts +0 -13
package/README.md CHANGED
@@ -10,14 +10,14 @@ _TypeScript SDK for deposits, withdrawals, and RPC access across the Elastic Net
10
10
  [![Release](https://img.shields.io/github/v/release/matter-labs/zksync-js?label=version)](https://github.com/matter-labs/zksync-js/releases/latest)
11
11
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
12
12
  [![X: @zksync](https://img.shields.io/badge/follow-@zksync-1DA1F2?logo=x)](https://x.com/zksync)
13
- [![User Book](https://img.shields.io/badge/docs-user%20book-brightgreen)](https://matter-labs.github.io/zksync-js/)
13
+ [![User Book](https://img.shields.io/badge/docs-user%20book-brightgreen)](https://matter-labs.github.io/zksync-js/latest/)
14
14
 
15
15
  </div>
16
16
 
17
17
  <p align="center">
18
18
  <b>
19
- <a href="https://matter-labs.github.io/zksync-js/latest/quickstart/">Quickstart</a> ·
20
- <a href="https://matter-labs.github.io/zksync-js/">User Book</a> ·
19
+ <a href="https://matter-labs.github.io/zksync-js/latest/quickstart/index.html">Quickstart</a> ·
20
+ <a href="https://matter-labs.github.io/zksync-js/latest/">User Book</a> ·
21
21
  <a href="./.github/CONTRIBUTING.md">Contributing</a>
22
22
  </b>
23
23
  </p>
@@ -39,7 +39,7 @@ Install the adapter you need:
39
39
  <summary><strong>viem adapter</strong></summary>
40
40
 
41
41
  ```bash
42
- npm install @matter-labs/zksync-js viem
42
+ npm install @matterlabs/zksync-js viem
43
43
  ```
44
44
 
45
45
  </details>
@@ -48,7 +48,7 @@ npm install @matter-labs/zksync-js viem
48
48
  <summary><strong>ethers adapter</strong></summary>
49
49
 
50
50
  ```bash
51
- npm install @matter-labs/zksync-js ethers
51
+ npm install @matterlabs/zksync-js ethers
52
52
  ```
53
53
 
54
54
  </details>
@@ -61,8 +61,8 @@ For exhaustive examples please refer to [`./examples`](./examples/) directory.
61
61
 
62
62
  ```ts
63
63
  import { JsonRpcProvider, Wallet, parseEther } from 'ethers';
64
- import { createEthersClient, createEthersSdk } from '@matter-labs/zksync-js/ethers';
65
- import { ETH_ADDRESS } from '@matter-labs/zksync-js/core';
64
+ import { createEthersClient, createEthersSdk } from '@matterlabs/zksync-js/ethers';
65
+ import { ETH_ADDRESS } from '@matterlabs/zksync-js/core';
66
66
 
67
67
  const l1Provider = new JsonRpcProvider('https://sepolia.infura.io/v3/...');
68
68
  const l2Provider = new JsonRpcProvider('https://zksync-testnet.rpc');
@@ -85,8 +85,8 @@ console.log('Deposit complete ✅');
85
85
 
86
86
  ```ts
87
87
  import { createPublicClient, createWalletClient, http, parseEther } from 'viem';
88
- import { createViemClient, createViemSdk } from '@matter-labs/zksync-js/viem';
89
- import { ETH_ADDRESS } from '@matter-labs/zksync-js/core';
88
+ import { createViemClient, createViemSdk } from '@matterlabs/zksync-js/viem';
89
+ import { ETH_ADDRESS } from '@matterlabs/zksync-js/core';
90
90
 
91
91
  const l1 = createPublicClient({ transport: http('https://sepolia.infura.io/v3/...') });
92
92
  const l2 = createPublicClient({ transport: http('https://zksync-testnet.rpc') });
@@ -111,9 +111,9 @@ console.log('Deposit complete ✅');
111
111
 
112
112
  ## 📚 Documentation
113
113
 
114
- - [User Book](https://matter-labs.github.io/zksync-sdk/) – guides, concepts, API docs
115
- - [How-to Guides](https://matter-labs.github.io/zksync-sdk/guides/) – deposits, withdrawals, RPC helpers
116
- - [Concepts](https://matter-labs.github.io/zksync-sdk/concepts/) – mental model, status vs wait, finalization
114
+ - [User Book](https://matter-labs.github.io/zksync-js/latest/) – guides, concepts, API docs
115
+ - [How-to Guides](https://matter-labs.github.io/zksync-js/latest/guides/index.html) – deposits, withdrawals, RPC helpers
116
+ - [Mental Model](https://matter-labs.github.io/zksync-js/latest/overview/mental-model.html) – mental model, status vs wait, finalization
117
117
 
118
118
  ## 🤝 Contributing
119
119