@matterlabs/zksync-js 0.0.6 → 0.0.8
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/adapters/ethers/client.cjs +243 -79
- package/dist/adapters/ethers/client.cjs.map +1 -1
- package/dist/adapters/ethers/client.js +6 -6
- package/dist/adapters/ethers/errors/error-ops.d.ts +26 -19
- package/dist/adapters/ethers/index.cjs +290 -119
- package/dist/adapters/ethers/index.cjs.map +1 -1
- package/dist/adapters/ethers/index.js +9 -9
- package/dist/adapters/ethers/sdk.cjs +78 -59
- package/dist/adapters/ethers/sdk.cjs.map +1 -1
- package/dist/adapters/ethers/sdk.js +7 -7
- package/dist/adapters/viem/client.cjs +192 -34
- package/dist/adapters/viem/client.cjs.map +1 -1
- package/dist/adapters/viem/client.js +4 -4
- package/dist/adapters/viem/errors/error-ops.d.ts +26 -19
- package/dist/adapters/viem/index.cjs +290 -119
- package/dist/adapters/viem/index.cjs.map +1 -1
- package/dist/adapters/viem/index.js +8 -8
- package/dist/adapters/viem/sdk.cjs +97 -80
- package/dist/adapters/viem/sdk.cjs.map +1 -1
- package/dist/adapters/viem/sdk.js +6 -6
- package/dist/{chunk-M5J2MM2U.js → chunk-3GFCAGGI.js} +1430 -7
- package/dist/chunk-5V2JRM5J.js +75 -0
- package/dist/{chunk-WU2LOG2A.js → chunk-63DNJXS3.js} +7 -8
- package/dist/{chunk-F2ENUV3A.js → chunk-C3AGOEHR.js} +12 -2
- package/dist/{chunk-3MRGU4HV.js → chunk-FGXRG2JS.js} +4 -4
- package/dist/{chunk-NTEIA5KA.js → chunk-L343N56B.js} +1 -1
- package/dist/{chunk-2MDK3GLO.js → chunk-LNIEQ7AN.js} +9 -54
- package/dist/{chunk-LL3WKCFJ.js → chunk-NODVRI3E.js} +2 -2
- package/dist/{chunk-XRE7H466.js → chunk-NVULC4JB.js} +3 -47
- package/dist/{chunk-YUK547UF.js → chunk-ODMBZ2VX.js} +3 -3
- package/dist/{chunk-NEC2ZKHI.js → chunk-QZVYN3YA.js} +30 -7
- package/dist/{chunk-6K6VJQAL.js → chunk-SHQQI3UD.js} +175 -20
- package/dist/core/abi.d.ts +5 -0
- package/dist/core/constants.cjs +11 -1
- package/dist/core/constants.cjs.map +1 -1
- package/dist/core/constants.d.ts +11 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/errors/error-ops.d.ts +18 -0
- package/dist/core/index.cjs +1737 -131
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.js +5 -5
- package/dist/core/internal/abis/IERC7786Attributes.d.ts +42 -0
- package/dist/core/internal/abis/IInteropCenter.d.ts +211 -0
- package/dist/core/internal/abis/IInteropHandler.d.ts +166 -0
- package/dist/core/internal/abis/InteropCenter.d.ts +578 -0
- package/dist/core/internal/abis/InteropRootStorage.d.ts +20 -0
- package/dist/core/internal/abis/L2MessageVerification.d.ts +277 -0
- package/dist/core/resources/interop/attributes/bundle.d.ts +6 -0
- package/dist/core/resources/interop/attributes/call.d.ts +6 -0
- package/dist/core/resources/interop/attributes/index.d.ts +4 -0
- package/dist/core/resources/interop/attributes/resource.d.ts +12 -0
- package/dist/core/resources/interop/attributes/types.d.ts +6 -0
- package/dist/core/resources/interop/events.d.ts +7 -0
- package/dist/core/resources/interop/finalization.d.ts +61 -0
- package/dist/core/resources/interop/plan.d.ts +39 -0
- package/dist/core/resources/interop/route.d.ts +15 -0
- package/dist/core/rpc/types.d.ts +14 -0
- package/dist/core/rpc/zks.d.ts +4 -1
- package/dist/core/types/errors.d.ts +43 -2
- package/dist/core/types/flows/base.d.ts +1 -1
- package/dist/core/types/flows/interop.d.ts +231 -0
- package/dist/core/types/flows/withdrawals.d.ts +0 -8
- package/dist/core/types/transactions.d.ts +10 -0
- package/dist/core/utils/addr.d.ts +2 -2
- package/dist/core/utils/events.d.ts +12 -0
- package/dist/core/utils/hash.d.ts +5 -0
- package/dist/core/utils/index.d.ts +5 -0
- package/dist/core/utils/number.d.ts +2 -0
- package/dist/index.cjs +1748 -132
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -5
- package/package.json +6 -2
- package/dist/chunk-NCAIVYBR.js +0 -23
- package/dist/core/resources/withdrawals/events.d.ts +0 -9
package/dist/index.d.ts
CHANGED
|
@@ -6,9 +6,10 @@ export * as zksRpc from './core/rpc/zks';
|
|
|
6
6
|
export type { ZksRpc } from './core/rpc/zks';
|
|
7
7
|
export { makeTransportFromEthers, makeTransportFromViem } from './core/rpc/transport';
|
|
8
8
|
export * from './core/utils/addr';
|
|
9
|
+
export * from './core/utils/hash';
|
|
9
10
|
export * from './core/resources/deposits/route';
|
|
10
11
|
export * from './core/resources/withdrawals/route';
|
|
11
|
-
export * from './core/
|
|
12
|
+
export * from './core/utils/events';
|
|
12
13
|
export * from './core/resources/withdrawals/logs';
|
|
13
14
|
export type * from './core/types';
|
|
14
15
|
export type * from './core/types/errors';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { pickDepositRoute } from './chunk-
|
|
2
|
-
export { findL1MessageSentLog, hexEq, isAddressEq, isETH, isHash66, messengerLogIndex, normalizeAddrEq, normalizeL1Token, pickWithdrawRoute } from './chunk-
|
|
3
|
-
export { makeTransportFromEthers, makeTransportFromViem, zks_exports as zksRpc } from './chunk-
|
|
4
|
-
export { abi_exports as abi, factory_exports as errors, formatEnvelopePretty } from './chunk-
|
|
5
|
-
export { constants_exports as constants } from './chunk-
|
|
1
|
+
export { pickDepositRoute } from './chunk-L343N56B.js';
|
|
2
|
+
export { findL1MessageSentLog, hexEq, isAddress, isAddressEq, isETH, isHash, isHash66, isHash66Array, isHashArray, isL1MessageSentLog, messengerLogIndex, normalizeAddrEq, normalizeL1Token, pickWithdrawRoute } from './chunk-QZVYN3YA.js';
|
|
3
|
+
export { makeTransportFromEthers, makeTransportFromViem, zks_exports as zksRpc } from './chunk-SHQQI3UD.js';
|
|
4
|
+
export { abi_exports as abi, factory_exports as errors, formatEnvelopePretty } from './chunk-3GFCAGGI.js';
|
|
5
|
+
export { constants_exports as constants } from './chunk-C3AGOEHR.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matterlabs/zksync-js",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"main": "./dist/index.cjs",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"devDependencies": {
|
|
@@ -42,6 +42,9 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"exports": {
|
|
45
|
+
"./types/flows/interop": null,
|
|
46
|
+
"./core/types/flows/interop": null,
|
|
47
|
+
"./core/resources/interop/*": null,
|
|
45
48
|
".": {
|
|
46
49
|
"types": "./dist/index.d.ts",
|
|
47
50
|
"import": "./dist/index.js",
|
|
@@ -142,7 +145,8 @@
|
|
|
142
145
|
"test:e2e:viem": "bun test ./src/adapters/viem/e2e/*.e2e.ts",
|
|
143
146
|
"test:watch": "bun test --watch",
|
|
144
147
|
"test:cov": "bun test --coverage",
|
|
145
|
-
"test:core": "bun test src/core"
|
|
148
|
+
"test:core": "bun test src/core",
|
|
149
|
+
"test:docs": "bun test docs/snippets --timeout 100000"
|
|
146
150
|
},
|
|
147
151
|
"sideEffects": false,
|
|
148
152
|
"type": "module",
|
package/dist/chunk-NCAIVYBR.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// src/core/errors/withdrawal-revert-map.ts
|
|
2
|
-
var REVERT_TO_READINESS = {
|
|
3
|
-
// Already done
|
|
4
|
-
WithdrawalAlreadyFinalized: { kind: "FINALIZED" },
|
|
5
|
-
// Temporary — try later
|
|
6
|
-
BatchNotExecuted: { kind: "NOT_READY", reason: "batch-not-executed" },
|
|
7
|
-
LocalRootIsZero: { kind: "NOT_READY", reason: "root-missing" },
|
|
8
|
-
// Permanent — won’t become ready for this tx
|
|
9
|
-
WrongL2Sender: { kind: "UNFINALIZABLE", reason: "message-invalid" },
|
|
10
|
-
InvalidSelector: { kind: "UNFINALIZABLE", reason: "message-invalid" },
|
|
11
|
-
L2WithdrawalMessageWrongLength: { kind: "UNFINALIZABLE", reason: "message-invalid" },
|
|
12
|
-
WrongMsgLength: { kind: "UNFINALIZABLE", reason: "message-invalid" },
|
|
13
|
-
TokenNotLegacy: { kind: "UNFINALIZABLE", reason: "message-invalid" },
|
|
14
|
-
TokenIsLegacy: { kind: "UNFINALIZABLE", reason: "message-invalid" },
|
|
15
|
-
InvalidProof: { kind: "UNFINALIZABLE", reason: "message-invalid" },
|
|
16
|
-
InvalidChainId: { kind: "UNFINALIZABLE", reason: "invalid-chain" },
|
|
17
|
-
NotSettlementLayer: { kind: "UNFINALIZABLE", reason: "settlement-layer" },
|
|
18
|
-
// Likely environment mismatch — treat as permanent for this tx
|
|
19
|
-
OnlyEraSupported: { kind: "UNFINALIZABLE", reason: "unsupported" },
|
|
20
|
-
LocalRootMustBeZero: { kind: "UNFINALIZABLE", reason: "unsupported" }
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export { REVERT_TO_READINESS };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ParsedLog, ParsedReceipt } from '../../types/flows/withdrawals';
|
|
2
|
-
type Prefer = 'messenger' | 'assetRouter' | {
|
|
3
|
-
address: string;
|
|
4
|
-
};
|
|
5
|
-
export declare function findL1MessageSentLog(receipt: ParsedReceipt, opts?: {
|
|
6
|
-
prefer?: Prefer;
|
|
7
|
-
index?: number;
|
|
8
|
-
}): ParsedLog;
|
|
9
|
-
export {};
|