@morpho-org/midnight-sdk 1.7.0-next.0 → 1.8.0

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 (92) hide show
  1. package/README.md +61 -61
  2. package/lib/cjs/abis.d.ts +794 -0
  3. package/lib/cjs/abis.js +502 -1
  4. package/lib/cjs/api/version.generated.d.ts +1 -1
  5. package/lib/cjs/api/version.generated.js +2 -2
  6. package/lib/cjs/constants.d.ts +34 -0
  7. package/lib/cjs/constants.js +35 -1
  8. package/lib/cjs/errors.d.ts +107 -0
  9. package/lib/cjs/errors.js +139 -1
  10. package/lib/cjs/fetch/Ratifier.d.ts +4 -3
  11. package/lib/cjs/fetch/Ratifier.js +5 -4
  12. package/lib/cjs/index.d.ts +7 -0
  13. package/lib/cjs/index.js +16 -1
  14. package/lib/cjs/offers/Offer.d.ts +10 -0
  15. package/lib/cjs/offers/Offer.js +15 -1
  16. package/lib/cjs/offers/OfferUtils.d.ts +3 -0
  17. package/lib/cjs/offers/OfferUtils.js +3 -0
  18. package/lib/cjs/signatures/{EcrecoverRatifierUtils.d.ts → EcrecoverRatifier.d.ts} +118 -2
  19. package/lib/cjs/signatures/{EcrecoverRatifierUtils.js → EcrecoverRatifier.js} +146 -9
  20. package/lib/cjs/signatures/GroupUtils.d.ts +55 -2
  21. package/lib/cjs/signatures/GroupUtils.js +64 -5
  22. package/lib/cjs/signatures/Payload.d.ts +3 -3
  23. package/lib/cjs/signatures/PriceRatifierV1.d.ts +472 -0
  24. package/lib/cjs/signatures/PriceRatifierV1.js +521 -0
  25. package/lib/cjs/signatures/RateRatifierV1.d.ts +581 -0
  26. package/lib/cjs/signatures/RateRatifierV1.js +696 -0
  27. package/lib/{esm/signatures/RatifierUtils.d.ts → cjs/signatures/Ratifier.d.ts} +14 -12
  28. package/lib/cjs/signatures/{RatifierUtils.js → Ratifier.js} +29 -29
  29. package/lib/cjs/signatures/{SetterRatifierUtils.d.ts → SetterRatifier.d.ts} +50 -3
  30. package/lib/cjs/signatures/{SetterRatifierUtils.js → SetterRatifier.js} +65 -7
  31. package/lib/cjs/signatures/Tree.d.ts +94 -17
  32. package/lib/cjs/signatures/Tree.js +146 -111
  33. package/lib/cjs/signatures/TreeUtils.d.ts +191 -21
  34. package/lib/cjs/signatures/TreeUtils.js +320 -134
  35. package/lib/cjs/signatures/index.d.ts +7 -3
  36. package/lib/cjs/signatures/index.js +5 -3
  37. package/lib/cjs/signatures/ratifierRequests.d.ts +55 -0
  38. package/lib/cjs/signatures/ratifierRequests.js +2 -0
  39. package/lib/cjs/signatures/ratifierV1Internal.d.ts +57 -0
  40. package/lib/cjs/signatures/ratifierV1Internal.js +183 -0
  41. package/lib/cjs/signatures/standardRatifierInternal.d.ts +4 -0
  42. package/lib/cjs/signatures/standardRatifierInternal.js +12 -0
  43. package/lib/cjs/signatures/treeMathInternal.d.ts +4 -0
  44. package/lib/cjs/signatures/treeMathInternal.js +12 -0
  45. package/lib/cjs/signatures/treeTypes.d.ts +109 -0
  46. package/lib/cjs/signatures/treeTypes.js +2 -0
  47. package/lib/esm/abis.d.ts +794 -0
  48. package/lib/esm/abis.js +501 -0
  49. package/lib/esm/api/version.generated.d.ts +1 -1
  50. package/lib/esm/api/version.generated.js +2 -2
  51. package/lib/esm/constants.d.ts +34 -0
  52. package/lib/esm/constants.js +34 -0
  53. package/lib/esm/errors.d.ts +107 -0
  54. package/lib/esm/errors.js +132 -0
  55. package/lib/esm/fetch/Ratifier.d.ts +4 -3
  56. package/lib/esm/fetch/Ratifier.js +5 -4
  57. package/lib/esm/index.d.ts +7 -0
  58. package/lib/esm/index.js +5 -0
  59. package/lib/esm/offers/Offer.d.ts +10 -0
  60. package/lib/esm/offers/Offer.js +15 -1
  61. package/lib/esm/offers/OfferUtils.d.ts +3 -0
  62. package/lib/esm/offers/OfferUtils.js +3 -0
  63. package/lib/esm/signatures/{EcrecoverRatifierUtils.d.ts → EcrecoverRatifier.d.ts} +118 -2
  64. package/lib/esm/signatures/{EcrecoverRatifierUtils.js → EcrecoverRatifier.js} +146 -9
  65. package/lib/esm/signatures/GroupUtils.d.ts +55 -2
  66. package/lib/esm/signatures/GroupUtils.js +64 -5
  67. package/lib/esm/signatures/Payload.d.ts +3 -3
  68. package/lib/esm/signatures/PriceRatifierV1.d.ts +472 -0
  69. package/lib/esm/signatures/PriceRatifierV1.js +520 -0
  70. package/lib/esm/signatures/RateRatifierV1.d.ts +581 -0
  71. package/lib/esm/signatures/RateRatifierV1.js +695 -0
  72. package/lib/{cjs/signatures/RatifierUtils.d.ts → esm/signatures/Ratifier.d.ts} +14 -12
  73. package/lib/esm/signatures/{RatifierUtils.js → Ratifier.js} +31 -29
  74. package/lib/esm/signatures/{SetterRatifierUtils.d.ts → SetterRatifier.d.ts} +50 -3
  75. package/lib/esm/signatures/{SetterRatifierUtils.js → SetterRatifier.js} +65 -7
  76. package/lib/esm/signatures/Tree.d.ts +94 -17
  77. package/lib/esm/signatures/Tree.js +147 -112
  78. package/lib/esm/signatures/TreeUtils.d.ts +191 -21
  79. package/lib/esm/signatures/TreeUtils.js +318 -132
  80. package/lib/esm/signatures/index.d.ts +7 -3
  81. package/lib/esm/signatures/index.js +5 -3
  82. package/lib/esm/signatures/ratifierRequests.d.ts +55 -0
  83. package/lib/esm/signatures/ratifierRequests.js +1 -0
  84. package/lib/esm/signatures/ratifierV1Internal.d.ts +57 -0
  85. package/lib/esm/signatures/ratifierV1Internal.js +176 -0
  86. package/lib/esm/signatures/standardRatifierInternal.d.ts +4 -0
  87. package/lib/esm/signatures/standardRatifierInternal.js +9 -0
  88. package/lib/esm/signatures/treeMathInternal.d.ts +4 -0
  89. package/lib/esm/signatures/treeMathInternal.js +8 -0
  90. package/lib/esm/signatures/treeTypes.d.ts +109 -0
  91. package/lib/esm/signatures/treeTypes.js +1 -0
  92. package/package.json +4 -4
package/lib/esm/abis.js CHANGED
@@ -4302,3 +4302,504 @@ export const setterRatifierAbi = [
4302
4302
  inputs: [],
4303
4303
  },
4304
4304
  ];
4305
+ /**
4306
+ * Pinned ABI JSON for the PriceRatifierV1.
4307
+ *
4308
+ * Source: `morpho-org/midnight` commit `11f3d984b53286fd9137eb89e5d1385e23fe1b30`,
4309
+ * `src/ratifiers/interfaces/IPriceRatifierV1.sol`, Forge artifact `out/IPriceRatifierV1.sol/IPriceRatifierV1.json`.
4310
+ *
4311
+ * @example
4312
+ * ```ts
4313
+ * import { priceRatifierV1Abi } from "@morpho-org/midnight-sdk";
4314
+ *
4315
+ * console.log(priceRatifierV1Abi.length);
4316
+ * ```
4317
+ */
4318
+ export const priceRatifierV1Abi = [
4319
+ {
4320
+ type: "function",
4321
+ name: "DOMAIN_SEPARATOR",
4322
+ inputs: [],
4323
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
4324
+ stateMutability: "view",
4325
+ },
4326
+ {
4327
+ type: "function",
4328
+ name: "MIDNIGHT",
4329
+ inputs: [],
4330
+ outputs: [{ name: "", type: "address", internalType: "address" }],
4331
+ stateMutability: "view",
4332
+ },
4333
+ {
4334
+ type: "function",
4335
+ name: "isRatified",
4336
+ inputs: [
4337
+ {
4338
+ name: "offer",
4339
+ type: "tuple",
4340
+ internalType: "struct Offer",
4341
+ components: [
4342
+ {
4343
+ name: "market",
4344
+ type: "tuple",
4345
+ internalType: "struct Market",
4346
+ components: [
4347
+ { name: "chainId", type: "uint256", internalType: "uint256" },
4348
+ { name: "midnight", type: "address", internalType: "address" },
4349
+ { name: "loanToken", type: "address", internalType: "address" },
4350
+ {
4351
+ name: "collateralParams",
4352
+ type: "tuple[]",
4353
+ internalType: "struct CollateralParams[]",
4354
+ components: [
4355
+ { name: "token", type: "address", internalType: "address" },
4356
+ { name: "lltv", type: "uint256", internalType: "uint256" },
4357
+ {
4358
+ name: "liquidationCursor",
4359
+ type: "uint256",
4360
+ internalType: "uint256",
4361
+ },
4362
+ { name: "oracle", type: "address", internalType: "address" },
4363
+ ],
4364
+ },
4365
+ { name: "maturity", type: "uint256", internalType: "uint256" },
4366
+ {
4367
+ name: "rcfThreshold",
4368
+ type: "uint256",
4369
+ internalType: "uint256",
4370
+ },
4371
+ { name: "enterGate", type: "address", internalType: "address" },
4372
+ {
4373
+ name: "liquidatorGate",
4374
+ type: "address",
4375
+ internalType: "address",
4376
+ },
4377
+ ],
4378
+ },
4379
+ { name: "buy", type: "bool", internalType: "bool" },
4380
+ { name: "maker", type: "address", internalType: "address" },
4381
+ { name: "start", type: "uint256", internalType: "uint256" },
4382
+ { name: "expiry", type: "uint256", internalType: "uint256" },
4383
+ { name: "tick", type: "uint256", internalType: "uint256" },
4384
+ { name: "group", type: "bytes32", internalType: "bytes32" },
4385
+ { name: "callback", type: "address", internalType: "address" },
4386
+ { name: "callbackData", type: "bytes", internalType: "bytes" },
4387
+ {
4388
+ name: "receiverIfMakerIsSeller",
4389
+ type: "address",
4390
+ internalType: "address",
4391
+ },
4392
+ { name: "ratifier", type: "address", internalType: "address" },
4393
+ { name: "reduceOnly", type: "bool", internalType: "bool" },
4394
+ { name: "maxUnits", type: "uint128", internalType: "uint128" },
4395
+ { name: "maxAssets", type: "uint128", internalType: "uint128" },
4396
+ {
4397
+ name: "continuousFeeCap",
4398
+ type: "uint256",
4399
+ internalType: "uint256",
4400
+ },
4401
+ ],
4402
+ },
4403
+ { name: "ratifierData", type: "bytes", internalType: "bytes" },
4404
+ { name: "taker", type: "address", internalType: "address" },
4405
+ ],
4406
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
4407
+ stateMutability: "view",
4408
+ },
4409
+ {
4410
+ type: "function",
4411
+ name: "isRootRatified",
4412
+ inputs: [
4413
+ { name: "maker", type: "address", internalType: "address" },
4414
+ { name: "root", type: "bytes32", internalType: "bytes32" },
4415
+ ],
4416
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
4417
+ stateMutability: "view",
4418
+ },
4419
+ {
4420
+ type: "function",
4421
+ name: "ratification",
4422
+ inputs: [
4423
+ { name: "maker", type: "address", internalType: "address" },
4424
+ { name: "root", type: "bytes32", internalType: "bytes32" },
4425
+ ],
4426
+ outputs: [
4427
+ { name: "isRootRatified", type: "bool", internalType: "bool" },
4428
+ { name: "rootNonce", type: "uint128", internalType: "uint128" },
4429
+ ],
4430
+ stateMutability: "view",
4431
+ },
4432
+ {
4433
+ type: "function",
4434
+ name: "rootNonce",
4435
+ inputs: [
4436
+ { name: "maker", type: "address", internalType: "address" },
4437
+ { name: "root", type: "bytes32", internalType: "bytes32" },
4438
+ ],
4439
+ outputs: [{ name: "", type: "uint128", internalType: "uint128" }],
4440
+ stateMutability: "view",
4441
+ },
4442
+ {
4443
+ type: "function",
4444
+ name: "setIsRootRatified",
4445
+ inputs: [
4446
+ { name: "maker", type: "address", internalType: "address" },
4447
+ { name: "root", type: "bytes32", internalType: "bytes32" },
4448
+ { name: "newIsRootRatified", type: "bool", internalType: "bool" },
4449
+ ],
4450
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
4451
+ stateMutability: "nonpayable",
4452
+ },
4453
+ {
4454
+ type: "function",
4455
+ name: "setIsRootRatifiedWithSig",
4456
+ inputs: [
4457
+ { name: "maker", type: "address", internalType: "address" },
4458
+ { name: "root", type: "bytes32", internalType: "bytes32" },
4459
+ { name: "height", type: "uint256", internalType: "uint256" },
4460
+ { name: "newIsRootRatified", type: "bool", internalType: "bool" },
4461
+ { name: "nonce", type: "uint128", internalType: "uint128" },
4462
+ { name: "deadline", type: "uint256", internalType: "uint256" },
4463
+ { name: "v", type: "uint8", internalType: "uint8" },
4464
+ { name: "r", type: "bytes32", internalType: "bytes32" },
4465
+ { name: "s", type: "bytes32", internalType: "bytes32" },
4466
+ ],
4467
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
4468
+ stateMutability: "nonpayable",
4469
+ },
4470
+ {
4471
+ type: "event",
4472
+ name: "SetIsRootRatified",
4473
+ inputs: [
4474
+ {
4475
+ name: "caller",
4476
+ type: "address",
4477
+ indexed: true,
4478
+ internalType: "address",
4479
+ },
4480
+ {
4481
+ name: "maker",
4482
+ type: "address",
4483
+ indexed: true,
4484
+ internalType: "address",
4485
+ },
4486
+ { name: "root", type: "bytes32", indexed: true, internalType: "bytes32" },
4487
+ {
4488
+ name: "newIsRootRatified",
4489
+ type: "bool",
4490
+ indexed: false,
4491
+ internalType: "bool",
4492
+ },
4493
+ ],
4494
+ anonymous: false,
4495
+ },
4496
+ {
4497
+ type: "event",
4498
+ name: "SetIsRootRatifiedWithSig",
4499
+ inputs: [
4500
+ {
4501
+ name: "caller",
4502
+ type: "address",
4503
+ indexed: false,
4504
+ internalType: "address",
4505
+ },
4506
+ {
4507
+ name: "signer",
4508
+ type: "address",
4509
+ indexed: true,
4510
+ internalType: "address",
4511
+ },
4512
+ {
4513
+ name: "maker",
4514
+ type: "address",
4515
+ indexed: true,
4516
+ internalType: "address",
4517
+ },
4518
+ { name: "root", type: "bytes32", indexed: true, internalType: "bytes32" },
4519
+ {
4520
+ name: "height",
4521
+ type: "uint256",
4522
+ indexed: false,
4523
+ internalType: "uint256",
4524
+ },
4525
+ {
4526
+ name: "newIsRootRatified",
4527
+ type: "bool",
4528
+ indexed: false,
4529
+ internalType: "bool",
4530
+ },
4531
+ {
4532
+ name: "signatureNonce",
4533
+ type: "uint128",
4534
+ indexed: false,
4535
+ internalType: "uint128",
4536
+ },
4537
+ {
4538
+ name: "previousNonce",
4539
+ type: "uint128",
4540
+ indexed: false,
4541
+ internalType: "uint128",
4542
+ },
4543
+ ],
4544
+ anonymous: false,
4545
+ },
4546
+ { type: "error", name: "DeadlineExpired", inputs: [] },
4547
+ { type: "error", name: "InvalidNonce", inputs: [] },
4548
+ { type: "error", name: "InvalidProof", inputs: [] },
4549
+ { type: "error", name: "InvalidSignature", inputs: [] },
4550
+ { type: "error", name: "NotRatified", inputs: [] },
4551
+ { type: "error", name: "RatifiedStatusChanged", inputs: [] },
4552
+ { type: "error", name: "Unauthorized", inputs: [] },
4553
+ { type: "error", name: "UnauthorizedTaker", inputs: [] },
4554
+ ];
4555
+ /**
4556
+ * Pinned ABI JSON for the RateRatifierV1.
4557
+ *
4558
+ * Source: `morpho-org/midnight` commit `11f3d984b53286fd9137eb89e5d1385e23fe1b30`,
4559
+ * `src/ratifiers/interfaces/IRateRatifierV1.sol`, Forge artifact `out/IRateRatifierV1.sol/IRateRatifierV1.json`.
4560
+ *
4561
+ * @example
4562
+ * ```ts
4563
+ * import { rateRatifierV1Abi } from "@morpho-org/midnight-sdk";
4564
+ *
4565
+ * console.log(rateRatifierV1Abi.length);
4566
+ * ```
4567
+ */
4568
+ export const rateRatifierV1Abi = [
4569
+ {
4570
+ type: "function",
4571
+ name: "DOMAIN_SEPARATOR",
4572
+ inputs: [],
4573
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
4574
+ stateMutability: "view",
4575
+ },
4576
+ {
4577
+ type: "function",
4578
+ name: "MIDNIGHT",
4579
+ inputs: [],
4580
+ outputs: [{ name: "", type: "address", internalType: "address" }],
4581
+ stateMutability: "view",
4582
+ },
4583
+ {
4584
+ type: "function",
4585
+ name: "isRatified",
4586
+ inputs: [
4587
+ {
4588
+ name: "offer",
4589
+ type: "tuple",
4590
+ internalType: "struct Offer",
4591
+ components: [
4592
+ {
4593
+ name: "market",
4594
+ type: "tuple",
4595
+ internalType: "struct Market",
4596
+ components: [
4597
+ { name: "chainId", type: "uint256", internalType: "uint256" },
4598
+ { name: "midnight", type: "address", internalType: "address" },
4599
+ { name: "loanToken", type: "address", internalType: "address" },
4600
+ {
4601
+ name: "collateralParams",
4602
+ type: "tuple[]",
4603
+ internalType: "struct CollateralParams[]",
4604
+ components: [
4605
+ { name: "token", type: "address", internalType: "address" },
4606
+ { name: "lltv", type: "uint256", internalType: "uint256" },
4607
+ {
4608
+ name: "liquidationCursor",
4609
+ type: "uint256",
4610
+ internalType: "uint256",
4611
+ },
4612
+ { name: "oracle", type: "address", internalType: "address" },
4613
+ ],
4614
+ },
4615
+ { name: "maturity", type: "uint256", internalType: "uint256" },
4616
+ {
4617
+ name: "rcfThreshold",
4618
+ type: "uint256",
4619
+ internalType: "uint256",
4620
+ },
4621
+ { name: "enterGate", type: "address", internalType: "address" },
4622
+ {
4623
+ name: "liquidatorGate",
4624
+ type: "address",
4625
+ internalType: "address",
4626
+ },
4627
+ ],
4628
+ },
4629
+ { name: "buy", type: "bool", internalType: "bool" },
4630
+ { name: "maker", type: "address", internalType: "address" },
4631
+ { name: "start", type: "uint256", internalType: "uint256" },
4632
+ { name: "expiry", type: "uint256", internalType: "uint256" },
4633
+ { name: "tick", type: "uint256", internalType: "uint256" },
4634
+ { name: "group", type: "bytes32", internalType: "bytes32" },
4635
+ { name: "callback", type: "address", internalType: "address" },
4636
+ { name: "callbackData", type: "bytes", internalType: "bytes" },
4637
+ {
4638
+ name: "receiverIfMakerIsSeller",
4639
+ type: "address",
4640
+ internalType: "address",
4641
+ },
4642
+ { name: "ratifier", type: "address", internalType: "address" },
4643
+ { name: "reduceOnly", type: "bool", internalType: "bool" },
4644
+ { name: "maxUnits", type: "uint128", internalType: "uint128" },
4645
+ { name: "maxAssets", type: "uint128", internalType: "uint128" },
4646
+ {
4647
+ name: "continuousFeeCap",
4648
+ type: "uint256",
4649
+ internalType: "uint256",
4650
+ },
4651
+ ],
4652
+ },
4653
+ { name: "ratifierData", type: "bytes", internalType: "bytes" },
4654
+ { name: "taker", type: "address", internalType: "address" },
4655
+ ],
4656
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
4657
+ stateMutability: "view",
4658
+ },
4659
+ {
4660
+ type: "function",
4661
+ name: "isRootRatified",
4662
+ inputs: [
4663
+ { name: "maker", type: "address", internalType: "address" },
4664
+ { name: "root", type: "bytes32", internalType: "bytes32" },
4665
+ ],
4666
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
4667
+ stateMutability: "view",
4668
+ },
4669
+ {
4670
+ type: "function",
4671
+ name: "ratification",
4672
+ inputs: [
4673
+ { name: "maker", type: "address", internalType: "address" },
4674
+ { name: "root", type: "bytes32", internalType: "bytes32" },
4675
+ ],
4676
+ outputs: [
4677
+ { name: "isRootRatified", type: "bool", internalType: "bool" },
4678
+ { name: "rootNonce", type: "uint128", internalType: "uint128" },
4679
+ ],
4680
+ stateMutability: "view",
4681
+ },
4682
+ {
4683
+ type: "function",
4684
+ name: "rootNonce",
4685
+ inputs: [
4686
+ { name: "maker", type: "address", internalType: "address" },
4687
+ { name: "root", type: "bytes32", internalType: "bytes32" },
4688
+ ],
4689
+ outputs: [{ name: "", type: "uint128", internalType: "uint128" }],
4690
+ stateMutability: "view",
4691
+ },
4692
+ {
4693
+ type: "function",
4694
+ name: "setIsRootRatified",
4695
+ inputs: [
4696
+ { name: "maker", type: "address", internalType: "address" },
4697
+ { name: "root", type: "bytes32", internalType: "bytes32" },
4698
+ { name: "newIsRootRatified", type: "bool", internalType: "bool" },
4699
+ ],
4700
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
4701
+ stateMutability: "nonpayable",
4702
+ },
4703
+ {
4704
+ type: "function",
4705
+ name: "setIsRootRatifiedWithSig",
4706
+ inputs: [
4707
+ { name: "maker", type: "address", internalType: "address" },
4708
+ { name: "root", type: "bytes32", internalType: "bytes32" },
4709
+ { name: "height", type: "uint256", internalType: "uint256" },
4710
+ { name: "newIsRootRatified", type: "bool", internalType: "bool" },
4711
+ { name: "nonce", type: "uint128", internalType: "uint128" },
4712
+ { name: "deadline", type: "uint256", internalType: "uint256" },
4713
+ { name: "v", type: "uint8", internalType: "uint8" },
4714
+ { name: "r", type: "bytes32", internalType: "bytes32" },
4715
+ { name: "s", type: "bytes32", internalType: "bytes32" },
4716
+ ],
4717
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
4718
+ stateMutability: "nonpayable",
4719
+ },
4720
+ {
4721
+ type: "event",
4722
+ name: "SetIsRootRatified",
4723
+ inputs: [
4724
+ {
4725
+ name: "caller",
4726
+ type: "address",
4727
+ indexed: true,
4728
+ internalType: "address",
4729
+ },
4730
+ {
4731
+ name: "maker",
4732
+ type: "address",
4733
+ indexed: true,
4734
+ internalType: "address",
4735
+ },
4736
+ { name: "root", type: "bytes32", indexed: true, internalType: "bytes32" },
4737
+ {
4738
+ name: "newIsRootRatified",
4739
+ type: "bool",
4740
+ indexed: false,
4741
+ internalType: "bool",
4742
+ },
4743
+ ],
4744
+ anonymous: false,
4745
+ },
4746
+ {
4747
+ type: "event",
4748
+ name: "SetIsRootRatifiedWithSig",
4749
+ inputs: [
4750
+ {
4751
+ name: "caller",
4752
+ type: "address",
4753
+ indexed: false,
4754
+ internalType: "address",
4755
+ },
4756
+ {
4757
+ name: "signer",
4758
+ type: "address",
4759
+ indexed: true,
4760
+ internalType: "address",
4761
+ },
4762
+ {
4763
+ name: "maker",
4764
+ type: "address",
4765
+ indexed: true,
4766
+ internalType: "address",
4767
+ },
4768
+ { name: "root", type: "bytes32", indexed: true, internalType: "bytes32" },
4769
+ {
4770
+ name: "height",
4771
+ type: "uint256",
4772
+ indexed: false,
4773
+ internalType: "uint256",
4774
+ },
4775
+ {
4776
+ name: "newIsRootRatified",
4777
+ type: "bool",
4778
+ indexed: false,
4779
+ internalType: "bool",
4780
+ },
4781
+ {
4782
+ name: "signatureNonce",
4783
+ type: "uint128",
4784
+ indexed: false,
4785
+ internalType: "uint128",
4786
+ },
4787
+ {
4788
+ name: "previousNonce",
4789
+ type: "uint128",
4790
+ indexed: false,
4791
+ internalType: "uint128",
4792
+ },
4793
+ ],
4794
+ anonymous: false,
4795
+ },
4796
+ { type: "error", name: "DeadlineExpired", inputs: [] },
4797
+ { type: "error", name: "InvalidNonce", inputs: [] },
4798
+ { type: "error", name: "InvalidProof", inputs: [] },
4799
+ { type: "error", name: "InvalidSignature", inputs: [] },
4800
+ { type: "error", name: "NotRatified", inputs: [] },
4801
+ { type: "error", name: "RatifiedStatusChanged", inputs: [] },
4802
+ { type: "error", name: "Unauthorized", inputs: [] },
4803
+ { type: "error", name: "UnauthorizedTaker", inputs: [] },
4804
+ { type: "error", name: "WorsePrice", inputs: [] },
4805
+ ];
@@ -1,2 +1,2 @@
1
1
  /** @internal Installed Midnight SDK package version. */
2
- export declare const MIDNIGHT_SDK_VERSION = "1.7.0-next.0";
2
+ export declare const MIDNIGHT_SDK_VERSION = "1.8.0";
@@ -1,3 +1,3 @@
1
- // Generated by scripts/release/generate-midnight-package-version.mjs. Do not edit.
1
+ // Generated by scripts/release/generate-midnight-package-version.ts. Do not edit.
2
2
  /** @internal Installed Midnight SDK package version. */
3
- export const MIDNIGHT_SDK_VERSION = "1.7.0-next.0";
3
+ export const MIDNIGHT_SDK_VERSION = "1.8.0";
@@ -111,6 +111,18 @@ export declare const MAX_CONTINUOUS_FEE = 317097919n;
111
111
  * ```
112
112
  */
113
113
  export declare const MAX_OFFER_CAP: bigint;
114
+ /**
115
+ * Maximum Merkle tree height supported by the Midnight offer-tree typehash
116
+ * tables, enforced by every ratifier tree helper (Ecrecover, Setter, and V1).
117
+ *
118
+ * @example
119
+ * ```ts
120
+ * import { MAX_TREE_HEIGHT } from "@morpho-org/midnight-sdk";
121
+ *
122
+ * console.log(MAX_TREE_HEIGHT);
123
+ * ```
124
+ */
125
+ export declare const MAX_TREE_HEIGHT = 20;
114
126
  /**
115
127
  * Seconds after maturity over which post-maturity LIF reaches the computed
116
128
  * maximum liquidation incentive factor.
@@ -156,6 +168,28 @@ export declare const MARKET_TYPEHASH = "0x510b3862f3816a109c9340b76972e8a3098424
156
168
  * ```
157
169
  */
158
170
  export declare const OFFER_TYPEHASH = "0x9905214264a9fb7b6cc1b0e33db7a04687c6e4185a84755d29914314aa9d8906";
171
+ /**
172
+ * HashLib PriceRatifierV1 offer typehash.
173
+ *
174
+ * @example
175
+ * ```ts
176
+ * import { PRICE_RATIFIER_V1_OFFER_TYPEHASH } from "@morpho-org/midnight-sdk";
177
+ *
178
+ * console.log(PRICE_RATIFIER_V1_OFFER_TYPEHASH);
179
+ * ```
180
+ */
181
+ export declare const PRICE_RATIFIER_V1_OFFER_TYPEHASH = "0x62a94097fbcb9b56e3cf7b4f7bb075b49540b1364815434ff4b16bc4decb303d";
182
+ /**
183
+ * HashLib RateRatifierV1 offer typehash.
184
+ *
185
+ * @example
186
+ * ```ts
187
+ * import { RATE_RATIFIER_V1_OFFER_TYPEHASH } from "@morpho-org/midnight-sdk";
188
+ *
189
+ * console.log(RATE_RATIFIER_V1_OFFER_TYPEHASH);
190
+ * ```
191
+ */
192
+ export declare const RATE_RATIFIER_V1_OFFER_TYPEHASH = "0x8e0f9c17bf7e919b5f22e8c6c4e787905f45864a4be441067bbd2e65b35c3de1";
159
193
  /**
160
194
  * EcrecoverRatifier EIP-712 domain typehash.
161
195
  *
@@ -128,6 +128,18 @@ export const MAX_CONTINUOUS_FEE = 317097919n;
128
128
  * ```
129
129
  */
130
130
  export const MAX_OFFER_CAP = maxUint128;
131
+ /**
132
+ * Maximum Merkle tree height supported by the Midnight offer-tree typehash
133
+ * tables, enforced by every ratifier tree helper (Ecrecover, Setter, and V1).
134
+ *
135
+ * @example
136
+ * ```ts
137
+ * import { MAX_TREE_HEIGHT } from "@morpho-org/midnight-sdk";
138
+ *
139
+ * console.log(MAX_TREE_HEIGHT);
140
+ * ```
141
+ */
142
+ export const MAX_TREE_HEIGHT = 20;
131
143
  /**
132
144
  * Seconds after maturity over which post-maturity LIF reaches the computed
133
145
  * maximum liquidation incentive factor.
@@ -173,6 +185,28 @@ export const MARKET_TYPEHASH = "0x510b3862f3816a109c9340b76972e8a30984246be06e03
173
185
  * ```
174
186
  */
175
187
  export const OFFER_TYPEHASH = "0x9905214264a9fb7b6cc1b0e33db7a04687c6e4185a84755d29914314aa9d8906";
188
+ /**
189
+ * HashLib PriceRatifierV1 offer typehash.
190
+ *
191
+ * @example
192
+ * ```ts
193
+ * import { PRICE_RATIFIER_V1_OFFER_TYPEHASH } from "@morpho-org/midnight-sdk";
194
+ *
195
+ * console.log(PRICE_RATIFIER_V1_OFFER_TYPEHASH);
196
+ * ```
197
+ */
198
+ export const PRICE_RATIFIER_V1_OFFER_TYPEHASH = "0x62a94097fbcb9b56e3cf7b4f7bb075b49540b1364815434ff4b16bc4decb303d";
199
+ /**
200
+ * HashLib RateRatifierV1 offer typehash.
201
+ *
202
+ * @example
203
+ * ```ts
204
+ * import { RATE_RATIFIER_V1_OFFER_TYPEHASH } from "@morpho-org/midnight-sdk";
205
+ *
206
+ * console.log(RATE_RATIFIER_V1_OFFER_TYPEHASH);
207
+ * ```
208
+ */
209
+ export const RATE_RATIFIER_V1_OFFER_TYPEHASH = "0x8e0f9c17bf7e919b5f22e8c6c4e787905f45864a4be441067bbd2e65b35c3de1";
176
210
  /**
177
211
  * EcrecoverRatifier EIP-712 domain typehash.
178
212
  *