@inco/js 0.6.8 → 0.7.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 (140) hide show
  1. package/README.md +8 -8
  2. package/dist/cjs/advancedacl/session-key.d.ts +39 -19
  3. package/dist/cjs/advancedacl/session-key.js +59 -108
  4. package/dist/cjs/attestedcompute/attested-compute.d.ts +6 -6
  5. package/dist/cjs/attestedcompute/attested-compute.js +5 -28
  6. package/dist/cjs/attesteddecrypt/attested-decrypt.d.ts +68 -16
  7. package/dist/cjs/attesteddecrypt/attested-decrypt.js +108 -66
  8. package/dist/cjs/attesteddecrypt/types.d.ts +8 -3
  9. package/dist/cjs/attesteddecrypt/types.js +1 -1
  10. package/dist/cjs/encryption/encryption.d.ts +8 -10
  11. package/dist/cjs/encryption/encryption.js +6 -6
  12. package/dist/cjs/generated/abis/add-two.d.ts +1 -1
  13. package/dist/cjs/generated/abis/add-two.js +1 -1
  14. package/dist/cjs/generated/abis/lightning-preview.d.ts +40 -0
  15. package/dist/cjs/generated/abis/lightning-preview.js +29 -1
  16. package/dist/cjs/generated/abis/lightning.d.ts +1 -1
  17. package/dist/cjs/generated/abis/lightning.js +1 -1
  18. package/dist/cjs/generated/abis/verifier.d.ts +126 -67
  19. package/dist/cjs/generated/abis/verifier.js +108 -54
  20. package/dist/cjs/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +15 -1
  21. package/dist/cjs/generated/es/inco/covalidator/compute/v1/types_pb.js +1 -1
  22. package/dist/cjs/generated/es/inco/kms/lite/v1/kms_service_pb.d.ts +87 -132
  23. package/dist/cjs/generated/es/inco/kms/lite/v1/kms_service_pb.js +21 -27
  24. package/dist/cjs/generated/lightning.d.ts +40 -32
  25. package/dist/cjs/generated/lightning.js +43 -33
  26. package/dist/cjs/generated/local-node.d.ts +11 -11
  27. package/dist/cjs/generated/local-node.js +28 -12
  28. package/dist/cjs/kms/client.d.ts +8 -4
  29. package/dist/cjs/kms/client.js +9 -4
  30. package/dist/cjs/kms/quorumClient.d.ts +58 -0
  31. package/dist/cjs/kms/quorumClient.js +378 -0
  32. package/dist/cjs/kms/thresholdPromises.d.ts +7 -0
  33. package/dist/cjs/kms/thresholdPromises.js +52 -0
  34. package/dist/cjs/lite/deployments.d.ts +20 -2
  35. package/dist/cjs/lite/deployments.js +1 -1
  36. package/dist/cjs/lite/index.d.ts +1 -2
  37. package/dist/cjs/lite/index.js +1 -2
  38. package/dist/cjs/lite/lightning.d.ts +109 -77
  39. package/dist/cjs/lite/lightning.js +279 -112
  40. package/dist/cjs/local/local-node.d.ts +1 -2
  41. package/dist/cjs/local/local-node.js +2 -3
  42. package/dist/cjs/test/mocks.d.ts +15 -0
  43. package/dist/cjs/test/mocks.js +45 -0
  44. package/dist/cjs/viem.d.ts +1 -1
  45. package/dist/esm/advancedacl/session-key.d.ts +39 -19
  46. package/dist/esm/advancedacl/session-key.js +52 -100
  47. package/dist/esm/attestedcompute/attested-compute.d.ts +6 -6
  48. package/dist/esm/attestedcompute/attested-compute.js +6 -29
  49. package/dist/esm/attesteddecrypt/attested-decrypt.d.ts +68 -16
  50. package/dist/esm/attesteddecrypt/attested-decrypt.js +109 -68
  51. package/dist/esm/attesteddecrypt/types.d.ts +8 -3
  52. package/dist/esm/attesteddecrypt/types.js +1 -1
  53. package/dist/esm/encryption/encryption.d.ts +8 -10
  54. package/dist/esm/encryption/encryption.js +6 -6
  55. package/dist/esm/generated/abis/add-two.d.ts +1 -1
  56. package/dist/esm/generated/abis/add-two.js +1 -1
  57. package/dist/esm/generated/abis/lightning-preview.d.ts +40 -0
  58. package/dist/esm/generated/abis/lightning-preview.js +29 -1
  59. package/dist/esm/generated/abis/lightning.d.ts +1 -1
  60. package/dist/esm/generated/abis/lightning.js +1 -1
  61. package/dist/esm/generated/abis/verifier.d.ts +126 -67
  62. package/dist/esm/generated/abis/verifier.js +108 -54
  63. package/dist/esm/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +15 -1
  64. package/dist/esm/generated/es/inco/covalidator/compute/v1/types_pb.js +1 -1
  65. package/dist/esm/generated/es/inco/kms/lite/v1/kms_service_pb.d.ts +87 -132
  66. package/dist/esm/generated/es/inco/kms/lite/v1/kms_service_pb.js +19 -25
  67. package/dist/esm/generated/lightning.d.ts +40 -32
  68. package/dist/esm/generated/lightning.js +43 -33
  69. package/dist/esm/generated/local-node.d.ts +11 -11
  70. package/dist/esm/generated/local-node.js +28 -12
  71. package/dist/esm/kms/client.d.ts +8 -4
  72. package/dist/esm/kms/client.js +8 -4
  73. package/dist/esm/kms/quorumClient.d.ts +58 -0
  74. package/dist/esm/kms/quorumClient.js +374 -0
  75. package/dist/esm/kms/thresholdPromises.d.ts +7 -0
  76. package/dist/esm/kms/thresholdPromises.js +49 -0
  77. package/dist/esm/lite/deployments.d.ts +20 -2
  78. package/dist/esm/lite/deployments.js +1 -1
  79. package/dist/esm/lite/index.d.ts +1 -2
  80. package/dist/esm/lite/index.js +1 -2
  81. package/dist/esm/lite/lightning.d.ts +109 -77
  82. package/dist/esm/lite/lightning.js +278 -111
  83. package/dist/esm/local/local-node.d.ts +1 -2
  84. package/dist/esm/local/local-node.js +2 -3
  85. package/dist/esm/test/mocks.d.ts +15 -0
  86. package/dist/esm/test/mocks.js +39 -0
  87. package/dist/esm/viem.d.ts +1 -1
  88. package/dist/types/advancedacl/session-key.d.ts +39 -19
  89. package/dist/types/attestedcompute/attested-compute.d.ts +6 -6
  90. package/dist/types/attesteddecrypt/attested-decrypt.d.ts +68 -16
  91. package/dist/types/attesteddecrypt/types.d.ts +8 -3
  92. package/dist/types/encryption/encryption.d.ts +8 -10
  93. package/dist/types/generated/abis/add-two.d.ts +1 -1
  94. package/dist/types/generated/abis/lightning-preview.d.ts +40 -0
  95. package/dist/types/generated/abis/lightning.d.ts +1 -1
  96. package/dist/types/generated/abis/verifier.d.ts +126 -67
  97. package/dist/types/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +15 -1
  98. package/dist/types/generated/es/inco/kms/lite/v1/kms_service_pb.d.ts +87 -132
  99. package/dist/types/generated/lightning.d.ts +40 -32
  100. package/dist/types/generated/local-node.d.ts +11 -11
  101. package/dist/types/kms/client.d.ts +8 -4
  102. package/dist/types/kms/quorumClient.d.ts +58 -0
  103. package/dist/types/kms/thresholdPromises.d.ts +7 -0
  104. package/dist/types/lite/deployments.d.ts +20 -2
  105. package/dist/types/lite/index.d.ts +1 -2
  106. package/dist/types/lite/lightning.d.ts +109 -77
  107. package/dist/types/local/local-node.d.ts +1 -2
  108. package/dist/types/test/mocks.d.ts +15 -0
  109. package/dist/types/viem.d.ts +1 -1
  110. package/package.json +3 -3
  111. package/dist/cjs/attestedreveal/attested-reveal.d.ts +0 -21
  112. package/dist/cjs/attestedreveal/attested-reveal.js +0 -67
  113. package/dist/cjs/attestedreveal/index.d.ts +0 -1
  114. package/dist/cjs/attestedreveal/index.js +0 -18
  115. package/dist/cjs/attestedreveal/types.d.ts +0 -7
  116. package/dist/cjs/attestedreveal/types.js +0 -16
  117. package/dist/cjs/generated/es/cosmos_proto/cosmos_pb.d.ts +0 -174
  118. package/dist/cjs/generated/es/cosmos_proto/cosmos_pb.js +0 -118
  119. package/dist/cjs/generated/es/inco/fhe/v1/types_pb.d.ts +0 -419
  120. package/dist/cjs/generated/es/inco/fhe/v1/types_pb.js +0 -136
  121. package/dist/cjs/lite/reencrypt.d.ts +0 -23
  122. package/dist/cjs/lite/reencrypt.js +0 -131
  123. package/dist/esm/attestedreveal/attested-reveal.d.ts +0 -21
  124. package/dist/esm/attestedreveal/attested-reveal.js +0 -64
  125. package/dist/esm/attestedreveal/index.d.ts +0 -1
  126. package/dist/esm/attestedreveal/index.js +0 -2
  127. package/dist/esm/attestedreveal/types.d.ts +0 -7
  128. package/dist/esm/attestedreveal/types.js +0 -12
  129. package/dist/esm/generated/es/cosmos_proto/cosmos_pb.d.ts +0 -174
  130. package/dist/esm/generated/es/cosmos_proto/cosmos_pb.js +0 -115
  131. package/dist/esm/generated/es/inco/fhe/v1/types_pb.d.ts +0 -419
  132. package/dist/esm/generated/es/inco/fhe/v1/types_pb.js +0 -133
  133. package/dist/esm/lite/reencrypt.d.ts +0 -23
  134. package/dist/esm/lite/reencrypt.js +0 -122
  135. package/dist/types/attestedreveal/attested-reveal.d.ts +0 -21
  136. package/dist/types/attestedreveal/index.d.ts +0 -1
  137. package/dist/types/attestedreveal/types.d.ts +0 -7
  138. package/dist/types/generated/es/cosmos_proto/cosmos_pb.d.ts +0 -174
  139. package/dist/types/generated/es/inco/fhe/v1/types_pb.d.ts +0 -419
  140. package/dist/types/lite/reencrypt.d.ts +0 -23
@@ -9,7 +9,7 @@ export declare const incoVerifierAbi: readonly [{
9
9
  }, {
10
10
  readonly type: "function";
11
11
  readonly inputs: readonly [];
12
- readonly name: "AddNodeResultStructHash";
12
+ readonly name: "ADD_NODE_RESULT_STRUCT_HASH";
13
13
  readonly outputs: readonly [{
14
14
  readonly name: "";
15
15
  readonly internalType: "bytes32";
@@ -19,7 +19,7 @@ export declare const incoVerifierAbi: readonly [{
19
19
  }, {
20
20
  readonly type: "function";
21
21
  readonly inputs: readonly [];
22
- readonly name: "BootstrapResultStructHash";
22
+ readonly name: "BOOTSTRAP_RESULT_STRUCT_HASH";
23
23
  readonly outputs: readonly [{
24
24
  readonly name: "";
25
25
  readonly internalType: "bytes32";
@@ -49,7 +49,7 @@ export declare const incoVerifierAbi: readonly [{
49
49
  }, {
50
50
  readonly type: "function";
51
51
  readonly inputs: readonly [];
52
- readonly name: "UpgradeResultStructHash";
52
+ readonly name: "UPGRADE_RESULT_STRUCT_HASH";
53
53
  readonly outputs: readonly [{
54
54
  readonly name: "";
55
55
  readonly internalType: "bytes32";
@@ -63,7 +63,7 @@ export declare const incoVerifierAbi: readonly [{
63
63
  readonly internalType: "struct AddNodeResult";
64
64
  readonly type: "tuple";
65
65
  readonly components: readonly [{
66
- readonly name: "network_pubkey";
66
+ readonly name: "networkPubkey";
67
67
  readonly internalType: "bytes";
68
68
  readonly type: "bytes";
69
69
  }];
@@ -75,16 +75,6 @@ export declare const incoVerifierAbi: readonly [{
75
75
  readonly type: "bytes32";
76
76
  }];
77
77
  readonly stateMutability: "view";
78
- }, {
79
- readonly type: "function";
80
- readonly inputs: readonly [{
81
- readonly name: "signerAddress";
82
- readonly internalType: "address";
83
- readonly type: "address";
84
- }];
85
- readonly name: "addSigner";
86
- readonly outputs: readonly [];
87
- readonly stateMutability: "nonpayable";
88
78
  }, {
89
79
  readonly type: "function";
90
80
  readonly inputs: readonly [{
@@ -123,7 +113,7 @@ export declare const incoVerifierAbi: readonly [{
123
113
  readonly internalType: "bytes32";
124
114
  readonly type: "bytes32";
125
115
  }];
126
- readonly name: "approveNewTEEVersion";
116
+ readonly name: "approveNewTeeVersion";
127
117
  readonly outputs: readonly [];
128
118
  readonly stateMutability: "nonpayable";
129
119
  }, {
@@ -133,7 +123,7 @@ export declare const incoVerifierAbi: readonly [{
133
123
  readonly internalType: "uint256";
134
124
  readonly type: "uint256";
135
125
  }];
136
- readonly name: "approvedTEEVersions";
126
+ readonly name: "approvedTeeVersions";
137
127
  readonly outputs: readonly [{
138
128
  readonly name: "";
139
129
  readonly internalType: "bytes32";
@@ -286,6 +276,40 @@ export declare const incoVerifierAbi: readonly [{
286
276
  readonly type: "string";
287
277
  }];
288
278
  readonly stateMutability: "view";
279
+ }, {
280
+ readonly type: "function";
281
+ readonly inputs: readonly [{
282
+ readonly name: "index";
283
+ readonly internalType: "uint256";
284
+ readonly type: "uint256";
285
+ }];
286
+ readonly name: "getSignerAtIndex";
287
+ readonly outputs: readonly [{
288
+ readonly name: "";
289
+ readonly internalType: "address";
290
+ readonly type: "address";
291
+ }];
292
+ readonly stateMutability: "view";
293
+ }, {
294
+ readonly type: "function";
295
+ readonly inputs: readonly [];
296
+ readonly name: "getSignersCount";
297
+ readonly outputs: readonly [{
298
+ readonly name: "";
299
+ readonly internalType: "uint256";
300
+ readonly type: "uint256";
301
+ }];
302
+ readonly stateMutability: "view";
303
+ }, {
304
+ readonly type: "function";
305
+ readonly inputs: readonly [];
306
+ readonly name: "getThreshold";
307
+ readonly outputs: readonly [{
308
+ readonly name: "";
309
+ readonly internalType: "uint256";
310
+ readonly type: "uint256";
311
+ }];
312
+ readonly stateMutability: "view";
289
313
  }, {
290
314
  readonly type: "function";
291
315
  readonly inputs: readonly [{
@@ -374,20 +398,6 @@ export declare const incoVerifierAbi: readonly [{
374
398
  readonly type: "bool";
375
399
  }];
376
400
  readonly stateMutability: "view";
377
- }, {
378
- readonly type: "function";
379
- readonly inputs: readonly [{
380
- readonly name: "addr";
381
- readonly internalType: "address";
382
- readonly type: "address";
383
- }];
384
- readonly name: "isEOASigner";
385
- readonly outputs: readonly [{
386
- readonly name: "";
387
- readonly internalType: "bool";
388
- readonly type: "bool";
389
- }];
390
- readonly stateMutability: "view";
391
401
  }, {
392
402
  readonly type: "function";
393
403
  readonly inputs: readonly [{
@@ -418,9 +428,9 @@ export declare const incoVerifierAbi: readonly [{
418
428
  readonly type: "bytes32";
419
429
  }];
420
430
  }, {
421
- readonly name: "signature";
422
- readonly internalType: "bytes";
423
- readonly type: "bytes";
431
+ readonly name: "signatures";
432
+ readonly internalType: "bytes[]";
433
+ readonly type: "bytes[]";
424
434
  }];
425
435
  readonly name: "isValidDecryptionAttestation";
426
436
  readonly outputs: readonly [{
@@ -432,13 +442,13 @@ export declare const incoVerifierAbi: readonly [{
432
442
  }, {
433
443
  readonly type: "function";
434
444
  readonly inputs: readonly [{
435
- readonly name: "hash";
445
+ readonly name: "digest";
436
446
  readonly internalType: "bytes32";
437
447
  readonly type: "bytes32";
438
448
  }, {
439
- readonly name: "signature";
440
- readonly internalType: "bytes";
441
- readonly type: "bytes";
449
+ readonly name: "signatures";
450
+ readonly internalType: "bytes[]";
451
+ readonly type: "bytes[]";
442
452
  }];
443
453
  readonly name: "isValidSignature";
444
454
  readonly outputs: readonly [{
@@ -461,7 +471,7 @@ export declare const incoVerifierAbi: readonly [{
461
471
  readonly type: "function";
462
472
  readonly inputs: readonly [{
463
473
  readonly name: "tdReport";
464
- readonly internalType: "struct TD10ReportBody";
474
+ readonly internalType: "struct Td10ReportBody";
465
475
  readonly type: "tuple";
466
476
  readonly components: readonly [{
467
477
  readonly name: "teeTcbSvn";
@@ -543,10 +553,10 @@ export declare const incoVerifierAbi: readonly [{
543
553
  readonly internalType: "bytes";
544
554
  readonly type: "bytes";
545
555
  }];
546
- readonly name: "parseTD10ReportBody";
556
+ readonly name: "parseTd10ReportBody";
547
557
  readonly outputs: readonly [{
548
558
  readonly name: "report";
549
- readonly internalType: "struct TD10ReportBody";
559
+ readonly internalType: "struct Td10ReportBody";
550
560
  readonly type: "tuple";
551
561
  readonly components: readonly [{
552
562
  readonly name: "teeTcbSvn";
@@ -647,6 +657,16 @@ export declare const incoVerifierAbi: readonly [{
647
657
  readonly name: "renounceOwnership";
648
658
  readonly outputs: readonly [];
649
659
  readonly stateMutability: "nonpayable";
660
+ }, {
661
+ readonly type: "function";
662
+ readonly inputs: readonly [{
663
+ readonly name: "newThreshold";
664
+ readonly internalType: "uint256";
665
+ readonly type: "uint256";
666
+ }];
667
+ readonly name: "setThreshold";
668
+ readonly outputs: readonly [];
669
+ readonly stateMutability: "nonpayable";
650
670
  }, {
651
671
  readonly type: "function";
652
672
  readonly inputs: readonly [{
@@ -670,7 +690,7 @@ export declare const incoVerifierAbi: readonly [{
670
690
  readonly internalType: "struct UpgradeResult";
671
691
  readonly type: "tuple";
672
692
  readonly components: readonly [{
673
- readonly name: "network_pubkey";
693
+ readonly name: "networkPubkey";
674
694
  readonly internalType: "bytes";
675
695
  readonly type: "bytes";
676
696
  }];
@@ -739,7 +759,7 @@ export declare const incoVerifierAbi: readonly [{
739
759
  readonly internalType: "struct AddNodeResult";
740
760
  readonly type: "tuple";
741
761
  readonly components: readonly [{
742
- readonly name: "network_pubkey";
762
+ readonly name: "networkPubkey";
743
763
  readonly internalType: "bytes";
744
764
  readonly type: "bytes";
745
765
  }];
@@ -789,7 +809,7 @@ export declare const incoVerifierAbi: readonly [{
789
809
  readonly internalType: "struct UpgradeResult";
790
810
  readonly type: "tuple";
791
811
  readonly components: readonly [{
792
- readonly name: "network_pubkey";
812
+ readonly name: "networkPubkey";
793
813
  readonly internalType: "bytes";
794
814
  readonly type: "bytes";
795
815
  }];
@@ -819,7 +839,7 @@ export declare const incoVerifierAbi: readonly [{
819
839
  readonly type: "event";
820
840
  readonly anonymous: false;
821
841
  readonly inputs: readonly [{
822
- readonly name: "newEOASigner";
842
+ readonly name: "newEoaSigner";
823
843
  readonly internalType: "address";
824
844
  readonly type: "address";
825
845
  readonly indexed: true;
@@ -840,21 +860,6 @@ export declare const incoVerifierAbi: readonly [{
840
860
  readonly anonymous: false;
841
861
  readonly inputs: readonly [];
842
862
  readonly name: "EIP712DomainChanged";
843
- }, {
844
- readonly type: "event";
845
- readonly anonymous: false;
846
- readonly inputs: readonly [{
847
- readonly name: "eoaSigner";
848
- readonly internalType: "address";
849
- readonly type: "address";
850
- readonly indexed: true;
851
- }, {
852
- readonly name: "mrAggregated";
853
- readonly internalType: "bytes32";
854
- readonly type: "bytes32";
855
- readonly indexed: true;
856
- }];
857
- readonly name: "EOAHasUpdatedTDX";
858
863
  }, {
859
864
  readonly type: "event";
860
865
  readonly anonymous: false;
@@ -920,6 +925,36 @@ export declare const incoVerifierAbi: readonly [{
920
925
  readonly indexed: false;
921
926
  }];
922
927
  readonly name: "RemovedSignatureVerifier";
928
+ }, {
929
+ readonly type: "event";
930
+ readonly anonymous: false;
931
+ readonly inputs: readonly [{
932
+ readonly name: "eoaSigner";
933
+ readonly internalType: "address";
934
+ readonly type: "address";
935
+ readonly indexed: true;
936
+ }, {
937
+ readonly name: "mrAggregated";
938
+ readonly internalType: "bytes32";
939
+ readonly type: "bytes32";
940
+ readonly indexed: true;
941
+ }];
942
+ readonly name: "SignerHasUpdatedTDX";
943
+ }, {
944
+ readonly type: "event";
945
+ readonly anonymous: false;
946
+ readonly inputs: readonly [{
947
+ readonly name: "oldThreshold";
948
+ readonly internalType: "uint256";
949
+ readonly type: "uint256";
950
+ readonly indexed: false;
951
+ }, {
952
+ readonly name: "newThreshold";
953
+ readonly internalType: "uint256";
954
+ readonly type: "uint256";
955
+ readonly indexed: false;
956
+ }];
957
+ readonly name: "ThresholdChanged";
923
958
  }, {
924
959
  readonly type: "event";
925
960
  readonly anonymous: false;
@@ -966,14 +1001,6 @@ export declare const incoVerifierAbi: readonly [{
966
1001
  readonly type: "bytes32";
967
1002
  }];
968
1003
  readonly name: "ECDSAInvalidSignatureS";
969
- }, {
970
- readonly type: "error";
971
- readonly inputs: readonly [];
972
- readonly name: "EOASignerAlreadyInitialized";
973
- }, {
974
- readonly type: "error";
975
- readonly inputs: readonly [];
976
- readonly name: "EOASignerNotFound";
977
1004
  }, {
978
1005
  readonly type: "error";
979
1006
  readonly inputs: readonly [{
@@ -1034,6 +1061,18 @@ export declare const incoVerifierAbi: readonly [{
1034
1061
  readonly type: "error";
1035
1062
  readonly inputs: readonly [];
1036
1063
  readonly name: "InvalidReportMrAggregated";
1064
+ }, {
1065
+ readonly type: "error";
1066
+ readonly inputs: readonly [{
1067
+ readonly name: "threshold";
1068
+ readonly internalType: "uint256";
1069
+ readonly type: "uint256";
1070
+ }, {
1071
+ readonly name: "nbOfSigners";
1072
+ readonly internalType: "uint256";
1073
+ readonly type: "uint256";
1074
+ }];
1075
+ readonly name: "InvalidThreshold";
1037
1076
  }, {
1038
1077
  readonly type: "error";
1039
1078
  readonly inputs: readonly [{
@@ -1094,6 +1133,14 @@ export declare const incoVerifierAbi: readonly [{
1094
1133
  readonly type: "address";
1095
1134
  }];
1096
1135
  readonly name: "SharerNotAllowedForHandle";
1136
+ }, {
1137
+ readonly type: "error";
1138
+ readonly inputs: readonly [{
1139
+ readonly name: "signerAddress";
1140
+ readonly internalType: "address";
1141
+ readonly type: "address";
1142
+ }];
1143
+ readonly name: "SignerAlreadyAdded";
1097
1144
  }, {
1098
1145
  readonly type: "error";
1099
1146
  readonly inputs: readonly [{
@@ -1102,6 +1149,18 @@ export declare const incoVerifierAbi: readonly [{
1102
1149
  readonly type: "address";
1103
1150
  }];
1104
1151
  readonly name: "SignerNotFound";
1152
+ }, {
1153
+ readonly type: "error";
1154
+ readonly inputs: readonly [{
1155
+ readonly name: "currentSigner";
1156
+ readonly internalType: "address";
1157
+ readonly type: "address";
1158
+ }, {
1159
+ readonly name: "lastSigner";
1160
+ readonly internalType: "address";
1161
+ readonly type: "address";
1162
+ }];
1163
+ readonly name: "SignersNotInAscendingOrder";
1105
1164
  }, {
1106
1165
  readonly type: "error";
1107
1166
  readonly inputs: readonly [];
@@ -118,7 +118,21 @@ export declare const AnyValueSchema: GenMessage<AnyValue>;
118
118
  */
119
119
  export type Scalar = Message<"inco.covalidator.compute.v1.Scalar"> & {
120
120
  /**
121
- * The type of the scalar
121
+ * The type of the scalar.
122
+ *
123
+ * The possible values are:
124
+ * Bool = 0
125
+ * Uint4 = 1
126
+ * Uint8 = 2
127
+ * Uint16 = 3
128
+ * Uint32 = 4
129
+ * Uint64 = 5
130
+ * Uint128 = 6
131
+ * Uint160 = 7
132
+ * Uint256 = 8
133
+ * Bytes64 = 9
134
+ * Bytes128 = 10
135
+ * Bytes256 = 11
122
136
  *
123
137
  * @generated from field: int32 type = 1;
124
138
  */
@@ -1,5 +1,4 @@
1
1
  import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
- import type { TypedCiphertext } from "../../../fhe/v1/types_pb";
3
2
  import type { ACLProof, ECIESKeyset, HandleWithProof } from "./types_pb";
4
3
  import type { Message } from "@bufbuild/protobuf";
5
4
  /**
@@ -43,113 +42,6 @@ export type KeyResponse = Message<"inco.kms.lite.v1.KeyResponse"> & {
43
42
  * Use `create(KeyResponseSchema)` to create a new message.
44
43
  */
45
44
  export declare const KeyResponseSchema: GenMessage<KeyResponse>;
46
- /**
47
- * ReencryptRequest is the request type for the KmsService/Reencrypt RPC method.
48
- *
49
- * @generated from message inco.kms.lite.v1.ReencryptRequest
50
- */
51
- export type ReencryptRequest = Message<"inco.kms.lite.v1.ReencryptRequest"> & {
52
- /**
53
- * user_address is the Ethereum address of the user who requested the
54
- * reencryption, prefixed with 0x.
55
- *
56
- * @generated from field: string user_address = 1;
57
- */
58
- userAddress: string;
59
- /**
60
- * ephemeral_pub_key is the encoding of the user's public ephemeral
61
- * encryption key (secp256k1), generated by the user for this reencryption
62
- * request. It is encoded in its 33-byte compressed format.
63
- *
64
- * @generated from field: bytes ephemeral_pub_key = 2;
65
- */
66
- ephemeralPubKey: Uint8Array;
67
- /**
68
- * eip712_signature is an EIP-712 signature of the following EIP-712 typed data by
69
- * `user_address` (note that we only give a JSON representation for the sake of
70
- * readability, but the actual signed data is defined in the EIP-712 spec):
71
- *
72
- * ```json
73
- * {
74
- * "types": {
75
- * "EIP712Domain": [
76
- * { "name": "name", "type": "string" },
77
- * { "name": "version", "type": "string" },
78
- * { "name": "chainId", "type": "uint256" }
79
- * ],
80
- * "ReencryptionRequest": [
81
- * { "name": "publicKey", "type": "bytes" }
82
- * ]
83
- * },
84
- * "primaryType": "ReencryptionRequest",
85
- * "domain": {
86
- * "name": "IncoReencryption",
87
- * "version": "0.1.0",
88
- * "chainId": "<host_chain_id>",
89
- * "verifyingContract": "<acl_address>",
90
- * "salt": "0x0000000000000000000000000000000000000000000000000000000000000000"
91
- * },
92
- * "message": {
93
- * "publicKey": "<ephemeral_pub_key>"
94
- * }
95
- * }
96
- * ```
97
- *
98
- * @generated from field: bytes eip712_signature = 3;
99
- */
100
- eip712Signature: Uint8Array;
101
- /**
102
- * handles_with_proofs is the list of handles of the ciphertexts to reencrypt,
103
- * along with the ACL proof that the user has access to the ciphertext.
104
- *
105
- * @generated from field: repeated inco.kms.lite.v1.HandleWithProof handles_with_proofs = 4;
106
- */
107
- handlesWithProofs: HandleWithProof[];
108
- };
109
- /**
110
- * Describes the message inco.kms.lite.v1.ReencryptRequest.
111
- * Use `create(ReencryptRequestSchema)` to create a new message.
112
- */
113
- export declare const ReencryptRequestSchema: GenMessage<ReencryptRequest>;
114
- /**
115
- * ReencryptResponse is the response type for the KmsService/Reencrypt RPC method.
116
- *
117
- * @generated from message inco.kms.lite.v1.ReencryptResponse
118
- */
119
- export type ReencryptResponse = Message<"inco.kms.lite.v1.ReencryptResponse"> & {
120
- /**
121
- * payload is the reencryption response payload.
122
- *
123
- * @generated from field: inco.kms.lite.v1.ReencryptionResponsePayload payload = 1;
124
- */
125
- payload?: ReencryptionResponsePayload;
126
- };
127
- /**
128
- * Describes the message inco.kms.lite.v1.ReencryptResponse.
129
- * Use `create(ReencryptResponseSchema)` to create a new message.
130
- */
131
- export declare const ReencryptResponseSchema: GenMessage<ReencryptResponse>;
132
- /**
133
- * ReencryptionResponsePayload is the payload of the ReencryptResponse,
134
- * separated out because it is signed by the KMS using its signing key.
135
- *
136
- * @generated from message inco.kms.lite.v1.ReencryptionResponsePayload
137
- */
138
- export type ReencryptionResponsePayload = Message<"inco.kms.lite.v1.ReencryptionResponsePayload"> & {
139
- /**
140
- * user_ciphertexts is the list of ciphertexts that were reencrypted to the
141
- * user's public key. Each ciphertext at index `i` corresponds to the ciphertext
142
- * at index `i` in the `ReencryptRequest`.
143
- *
144
- * @generated from field: repeated inco.fhe.v1.TypedCiphertext user_ciphertexts = 1;
145
- */
146
- userCiphertexts: TypedCiphertext[];
147
- };
148
- /**
149
- * Describes the message inco.kms.lite.v1.ReencryptionResponsePayload.
150
- * Use `create(ReencryptionResponsePayloadSchema)` to create a new message.
151
- */
152
- export declare const ReencryptionResponsePayloadSchema: GenMessage<ReencryptionResponsePayload>;
153
45
  /**
154
46
  * AttestedDecryptRequest is the request type for the KmsService/AttestedDecrypt RPC method.
155
47
  *
@@ -163,10 +55,21 @@ export type AttestedDecryptRequest = Message<"inco.kms.lite.v1.AttestedDecryptRe
163
55
  * @generated from field: string user_address = 1;
164
56
  */
165
57
  userAddress: string;
58
+ /**
59
+ * reencrypt_pub_key is the encoding of the user's public
60
+ * encryption key (secp256k1) used to reencrypt the result for.
61
+ * It is encoded in its 33-byte compressed format.
62
+ * If empty, the KMS will return plaintext decryption instead of reencryption.
63
+ *
64
+ * @generated from field: bytes reencrypt_pub_key = 2;
65
+ */
66
+ reencryptPubKey: Uint8Array;
166
67
  /**
167
68
  * eip712_signature is an EIP-712 signature of the following EIP-712 typed data by
168
69
  * `user_address` (note that we only give a JSON representation for the sake of
169
- * readability, but the actual signed data is defined in the EIP-712 spec):
70
+ * readability, but the actual signed data is defined in the EIP-712 spec) where:
71
+ * handles - list of 0x prefixed handles to decrypt
72
+ * publicKey - 0x prefixed reencrypt_pub_key (if any). "0x" otherwise if empty.
170
73
  *
171
74
  * ```json
172
75
  * {
@@ -177,22 +80,24 @@ export type AttestedDecryptRequest = Message<"inco.kms.lite.v1.AttestedDecryptRe
177
80
  * { "name": "chainId", "type": "uint256" }
178
81
  * ],
179
82
  * "AttestedDecryptRequest": [
180
- * { "name": "handles", "type": "bytes32[]" }
83
+ * { "name": "handles", "type": "bytes32[]" },
84
+ * { "name": "publicKey", "type": "bytes" },
181
85
  * ]
182
86
  * },
183
87
  * "primaryType": "AttestedDecryptRequest",
184
88
  * "domain": {
185
89
  * "name": "IncoAttestedDecrypt",
186
- * "version": "0.1.0",
90
+ * "version": "1",
187
91
  * "chainId": "<host_chain_id>",
188
92
  * },
189
93
  * "message": {
190
- * "handles": ["<handle1>", "<handle2>", ...]
94
+ * "handles": ["<handle1>", "<handle2>", ...],
95
+ * "publicKey": "0x<reencrypt_pub_key>"
191
96
  * }
192
97
  * }
193
98
  * ```
194
99
  *
195
- * @generated from field: bytes eip712_signature = 2;
100
+ * @generated from field: bytes eip712_signature = 3;
196
101
  */
197
102
  eip712Signature: Uint8Array;
198
103
  /**
@@ -200,7 +105,7 @@ export type AttestedDecryptRequest = Message<"inco.kms.lite.v1.AttestedDecryptRe
200
105
  * Either the user_address or sharer must have ACL access to the handles for the attested
201
106
  * decryption to succeed.
202
107
  *
203
- * @generated from field: repeated inco.kms.lite.v1.HandleWithProof handles_with_proofs = 3;
108
+ * @generated from field: repeated inco.kms.lite.v1.HandleWithProof handles_with_proofs = 4;
204
109
  */
205
110
  handlesWithProofs: HandleWithProof[];
206
111
  };
@@ -263,7 +168,7 @@ export type AttestedComputeRequest = Message<"inco.kms.lite.v1.AttestedComputeRe
263
168
  * "primaryType": "AttestedComputeRequest",
264
169
  * "domain": {
265
170
  * "name": "IncoAttestedCompute",
266
- * "version": "0.1.0",
171
+ * "version": "1",
267
172
  * "chainId": "<host_chain_id>",
268
173
  * },
269
174
  * "message": {
@@ -367,6 +272,49 @@ export type AttestedComputeResponse = Message<"inco.kms.lite.v1.AttestedComputeR
367
272
  * Use `create(AttestedComputeResponseSchema)` to create a new message.
368
273
  */
369
274
  export declare const AttestedComputeResponseSchema: GenMessage<AttestedComputeResponse>;
275
+ /**
276
+ * Plaintext contains the decrypted plaintext value.
277
+ *
278
+ * @generated from message inco.kms.lite.v1.Plaintext
279
+ */
280
+ export type Plaintext = Message<"inco.kms.lite.v1.Plaintext"> & {
281
+ /**
282
+ * value is the decrypted plaintext value as a 32-byte word.
283
+ *
284
+ * @generated from field: bytes value = 1;
285
+ */
286
+ value: Uint8Array;
287
+ };
288
+ /**
289
+ * Describes the message inco.kms.lite.v1.Plaintext.
290
+ * Use `create(PlaintextSchema)` to create a new message.
291
+ */
292
+ export declare const PlaintextSchema: GenMessage<Plaintext>;
293
+ /**
294
+ * Reencryption contains the reencrypted ciphertext value.
295
+ *
296
+ * @generated from message inco.kms.lite.v1.Reencryption
297
+ */
298
+ export type Reencryption = Message<"inco.kms.lite.v1.Reencryption"> & {
299
+ /**
300
+ * The ciphertext that was reencrypted to the user's public key.
301
+ *
302
+ * @generated from field: bytes user_ciphertext = 1;
303
+ */
304
+ userCiphertext: Uint8Array;
305
+ /**
306
+ * The handle of the ciphertext, encoded as a 0x-prefixed hex string, any case.
307
+ * TODO scalar declaration.
308
+ *
309
+ * @generated from field: string handle = 2;
310
+ */
311
+ handle: string;
312
+ };
313
+ /**
314
+ * Describes the message inco.kms.lite.v1.Reencryption.
315
+ * Use `create(ReencryptionSchema)` to create a new message.
316
+ */
317
+ export declare const ReencryptionSchema: GenMessage<Reencryption>;
370
318
  /**
371
319
  * DecryptionAttestation contains the attestation for the decryption of a single handle.
372
320
  *
@@ -380,11 +328,28 @@ export type DecryptionAttestation = Message<"inco.kms.lite.v1.DecryptionAttestat
380
328
  */
381
329
  handle: string;
382
330
  /**
383
- * plaintext is the decrypted plaintext value as a 32-byte word.
384
- *
385
- * @generated from field: bytes plaintext = 2;
386
- */
387
- plaintext: Uint8Array;
331
+ * @generated from oneof inco.kms.lite.v1.DecryptionAttestation.value
332
+ */
333
+ value: {
334
+ /**
335
+ * Returns plaintext if reencrypt_pub_key was empty in the request
336
+ *
337
+ * @generated from field: inco.kms.lite.v1.Plaintext plaintext = 2;
338
+ */
339
+ value: Plaintext;
340
+ case: "plaintext";
341
+ } | {
342
+ /**
343
+ * Returns encrypted ciphertext if reencrypt_pub_key was set in the request
344
+ *
345
+ * @generated from field: inco.kms.lite.v1.Reencryption reencryption = 3;
346
+ */
347
+ value: Reencryption;
348
+ case: "reencryption";
349
+ } | {
350
+ case: undefined;
351
+ value?: undefined;
352
+ };
388
353
  /**
389
354
  * signature is the attestation from the covalidator for the (handle,plaintext) pair.
390
355
  * This signature will be verified on the host chain.
@@ -421,7 +386,7 @@ export type DecryptionAttestation = Message<"inco.kms.lite.v1.DecryptionAttestat
421
386
  * }
422
387
  * ```
423
388
  *
424
- * @generated from field: bytes signature = 3;
389
+ * @generated from field: bytes signature = 4;
425
390
  */
426
391
  signature: Uint8Array;
427
392
  };
@@ -536,20 +501,10 @@ export declare const KmsService: GenService<{
536
501
  input: typeof KeyRequestSchema;
537
502
  output: typeof KeyResponseSchema;
538
503
  };
539
- /**
540
- * Reencrypt reencrypts a ciphertext using the ephemeral public key of the
541
- * user.
542
- *
543
- * @generated from rpc inco.kms.lite.v1.KmsService.Reencrypt
544
- */
545
- reencrypt: {
546
- methodKind: "unary";
547
- input: typeof ReencryptRequestSchema;
548
- output: typeof ReencryptResponseSchema;
549
- };
550
504
  /**
551
505
  * AttestedDecrypt decrypts multiple ciphertexts and provides an attestation
552
506
  * that the decryption was performed correctly.
507
+ * Can optionally reencrypt the result of the decryption to a desired public key.
553
508
  *
554
509
  * @generated from rpc inco.kms.lite.v1.KmsService.AttestedDecrypt
555
510
  */