@matterlabs/zksync-js 0.0.21 → 0.0.22
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 +31 -1
- package/dist/adapters/ethers/client.cjs.map +1 -1
- package/dist/adapters/ethers/client.d.ts +11 -0
- package/dist/adapters/ethers/client.js +6 -5
- package/dist/adapters/ethers/index.cjs +1009 -274
- package/dist/adapters/ethers/index.cjs.map +1 -1
- package/dist/adapters/ethers/index.d.ts +2 -1
- package/dist/adapters/ethers/index.js +10 -8
- package/dist/adapters/ethers/resources/withdrawals/context.d.ts +12 -1
- package/dist/adapters/ethers/resources/withdrawals/index.d.ts +17 -1
- package/dist/adapters/ethers/resources/withdrawals/routes/interop-bundle.d.ts +2 -0
- package/dist/adapters/ethers/resources/withdrawals/services/finalization.d.ts +35 -17
- package/dist/adapters/ethers/resources/withdrawals/services/protocol.d.ts +11 -0
- package/dist/adapters/ethers/sdk.cjs +976 -272
- package/dist/adapters/ethers/sdk.cjs.map +1 -1
- package/dist/adapters/ethers/sdk.d.ts +3 -1
- package/dist/adapters/ethers/sdk.js +8 -7
- package/dist/adapters/viem/client.cjs +44 -0
- package/dist/adapters/viem/client.cjs.map +1 -1
- package/dist/adapters/viem/client.d.ts +11 -0
- package/dist/adapters/viem/client.js +6 -5
- package/dist/adapters/viem/index.cjs +1060 -294
- package/dist/adapters/viem/index.cjs.map +1 -1
- package/dist/adapters/viem/index.d.ts +2 -1
- package/dist/adapters/viem/index.js +10 -8
- package/dist/adapters/viem/resources/withdrawals/context.d.ts +12 -1
- package/dist/adapters/viem/resources/withdrawals/index.d.ts +17 -1
- package/dist/adapters/viem/resources/withdrawals/routes/interop-bundle.d.ts +2 -0
- package/dist/adapters/viem/resources/withdrawals/services/finalization.d.ts +36 -18
- package/dist/adapters/viem/resources/withdrawals/services/protocol.d.ts +11 -0
- package/dist/adapters/viem/sdk.cjs +1014 -293
- package/dist/adapters/viem/sdk.cjs.map +1 -1
- package/dist/adapters/viem/sdk.d.ts +3 -1
- package/dist/adapters/viem/sdk.js +8 -7
- package/dist/{chunk-SBGBYZJM.js → chunk-2D3FBCZC.js} +2 -2
- package/dist/{chunk-LGTYM5XP.js → chunk-32N6TI6K.js} +1 -1
- package/dist/{chunk-IDXSGCGF.js → chunk-3SPDWWRD.js} +7 -22
- package/dist/{chunk-7GZDTLHX.js → chunk-4K4LOCQJ.js} +559 -256
- package/dist/{chunk-UEKFQAOS.js → chunk-AMRHBZIY.js} +304 -2
- package/dist/{chunk-2CGBLD5H.js → chunk-CP4SQ5PM.js} +527 -239
- package/dist/{chunk-NJK325XV.js → chunk-CPNHKNI4.js} +2 -2
- package/dist/{chunk-TYYUG5GA.js → chunk-CUBUD4J4.js} +1 -1
- package/dist/{chunk-CK5UFAZK.js → chunk-JXBLQQEN.js} +37 -3
- package/dist/{chunk-JSBMIT4S.js → chunk-KL6ZCPWJ.js} +1 -1
- package/dist/{chunk-MT4X5FEO.js → chunk-NQRYXL3K.js} +3 -1
- package/dist/{chunk-24TE2NNJ.js → chunk-PI4PF6WT.js} +24 -4
- package/dist/chunk-QUAPG3ZR.js +157 -0
- package/dist/chunk-UMPAKZCQ.js +19 -0
- package/dist/core/abi.d.ts +1 -0
- package/dist/core/constants.cjs +2 -0
- package/dist/core/constants.cjs.map +1 -1
- package/dist/core/constants.d.ts +9 -0
- package/dist/core/constants.js +1 -1
- package/dist/core/index.cjs +504 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +6 -1
- package/dist/core/index.js +6 -4
- package/dist/core/internal/abis/IERC7786Attributes.d.ts +10 -0
- package/dist/core/internal/abis/IL1NullifierV32.d.ts +221 -0
- package/dist/core/resources/interop/attributes/bundle.d.ts +1 -0
- package/dist/core/resources/interop/attributes/resource.d.ts +1 -0
- package/dist/core/resources/protocol/semver.d.ts +18 -0
- package/dist/core/resources/withdrawals/bundle.d.ts +80 -0
- package/dist/core/resources/withdrawals/finalization.d.ts +142 -0
- package/dist/core/resources/withdrawals/protocol.d.ts +55 -0
- package/dist/core/types/flows/withdrawals.d.ts +30 -0
- package/dist/index.cjs +304 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __export, ETH_ADDRESS, FORMAL_ETH_ADDRESS, L2_BASE_TOKEN_ADDRESS } from './chunk-
|
|
1
|
+
import { __export, ETH_ADDRESS, FORMAL_ETH_ADDRESS, L2_BASE_TOKEN_ADDRESS } from './chunk-NQRYXL3K.js';
|
|
2
2
|
|
|
3
3
|
// src/core/internal/abis/IBridgehub.ts
|
|
4
4
|
var IBridgehubABI = [
|
|
@@ -5312,6 +5312,7 @@ __export(abi_exports, {
|
|
|
5312
5312
|
IL1AssetRouterABI: () => IL1AssetRouter_default,
|
|
5313
5313
|
IL1ContractErrorsABI: () => IL1ContractErrors_default,
|
|
5314
5314
|
IL1NullifierABI: () => IL1Nullifier_default,
|
|
5315
|
+
IL1NullifierV32ABI: () => IL1NullifierV32_default,
|
|
5315
5316
|
IL2AssetRouterABI: () => IL2AssetRouter_default,
|
|
5316
5317
|
L1NativeTokenVaultABI: () => L1NativeTokenVault_default,
|
|
5317
5318
|
L2MessageVerificationABI: () => L2MessageVerification_default,
|
|
@@ -5319,6 +5320,294 @@ __export(abi_exports, {
|
|
|
5319
5320
|
MailboxABI: () => Mailbox_default
|
|
5320
5321
|
});
|
|
5321
5322
|
|
|
5323
|
+
// src/core/internal/abis/IL1NullifierV32.ts
|
|
5324
|
+
var IL1NullifierV32ABI = [
|
|
5325
|
+
{
|
|
5326
|
+
anonymous: false,
|
|
5327
|
+
inputs: [
|
|
5328
|
+
{
|
|
5329
|
+
indexed: true,
|
|
5330
|
+
internalType: "uint256",
|
|
5331
|
+
name: "chainId",
|
|
5332
|
+
type: "uint256"
|
|
5333
|
+
},
|
|
5334
|
+
{
|
|
5335
|
+
indexed: true,
|
|
5336
|
+
internalType: "bytes32",
|
|
5337
|
+
name: "txDataHash",
|
|
5338
|
+
type: "bytes32"
|
|
5339
|
+
},
|
|
5340
|
+
{
|
|
5341
|
+
indexed: true,
|
|
5342
|
+
internalType: "bytes32",
|
|
5343
|
+
name: "l2DepositTxHash",
|
|
5344
|
+
type: "bytes32"
|
|
5345
|
+
}
|
|
5346
|
+
],
|
|
5347
|
+
name: "BridgehubDepositFinalized",
|
|
5348
|
+
type: "event"
|
|
5349
|
+
},
|
|
5350
|
+
{
|
|
5351
|
+
inputs: [],
|
|
5352
|
+
name: "BRIDGE_HUB",
|
|
5353
|
+
outputs: [
|
|
5354
|
+
{
|
|
5355
|
+
internalType: "contract IL1Bridgehub",
|
|
5356
|
+
name: "",
|
|
5357
|
+
type: "address"
|
|
5358
|
+
}
|
|
5359
|
+
],
|
|
5360
|
+
stateMutability: "view",
|
|
5361
|
+
type: "function"
|
|
5362
|
+
},
|
|
5363
|
+
{
|
|
5364
|
+
inputs: [],
|
|
5365
|
+
name: "l1AssetRouter",
|
|
5366
|
+
outputs: [
|
|
5367
|
+
{
|
|
5368
|
+
internalType: "contract IL1AssetRouter",
|
|
5369
|
+
name: "",
|
|
5370
|
+
type: "address"
|
|
5371
|
+
}
|
|
5372
|
+
],
|
|
5373
|
+
stateMutability: "view",
|
|
5374
|
+
type: "function"
|
|
5375
|
+
},
|
|
5376
|
+
{
|
|
5377
|
+
// The contract that took over withdrawal finalization from the nullifier's own (removed)
|
|
5378
|
+
// `finalizeDeposit`.
|
|
5379
|
+
inputs: [],
|
|
5380
|
+
name: "l1InteropHandler",
|
|
5381
|
+
outputs: [
|
|
5382
|
+
{
|
|
5383
|
+
internalType: "address",
|
|
5384
|
+
name: "",
|
|
5385
|
+
type: "address"
|
|
5386
|
+
}
|
|
5387
|
+
],
|
|
5388
|
+
stateMutability: "view",
|
|
5389
|
+
type: "function"
|
|
5390
|
+
},
|
|
5391
|
+
{
|
|
5392
|
+
inputs: [],
|
|
5393
|
+
name: "l1NativeTokenVault",
|
|
5394
|
+
outputs: [
|
|
5395
|
+
{
|
|
5396
|
+
internalType: "contract IL1NativeTokenVault",
|
|
5397
|
+
name: "",
|
|
5398
|
+
type: "address"
|
|
5399
|
+
}
|
|
5400
|
+
],
|
|
5401
|
+
stateMutability: "view",
|
|
5402
|
+
type: "function"
|
|
5403
|
+
},
|
|
5404
|
+
{
|
|
5405
|
+
inputs: [
|
|
5406
|
+
{
|
|
5407
|
+
internalType: "uint256",
|
|
5408
|
+
name: "_chainId",
|
|
5409
|
+
type: "uint256"
|
|
5410
|
+
},
|
|
5411
|
+
{
|
|
5412
|
+
internalType: "bytes32",
|
|
5413
|
+
name: "_l2TxHash",
|
|
5414
|
+
type: "bytes32"
|
|
5415
|
+
}
|
|
5416
|
+
],
|
|
5417
|
+
name: "depositHappened",
|
|
5418
|
+
outputs: [
|
|
5419
|
+
{
|
|
5420
|
+
internalType: "bytes32",
|
|
5421
|
+
name: "",
|
|
5422
|
+
type: "bytes32"
|
|
5423
|
+
}
|
|
5424
|
+
],
|
|
5425
|
+
stateMutability: "view",
|
|
5426
|
+
type: "function"
|
|
5427
|
+
},
|
|
5428
|
+
{
|
|
5429
|
+
inputs: [
|
|
5430
|
+
{
|
|
5431
|
+
internalType: "uint256",
|
|
5432
|
+
name: "_chainId",
|
|
5433
|
+
type: "uint256"
|
|
5434
|
+
},
|
|
5435
|
+
{
|
|
5436
|
+
internalType: "bytes32",
|
|
5437
|
+
name: "_txDataHash",
|
|
5438
|
+
type: "bytes32"
|
|
5439
|
+
},
|
|
5440
|
+
{
|
|
5441
|
+
internalType: "bytes32",
|
|
5442
|
+
name: "_txHash",
|
|
5443
|
+
type: "bytes32"
|
|
5444
|
+
}
|
|
5445
|
+
],
|
|
5446
|
+
name: "bridgehubConfirmL2TransactionForwarded",
|
|
5447
|
+
outputs: [],
|
|
5448
|
+
stateMutability: "nonpayable",
|
|
5449
|
+
type: "function"
|
|
5450
|
+
},
|
|
5451
|
+
{
|
|
5452
|
+
inputs: [
|
|
5453
|
+
{
|
|
5454
|
+
components: [
|
|
5455
|
+
{
|
|
5456
|
+
internalType: "uint256",
|
|
5457
|
+
name: "_chainId",
|
|
5458
|
+
type: "uint256"
|
|
5459
|
+
},
|
|
5460
|
+
{
|
|
5461
|
+
internalType: "address",
|
|
5462
|
+
name: "_depositSender",
|
|
5463
|
+
type: "address"
|
|
5464
|
+
},
|
|
5465
|
+
{
|
|
5466
|
+
internalType: "uint16",
|
|
5467
|
+
name: "_l2TxNumberInBatch",
|
|
5468
|
+
type: "uint16"
|
|
5469
|
+
},
|
|
5470
|
+
{
|
|
5471
|
+
internalType: "enum TxStatus",
|
|
5472
|
+
name: "_txStatus",
|
|
5473
|
+
type: "uint8"
|
|
5474
|
+
},
|
|
5475
|
+
{
|
|
5476
|
+
internalType: "bytes32",
|
|
5477
|
+
name: "_assetId",
|
|
5478
|
+
type: "bytes32"
|
|
5479
|
+
},
|
|
5480
|
+
{
|
|
5481
|
+
internalType: "bytes",
|
|
5482
|
+
name: "_assetData",
|
|
5483
|
+
type: "bytes"
|
|
5484
|
+
},
|
|
5485
|
+
{
|
|
5486
|
+
internalType: "bytes32",
|
|
5487
|
+
name: "_l2TxHash",
|
|
5488
|
+
type: "bytes32"
|
|
5489
|
+
},
|
|
5490
|
+
{
|
|
5491
|
+
internalType: "uint256",
|
|
5492
|
+
name: "_l2BatchNumber",
|
|
5493
|
+
type: "uint256"
|
|
5494
|
+
},
|
|
5495
|
+
{
|
|
5496
|
+
internalType: "uint256",
|
|
5497
|
+
name: "_l2MessageIndex",
|
|
5498
|
+
type: "uint256"
|
|
5499
|
+
},
|
|
5500
|
+
{
|
|
5501
|
+
internalType: "bytes32[]",
|
|
5502
|
+
name: "_merkleProof",
|
|
5503
|
+
type: "bytes32[]"
|
|
5504
|
+
}
|
|
5505
|
+
],
|
|
5506
|
+
internalType: "struct ConfirmTransferResultData",
|
|
5507
|
+
name: "_confirmTransferResultData",
|
|
5508
|
+
type: "tuple"
|
|
5509
|
+
}
|
|
5510
|
+
],
|
|
5511
|
+
name: "bridgeConfirmTransferResult",
|
|
5512
|
+
outputs: [],
|
|
5513
|
+
stateMutability: "nonpayable",
|
|
5514
|
+
type: "function"
|
|
5515
|
+
},
|
|
5516
|
+
{
|
|
5517
|
+
inputs: [
|
|
5518
|
+
{
|
|
5519
|
+
internalType: "uint256",
|
|
5520
|
+
name: "_chainId",
|
|
5521
|
+
type: "uint256"
|
|
5522
|
+
},
|
|
5523
|
+
{
|
|
5524
|
+
internalType: "address",
|
|
5525
|
+
name: "_depositSender",
|
|
5526
|
+
type: "address"
|
|
5527
|
+
},
|
|
5528
|
+
{
|
|
5529
|
+
internalType: "bytes32",
|
|
5530
|
+
name: "_assetId",
|
|
5531
|
+
type: "bytes32"
|
|
5532
|
+
},
|
|
5533
|
+
{
|
|
5534
|
+
internalType: "bytes",
|
|
5535
|
+
name: "_assetData",
|
|
5536
|
+
type: "bytes"
|
|
5537
|
+
},
|
|
5538
|
+
{
|
|
5539
|
+
internalType: "bytes32",
|
|
5540
|
+
name: "_l2TxHash",
|
|
5541
|
+
type: "bytes32"
|
|
5542
|
+
},
|
|
5543
|
+
{
|
|
5544
|
+
internalType: "uint256",
|
|
5545
|
+
name: "_l2BatchNumber",
|
|
5546
|
+
type: "uint256"
|
|
5547
|
+
},
|
|
5548
|
+
{
|
|
5549
|
+
internalType: "uint256",
|
|
5550
|
+
name: "_l2MessageIndex",
|
|
5551
|
+
type: "uint256"
|
|
5552
|
+
},
|
|
5553
|
+
{
|
|
5554
|
+
internalType: "uint16",
|
|
5555
|
+
name: "_l2TxNumberInBatch",
|
|
5556
|
+
type: "uint16"
|
|
5557
|
+
},
|
|
5558
|
+
{
|
|
5559
|
+
internalType: "bytes32[]",
|
|
5560
|
+
name: "_merkleProof",
|
|
5561
|
+
type: "bytes32[]"
|
|
5562
|
+
}
|
|
5563
|
+
],
|
|
5564
|
+
name: "bridgeRecoverFailedTransfer",
|
|
5565
|
+
outputs: [],
|
|
5566
|
+
stateMutability: "nonpayable",
|
|
5567
|
+
type: "function"
|
|
5568
|
+
},
|
|
5569
|
+
{
|
|
5570
|
+
inputs: [
|
|
5571
|
+
{
|
|
5572
|
+
internalType: "contract IL1NativeTokenVault",
|
|
5573
|
+
name: "_nativeTokenVault",
|
|
5574
|
+
type: "address"
|
|
5575
|
+
}
|
|
5576
|
+
],
|
|
5577
|
+
name: "setL1NativeTokenVault",
|
|
5578
|
+
outputs: [],
|
|
5579
|
+
stateMutability: "nonpayable",
|
|
5580
|
+
type: "function"
|
|
5581
|
+
},
|
|
5582
|
+
{
|
|
5583
|
+
inputs: [
|
|
5584
|
+
{
|
|
5585
|
+
internalType: "address",
|
|
5586
|
+
name: "_l1AssetRouter",
|
|
5587
|
+
type: "address"
|
|
5588
|
+
}
|
|
5589
|
+
],
|
|
5590
|
+
name: "setL1AssetRouter",
|
|
5591
|
+
outputs: [],
|
|
5592
|
+
stateMutability: "nonpayable",
|
|
5593
|
+
type: "function"
|
|
5594
|
+
},
|
|
5595
|
+
{
|
|
5596
|
+
inputs: [
|
|
5597
|
+
{
|
|
5598
|
+
internalType: "address",
|
|
5599
|
+
name: "_l1InteropHandler",
|
|
5600
|
+
type: "address"
|
|
5601
|
+
}
|
|
5602
|
+
],
|
|
5603
|
+
name: "setL1InteropHandler",
|
|
5604
|
+
outputs: [],
|
|
5605
|
+
stateMutability: "nonpayable",
|
|
5606
|
+
type: "function"
|
|
5607
|
+
}
|
|
5608
|
+
];
|
|
5609
|
+
var IL1NullifierV32_default = IL1NullifierV32ABI;
|
|
5610
|
+
|
|
5322
5611
|
// src/core/internal/abis/IERC20.ts
|
|
5323
5612
|
var IERC20ABI = [
|
|
5324
5613
|
{
|
|
@@ -5490,6 +5779,19 @@ var IERC7786AttributesABI = [
|
|
|
5490
5779
|
outputs: [],
|
|
5491
5780
|
stateMutability: "pure"
|
|
5492
5781
|
},
|
|
5782
|
+
{
|
|
5783
|
+
type: "function",
|
|
5784
|
+
name: "interopBundleSalt",
|
|
5785
|
+
inputs: [
|
|
5786
|
+
{
|
|
5787
|
+
name: "_salt",
|
|
5788
|
+
type: "bytes32",
|
|
5789
|
+
internalType: "bytes32"
|
|
5790
|
+
}
|
|
5791
|
+
],
|
|
5792
|
+
outputs: [],
|
|
5793
|
+
stateMutability: "pure"
|
|
5794
|
+
},
|
|
5493
5795
|
{
|
|
5494
5796
|
type: "function",
|
|
5495
5797
|
name: "unbundlerAddress",
|
|
@@ -7517,4 +7819,4 @@ function createZksRpc(transport) {
|
|
|
7517
7819
|
};
|
|
7518
7820
|
}
|
|
7519
7821
|
|
|
7520
|
-
export { IBaseToken_default, IBridgehub_default, IERC20_default, IERC7786Attributes_default, IInteropCenter_default, IInteropErrors_default, IInteropHandler_default, IInteropRootStorage_default, IL1AssetRouter_default, IL1ContractErrors_default, IL1Nullifier_default, IL2AssetRouter_default, L1NativeTokenVault_default, L2MessageVerification_default, L2NativeTokenVault_default, Mailbox_default, OP_CLIENT, OP_DEPOSITS, OP_INTEROP, OP_WITHDRAWALS, abi_exports, assertNever, createError, createZksRpc, factory_exports, formatEnvelopePretty, hexEq, isAddress, isAddressEq, isBigint, isETH, isHash, isHash66, isHash66Array, isHashArray, isNumber, isReceiptNotFound, isZKsyncError, normalizeAddrEq, normalizeL1Token, shapeCause, sleep, zks_exports };
|
|
7822
|
+
export { IBaseToken_default, IBridgehub_default, IERC20_default, IERC7786Attributes_default, IInteropCenter_default, IInteropErrors_default, IInteropHandler_default, IInteropRootStorage_default, IL1AssetRouter_default, IL1ContractErrors_default, IL1NullifierV32_default, IL1Nullifier_default, IL2AssetRouter_default, L1NativeTokenVault_default, L2MessageVerification_default, L2NativeTokenVault_default, Mailbox_default, OP_CLIENT, OP_DEPOSITS, OP_INTEROP, OP_WITHDRAWALS, abi_exports, assertNever, createError, createZksRpc, factory_exports, formatEnvelopePretty, hexEq, isAddress, isAddressEq, isBigint, isETH, isHash, isHash66, isHash66Array, isHashArray, isNumber, isReceiptNotFound, isZKsyncError, normalizeAddrEq, normalizeL1Token, shapeCause, sleep, zks_exports };
|