@matterlabs/zksync-js 0.0.2 → 0.0.5
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/README.md +1 -3
- package/dist/adapters/ethers/client.cjs.map +1 -1
- package/dist/adapters/ethers/index.cjs +391 -170
- package/dist/adapters/ethers/index.cjs.map +1 -1
- package/dist/adapters/ethers/index.d.ts +1 -0
- package/dist/adapters/ethers/index.js +3 -3
- package/dist/adapters/ethers/resources/contracts/contracts.d.ts +9 -0
- package/dist/adapters/ethers/resources/contracts/index.d.ts +2 -0
- package/dist/adapters/ethers/resources/contracts/types.d.ts +60 -0
- package/dist/adapters/ethers/resources/deposits/context.d.ts +16 -2
- package/dist/adapters/ethers/resources/deposits/index.d.ts +3 -1
- package/dist/adapters/ethers/resources/deposits/services/gas.d.ts +3 -2
- package/dist/adapters/ethers/resources/tokens/index.d.ts +1 -0
- package/dist/adapters/ethers/resources/tokens/tokens.d.ts +10 -0
- package/dist/adapters/ethers/resources/utils.d.ts +0 -3
- package/dist/adapters/ethers/resources/withdrawals/context.d.ts +11 -3
- package/dist/adapters/ethers/resources/withdrawals/index.d.ts +3 -1
- package/dist/adapters/ethers/sdk.cjs +386 -154
- package/dist/adapters/ethers/sdk.cjs.map +1 -1
- package/dist/adapters/ethers/sdk.d.ts +5 -22
- package/dist/adapters/ethers/sdk.js +3 -3
- package/dist/adapters/viem/client.cjs.map +1 -1
- package/dist/adapters/viem/index.cjs +383 -176
- package/dist/adapters/viem/index.cjs.map +1 -1
- package/dist/adapters/viem/index.d.ts +3 -0
- package/dist/adapters/viem/index.js +3 -3
- package/dist/adapters/viem/resources/contracts/contracts.d.ts +9 -0
- package/dist/adapters/viem/resources/contracts/index.d.ts +2 -0
- package/dist/adapters/viem/resources/contracts/types.d.ts +61 -0
- package/dist/adapters/viem/resources/deposits/context.d.ts +16 -2
- package/dist/adapters/viem/resources/deposits/index.d.ts +3 -1
- package/dist/adapters/viem/resources/deposits/services/gas.d.ts +2 -1
- package/dist/adapters/viem/resources/tokens/index.d.ts +1 -0
- package/dist/adapters/viem/resources/tokens/tokens.d.ts +3 -0
- package/dist/adapters/viem/resources/utils.d.ts +0 -3
- package/dist/adapters/viem/resources/withdrawals/context.d.ts +11 -3
- package/dist/adapters/viem/resources/withdrawals/index.d.ts +3 -1
- package/dist/adapters/viem/sdk.cjs +401 -189
- package/dist/adapters/viem/sdk.cjs.map +1 -1
- package/dist/adapters/viem/sdk.d.ts +5 -25
- package/dist/adapters/viem/sdk.js +3 -3
- package/dist/{chunk-OC6ZVLSP.js → chunk-JXUFGIJG.js} +348 -150
- package/dist/{chunk-QJS6ETEE.js → chunk-LL3WKCFJ.js} +15 -1
- package/dist/{chunk-BCCKWWOX.js → chunk-NBJEQAOE.js} +373 -158
- package/dist/{chunk-HLUANWGN.js → chunk-NEC2ZKHI.js} +4 -12
- package/dist/chunk-NTEIA5KA.js +13 -0
- package/dist/core/codec/ntv.d.ts +48 -0
- package/dist/core/index.cjs +4 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +2 -1
- package/dist/core/types/errors.d.ts +1 -1
- package/dist/core/types/flows/token.d.ts +192 -0
- package/dist/core/utils/addr.d.ts +2 -0
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/package.json +1 -1
- package/dist/adapters/ethers/resources/token-info.d.ts +0 -31
- package/dist/adapters/viem/resources/token-info.d.ts +0 -34
|
@@ -1,32 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ViemClient, ResolvedAddresses } from './client';
|
|
1
|
+
import type { ViemClient } from './client';
|
|
3
2
|
import { type DepositsResource as DepositsResourceType } from './resources/deposits/index';
|
|
4
3
|
import { type WithdrawalsResource as WithdrawalsResourceType } from './resources/withdrawals/index';
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
type ViemContracts = {
|
|
8
|
-
bridgehub: GetContractReturnType<typeof IBridgehubABI, PublicClient>;
|
|
9
|
-
l1AssetRouter: GetContractReturnType<typeof IL1AssetRouterABI, PublicClient>;
|
|
10
|
-
l1Nullifier: GetContractReturnType<typeof IL1NullifierABI, PublicClient>;
|
|
11
|
-
l1NativeTokenVault: GetContractReturnType<typeof L1NativeTokenVaultABI, PublicClient>;
|
|
12
|
-
l2AssetRouter: GetContractReturnType<typeof IL2AssetRouterABI, PublicClient>;
|
|
13
|
-
l2NativeTokenVault: GetContractReturnType<typeof L2NativeTokenVaultABI, PublicClient>;
|
|
14
|
-
l2BaseTokenSystem: GetContractReturnType<typeof IBaseTokenABI, PublicClient>;
|
|
15
|
-
};
|
|
4
|
+
import type { TokensResource as TokensResourceType } from '../../core/types/flows/token';
|
|
5
|
+
import type { ContractsResource as ContractsResourceType } from './resources/contracts';
|
|
16
6
|
export interface ViemSdk {
|
|
17
7
|
deposits: DepositsResourceType;
|
|
18
8
|
withdrawals: WithdrawalsResourceType;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
contracts(): Promise<ViemContracts>;
|
|
22
|
-
l1AssetRouter(): Promise<ViemContracts['l1AssetRouter']>;
|
|
23
|
-
l1NativeTokenVault(): Promise<ViemContracts['l1NativeTokenVault']>;
|
|
24
|
-
l1Nullifier(): Promise<ViemContracts['l1Nullifier']>;
|
|
25
|
-
baseToken(chainId?: bigint): Promise<Address>;
|
|
26
|
-
l2TokenAddress(l1Token: Address): Promise<Address>;
|
|
27
|
-
l1TokenAddress(l2Token: Address): Promise<Address>;
|
|
28
|
-
assetId(l1Token: Address): Promise<Hex>;
|
|
29
|
-
};
|
|
9
|
+
tokens: TokensResourceType;
|
|
10
|
+
contracts: ContractsResourceType;
|
|
30
11
|
}
|
|
31
12
|
export declare function createViemSdk(client: ViemClient): ViemSdk;
|
|
32
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { createViemSdk } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
export { createViemSdk } from '../../chunk-JXUFGIJG.js';
|
|
2
|
+
import '../../chunk-LL3WKCFJ.js';
|
|
3
|
+
import '../../chunk-NEC2ZKHI.js';
|
|
4
4
|
import '../../chunk-NCAIVYBR.js';
|
|
5
5
|
import '../../chunk-M5J2MM2U.js';
|
|
6
6
|
import '../../chunk-F2ENUV3A.js';
|