@inco/js 0.8.0-devnet-5 → 0.9.0-devnet-test-2

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 (67) hide show
  1. package/dist/cjs/advancedacl/session-key.d.ts +11 -10
  2. package/dist/cjs/advancedacl/session-key.js +7 -11
  3. package/dist/cjs/attestedcompute/attested-compute.d.ts +6 -6
  4. package/dist/cjs/attestedcompute/attested-compute.js +2 -2
  5. package/dist/cjs/attesteddecrypt/attested-decrypt.d.ts +8 -8
  6. package/dist/cjs/attesteddecrypt/attested-decrypt.js +6 -6
  7. package/dist/cjs/encryption/encryption.d.ts +10 -10
  8. package/dist/cjs/encryption/encryption.js +5 -5
  9. package/dist/cjs/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +270 -7
  10. package/dist/cjs/generated/es/inco/covalidator/compute/v1/server_pb.js +98 -12
  11. package/dist/cjs/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +0 -6
  12. package/dist/cjs/generated/es/inco/covalidator/compute/v1/types_pb.js +2 -8
  13. package/dist/cjs/generated/es/inco/kms/lite/v1/kms_service_pb.d.ts +213 -0
  14. package/dist/cjs/generated/es/inco/kms/lite/v1/kms_service_pb.js +36 -11
  15. package/dist/cjs/generated/es/inco/sealingfetcher/v1/sealingfetcher_pb.d.ts +3 -3
  16. package/dist/cjs/kms/quorumClient.d.ts +5 -4
  17. package/dist/cjs/kms/quorumClient.js +33 -30
  18. package/dist/cjs/lite/index.d.ts +1 -1
  19. package/dist/cjs/lite/index.js +15 -2
  20. package/dist/cjs/lite/lightning.d.ts +33 -24
  21. package/dist/cjs/lite/lightning.js +67 -38
  22. package/dist/cjs/lite/xwing.d.ts +123 -0
  23. package/dist/cjs/lite/xwing.js +275 -0
  24. package/dist/cjs/reencryption/types.d.ts +2 -2
  25. package/dist/esm/advancedacl/session-key.d.ts +11 -10
  26. package/dist/esm/advancedacl/session-key.js +7 -11
  27. package/dist/esm/attestedcompute/attested-compute.d.ts +6 -6
  28. package/dist/esm/attestedcompute/attested-compute.js +2 -2
  29. package/dist/esm/attesteddecrypt/attested-decrypt.d.ts +8 -8
  30. package/dist/esm/attesteddecrypt/attested-decrypt.js +4 -4
  31. package/dist/esm/encryption/encryption.d.ts +10 -10
  32. package/dist/esm/encryption/encryption.js +5 -5
  33. package/dist/esm/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +270 -7
  34. package/dist/esm/generated/es/inco/covalidator/compute/v1/server_pb.js +97 -11
  35. package/dist/esm/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +0 -6
  36. package/dist/esm/generated/es/inco/covalidator/compute/v1/types_pb.js +2 -8
  37. package/dist/esm/generated/es/inco/kms/lite/v1/kms_service_pb.d.ts +213 -0
  38. package/dist/esm/generated/es/inco/kms/lite/v1/kms_service_pb.js +35 -10
  39. package/dist/esm/generated/es/inco/sealingfetcher/v1/sealingfetcher_pb.d.ts +3 -3
  40. package/dist/esm/kms/quorumClient.d.ts +5 -4
  41. package/dist/esm/kms/quorumClient.js +33 -30
  42. package/dist/esm/lite/index.d.ts +1 -1
  43. package/dist/esm/lite/index.js +2 -2
  44. package/dist/esm/lite/lightning.d.ts +33 -24
  45. package/dist/esm/lite/lightning.js +67 -38
  46. package/dist/esm/lite/xwing.d.ts +123 -0
  47. package/dist/esm/lite/xwing.js +263 -0
  48. package/dist/esm/reencryption/types.d.ts +2 -2
  49. package/dist/types/advancedacl/session-key.d.ts +11 -10
  50. package/dist/types/attestedcompute/attested-compute.d.ts +6 -6
  51. package/dist/types/attesteddecrypt/attested-decrypt.d.ts +8 -8
  52. package/dist/types/encryption/encryption.d.ts +10 -10
  53. package/dist/types/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +270 -7
  54. package/dist/types/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +0 -6
  55. package/dist/types/generated/es/inco/kms/lite/v1/kms_service_pb.d.ts +213 -0
  56. package/dist/types/generated/es/inco/sealingfetcher/v1/sealingfetcher_pb.d.ts +3 -3
  57. package/dist/types/kms/quorumClient.d.ts +5 -4
  58. package/dist/types/lite/index.d.ts +1 -1
  59. package/dist/types/lite/lightning.d.ts +33 -24
  60. package/dist/types/lite/xwing.d.ts +123 -0
  61. package/dist/types/reencryption/types.d.ts +2 -2
  62. package/package.json +6 -6
  63. package/dist/cjs/lite/ecies.d.ts +0 -26
  64. package/dist/cjs/lite/ecies.js +0 -146
  65. package/dist/esm/lite/ecies.d.ts +0 -26
  66. package/dist/esm/lite/ecies.js +0 -134
  67. package/dist/types/lite/ecies.d.ts +0 -26
@@ -1,6 +1,6 @@
1
1
  import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
2
  import type { CryptogramWithProof, InputCryptogram, StoredCryptogram } from "./types_pb";
3
- import type { DecryptionAttestation } from "../../../kms/lite/v1/kms_service_pb";
3
+ import type { DecryptionAttestation, EListElement } from "../../../kms/lite/v1/kms_service_pb";
4
4
  import type { ACLProof, SupportedScalarBinaryOp } from "../../../kms/lite/v1/types_pb";
5
5
  import type { RATlsServer } from "../../../sealingfetcher/v1/sealingfetcher_pb";
6
6
  import type { StartHeliosRequest } from "../../../helioswrapper/v1/helioswrapper_pb";
@@ -580,6 +580,24 @@ export type ConfigureRequest = Message<"inco.covalidator.compute.v1.ConfigureReq
580
580
  * Use `create(ConfigureRequestSchema)` to create a new message.
581
581
  */
582
582
  export declare const ConfigureRequestSchema: GenMessage<ConfigureRequest>;
583
+ /**
584
+ * HeliosConfigureRequest is a request to configure the helios light client.
585
+ *
586
+ * @generated from message inco.covalidator.compute.v1.HeliosConfigureRequest
587
+ */
588
+ export type HeliosConfigureRequest = Message<"inco.covalidator.compute.v1.HeliosConfigureRequest"> & {
589
+ /**
590
+ * Provide Helios-specific configuration to start the Helios from compute service.
591
+ *
592
+ * @generated from field: inco.helioswrapper.v1.StartHeliosRequest helios_config = 2;
593
+ */
594
+ heliosConfig?: StartHeliosRequest;
595
+ };
596
+ /**
597
+ * Describes the message inco.covalidator.compute.v1.HeliosConfigureRequest.
598
+ * Use `create(HeliosConfigureRequestSchema)` to create a new message.
599
+ */
600
+ export declare const HeliosConfigureRequestSchema: GenMessage<HeliosConfigureRequest>;
583
601
  /**
584
602
  * ConfigureResponse is a response to ConfigureRequest.
585
603
  *
@@ -604,6 +622,24 @@ export type ConfigureResponse = Message<"inco.covalidator.compute.v1.ConfigureRe
604
622
  * Use `create(ConfigureResponseSchema)` to create a new message.
605
623
  */
606
624
  export declare const ConfigureResponseSchema: GenMessage<ConfigureResponse>;
625
+ /**
626
+ * HeliosConfigureResponse is a response to HeliosConfigureRequest.
627
+ *
628
+ * @generated from message inco.covalidator.compute.v1.HeliosConfigureResponse
629
+ */
630
+ export type HeliosConfigureResponse = Message<"inco.covalidator.compute.v1.HeliosConfigureResponse"> & {
631
+ /**
632
+ * True if the Helios light client was started successfully.
633
+ *
634
+ * @generated from field: bool helios_started = 1;
635
+ */
636
+ heliosStarted: boolean;
637
+ };
638
+ /**
639
+ * Describes the message inco.covalidator.compute.v1.HeliosConfigureResponse.
640
+ * Use `create(HeliosConfigureResponseSchema)` to create a new message.
641
+ */
642
+ export declare const HeliosConfigureResponseSchema: GenMessage<HeliosConfigureResponse>;
607
643
  /**
608
644
  * AttestedDecryptRequest is the request type for the ComputeService/AttestedDecrypt RPC method.
609
645
  *
@@ -619,8 +655,8 @@ export type AttestedDecryptRequest = Message<"inco.covalidator.compute.v1.Attest
619
655
  userAddress: string;
620
656
  /**
621
657
  * reencrypt_pub_key is the encoding of the user's public
622
- * encryption key (secp256k1) used to reencrypt the result for.
623
- * It is encoded in its 33-byte compressed format.
658
+ * encryption key (X-Wing) used to reencrypt the result for.
659
+ * It is encoded in its 1216-byte format.
624
660
  * If empty, the KMS will return plaintext decryption instead of reencryption.
625
661
  *
626
662
  * @generated from field: bytes reencrypt_pub_key = 2;
@@ -680,6 +716,82 @@ export type AttestedDecryptRequest = Message<"inco.covalidator.compute.v1.Attest
680
716
  * Use `create(AttestedDecryptRequestSchema)` to create a new message.
681
717
  */
682
718
  export declare const AttestedDecryptRequestSchema: GenMessage<AttestedDecryptRequest>;
719
+ /**
720
+ * EListAttestedDecryptRequest is the request type for the ComputeService/EListAttestedDecrypt RPC method.
721
+ *
722
+ * @generated from message inco.covalidator.compute.v1.EListAttestedDecryptRequest
723
+ */
724
+ export type EListAttestedDecryptRequest = Message<"inco.covalidator.compute.v1.EListAttestedDecryptRequest"> & {
725
+ /**
726
+ * user_address is the Ethereum address of the user who requested the
727
+ * decryption, prefixed with 0x.
728
+ *
729
+ * @generated from field: string user_address = 1;
730
+ */
731
+ userAddress: string;
732
+ /**
733
+ * reencrypt_pub_key is the encoding of the user's public
734
+ * encryption key (secp256k1) used to reencrypt the result for.
735
+ * It is encoded in its 33-byte compressed format.
736
+ * If empty, the KMS will return plaintext decryption instead of reencryption.
737
+ *
738
+ * @generated from field: bytes reencrypt_pub_key = 2;
739
+ */
740
+ reencryptPubKey: Uint8Array;
741
+ /**
742
+ * eip712_signature is an EIP-712 signature of the following EIP-712 typed data by
743
+ * `user_address` (note that we only give a JSON representation for the sake of
744
+ * readability, but the actual signed data is defined in the EIP-712 spec) where:
745
+ * handles - list of 0x prefixed handles to decrypt
746
+ * publicKey - 0x prefixed reencrypt_pub_key (if any). "0x" otherwise if empty.
747
+ *
748
+ * ```json
749
+ * {
750
+ * "types": {
751
+ * "EIP712Domain": [
752
+ * { "name": "name", "type": "string" },
753
+ * { "name": "version", "type": "string" },
754
+ * { "name": "chainId", "type": "uint256" }
755
+ * ],
756
+ * "AttestedDecryptRequest": [
757
+ * { "name": "handles", "type": "bytes32[]" },
758
+ * { "name": "publicKey", "type": "bytes" },
759
+ * ]
760
+ * },
761
+ * "primaryType": "AttestedDecryptRequest",
762
+ * "domain": {
763
+ * "name": "IncoAttestedDecrypt",
764
+ * "version": "0.1.0",
765
+ * "chainId": "<host_chain_id>",
766
+ * },
767
+ * "message": {
768
+ * "handles": ["<handle1>", "<handle2>", ...],
769
+ * "publicKey": "0x<reencrypt_pub_key>"
770
+ * }
771
+ * }
772
+ * ```
773
+ *
774
+ * @generated from field: bytes eip712_signature = 3;
775
+ */
776
+ eip712Signature: Uint8Array;
777
+ /**
778
+ * cryptogram_with_proof is the cryptogram for elist with proof to decrypt.
779
+ * Either the user_address or sharer must have ACL access to the elist cryptogram handle for the attested
780
+ * decryption to succeed.
781
+ *
782
+ * @generated from field: inco.covalidator.compute.v1.CryptogramWithProof cryptogram_with_proof = 4;
783
+ */
784
+ cryptogramWithProof?: CryptogramWithProof;
785
+ /**
786
+ * @generated from field: optional inco.covalidator.compute.v1.ConfigureRequest configure_request = 5;
787
+ */
788
+ configureRequest?: ConfigureRequest;
789
+ };
790
+ /**
791
+ * Describes the message inco.covalidator.compute.v1.EListAttestedDecryptRequest.
792
+ * Use `create(EListAttestedDecryptRequestSchema)` to create a new message.
793
+ */
794
+ export declare const EListAttestedDecryptRequestSchema: GenMessage<EListAttestedDecryptRequest>;
683
795
  /**
684
796
  * AttestedDecryptResponse is the response type for the ComputeService/AttestedDecrypt RPC method.
685
797
  *
@@ -699,6 +811,30 @@ export type AttestedDecryptResponse = Message<"inco.covalidator.compute.v1.Attes
699
811
  * Use `create(AttestedDecryptResponseSchema)` to create a new message.
700
812
  */
701
813
  export declare const AttestedDecryptResponseSchema: GenMessage<AttestedDecryptResponse>;
814
+ /**
815
+ * EListAttestedDecryptResponse is the response type for the ComputeService/EListAttestedDecrypt RPC method.
816
+ *
817
+ * @generated from message inco.covalidator.compute.v1.EListAttestedDecryptResponse
818
+ */
819
+ export type EListAttestedDecryptResponse = Message<"inco.covalidator.compute.v1.EListAttestedDecryptResponse"> & {
820
+ /**
821
+ * commitment_proof_attestation is the signed commitment proof of the decrypted elist values.
822
+ *
823
+ * @generated from field: inco.kms.lite.v1.DecryptionAttestation commitment_proof_attestation = 1;
824
+ */
825
+ commitmentProofAttestation?: DecryptionAttestation;
826
+ /**
827
+ * values is the list of decrypted elist elements.
828
+ *
829
+ * @generated from field: repeated inco.kms.lite.v1.EListElement values = 2;
830
+ */
831
+ values: EListElement[];
832
+ };
833
+ /**
834
+ * Describes the message inco.covalidator.compute.v1.EListAttestedDecryptResponse.
835
+ * Use `create(EListAttestedDecryptResponseSchema)` to create a new message.
836
+ */
837
+ export declare const EListAttestedDecryptResponseSchema: GenMessage<EListAttestedDecryptResponse>;
702
838
  /**
703
839
  * AttestedRevealRequest is the request type for the ComputeService/AttestedReveal RPC method.
704
840
  *
@@ -722,6 +858,29 @@ export type AttestedRevealRequest = Message<"inco.covalidator.compute.v1.Atteste
722
858
  * Use `create(AttestedRevealRequestSchema)` to create a new message.
723
859
  */
724
860
  export declare const AttestedRevealRequestSchema: GenMessage<AttestedRevealRequest>;
861
+ /**
862
+ * EListAttestedRevealRequest is the request type for the ComputeService/EListAttestedReveal RPC method.
863
+ *
864
+ * @generated from message inco.covalidator.compute.v1.EListAttestedRevealRequest
865
+ */
866
+ export type EListAttestedRevealRequest = Message<"inco.covalidator.compute.v1.EListAttestedRevealRequest"> & {
867
+ /**
868
+ * cryptogram is the elist ciphertext to decrypt.
869
+ * The elist handle must have been revealed beforehand with the on-chain .reveal() call.
870
+ *
871
+ * @generated from field: inco.covalidator.compute.v1.StoredCryptogram cryptogram = 3;
872
+ */
873
+ cryptogram?: StoredCryptogram;
874
+ /**
875
+ * @generated from field: optional inco.covalidator.compute.v1.ConfigureRequest configure_request = 4;
876
+ */
877
+ configureRequest?: ConfigureRequest;
878
+ };
879
+ /**
880
+ * Describes the message inco.covalidator.compute.v1.EListAttestedRevealRequest.
881
+ * Use `create(EListAttestedRevealRequestSchema)` to create a new message.
882
+ */
883
+ export declare const EListAttestedRevealRequestSchema: GenMessage<EListAttestedRevealRequest>;
725
884
  /**
726
885
  * AttestedRevealResponse is the response type for the ComputeService/AttestedReveal RPC method.
727
886
  *
@@ -741,6 +900,30 @@ export type AttestedRevealResponse = Message<"inco.covalidator.compute.v1.Attest
741
900
  * Use `create(AttestedRevealResponseSchema)` to create a new message.
742
901
  */
743
902
  export declare const AttestedRevealResponseSchema: GenMessage<AttestedRevealResponse>;
903
+ /**
904
+ * EListAttestedRevealResponse is the response type for the ComputeService/EListAttestedRevealResponse RPC method.
905
+ *
906
+ * @generated from message inco.covalidator.compute.v1.EListAttestedRevealResponse
907
+ */
908
+ export type EListAttestedRevealResponse = Message<"inco.covalidator.compute.v1.EListAttestedRevealResponse"> & {
909
+ /**
910
+ * commitment_proof_attestation is the signed commitment proof of the decrypted elist values.
911
+ *
912
+ * @generated from field: inco.kms.lite.v1.DecryptionAttestation commitment_proof_attestation = 1;
913
+ */
914
+ commitmentProofAttestation?: DecryptionAttestation;
915
+ /**
916
+ * values is the list of decrypted elist elements.
917
+ *
918
+ * @generated from field: repeated inco.kms.lite.v1.EListElement values = 2;
919
+ */
920
+ values: EListElement[];
921
+ };
922
+ /**
923
+ * Describes the message inco.covalidator.compute.v1.EListAttestedRevealResponse.
924
+ * Use `create(EListAttestedRevealResponseSchema)` to create a new message.
925
+ */
926
+ export declare const EListAttestedRevealResponseSchema: GenMessage<EListAttestedRevealResponse>;
744
927
  /**
745
928
  * AttestedComputeRequest is the request type for the ComputeService/AttestedDecrypt RPC method.
746
929
  *
@@ -756,8 +939,8 @@ export type AttestedComputeRequest = Message<"inco.covalidator.compute.v1.Attest
756
939
  userAddress: string;
757
940
  /**
758
941
  * reencrypt_pub_key is the encoding of the user's public
759
- * encryption key (secp256k1) used to reencrypt the result for.
760
- * It is encoded in its 33-byte compressed format.
942
+ * encryption key (X-Wing) used to reencrypt the result for.
943
+ * It is encoded in its 1216-byte format.
761
944
  * If empty, the KMS will return plaintext decryption instead of reencryption.
762
945
  *
763
946
  * @generated from field: bytes reencrypt_pub_key = 2;
@@ -1008,10 +1191,66 @@ export declare enum FheOperation {
1008
1191
  * @generated from enum value: FHE_RAND_BOUNDED = 27;
1009
1192
  */
1010
1193
  FHE_RAND_BOUNDED = 27,
1194
+ /**
1195
+ * Custom
1196
+ *
1197
+ * @generated from enum value: FHE_ALLOW = 40;
1198
+ */
1199
+ FHE_ALLOW = 40,
1200
+ /**
1201
+ * @generated from enum value: FHE_REVEAL = 41;
1202
+ */
1203
+ FHE_REVEAL = 41,
1011
1204
  /**
1012
1205
  * @generated from enum value: FHE_GET_CIPHERTEXT = 32;
1013
1206
  */
1014
- FHE_GET_CIPHERTEXT = 32
1207
+ FHE_GET_CIPHERTEXT = 32,
1208
+ /**
1209
+ * Elist operations
1210
+ *
1211
+ * @generated from enum value: FHE_NEW_ELIST = 100;
1212
+ */
1213
+ FHE_NEW_ELIST = 100,
1214
+ /**
1215
+ * @generated from enum value: FHE_ELIST_GET = 101;
1216
+ */
1217
+ FHE_ELIST_GET = 101,
1218
+ /**
1219
+ * @generated from enum value: FHE_ELIST_GET_OR = 102;
1220
+ */
1221
+ FHE_ELIST_GET_OR = 102,
1222
+ /**
1223
+ * @generated from enum value: FHE_ELIST_SET = 103;
1224
+ */
1225
+ FHE_ELIST_SET = 103,
1226
+ /**
1227
+ * @generated from enum value: FHE_ELIST_INSERT = 104;
1228
+ */
1229
+ FHE_ELIST_INSERT = 104,
1230
+ /**
1231
+ * @generated from enum value: FHE_ELIST_APPEND = 105;
1232
+ */
1233
+ FHE_ELIST_APPEND = 105,
1234
+ /**
1235
+ * @generated from enum value: FHE_ELIST_CONCAT = 106;
1236
+ */
1237
+ FHE_ELIST_CONCAT = 106,
1238
+ /**
1239
+ * @generated from enum value: FHE_ELIST_SLICE = 107;
1240
+ */
1241
+ FHE_ELIST_SLICE = 107,
1242
+ /**
1243
+ * @generated from enum value: FHE_ELIST_RANGE = 108;
1244
+ */
1245
+ FHE_ELIST_RANGE = 108,
1246
+ /**
1247
+ * @generated from enum value: FHE_ELIST_SHUFFLE = 109;
1248
+ */
1249
+ FHE_ELIST_SHUFFLE = 109,
1250
+ /**
1251
+ * @generated from enum value: FHE_ELIST_REVERSE = 110;
1252
+ */
1253
+ FHE_ELIST_REVERSE = 110
1015
1254
  }
1016
1255
  /**
1017
1256
  * Describes the enum inco.covalidator.compute.v1.FheOperation.
@@ -1049,7 +1288,7 @@ export declare const ComputeService: GenService<{
1049
1288
  *
1050
1289
  * # IncoLite
1051
1290
  *
1052
- * In the IncoLite system, the input ciphertext is an ECIES ciphertext, and
1291
+ * In the IncoLite system, the input ciphertext is an X-Wing ciphertext, and
1053
1292
  * the compute ciphertexts are encrypted using the encryption codec passed
1054
1293
  * into the plaintext compute client.
1055
1294
  *
@@ -1248,4 +1487,28 @@ export declare const ComputeService: GenService<{
1248
1487
  input: typeof AttestedRevealRequestSchema;
1249
1488
  output: typeof AttestedRevealResponseSchema;
1250
1489
  };
1490
+ /**
1491
+ * EListAttestedDecrypt decrypts a single elist ciphertext and provides an attestation
1492
+ * that the decryption was performed correctly.
1493
+ * Can optionally reencrypt the results of the decryption to a desired public key.
1494
+ *
1495
+ * @generated from rpc inco.covalidator.compute.v1.ComputeService.EListAttestedDecrypt
1496
+ */
1497
+ eListAttestedDecrypt: {
1498
+ methodKind: "unary";
1499
+ input: typeof EListAttestedDecryptRequestSchema;
1500
+ output: typeof EListAttestedDecryptResponseSchema;
1501
+ };
1502
+ /**
1503
+ * EListAttestedReveal decrypts a single elist ciphertext and provides an attestation
1504
+ * that the decryption was performed correctly.
1505
+ * Doesn't require authentication if the handle is publicly revealed with the on-chain .reveal() call beforehand.
1506
+ *
1507
+ * @generated from rpc inco.covalidator.compute.v1.ComputeService.EListAttestedReveal
1508
+ */
1509
+ eListAttestedReveal: {
1510
+ methodKind: "unary";
1511
+ input: typeof EListAttestedRevealRequestSchema;
1512
+ output: typeof EListAttestedRevealResponseSchema;
1513
+ };
1251
1514
  }>;
@@ -221,12 +221,6 @@ export declare enum InputVersion {
221
221
  * @generated from enum value: INPUT_VERSION_UNSPECIFIED = 0;
222
222
  */
223
223
  UNSPECIFIED = 0,
224
- /**
225
- * INPUT_VERSION_ECIES is the InputPayload message encrypted using ECIES with the primary key version.
226
- *
227
- * @generated from enum value: INPUT_VERSION_ECIES = 1;
228
- */
229
- ECIES = 1,
230
224
  /**
231
225
  * INPUT_VERSION_XWING is the InputPayload message encrypted using HPKE-XWING-CHACHA20POLY1305-SHA256 with the primary key version.
232
226
  *
@@ -106,6 +106,105 @@ export type AttestedDecryptRequest = Message<"inco.kms.lite.v1.AttestedDecryptRe
106
106
  * Use `create(AttestedDecryptRequestSchema)` to create a new message.
107
107
  */
108
108
  export declare const AttestedDecryptRequestSchema: GenMessage<AttestedDecryptRequest>;
109
+ /**
110
+ * EListAttestedDecryptRequest is the request type for the KmsService/EListAttestedDecrypt RPC method.
111
+ *
112
+ * @generated from message inco.kms.lite.v1.EListAttestedDecryptRequest
113
+ */
114
+ export type EListAttestedDecryptRequest = Message<"inco.kms.lite.v1.EListAttestedDecryptRequest"> & {
115
+ /**
116
+ * user_address is the Ethereum address of the user who requested the
117
+ * decryption, prefixed with 0x.
118
+ *
119
+ * @generated from field: string user_address = 1;
120
+ */
121
+ userAddress: string;
122
+ /**
123
+ * reencrypt_pub_key is the encoding of the user's public
124
+ * encryption key (secp256k1) used to reencrypt the result for.
125
+ * It is encoded in its 33-byte compressed format.
126
+ * If empty, the KMS will return plaintext decryption instead of reencryption.
127
+ *
128
+ * @generated from field: bytes reencrypt_pub_key = 2;
129
+ */
130
+ reencryptPubKey: Uint8Array;
131
+ /**
132
+ * eip712_signature is an EIP-712 signature of the following EIP-712 typed data by
133
+ * `user_address` (note that we only give a JSON representation for the sake of
134
+ * readability, but the actual signed data is defined in the EIP-712 spec) where:
135
+ * handles - list of 0x prefixed handles to decrypt
136
+ * publicKey - 0x prefixed reencrypt_pub_key (if any). "0x" otherwise if empty.
137
+ *
138
+ * ```json
139
+ * {
140
+ * "types": {
141
+ * "EIP712Domain": [
142
+ * { "name": "name", "type": "string" },
143
+ * { "name": "version", "type": "string" },
144
+ * { "name": "chainId", "type": "uint256" }
145
+ * ],
146
+ * "AttestedDecryptRequest": [
147
+ * { "name": "handles", "type": "bytes32[]" },
148
+ * { "name": "publicKey", "type": "bytes" },
149
+ * ]
150
+ * },
151
+ * "primaryType": "AttestedDecryptRequest",
152
+ * "domain": {
153
+ * "name": "IncoAttestedDecrypt",
154
+ * "version": "1",
155
+ * "chainId": "<host_chain_id>",
156
+ * },
157
+ * "message": {
158
+ * "handles": ["<handle1>", "<handle2>", ...],
159
+ * "publicKey": "0x<reencrypt_pub_key>"
160
+ * }
161
+ * }
162
+ * ```
163
+ *
164
+ * @generated from field: bytes eip712_signature = 3;
165
+ */
166
+ eip712Signature: Uint8Array;
167
+ /**
168
+ * handle_with_proof is the handle of an elist ciphertext with proof to decrypt.
169
+ * Either the user_address or sharer must have ACL access to the elist handle for the attested
170
+ * decryption to succeed.
171
+ *
172
+ * @generated from field: inco.kms.lite.v1.HandleWithProof elist_handle_with_proof = 4;
173
+ */
174
+ elistHandleWithProof?: HandleWithProof;
175
+ };
176
+ /**
177
+ * Describes the message inco.kms.lite.v1.EListAttestedDecryptRequest.
178
+ * Use `create(EListAttestedDecryptRequestSchema)` to create a new message.
179
+ */
180
+ export declare const EListAttestedDecryptRequestSchema: GenMessage<EListAttestedDecryptRequest>;
181
+ /**
182
+ * EListAttestedDecryptResponse is the response type for the KmsService/EListAttestedDecryptResponse RPC method.
183
+ *
184
+ * @generated from message inco.kms.lite.v1.EListAttestedDecryptResponse
185
+ */
186
+ export type EListAttestedDecryptResponse = Message<"inco.kms.lite.v1.EListAttestedDecryptResponse"> & {
187
+ /**
188
+ * commitment_proof_attestation is the signed commitment_proof of the decrypted elist values and their corresponding commitments.
189
+ * commitment_proof = hash(concat([
190
+ * hash(concat([commitment1, v1])),
191
+ * ...]))
192
+ *
193
+ * @generated from field: inco.kms.lite.v1.DecryptionAttestation commitment_proof_attestation = 1;
194
+ */
195
+ commitmentProofAttestation?: DecryptionAttestation;
196
+ /**
197
+ * values is the list of decrypted elist values.
198
+ *
199
+ * @generated from field: repeated inco.kms.lite.v1.EListElement values = 2;
200
+ */
201
+ values: EListElement[];
202
+ };
203
+ /**
204
+ * Describes the message inco.kms.lite.v1.EListAttestedDecryptResponse.
205
+ * Use `create(EListAttestedDecryptResponseSchema)` to create a new message.
206
+ */
207
+ export declare const EListAttestedDecryptResponseSchema: GenMessage<EListAttestedDecryptResponse>;
109
208
  /**
110
209
  * AttestedRevealRequest is the request type for the KmsService/AttestedReveal RPC method.
111
210
  *
@@ -125,6 +224,25 @@ export type AttestedRevealRequest = Message<"inco.kms.lite.v1.AttestedRevealRequ
125
224
  * Use `create(AttestedRevealRequestSchema)` to create a new message.
126
225
  */
127
226
  export declare const AttestedRevealRequestSchema: GenMessage<AttestedRevealRequest>;
227
+ /**
228
+ * EListAttestedRevealRequest is the request type for the KmsService/EListAttestedReveal RPC method.
229
+ *
230
+ * @generated from message inco.kms.lite.v1.EListAttestedRevealRequest
231
+ */
232
+ export type EListAttestedRevealRequest = Message<"inco.kms.lite.v1.EListAttestedRevealRequest"> & {
233
+ /**
234
+ * handle is the handle of the elist ciphertext to decrypt.
235
+ * The handle must have been revealed beforehand with the on-chain .reveal() call.
236
+ *
237
+ * @generated from field: string handle = 3;
238
+ */
239
+ handle: string;
240
+ };
241
+ /**
242
+ * Describes the message inco.kms.lite.v1.EListAttestedRevealRequest.
243
+ * Use `create(EListAttestedRevealRequestSchema)` to create a new message.
244
+ */
245
+ export declare const EListAttestedRevealRequestSchema: GenMessage<EListAttestedRevealRequest>;
128
246
  /**
129
247
  * AttestedComputeRequest is the request type for the KmsService/AttestedDecrypt RPC method.
130
248
  *
@@ -261,6 +379,30 @@ export type AttestedRevealResponse = Message<"inco.kms.lite.v1.AttestedRevealRes
261
379
  * Use `create(AttestedRevealResponseSchema)` to create a new message.
262
380
  */
263
381
  export declare const AttestedRevealResponseSchema: GenMessage<AttestedRevealResponse>;
382
+ /**
383
+ * EListAttestedRevealResponse is the response type for the KmsService/EListAttestedReveal RPC method.
384
+ *
385
+ * @generated from message inco.kms.lite.v1.EListAttestedRevealResponse
386
+ */
387
+ export type EListAttestedRevealResponse = Message<"inco.kms.lite.v1.EListAttestedRevealResponse"> & {
388
+ /**
389
+ * commitment_proof_attestation is the signed commitment_proof of the concatenation of the hashes of individual elist values.
390
+ *
391
+ * @generated from field: inco.kms.lite.v1.DecryptionAttestation commitment_proof_attestation = 1;
392
+ */
393
+ commitmentProofAttestation?: DecryptionAttestation;
394
+ /**
395
+ * values is the list of decrypted elist values.
396
+ *
397
+ * @generated from field: repeated inco.kms.lite.v1.EListElement values = 2;
398
+ */
399
+ values: EListElement[];
400
+ };
401
+ /**
402
+ * Describes the message inco.kms.lite.v1.EListAttestedRevealResponse.
403
+ * Use `create(EListAttestedRevealResponseSchema)` to create a new message.
404
+ */
405
+ export declare const EListAttestedRevealResponseSchema: GenMessage<EListAttestedRevealResponse>;
264
406
  /**
265
407
  * AttestedComputeResponse is the response type for the KmsService/AttestedCompute RPC method.
266
408
  *
@@ -321,6 +463,53 @@ export type Reencryption = Message<"inco.kms.lite.v1.Reencryption"> & {
321
463
  * Use `create(ReencryptionSchema)` to create a new message.
322
464
  */
323
465
  export declare const ReencryptionSchema: GenMessage<Reencryption>;
466
+ /**
467
+ * EListElement contains the decryptions/reencryptions for elist element.
468
+ *
469
+ * @generated from message inco.kms.lite.v1.EListElement
470
+ */
471
+ export type EListElement = Message<"inco.kms.lite.v1.EListElement"> & {
472
+ /**
473
+ * index is the index of the element in the elist.
474
+ *
475
+ * @generated from field: uint32 index = 1;
476
+ */
477
+ index: number;
478
+ /**
479
+ * commitment is the random commitment applied to the element when calculating elist commitment_proof.
480
+ *
481
+ * @generated from field: bytes commitment = 2;
482
+ */
483
+ commitment: Uint8Array;
484
+ /**
485
+ * @generated from oneof inco.kms.lite.v1.EListElement.value
486
+ */
487
+ value: {
488
+ /**
489
+ * Returns plaintext if reencrypt_pub_key was empty in the request
490
+ *
491
+ * @generated from field: inco.kms.lite.v1.Plaintext plaintext = 3;
492
+ */
493
+ value: Plaintext;
494
+ case: "plaintext";
495
+ } | {
496
+ /**
497
+ * Returns encrypted ciphertext if reencrypt_pub_key was set in the request
498
+ *
499
+ * @generated from field: inco.kms.lite.v1.Reencryption reencryption = 4;
500
+ */
501
+ value: Reencryption;
502
+ case: "reencryption";
503
+ } | {
504
+ case: undefined;
505
+ value?: undefined;
506
+ };
507
+ };
508
+ /**
509
+ * Describes the message inco.kms.lite.v1.EListElement.
510
+ * Use `create(EListElementSchema)` to create a new message.
511
+ */
512
+ export declare const EListElementSchema: GenMessage<EListElement>;
324
513
  /**
325
514
  * DecryptionAttestation contains the attestation for the decryption of a single handle.
326
515
  *
@@ -453,4 +642,28 @@ export declare const KmsService: GenService<{
453
642
  input: typeof AttestedRevealRequestSchema;
454
643
  output: typeof AttestedRevealResponseSchema;
455
644
  };
645
+ /**
646
+ * EListAttestedDecrypt decrypts a single elist ciphertext and provides an attestation
647
+ * that the decryption was performed correctly.
648
+ * Can optionally reencrypt the result of the decryption to a desired public key.
649
+ *
650
+ * @generated from rpc inco.kms.lite.v1.KmsService.EListAttestedDecrypt
651
+ */
652
+ eListAttestedDecrypt: {
653
+ methodKind: "unary";
654
+ input: typeof EListAttestedDecryptRequestSchema;
655
+ output: typeof EListAttestedDecryptResponseSchema;
656
+ };
657
+ /**
658
+ * EListAttestedReveal decrypts a single elist ciphertext and provides an attestation
659
+ * that the decryption was performed correctly.
660
+ * Doesn't require authentication if the handle is publicly revealed with the on-chain .reveal() call beforehand.
661
+ *
662
+ * @generated from rpc inco.kms.lite.v1.KmsService.EListAttestedReveal
663
+ */
664
+ eListAttestedReveal: {
665
+ methodKind: "unary";
666
+ input: typeof EListAttestedRevealRequestSchema;
667
+ output: typeof EListAttestedRevealResponseSchema;
668
+ };
456
669
  }>;
@@ -107,9 +107,9 @@ export type TeeKeys = Message<"inco.sealingfetcher.v1.TeeKeys"> & {
107
107
  */
108
108
  eoaPrivkey: Uint8Array;
109
109
  /**
110
- * The Network private key that the TEE generated during the bootstrap process.
111
- * This is simply a 32-byte array, that can be used as-is as a sepc256k1
112
- * private key.
110
+ * The Network private key (X-Wing) that the TEE generated during the bootstrap process.
111
+ * This is a 32-byte seed used to derive the X-Wing keypair for input encryption.
112
+ * X-Wing is a post-quantum hybrid KEM combining ML-KEM-768 and X25519.
113
113
  *
114
114
  * @generated from field: bytes network_privkey = 2;
115
115
  */
@@ -1,7 +1,8 @@
1
1
  import type { Address } from 'viem';
2
2
  import type { DecryptionAttestation, EncryptedDecryptionAttestation } from '../attesteddecrypt/types.js';
3
- import type { EciesScheme, SupportedFheType } from '../encryption/encryption.js';
3
+ import type { EncryptionScheme, SupportedFheType } from '../encryption/encryption.js';
4
4
  import type { AttestedComputeRequest, AttestedDecryptRequest, AttestedRevealRequest } from '../generated/es/inco/kms/lite/v1/kms_service_pb.js';
5
+ import type { XwingKeypair } from '../lite/index.js';
5
6
  import type { BackoffConfig } from '../retry.js';
6
7
  import { type KmsClient } from './client.js';
7
8
  export declare class KmsQuorumClient {
@@ -28,9 +29,9 @@ export declare class KmsQuorumClient {
28
29
  * @throws {Error} If KMS clients array is empty or threshold is invalid
29
30
  */
30
31
  static fromKmsClients(kmsClients: KmsClient[], threshold: number): KmsQuorumClient;
31
- attestedDecrypt(request: AttestedDecryptRequest, backoffConfig?: Partial<BackoffConfig>): Promise<(DecryptionAttestation<EciesScheme, SupportedFheType> | EncryptedDecryptionAttestation<EciesScheme, SupportedFheType>)[]>;
32
- attestedCompute(request: AttestedComputeRequest, backoffConfig?: Partial<BackoffConfig>): Promise<DecryptionAttestation<EciesScheme, SupportedFheType> | EncryptedDecryptionAttestation<EciesScheme, SupportedFheType>>;
33
- attestedReveal(request: AttestedRevealRequest, backoffConfig?: Partial<BackoffConfig>): Promise<(DecryptionAttestation<EciesScheme, SupportedFheType> | EncryptedDecryptionAttestation<EciesScheme, SupportedFheType>)[]>;
32
+ attestedDecrypt(request: AttestedDecryptRequest, backoffConfig?: Partial<BackoffConfig>, reencryptKeypair?: XwingKeypair): Promise<(DecryptionAttestation<EncryptionScheme, SupportedFheType> | EncryptedDecryptionAttestation<EncryptionScheme, SupportedFheType>)[]>;
33
+ attestedCompute(request: AttestedComputeRequest, backoffConfig?: Partial<BackoffConfig>, reencryptKeypair?: XwingKeypair): Promise<DecryptionAttestation<EncryptionScheme, SupportedFheType> | EncryptedDecryptionAttestation<EncryptionScheme, SupportedFheType>>;
34
+ attestedReveal(request: AttestedRevealRequest, backoffConfig?: Partial<BackoffConfig>): Promise<(DecryptionAttestation<EncryptionScheme, SupportedFheType> | EncryptedDecryptionAttestation<EncryptionScheme, SupportedFheType>)[]>;
34
35
  /**
35
36
  * Generic method to execute a KMS operation across all clients with retry and threshold logic.
36
37
  * Returns results with both the response and signer address.
@@ -4,6 +4,6 @@ export type { HandleWithProof } from '../generated/es/inco/kms/lite/v1/types_pb.
4
4
  export * from './attested-compute.js';
5
5
  export * from './attested-decrypt.js';
6
6
  export * from './deployments.js';
7
- export * from './ecies.js';
8
7
  export * from './hadu.js';
9
8
  export * from './lightning.js';
9
+ export { TEST_NETWORK_SEED_KEY, TEST_NETWORK_XWING_PUBKEY, XWING_PUBLIC_KEY_SIZE, decodeXwingPrivateKey, decodeXwingPublicKey, decrypt, deriveXwingKeypairFromSeed, encodeXwingPublicKey, encrypt, generateXwingKeypair, getXwingDecryptor, getXwingEncryptor, type XwingDecryptorArgs, type XwingEncryptorArgs, type XwingKeypair, } from './xwing.js';