@pufferfinance/puffer-sdk 1.18.1 → 1.20.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 (37) hide show
  1. package/dist/api/puffer-client.cjs +1 -1
  2. package/dist/api/puffer-client.cjs.map +1 -1
  3. package/dist/api/puffer-client.d.ts +6 -0
  4. package/dist/api/puffer-client.js +42 -28
  5. package/dist/api/puffer-client.js.map +1 -1
  6. package/dist/contracts/abis/mainnet/PufferOracleV2.cjs +2 -0
  7. package/dist/contracts/abis/mainnet/PufferOracleV2.cjs.map +1 -0
  8. package/dist/contracts/abis/mainnet/PufferOracleV2.d.ts +172 -0
  9. package/dist/contracts/abis/mainnet/PufferOracleV2.js +153 -0
  10. package/dist/contracts/abis/mainnet/PufferOracleV2.js.map +1 -0
  11. package/dist/contracts/abis/mainnet/PufferProtocol.cjs +2 -0
  12. package/dist/contracts/abis/mainnet/PufferProtocol.cjs.map +1 -0
  13. package/dist/contracts/abis/mainnet/PufferProtocol.d.ts +665 -0
  14. package/dist/contracts/abis/mainnet/PufferProtocol.js +866 -0
  15. package/dist/contracts/abis/mainnet/PufferProtocol.js.map +1 -0
  16. package/dist/contracts/addresses.cjs +1 -1
  17. package/dist/contracts/addresses.cjs.map +1 -1
  18. package/dist/contracts/addresses.d.ts +6 -0
  19. package/dist/contracts/addresses.js +8 -4
  20. package/dist/contracts/addresses.js.map +1 -1
  21. package/dist/contracts/handlers/puffer-oracle-v2-handler.cjs +2 -0
  22. package/dist/contracts/handlers/puffer-oracle-v2-handler.cjs.map +1 -0
  23. package/dist/contracts/handlers/puffer-oracle-v2-handler.d.ts +14789 -0
  24. package/dist/contracts/handlers/puffer-oracle-v2-handler.js +120 -0
  25. package/dist/contracts/handlers/puffer-oracle-v2-handler.js.map +1 -0
  26. package/dist/contracts/handlers/puffer-protocol-handler.cjs +2 -0
  27. package/dist/contracts/handlers/puffer-protocol-handler.cjs.map +1 -0
  28. package/dist/contracts/handlers/puffer-protocol-handler.d.ts +15413 -0
  29. package/dist/contracts/handlers/puffer-protocol-handler.js +258 -0
  30. package/dist/contracts/handlers/puffer-protocol-handler.js.map +1 -0
  31. package/dist/main.cjs +1 -1
  32. package/dist/main.d.ts +2 -0
  33. package/dist/main.js +22 -18
  34. package/dist/main.js.map +1 -1
  35. package/dist/utils/version.cjs +1 -1
  36. package/dist/utils/version.js +1 -1
  37. package/package.json +1 -1
@@ -0,0 +1,866 @@
1
+ const e = [
2
+ {
3
+ type: "constructor",
4
+ inputs: [
5
+ {
6
+ name: "pufferVault",
7
+ type: "address",
8
+ internalType: "contract PufferVaultV2"
9
+ },
10
+ {
11
+ name: "guardianModule",
12
+ type: "address",
13
+ internalType: "contract IGuardianModule"
14
+ },
15
+ {
16
+ name: "moduleManager",
17
+ type: "address",
18
+ internalType: "address"
19
+ },
20
+ {
21
+ name: "validatorTicket",
22
+ type: "address",
23
+ internalType: "contract ValidatorTicket"
24
+ },
25
+ {
26
+ name: "oracle",
27
+ type: "address",
28
+ internalType: "contract IPufferOracleV2"
29
+ },
30
+ {
31
+ name: "beaconDepositContract",
32
+ type: "address",
33
+ internalType: "address"
34
+ }
35
+ ],
36
+ stateMutability: "nonpayable"
37
+ },
38
+ {
39
+ type: "function",
40
+ name: "batchHandleWithdrawals",
41
+ inputs: [
42
+ {
43
+ name: "validatorInfos",
44
+ type: "tuple[]",
45
+ internalType: "struct StoppedValidatorInfo[]",
46
+ components: [
47
+ {
48
+ name: "module",
49
+ type: "address",
50
+ internalType: "address"
51
+ },
52
+ {
53
+ name: "startEpoch",
54
+ type: "uint256",
55
+ internalType: "uint256"
56
+ },
57
+ {
58
+ name: "endEpoch",
59
+ type: "uint256",
60
+ internalType: "uint256"
61
+ },
62
+ {
63
+ name: "wasSlashed",
64
+ type: "bool",
65
+ internalType: "bool"
66
+ },
67
+ {
68
+ name: "moduleName",
69
+ type: "bytes32",
70
+ internalType: "bytes32"
71
+ },
72
+ {
73
+ name: "pufferModuleIndex",
74
+ type: "uint256",
75
+ internalType: "uint256"
76
+ },
77
+ {
78
+ name: "withdrawalAmount",
79
+ type: "uint256",
80
+ internalType: "uint256"
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ name: "guardianEOASignatures",
86
+ type: "bytes[]",
87
+ internalType: "bytes[]"
88
+ }
89
+ ],
90
+ outputs: [],
91
+ stateMutability: "nonpayable"
92
+ },
93
+ {
94
+ type: "function",
95
+ name: "createPufferModule",
96
+ inputs: [
97
+ {
98
+ name: "moduleName",
99
+ type: "bytes32",
100
+ internalType: "bytes32"
101
+ }
102
+ ],
103
+ outputs: [
104
+ {
105
+ name: "",
106
+ type: "address",
107
+ internalType: "address"
108
+ }
109
+ ],
110
+ stateMutability: "nonpayable"
111
+ },
112
+ {
113
+ type: "function",
114
+ name: "depositValidatorTickets",
115
+ inputs: [
116
+ {
117
+ name: "permit",
118
+ type: "tuple",
119
+ internalType: "struct Permit",
120
+ components: [
121
+ {
122
+ name: "deadline",
123
+ type: "uint256",
124
+ internalType: "uint256"
125
+ },
126
+ {
127
+ name: "amount",
128
+ type: "uint256",
129
+ internalType: "uint256"
130
+ },
131
+ {
132
+ name: "v",
133
+ type: "uint8",
134
+ internalType: "uint8"
135
+ },
136
+ {
137
+ name: "r",
138
+ type: "bytes32",
139
+ internalType: "bytes32"
140
+ },
141
+ {
142
+ name: "s",
143
+ type: "bytes32",
144
+ internalType: "bytes32"
145
+ }
146
+ ]
147
+ },
148
+ {
149
+ name: "node",
150
+ type: "address",
151
+ internalType: "address"
152
+ }
153
+ ],
154
+ outputs: [],
155
+ stateMutability: "nonpayable"
156
+ },
157
+ {
158
+ type: "function",
159
+ name: "getDepositDataRoot",
160
+ inputs: [
161
+ {
162
+ name: "pubKey",
163
+ type: "bytes",
164
+ internalType: "bytes"
165
+ },
166
+ {
167
+ name: "signature",
168
+ type: "bytes",
169
+ internalType: "bytes"
170
+ },
171
+ {
172
+ name: "withdrawalCredentials",
173
+ type: "bytes",
174
+ internalType: "bytes"
175
+ }
176
+ ],
177
+ outputs: [
178
+ {
179
+ name: "",
180
+ type: "bytes32",
181
+ internalType: "bytes32"
182
+ }
183
+ ],
184
+ stateMutability: "pure"
185
+ },
186
+ {
187
+ type: "function",
188
+ name: "getMinimumVtAmount",
189
+ inputs: [],
190
+ outputs: [
191
+ {
192
+ name: "",
193
+ type: "uint256",
194
+ internalType: "uint256"
195
+ }
196
+ ],
197
+ stateMutability: "view"
198
+ },
199
+ {
200
+ type: "function",
201
+ name: "getModuleAddress",
202
+ inputs: [
203
+ {
204
+ name: "moduleName",
205
+ type: "bytes32",
206
+ internalType: "bytes32"
207
+ }
208
+ ],
209
+ outputs: [
210
+ {
211
+ name: "",
212
+ type: "address",
213
+ internalType: "address"
214
+ }
215
+ ],
216
+ stateMutability: "view"
217
+ },
218
+ {
219
+ type: "function",
220
+ name: "getModuleLimitInformation",
221
+ inputs: [
222
+ {
223
+ name: "moduleName",
224
+ type: "bytes32",
225
+ internalType: "bytes32"
226
+ }
227
+ ],
228
+ outputs: [
229
+ {
230
+ name: "info",
231
+ type: "tuple",
232
+ internalType: "struct ModuleLimit",
233
+ components: [
234
+ {
235
+ name: "allowedLimit",
236
+ type: "uint128",
237
+ internalType: "uint128"
238
+ },
239
+ {
240
+ name: "numberOfRegisteredValidators",
241
+ type: "uint128",
242
+ internalType: "uint128"
243
+ }
244
+ ]
245
+ }
246
+ ],
247
+ stateMutability: "view"
248
+ },
249
+ {
250
+ type: "function",
251
+ name: "getModuleWeights",
252
+ inputs: [],
253
+ outputs: [
254
+ {
255
+ name: "",
256
+ type: "bytes32[]",
257
+ internalType: "bytes32[]"
258
+ }
259
+ ],
260
+ stateMutability: "view"
261
+ },
262
+ {
263
+ type: "function",
264
+ name: "getNextValidatorToProvision",
265
+ inputs: [],
266
+ outputs: [
267
+ {
268
+ name: "",
269
+ type: "bytes32",
270
+ internalType: "bytes32"
271
+ },
272
+ {
273
+ name: "",
274
+ type: "uint256",
275
+ internalType: "uint256"
276
+ }
277
+ ],
278
+ stateMutability: "view"
279
+ },
280
+ {
281
+ type: "function",
282
+ name: "getNodeInfo",
283
+ inputs: [
284
+ {
285
+ name: "node",
286
+ type: "address",
287
+ internalType: "address"
288
+ }
289
+ ],
290
+ outputs: [
291
+ {
292
+ name: "",
293
+ type: "tuple",
294
+ internalType: "struct NodeInfo",
295
+ components: [
296
+ {
297
+ name: "activeValidatorCount",
298
+ type: "uint64",
299
+ internalType: "uint64"
300
+ },
301
+ {
302
+ name: "pendingValidatorCount",
303
+ type: "uint64",
304
+ internalType: "uint64"
305
+ },
306
+ {
307
+ name: "vtBalance",
308
+ type: "uint96",
309
+ internalType: "uint96"
310
+ }
311
+ ]
312
+ }
313
+ ],
314
+ stateMutability: "view"
315
+ },
316
+ {
317
+ type: "function",
318
+ name: "getVTPenalty",
319
+ inputs: [],
320
+ outputs: [
321
+ {
322
+ name: "",
323
+ type: "uint256",
324
+ internalType: "uint256"
325
+ }
326
+ ],
327
+ stateMutability: "view"
328
+ },
329
+ {
330
+ type: "function",
331
+ name: "getValidatorInfo",
332
+ inputs: [
333
+ {
334
+ name: "moduleName",
335
+ type: "bytes32",
336
+ internalType: "bytes32"
337
+ },
338
+ {
339
+ name: "pufferModuleIndex",
340
+ type: "uint256",
341
+ internalType: "uint256"
342
+ }
343
+ ],
344
+ outputs: [
345
+ {
346
+ name: "",
347
+ type: "tuple",
348
+ internalType: "struct Validator",
349
+ components: [
350
+ {
351
+ name: "node",
352
+ type: "address",
353
+ internalType: "address"
354
+ },
355
+ {
356
+ name: "bond",
357
+ type: "uint96",
358
+ internalType: "uint96"
359
+ },
360
+ {
361
+ name: "module",
362
+ type: "address",
363
+ internalType: "address"
364
+ },
365
+ {
366
+ name: "status",
367
+ type: "uint8",
368
+ internalType: "enum Status"
369
+ },
370
+ {
371
+ name: "pubKey",
372
+ type: "bytes",
373
+ internalType: "bytes"
374
+ }
375
+ ]
376
+ }
377
+ ],
378
+ stateMutability: "view"
379
+ },
380
+ {
381
+ type: "function",
382
+ name: "getValidatorTicketsBalance",
383
+ inputs: [
384
+ {
385
+ name: "owner",
386
+ type: "address",
387
+ internalType: "address"
388
+ }
389
+ ],
390
+ outputs: [
391
+ {
392
+ name: "",
393
+ type: "uint256",
394
+ internalType: "uint256"
395
+ }
396
+ ],
397
+ stateMutability: "view"
398
+ },
399
+ {
400
+ type: "function",
401
+ name: "getValidators",
402
+ inputs: [
403
+ {
404
+ name: "moduleName",
405
+ type: "bytes32",
406
+ internalType: "bytes32"
407
+ }
408
+ ],
409
+ outputs: [
410
+ {
411
+ name: "",
412
+ type: "tuple[]",
413
+ internalType: "struct Validator[]",
414
+ components: [
415
+ {
416
+ name: "node",
417
+ type: "address",
418
+ internalType: "address"
419
+ },
420
+ {
421
+ name: "bond",
422
+ type: "uint96",
423
+ internalType: "uint96"
424
+ },
425
+ {
426
+ name: "module",
427
+ type: "address",
428
+ internalType: "address"
429
+ },
430
+ {
431
+ name: "status",
432
+ type: "uint8",
433
+ internalType: "enum Status"
434
+ },
435
+ {
436
+ name: "pubKey",
437
+ type: "bytes",
438
+ internalType: "bytes"
439
+ }
440
+ ]
441
+ }
442
+ ],
443
+ stateMutability: "view"
444
+ },
445
+ {
446
+ type: "function",
447
+ name: "getWithdrawalCredentials",
448
+ inputs: [
449
+ {
450
+ name: "module",
451
+ type: "address",
452
+ internalType: "address"
453
+ }
454
+ ],
455
+ outputs: [
456
+ {
457
+ name: "",
458
+ type: "bytes",
459
+ internalType: "bytes"
460
+ }
461
+ ],
462
+ stateMutability: "view"
463
+ },
464
+ {
465
+ type: "function",
466
+ name: "provisionNode",
467
+ inputs: [
468
+ {
469
+ name: "guardianEnclaveSignatures",
470
+ type: "bytes[]",
471
+ internalType: "bytes[]"
472
+ },
473
+ {
474
+ name: "validatorSignature",
475
+ type: "bytes",
476
+ internalType: "bytes"
477
+ },
478
+ {
479
+ name: "depositRootHash",
480
+ type: "bytes32",
481
+ internalType: "bytes32"
482
+ }
483
+ ],
484
+ outputs: [],
485
+ stateMutability: "nonpayable"
486
+ },
487
+ {
488
+ type: "function",
489
+ name: "registerValidatorKey",
490
+ inputs: [
491
+ {
492
+ name: "data",
493
+ type: "tuple",
494
+ internalType: "struct ValidatorKeyData",
495
+ components: [
496
+ {
497
+ name: "blsPubKey",
498
+ type: "bytes",
499
+ internalType: "bytes"
500
+ },
501
+ {
502
+ name: "signature",
503
+ type: "bytes",
504
+ internalType: "bytes"
505
+ },
506
+ {
507
+ name: "depositDataRoot",
508
+ type: "bytes32",
509
+ internalType: "bytes32"
510
+ },
511
+ {
512
+ name: "blsEncryptedPrivKeyShares",
513
+ type: "bytes[]",
514
+ internalType: "bytes[]"
515
+ },
516
+ {
517
+ name: "blsPubKeySet",
518
+ type: "bytes",
519
+ internalType: "bytes"
520
+ },
521
+ {
522
+ name: "raveEvidence",
523
+ type: "bytes",
524
+ internalType: "bytes"
525
+ }
526
+ ]
527
+ },
528
+ {
529
+ name: "moduleName",
530
+ type: "bytes32",
531
+ internalType: "bytes32"
532
+ },
533
+ {
534
+ name: "pufETHPermit",
535
+ type: "tuple",
536
+ internalType: "struct Permit",
537
+ components: [
538
+ {
539
+ name: "deadline",
540
+ type: "uint256",
541
+ internalType: "uint256"
542
+ },
543
+ {
544
+ name: "amount",
545
+ type: "uint256",
546
+ internalType: "uint256"
547
+ },
548
+ {
549
+ name: "v",
550
+ type: "uint8",
551
+ internalType: "uint8"
552
+ },
553
+ {
554
+ name: "r",
555
+ type: "bytes32",
556
+ internalType: "bytes32"
557
+ },
558
+ {
559
+ name: "s",
560
+ type: "bytes32",
561
+ internalType: "bytes32"
562
+ }
563
+ ]
564
+ },
565
+ {
566
+ name: "vtPermit",
567
+ type: "tuple",
568
+ internalType: "struct Permit",
569
+ components: [
570
+ {
571
+ name: "deadline",
572
+ type: "uint256",
573
+ internalType: "uint256"
574
+ },
575
+ {
576
+ name: "amount",
577
+ type: "uint256",
578
+ internalType: "uint256"
579
+ },
580
+ {
581
+ name: "v",
582
+ type: "uint8",
583
+ internalType: "uint8"
584
+ },
585
+ {
586
+ name: "r",
587
+ type: "bytes32",
588
+ internalType: "bytes32"
589
+ },
590
+ {
591
+ name: "s",
592
+ type: "bytes32",
593
+ internalType: "bytes32"
594
+ }
595
+ ]
596
+ }
597
+ ],
598
+ outputs: [],
599
+ stateMutability: "payable"
600
+ },
601
+ {
602
+ type: "function",
603
+ name: "skipProvisioning",
604
+ inputs: [
605
+ {
606
+ name: "moduleName",
607
+ type: "bytes32",
608
+ internalType: "bytes32"
609
+ },
610
+ {
611
+ name: "guardianEOASignatures",
612
+ type: "bytes[]",
613
+ internalType: "bytes[]"
614
+ }
615
+ ],
616
+ outputs: [],
617
+ stateMutability: "nonpayable"
618
+ },
619
+ {
620
+ type: "function",
621
+ name: "withdrawValidatorTickets",
622
+ inputs: [
623
+ {
624
+ name: "amount",
625
+ type: "uint96",
626
+ internalType: "uint96"
627
+ },
628
+ {
629
+ name: "recipient",
630
+ type: "address",
631
+ internalType: "address"
632
+ }
633
+ ],
634
+ outputs: [],
635
+ stateMutability: "nonpayable"
636
+ },
637
+ {
638
+ type: "event",
639
+ name: "NewPufferModuleCreated",
640
+ inputs: [
641
+ {
642
+ name: "module",
643
+ type: "address",
644
+ indexed: !1,
645
+ internalType: "address"
646
+ },
647
+ {
648
+ name: "moduleName",
649
+ type: "bytes32",
650
+ indexed: !0,
651
+ internalType: "bytes32"
652
+ },
653
+ {
654
+ name: "withdrawalCredentials",
655
+ type: "bytes32",
656
+ indexed: !1,
657
+ internalType: "bytes32"
658
+ }
659
+ ],
660
+ anonymous: !1
661
+ },
662
+ {
663
+ type: "event",
664
+ name: "SuccessfullyProvisioned",
665
+ inputs: [
666
+ {
667
+ name: "pubKey",
668
+ type: "bytes",
669
+ indexed: !1,
670
+ internalType: "bytes"
671
+ },
672
+ {
673
+ name: "pufferModuleIndex",
674
+ type: "uint256",
675
+ indexed: !0,
676
+ internalType: "uint256"
677
+ },
678
+ {
679
+ name: "moduleName",
680
+ type: "bytes32",
681
+ indexed: !0,
682
+ internalType: "bytes32"
683
+ }
684
+ ],
685
+ anonymous: !1
686
+ },
687
+ {
688
+ type: "event",
689
+ name: "ValidatorKeyRegistered",
690
+ inputs: [
691
+ {
692
+ name: "pubKey",
693
+ type: "bytes",
694
+ indexed: !1,
695
+ internalType: "bytes"
696
+ },
697
+ {
698
+ name: "pufferModuleIndex",
699
+ type: "uint256",
700
+ indexed: !0,
701
+ internalType: "uint256"
702
+ },
703
+ {
704
+ name: "moduleName",
705
+ type: "bytes32",
706
+ indexed: !0,
707
+ internalType: "bytes32"
708
+ },
709
+ {
710
+ name: "usingEnclave",
711
+ type: "bool",
712
+ indexed: !1,
713
+ internalType: "bool"
714
+ }
715
+ ],
716
+ anonymous: !1
717
+ },
718
+ {
719
+ type: "event",
720
+ name: "ValidatorTicketsDeposited",
721
+ inputs: [
722
+ {
723
+ name: "node",
724
+ type: "address",
725
+ indexed: !0,
726
+ internalType: "address"
727
+ },
728
+ {
729
+ name: "depositor",
730
+ type: "address",
731
+ indexed: !0,
732
+ internalType: "address"
733
+ },
734
+ {
735
+ name: "amount",
736
+ type: "uint256",
737
+ indexed: !1,
738
+ internalType: "uint256"
739
+ }
740
+ ],
741
+ anonymous: !1
742
+ },
743
+ {
744
+ type: "event",
745
+ name: "ValidatorTicketsWithdrawn",
746
+ inputs: [
747
+ {
748
+ name: "node",
749
+ type: "address",
750
+ indexed: !0,
751
+ internalType: "address"
752
+ },
753
+ {
754
+ name: "recipient",
755
+ type: "address",
756
+ indexed: !0,
757
+ internalType: "address"
758
+ },
759
+ {
760
+ name: "amount",
761
+ type: "uint256",
762
+ indexed: !1,
763
+ internalType: "uint256"
764
+ }
765
+ ],
766
+ anonymous: !1
767
+ },
768
+ {
769
+ type: "error",
770
+ name: "AccessManagedInvalidAuthority",
771
+ inputs: [
772
+ {
773
+ name: "authority",
774
+ type: "address",
775
+ internalType: "address"
776
+ }
777
+ ]
778
+ },
779
+ {
780
+ type: "error",
781
+ name: "AccessManagedRequiredDelay",
782
+ inputs: [
783
+ {
784
+ name: "caller",
785
+ type: "address",
786
+ internalType: "address"
787
+ },
788
+ {
789
+ name: "delay",
790
+ type: "uint32",
791
+ internalType: "uint32"
792
+ }
793
+ ]
794
+ },
795
+ {
796
+ type: "error",
797
+ name: "AccessManagedUnauthorized",
798
+ inputs: [
799
+ {
800
+ name: "caller",
801
+ type: "address",
802
+ internalType: "address"
803
+ }
804
+ ]
805
+ },
806
+ {
807
+ type: "error",
808
+ name: "InvalidAddress",
809
+ inputs: []
810
+ },
811
+ {
812
+ type: "error",
813
+ name: "InvalidBLSPrivateKeyShares",
814
+ inputs: []
815
+ },
816
+ {
817
+ type: "error",
818
+ name: "InvalidBLSPubKey",
819
+ inputs: []
820
+ },
821
+ {
822
+ type: "error",
823
+ name: "InvalidBLSPublicKeySet",
824
+ inputs: []
825
+ },
826
+ {
827
+ type: "error",
828
+ name: "InvalidDepositRootHash",
829
+ inputs: []
830
+ },
831
+ {
832
+ type: "error",
833
+ name: "InvalidETHAmount",
834
+ inputs: []
835
+ },
836
+ {
837
+ type: "error",
838
+ name: "InvalidVTAmount",
839
+ inputs: []
840
+ },
841
+ {
842
+ type: "error",
843
+ name: "InvalidValidatorState",
844
+ inputs: [
845
+ {
846
+ name: "status",
847
+ type: "uint8",
848
+ internalType: "enum Status"
849
+ }
850
+ ]
851
+ },
852
+ {
853
+ type: "error",
854
+ name: "ModuleAlreadyExists",
855
+ inputs: []
856
+ },
857
+ {
858
+ type: "error",
859
+ name: "ValidatorLimitForModuleReached",
860
+ inputs: []
861
+ }
862
+ ];
863
+ export {
864
+ e as PufferProtocol
865
+ };
866
+ //# sourceMappingURL=PufferProtocol.js.map