@nucypher/shared 0.6.0-alpha.2 → 0.6.0-alpha.4

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 (49) hide show
  1. package/dist/cjs/contracts/agents/coordinator.d.ts +1 -2
  2. package/dist/cjs/contracts/agents/coordinator.js +0 -4
  3. package/dist/cjs/contracts/agents/coordinator.js.map +1 -1
  4. package/dist/cjs/contracts/agents/signing-coordinator.d.ts +4 -4
  5. package/dist/cjs/contracts/agents/signing-coordinator.js +5 -2
  6. package/dist/cjs/contracts/agents/signing-coordinator.js.map +1 -1
  7. package/dist/cjs/contracts/ethers-typechain/Coordinator.d.ts +250 -98
  8. package/dist/cjs/contracts/ethers-typechain/SigningCoordinator.d.ts +61 -32
  9. package/dist/cjs/contracts/ethers-typechain/factories/Coordinator__factory.d.ts +294 -104
  10. package/dist/cjs/contracts/ethers-typechain/factories/Coordinator__factory.js +375 -133
  11. package/dist/cjs/contracts/ethers-typechain/factories/Coordinator__factory.js.map +1 -1
  12. package/dist/cjs/contracts/ethers-typechain/factories/SigningCoordinator__factory.d.ts +60 -19
  13. package/dist/cjs/contracts/ethers-typechain/factories/SigningCoordinator__factory.js +72 -20
  14. package/dist/cjs/contracts/ethers-typechain/factories/SigningCoordinator__factory.js.map +1 -1
  15. package/dist/cjs/porter.d.ts +6 -8
  16. package/dist/cjs/porter.js +12 -36
  17. package/dist/cjs/porter.js.map +1 -1
  18. package/dist/cjs/types.d.ts +29 -42
  19. package/dist/cjs/types.js +37 -58
  20. package/dist/cjs/types.js.map +1 -1
  21. package/dist/es/contracts/agents/coordinator.d.ts +1 -2
  22. package/dist/es/contracts/agents/coordinator.js +1 -5
  23. package/dist/es/contracts/agents/coordinator.js.map +1 -1
  24. package/dist/es/contracts/agents/signing-coordinator.d.ts +4 -4
  25. package/dist/es/contracts/agents/signing-coordinator.js +5 -2
  26. package/dist/es/contracts/agents/signing-coordinator.js.map +1 -1
  27. package/dist/es/contracts/ethers-typechain/Coordinator.d.ts +250 -98
  28. package/dist/es/contracts/ethers-typechain/SigningCoordinator.d.ts +61 -32
  29. package/dist/es/contracts/ethers-typechain/factories/Coordinator__factory.d.ts +294 -104
  30. package/dist/es/contracts/ethers-typechain/factories/Coordinator__factory.js +375 -133
  31. package/dist/es/contracts/ethers-typechain/factories/Coordinator__factory.js.map +1 -1
  32. package/dist/es/contracts/ethers-typechain/factories/SigningCoordinator__factory.d.ts +60 -19
  33. package/dist/es/contracts/ethers-typechain/factories/SigningCoordinator__factory.js +72 -20
  34. package/dist/es/contracts/ethers-typechain/factories/SigningCoordinator__factory.js.map +1 -1
  35. package/dist/es/porter.d.ts +6 -8
  36. package/dist/es/porter.js +13 -37
  37. package/dist/es/porter.js.map +1 -1
  38. package/dist/es/types.d.ts +29 -42
  39. package/dist/es/types.js +34 -55
  40. package/dist/es/types.js.map +1 -1
  41. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  42. package/dist/tsconfig.es.tsbuildinfo +1 -1
  43. package/package.json +3 -3
  44. package/dist/cjs/contracts/agents/signingCoordinator.d.ts +0 -14
  45. package/dist/cjs/contracts/agents/signingCoordinator.js +0 -32
  46. package/dist/cjs/contracts/agents/signingCoordinator.js.map +0 -1
  47. package/dist/es/contracts/agents/signingCoordinator.d.ts +0 -14
  48. package/dist/es/contracts/agents/signingCoordinator.js +0 -28
  49. package/dist/es/contracts/agents/signingCoordinator.js.map +0 -1
@@ -12,6 +12,16 @@ const _abi = [
12
12
  type: 'address',
13
13
  internalType: 'contract ITACoChildApplication',
14
14
  },
15
+ {
16
+ name: '_dkgTimeout',
17
+ type: 'uint32',
18
+ internalType: 'uint32',
19
+ },
20
+ {
21
+ name: '_handoverTimeout',
22
+ type: 'uint32',
23
+ internalType: 'uint32',
24
+ },
15
25
  ],
16
26
  },
17
27
  {
@@ -62,33 +72,6 @@ const _abi = [
62
72
  },
63
73
  ],
64
74
  },
65
- {
66
- type: 'error',
67
- name: 'AddressEmptyCode',
68
- inputs: [
69
- {
70
- name: 'target',
71
- type: 'address',
72
- internalType: 'address',
73
- },
74
- ],
75
- },
76
- {
77
- type: 'error',
78
- name: 'AddressInsufficientBalance',
79
- inputs: [
80
- {
81
- name: 'account',
82
- type: 'address',
83
- internalType: 'address',
84
- },
85
- ],
86
- },
87
- {
88
- type: 'error',
89
- name: 'FailedInnerCall',
90
- inputs: [],
91
- },
92
75
  {
93
76
  type: 'error',
94
77
  name: 'InvalidInitialization',
@@ -115,17 +98,6 @@ const _abi = [
115
98
  },
116
99
  ],
117
100
  },
118
- {
119
- type: 'error',
120
- name: 'SafeERC20FailedOperation',
121
- inputs: [
122
- {
123
- name: 'token',
124
- type: 'address',
125
- internalType: 'address',
126
- },
127
- ],
128
- },
129
101
  {
130
102
  type: 'event',
131
103
  name: 'AggregationPosted',
@@ -151,6 +123,25 @@ const _abi = [
151
123
  ],
152
124
  anonymous: false,
153
125
  },
126
+ {
127
+ type: 'event',
128
+ name: 'BlindedSharePosted',
129
+ inputs: [
130
+ {
131
+ name: 'ritualId',
132
+ type: 'uint32',
133
+ internalType: 'uint32',
134
+ indexed: true,
135
+ },
136
+ {
137
+ name: 'departingParticipant',
138
+ type: 'address',
139
+ internalType: 'address',
140
+ indexed: true,
141
+ },
142
+ ],
143
+ anonymous: false,
144
+ },
154
145
  {
155
146
  type: 'event',
156
147
  name: 'DefaultAdminDelayChangeCanceled',
@@ -233,6 +224,106 @@ const _abi = [
233
224
  ],
234
225
  anonymous: false,
235
226
  },
227
+ {
228
+ type: 'event',
229
+ name: 'HandoverCanceled',
230
+ inputs: [
231
+ {
232
+ name: 'ritualId',
233
+ type: 'uint32',
234
+ internalType: 'uint32',
235
+ indexed: true,
236
+ },
237
+ {
238
+ name: 'departingParticipant',
239
+ type: 'address',
240
+ internalType: 'address',
241
+ indexed: true,
242
+ },
243
+ {
244
+ name: 'incomingParticipant',
245
+ type: 'address',
246
+ internalType: 'address',
247
+ indexed: true,
248
+ },
249
+ ],
250
+ anonymous: false,
251
+ },
252
+ {
253
+ type: 'event',
254
+ name: 'HandoverFinalized',
255
+ inputs: [
256
+ {
257
+ name: 'ritualId',
258
+ type: 'uint32',
259
+ internalType: 'uint32',
260
+ indexed: true,
261
+ },
262
+ {
263
+ name: 'departingParticipant',
264
+ type: 'address',
265
+ internalType: 'address',
266
+ indexed: true,
267
+ },
268
+ {
269
+ name: 'incomingParticipant',
270
+ type: 'address',
271
+ internalType: 'address',
272
+ indexed: true,
273
+ },
274
+ ],
275
+ anonymous: false,
276
+ },
277
+ {
278
+ type: 'event',
279
+ name: 'HandoverRequest',
280
+ inputs: [
281
+ {
282
+ name: 'ritualId',
283
+ type: 'uint32',
284
+ internalType: 'uint32',
285
+ indexed: true,
286
+ },
287
+ {
288
+ name: 'departingParticipant',
289
+ type: 'address',
290
+ internalType: 'address',
291
+ indexed: true,
292
+ },
293
+ {
294
+ name: 'incomingParticipant',
295
+ type: 'address',
296
+ internalType: 'address',
297
+ indexed: true,
298
+ },
299
+ ],
300
+ anonymous: false,
301
+ },
302
+ {
303
+ type: 'event',
304
+ name: 'HandoverTranscriptPosted',
305
+ inputs: [
306
+ {
307
+ name: 'ritualId',
308
+ type: 'uint32',
309
+ internalType: 'uint32',
310
+ indexed: true,
311
+ },
312
+ {
313
+ name: 'departingParticipant',
314
+ type: 'address',
315
+ internalType: 'address',
316
+ indexed: true,
317
+ },
318
+ {
319
+ name: 'incomingParticipant',
320
+ type: 'address',
321
+ internalType: 'address',
322
+ indexed: true,
323
+ },
324
+ ],
325
+ anonymous: false,
326
+ },
236
327
  {
237
328
  type: 'event',
238
329
  name: 'Initialized',
@@ -477,25 +568,6 @@ const _abi = [
477
568
  ],
478
569
  anonymous: false,
479
570
  },
480
- {
481
- type: 'event',
482
- name: 'TimeoutChanged',
483
- inputs: [
484
- {
485
- name: 'oldTimeout',
486
- type: 'uint32',
487
- internalType: 'uint32',
488
- indexed: false,
489
- },
490
- {
491
- name: 'newTimeout',
492
- type: 'uint32',
493
- internalType: 'uint32',
494
- indexed: false,
495
- },
496
- ],
497
- anonymous: false,
498
- },
499
571
  {
500
572
  type: 'event',
501
573
  name: 'TranscriptPosted',
@@ -547,6 +619,19 @@ const _abi = [
547
619
  },
548
620
  ],
549
621
  },
622
+ {
623
+ type: 'function',
624
+ name: 'HANDOVER_SUPERVISOR_ROLE',
625
+ stateMutability: 'view',
626
+ inputs: [],
627
+ outputs: [
628
+ {
629
+ name: '',
630
+ type: 'bytes32',
631
+ internalType: 'bytes32',
632
+ },
633
+ ],
634
+ },
550
635
  {
551
636
  type: 'function',
552
637
  name: 'TREASURY_ROLE',
@@ -606,6 +691,30 @@ const _abi = [
606
691
  ],
607
692
  outputs: [],
608
693
  },
694
+ {
695
+ type: 'function',
696
+ name: 'blindedSharePosition',
697
+ stateMutability: 'pure',
698
+ inputs: [
699
+ {
700
+ name: 'index',
701
+ type: 'uint256',
702
+ internalType: 'uint256',
703
+ },
704
+ {
705
+ name: 'threshold',
706
+ type: 'uint16',
707
+ internalType: 'uint16',
708
+ },
709
+ ],
710
+ outputs: [
711
+ {
712
+ name: '',
713
+ type: 'uint256',
714
+ internalType: 'uint256',
715
+ },
716
+ ],
717
+ },
609
718
  {
610
719
  type: 'function',
611
720
  name: 'cancelDefaultAdminTransfer',
@@ -613,6 +722,24 @@ const _abi = [
613
722
  inputs: [],
614
723
  outputs: [],
615
724
  },
725
+ {
726
+ type: 'function',
727
+ name: 'cancelHandover',
728
+ stateMutability: 'nonpayable',
729
+ inputs: [
730
+ {
731
+ name: 'ritualId',
732
+ type: 'uint32',
733
+ internalType: 'uint32',
734
+ },
735
+ {
736
+ name: 'departingParticipant',
737
+ type: 'address',
738
+ internalType: 'address',
739
+ },
740
+ ],
741
+ outputs: [],
742
+ },
616
743
  {
617
744
  type: 'function',
618
745
  name: 'changeDefaultAdminDelay',
@@ -684,6 +811,32 @@ const _abi = [
684
811
  },
685
812
  ],
686
813
  },
814
+ {
815
+ type: 'function',
816
+ name: 'dkgTimeout',
817
+ stateMutability: 'view',
818
+ inputs: [],
819
+ outputs: [
820
+ {
821
+ name: '',
822
+ type: 'uint32',
823
+ internalType: 'uint32',
824
+ },
825
+ ],
826
+ },
827
+ {
828
+ type: 'function',
829
+ name: 'dkgTimeoutStub',
830
+ stateMutability: 'view',
831
+ inputs: [],
832
+ outputs: [
833
+ {
834
+ name: '',
835
+ type: 'uint32',
836
+ internalType: 'uint32',
837
+ },
838
+ ],
839
+ },
687
840
  {
688
841
  type: 'function',
689
842
  name: 'expectedTranscriptSize',
@@ -745,6 +898,24 @@ const _abi = [
745
898
  },
746
899
  ],
747
900
  },
901
+ {
902
+ type: 'function',
903
+ name: 'finalizeHandover',
904
+ stateMutability: 'nonpayable',
905
+ inputs: [
906
+ {
907
+ name: 'ritualId',
908
+ type: 'uint32',
909
+ internalType: 'uint32',
910
+ },
911
+ {
912
+ name: 'departingParticipant',
913
+ type: 'address',
914
+ internalType: 'address',
915
+ },
916
+ ],
917
+ outputs: [],
918
+ },
748
919
  {
749
920
  type: 'function',
750
921
  name: 'getAccessController',
@@ -802,6 +973,54 @@ const _abi = [
802
973
  },
803
974
  ],
804
975
  },
976
+ {
977
+ type: 'function',
978
+ name: 'getHandoverKey',
979
+ stateMutability: 'view',
980
+ inputs: [
981
+ {
982
+ name: 'ritualId',
983
+ type: 'uint32',
984
+ internalType: 'uint32',
985
+ },
986
+ {
987
+ name: 'departingProvider',
988
+ type: 'address',
989
+ internalType: 'address',
990
+ },
991
+ ],
992
+ outputs: [
993
+ {
994
+ name: '',
995
+ type: 'bytes32',
996
+ internalType: 'bytes32',
997
+ },
998
+ ],
999
+ },
1000
+ {
1001
+ type: 'function',
1002
+ name: 'getHandoverState',
1003
+ stateMutability: 'view',
1004
+ inputs: [
1005
+ {
1006
+ name: 'ritualId',
1007
+ type: 'uint32',
1008
+ internalType: 'uint32',
1009
+ },
1010
+ {
1011
+ name: 'departingParticipant',
1012
+ type: 'address',
1013
+ internalType: 'address',
1014
+ },
1015
+ ],
1016
+ outputs: [
1017
+ {
1018
+ name: '',
1019
+ type: 'uint8',
1020
+ internalType: 'enum Coordinator.HandoverState',
1021
+ },
1022
+ ],
1023
+ },
805
1024
  {
806
1025
  type: 'function',
807
1026
  name: 'getInitiator',
@@ -1236,6 +1455,81 @@ const _abi = [
1236
1455
  ],
1237
1456
  outputs: [],
1238
1457
  },
1458
+ {
1459
+ type: 'function',
1460
+ name: 'handoverRequest',
1461
+ stateMutability: 'nonpayable',
1462
+ inputs: [
1463
+ {
1464
+ name: 'ritualId',
1465
+ type: 'uint32',
1466
+ internalType: 'uint32',
1467
+ },
1468
+ {
1469
+ name: 'departingParticipant',
1470
+ type: 'address',
1471
+ internalType: 'address',
1472
+ },
1473
+ {
1474
+ name: 'incomingParticipant',
1475
+ type: 'address',
1476
+ internalType: 'address',
1477
+ },
1478
+ ],
1479
+ outputs: [],
1480
+ },
1481
+ {
1482
+ type: 'function',
1483
+ name: 'handoverTimeout',
1484
+ stateMutability: 'view',
1485
+ inputs: [],
1486
+ outputs: [
1487
+ {
1488
+ name: '',
1489
+ type: 'uint32',
1490
+ internalType: 'uint32',
1491
+ },
1492
+ ],
1493
+ },
1494
+ {
1495
+ type: 'function',
1496
+ name: 'handovers',
1497
+ stateMutability: 'view',
1498
+ inputs: [
1499
+ {
1500
+ name: 'handoverKey',
1501
+ type: 'bytes32',
1502
+ internalType: 'bytes32',
1503
+ },
1504
+ ],
1505
+ outputs: [
1506
+ {
1507
+ name: 'requestTimestamp',
1508
+ type: 'uint32',
1509
+ internalType: 'uint32',
1510
+ },
1511
+ {
1512
+ name: 'incomingProvider',
1513
+ type: 'address',
1514
+ internalType: 'address',
1515
+ },
1516
+ {
1517
+ name: 'transcript',
1518
+ type: 'bytes',
1519
+ internalType: 'bytes',
1520
+ },
1521
+ {
1522
+ name: 'decryptionRequestStaticKey',
1523
+ type: 'bytes',
1524
+ internalType: 'bytes',
1525
+ },
1526
+ {
1527
+ name: 'blindedShare',
1528
+ type: 'bytes',
1529
+ internalType: 'bytes',
1530
+ },
1531
+ ],
1532
+ },
1239
1533
  {
1240
1534
  type: 'function',
1241
1535
  name: 'hasRole',
@@ -1265,11 +1559,6 @@ const _abi = [
1265
1559
  name: 'initialize',
1266
1560
  stateMutability: 'nonpayable',
1267
1561
  inputs: [
1268
- {
1269
- name: '_timeout',
1270
- type: 'uint32',
1271
- internalType: 'uint32',
1272
- },
1273
1562
  {
1274
1563
  name: '_maxDkgSize',
1275
1564
  type: 'uint16',
@@ -1283,13 +1572,6 @@ const _abi = [
1283
1572
  ],
1284
1573
  outputs: [],
1285
1574
  },
1286
- {
1287
- type: 'function',
1288
- name: 'initializeNumberOfRituals',
1289
- stateMutability: 'nonpayable',
1290
- inputs: [],
1291
- outputs: [],
1292
- },
1293
1575
  {
1294
1576
  type: 'function',
1295
1577
  name: 'initiateRitual',
@@ -1329,35 +1611,6 @@ const _abi = [
1329
1611
  },
1330
1612
  ],
1331
1613
  },
1332
- {
1333
- type: 'function',
1334
- name: 'isEncryptionAuthorized',
1335
- stateMutability: 'view',
1336
- inputs: [
1337
- {
1338
- name: '',
1339
- type: 'uint32',
1340
- internalType: 'uint32',
1341
- },
1342
- {
1343
- name: '',
1344
- type: 'bytes',
1345
- internalType: 'bytes',
1346
- },
1347
- {
1348
- name: '',
1349
- type: 'bytes',
1350
- internalType: 'bytes',
1351
- },
1352
- ],
1353
- outputs: [
1354
- {
1355
- name: '',
1356
- type: 'bool',
1357
- internalType: 'bool',
1358
- },
1359
- ],
1360
- },
1361
1614
  {
1362
1615
  type: 'function',
1363
1616
  name: 'isParticipant',
@@ -1556,16 +1809,16 @@ const _abi = [
1556
1809
  },
1557
1810
  {
1558
1811
  type: 'function',
1559
- name: 'postTranscript',
1812
+ name: 'postBlindedShare',
1560
1813
  stateMutability: 'nonpayable',
1561
1814
  inputs: [
1562
1815
  {
1563
- name: '',
1816
+ name: 'ritualId',
1564
1817
  type: 'uint32',
1565
1818
  internalType: 'uint32',
1566
1819
  },
1567
1820
  {
1568
- name: '',
1821
+ name: 'blindedShare',
1569
1822
  type: 'bytes',
1570
1823
  internalType: 'bytes',
1571
1824
  },
@@ -1574,7 +1827,7 @@ const _abi = [
1574
1827
  },
1575
1828
  {
1576
1829
  type: 'function',
1577
- name: 'publishTranscript',
1830
+ name: 'postHandoverTranscript',
1578
1831
  stateMutability: 'nonpayable',
1579
1832
  inputs: [
1580
1833
  {
@@ -1582,23 +1835,38 @@ const _abi = [
1582
1835
  type: 'uint32',
1583
1836
  internalType: 'uint32',
1584
1837
  },
1838
+ {
1839
+ name: 'departingParticipant',
1840
+ type: 'address',
1841
+ internalType: 'address',
1842
+ },
1585
1843
  {
1586
1844
  name: 'transcript',
1587
1845
  type: 'bytes',
1588
1846
  internalType: 'bytes',
1589
1847
  },
1848
+ {
1849
+ name: 'decryptionRequestStaticKey',
1850
+ type: 'bytes',
1851
+ internalType: 'bytes',
1852
+ },
1590
1853
  ],
1591
1854
  outputs: [],
1592
1855
  },
1593
1856
  {
1594
1857
  type: 'function',
1595
- name: 'reinitializeDefaultAdmin',
1858
+ name: 'publishTranscript',
1596
1859
  stateMutability: 'nonpayable',
1597
1860
  inputs: [
1598
1861
  {
1599
- name: 'newDefaultAdmin',
1600
- type: 'address',
1601
- internalType: 'address',
1862
+ name: 'ritualId',
1863
+ type: 'uint32',
1864
+ internalType: 'uint32',
1865
+ },
1866
+ {
1867
+ name: 'transcript',
1868
+ type: 'bytes',
1869
+ internalType: 'bytes',
1602
1870
  },
1603
1871
  ],
1604
1872
  outputs: [],
@@ -1645,7 +1913,7 @@ const _abi = [
1645
1913
  stateMutability: 'view',
1646
1914
  inputs: [
1647
1915
  {
1648
- name: 'ritualId',
1916
+ name: 'index',
1649
1917
  type: 'uint256',
1650
1918
  internalType: 'uint256',
1651
1919
  },
@@ -1793,19 +2061,6 @@ const _abi = [
1793
2061
  ],
1794
2062
  outputs: [],
1795
2063
  },
1796
- {
1797
- type: 'function',
1798
- name: 'setTimeout',
1799
- stateMutability: 'nonpayable',
1800
- inputs: [
1801
- {
1802
- name: 'newTimeout',
1803
- type: 'uint32',
1804
- internalType: 'uint32',
1805
- },
1806
- ],
1807
- outputs: [],
1808
- },
1809
2064
  {
1810
2065
  type: 'function',
1811
2066
  name: 'supportsInterface',
@@ -1856,19 +2111,6 @@ const _abi = [
1856
2111
  ],
1857
2112
  outputs: [],
1858
2113
  },
1859
- {
1860
- type: 'function',
1861
- name: 'withdrawAllTokens',
1862
- stateMutability: 'nonpayable',
1863
- inputs: [
1864
- {
1865
- name: 'token',
1866
- type: 'address',
1867
- internalType: 'contract IERC20',
1868
- },
1869
- ],
1870
- outputs: [],
1871
- },
1872
2114
  ];
1873
2115
  export class Coordinator__factory {
1874
2116
  static abi = _abi;