@inco/lightning 0.10.0-devnet-3 → 0.11.0-demonet-1

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 (45) hide show
  1. package/manifest.yaml +46 -0
  2. package/package.json +1 -1
  3. package/src/IncoLightning.sol +1 -3
  4. package/src/IncoVerifier.sol +1 -3
  5. package/src/Lib.alphanet.sol +19 -0
  6. package/src/Lib.demonet.sol +20 -1
  7. package/src/Lib.devnet.sol +19 -0
  8. package/src/Lib.sol +20 -1
  9. package/src/Lib.template.sol +19 -0
  10. package/src/Lib.testnet.sol +20 -1
  11. package/src/Types.sol +0 -1
  12. package/src/interfaces/automata-interfaces/IPCCSRouterExtended.sol +2 -0
  13. package/src/libs/incoLightning_alphanet_v0_297966649.sol +19 -0
  14. package/src/libs/incoLightning_alphanet_v1_725458969.sol +19 -0
  15. package/src/libs/incoLightning_alphanet_v2_976644394.sol +19 -0
  16. package/src/libs/incoLightning_demonet_v0_863421733.sol +19 -0
  17. package/src/libs/incoLightning_demonet_v11_473256067.sol +1242 -0
  18. package/src/libs/incoLightning_demonet_v2_467437523.sol +19 -0
  19. package/src/libs/incoLightning_devnet_v0_340846814.sol +19 -0
  20. package/src/libs/incoLightning_devnet_v10_266391127.sol +19 -0
  21. package/src/libs/incoLightning_devnet_v1_904635675.sol +19 -0
  22. package/src/libs/incoLightning_devnet_v2_295237520.sol +19 -0
  23. package/src/libs/incoLightning_devnet_v3_976859633.sol +19 -0
  24. package/src/libs/incoLightning_devnet_v4_409204766.sol +19 -0
  25. package/src/libs/incoLightning_devnet_v5_203964628.sol +19 -0
  26. package/src/libs/incoLightning_devnet_v6_281949651.sol +19 -0
  27. package/src/libs/incoLightning_devnet_v7_24560427.sol +19 -0
  28. package/src/libs/incoLightning_devnet_v8_985328058.sol +19 -0
  29. package/src/libs/incoLightning_devnet_v9_269218568.sol +19 -0
  30. package/src/libs/incoLightning_testnet_v0_183408998.sol +19 -0
  31. package/src/libs/incoLightning_testnet_v11_340321378.sol +1242 -0
  32. package/src/libs/incoLightning_testnet_v2_889158349.sol +19 -0
  33. package/src/lightning-parts/AccessControl/AdvancedAccessControl.sol +13 -2
  34. package/src/lightning-parts/AccessControl/AdvancedAccessControl.types.sol +12 -0
  35. package/src/lightning-parts/AccessControl/test/TestAdvancedAccessControl.t.sol +36 -9
  36. package/src/lightning-parts/EncryptedOperations.sol +2 -9
  37. package/src/lightning-parts/primitives/EListHandleMetadata.sol +6 -6
  38. package/src/lightning-parts/primitives/HandleGeneration.sol +3 -10
  39. package/src/lightning-parts/primitives/HandleMetadata.sol +10 -10
  40. package/src/lightning-parts/test/HandleMetadata.t.sol +22 -40
  41. package/src/periphery/SessionVerifier.sol +16 -14
  42. package/src/test/IncoTest.sol +19 -3
  43. package/src/test/TestLib.t.sol +65 -13
  44. package/src/test/TestUpgrade.t.sol +1 -1
  45. package/src/version/IncoLightningConfig.sol +2 -2
package/manifest.yaml CHANGED
@@ -1,3 +1,49 @@
1
+ incoLightning_testnet_v11_340321378:
2
+ executor:
3
+ name: incoLightning_testnet_v11_340321378
4
+ majorVersion: 11
5
+ deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
6
+ owner: "0x8E0860785c9B9c99B17DCd8c1da89548dA140299"
7
+ pepper: testnet
8
+ executorAddress: "0x3cC345Eaa5bEe457AF9C0C3183335a67b62b0066"
9
+ salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc00af1f4ec3705e21d9e36c62"
10
+ deployments:
11
+ - name: incoLightning_11_0_0__340321378
12
+ chainId: "84532"
13
+ chainName: Base Sepolia
14
+ version:
15
+ major: 11
16
+ minor: 0
17
+ patch: 0
18
+ shortSalt: "340321378"
19
+ blockNumber: "40623608"
20
+ deployDate: 2026-04-24T07:25:07.657Z
21
+ commit: v0.10.0-devnet-2-12-gfac57f53-dirty
22
+ active: true
23
+ includesPreviewFeatures: false
24
+ incoLightning_demonet_v11_473256067:
25
+ executor:
26
+ name: incoLightning_demonet_v11_473256067
27
+ majorVersion: 11
28
+ deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC"
29
+ owner: "0x8E0860785c9B9c99B17DCd8c1da89548dA140299"
30
+ pepper: demonet
31
+ executorAddress: "0xad9Af2e804FbF14d69391167F1FCDf918A3980fb"
32
+ salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc00056195a8d84ba47a58b683"
33
+ deployments:
34
+ - name: incoLightning_11_0_1__473256067
35
+ chainId: "84532"
36
+ chainName: Base Sepolia
37
+ version:
38
+ major: 11
39
+ minor: 0
40
+ patch: 1
41
+ shortSalt: "473256067"
42
+ blockNumber: "40887358"
43
+ deployDate: 2026-04-30T09:56:46.927Z
44
+ commit: v0.11.0-testnet-3-10-g6b4bb85b
45
+ active: true
46
+ includesPreviewFeatures: false
1
47
  incoLightning_devnet_v10_266391127:
2
48
  executor:
3
49
  name: incoLightning_devnet_v10_266391127
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inco/lightning",
3
- "version": "0.10.0-devnet-3",
3
+ "version": "0.11.0-demonet-1",
4
4
  "repository": "https://github.com/Inco-fhevm/inco-monorepo",
5
5
  "files": [
6
6
  "src/",
@@ -35,9 +35,7 @@ contract IncoLightning is IIncoLightning, TrivialEncryption, EList, UUPSUpgradea
35
35
 
36
36
  /// @notice Authorizes contract upgrades (restricted to owner only)
37
37
  /// @dev Required by UUPSUpgradeable. Only the contract owner can authorize upgrades.
38
- function _authorizeUpgrade(address) internal view override {
39
- require(msg.sender == owner());
40
- }
38
+ function _authorizeUpgrade(address) internal view override onlyOwner {}
41
39
 
42
40
  /// @notice Initializes the proxy with an owner address
43
41
  /// @dev Must be called immediately after proxy deployment. Can only be called once.
@@ -21,9 +21,7 @@ contract IncoVerifier is IIncoVerifier, AdvancedAccessControl, DecryptionAtteste
21
21
 
22
22
  /// @notice Authorizes contract upgrades (restricted to owner only)
23
23
  /// @dev Required by UUPSUpgradeable. Only the contract owner can authorize upgrades.
24
- function _authorizeUpgrade(address) internal view override {
25
- require(msg.sender == owner());
26
- }
24
+ function _authorizeUpgrade(address) internal view override onlyOwner {}
27
25
 
28
26
  /// @notice Initializes the proxy with an owner address and EIP712 parameters
29
27
  /// @dev Must be called immediately after proxy deployment. Can only be called once.
@@ -801,6 +801,13 @@ library e {
801
801
  inco.allow(eaddress.unwrap(a), to);
802
802
  }
803
803
 
804
+ /// @notice Allows an address to access an elist
805
+ /// @param a The elist
806
+ /// @param to The address to allow
807
+ function allow(elist a, address to) internal {
808
+ inco.allow(elist.unwrap(a), to);
809
+ }
810
+
804
811
  /// @notice Reveals an encrypted uint256
805
812
  /// @param a The encrypted uint256
806
813
  function reveal(euint256 a) internal {
@@ -819,6 +826,12 @@ library e {
819
826
  inco.reveal(eaddress.unwrap(a));
820
827
  }
821
828
 
829
+ /// @notice Reveals an elist (makes all elements publicly readable without wallet authentication)
830
+ /// @param a The elist
831
+ function reveal(elist a) internal {
832
+ inco.reveal(elist.unwrap(a));
833
+ }
834
+
822
835
  /// @notice Verifies a decryption attestation for a euint256
823
836
  /// @param handle The encrypted handle
824
837
  /// @param value The claimed decrypted value
@@ -857,6 +870,12 @@ library e {
857
870
  allow(a, address(this));
858
871
  }
859
872
 
873
+ /// @notice Allows this contract to access an elist
874
+ /// @param a The elist
875
+ function allowThis(elist a) internal {
876
+ allow(a, address(this));
877
+ }
878
+
860
879
  /// @notice Checks if a user is allowed to access an encrypted uint256
861
880
  /// @param user The address to check
862
881
  /// @param a The encrypted uint256
@@ -10,7 +10,7 @@ import { ebool, euint256, eaddress, ETypes, elist, IndexOutOfRange, InvalidRange
10
10
  import { asBool } from "./shared/TypeUtils.sol";
11
11
  import { DecryptionAttestation, ElementAttestationWithProof } from "./lightning-parts/DecryptionAttester.types.sol";
12
12
 
13
- IncoLightning constant inco = IncoLightning(payable(0xA95EAbCE575f5f1e52605358Ee893F6536166378));
13
+ IncoLightning constant inco = IncoLightning(payable(0xad9Af2e804FbF14d69391167F1FCDf918A3980fb));
14
14
  address constant deployedBy = 0x8202D2D747784Cb7D48868E44C42C4bf162a70BC;
15
15
 
16
16
  /// @notice Returns the ETypes enum value encoded in a handle
@@ -801,6 +801,13 @@ library e {
801
801
  inco.allow(eaddress.unwrap(a), to);
802
802
  }
803
803
 
804
+ /// @notice Allows an address to access an elist
805
+ /// @param a The elist
806
+ /// @param to The address to allow
807
+ function allow(elist a, address to) internal {
808
+ inco.allow(elist.unwrap(a), to);
809
+ }
810
+
804
811
  /// @notice Reveals an encrypted uint256
805
812
  /// @param a The encrypted uint256
806
813
  function reveal(euint256 a) internal {
@@ -819,6 +826,12 @@ library e {
819
826
  inco.reveal(eaddress.unwrap(a));
820
827
  }
821
828
 
829
+ /// @notice Reveals an elist (makes all elements publicly readable without wallet authentication)
830
+ /// @param a The elist
831
+ function reveal(elist a) internal {
832
+ inco.reveal(elist.unwrap(a));
833
+ }
834
+
822
835
  /// @notice Verifies a decryption attestation for a euint256
823
836
  /// @param handle The encrypted handle
824
837
  /// @param value The claimed decrypted value
@@ -857,6 +870,12 @@ library e {
857
870
  allow(a, address(this));
858
871
  }
859
872
 
873
+ /// @notice Allows this contract to access an elist
874
+ /// @param a The elist
875
+ function allowThis(elist a) internal {
876
+ allow(a, address(this));
877
+ }
878
+
860
879
  /// @notice Checks if a user is allowed to access an encrypted uint256
861
880
  /// @param user The address to check
862
881
  /// @param a The encrypted uint256
@@ -801,6 +801,13 @@ library e {
801
801
  inco.allow(eaddress.unwrap(a), to);
802
802
  }
803
803
 
804
+ /// @notice Allows an address to access an elist
805
+ /// @param a The elist
806
+ /// @param to The address to allow
807
+ function allow(elist a, address to) internal {
808
+ inco.allow(elist.unwrap(a), to);
809
+ }
810
+
804
811
  /// @notice Reveals an encrypted uint256
805
812
  /// @param a The encrypted uint256
806
813
  function reveal(euint256 a) internal {
@@ -819,6 +826,12 @@ library e {
819
826
  inco.reveal(eaddress.unwrap(a));
820
827
  }
821
828
 
829
+ /// @notice Reveals an elist (makes all elements publicly readable without wallet authentication)
830
+ /// @param a The elist
831
+ function reveal(elist a) internal {
832
+ inco.reveal(elist.unwrap(a));
833
+ }
834
+
822
835
  /// @notice Verifies a decryption attestation for a euint256
823
836
  /// @param handle The encrypted handle
824
837
  /// @param value The claimed decrypted value
@@ -857,6 +870,12 @@ library e {
857
870
  allow(a, address(this));
858
871
  }
859
872
 
873
+ /// @notice Allows this contract to access an elist
874
+ /// @param a The elist
875
+ function allowThis(elist a) internal {
876
+ allow(a, address(this));
877
+ }
878
+
860
879
  /// @notice Checks if a user is allowed to access an encrypted uint256
861
880
  /// @param user The address to check
862
881
  /// @param a The encrypted uint256
package/src/Lib.sol CHANGED
@@ -10,7 +10,7 @@ import { ebool, euint256, eaddress, ETypes, elist, IndexOutOfRange, InvalidRange
10
10
  import { asBool } from "./shared/TypeUtils.sol";
11
11
  import { DecryptionAttestation, ElementAttestationWithProof } from "./lightning-parts/DecryptionAttester.types.sol";
12
12
 
13
- IncoLightning constant inco = IncoLightning(payable(0x9C6b74dff47644956e712B301aa3701b3141fF9C));
13
+ IncoLightning constant inco = IncoLightning(payable(0x3cC345Eaa5bEe457AF9C0C3183335a67b62b0066));
14
14
  address constant deployedBy = 0x8202D2D747784Cb7D48868E44C42C4bf162a70BC;
15
15
 
16
16
  /// @notice Returns the ETypes enum value encoded in a handle
@@ -801,6 +801,13 @@ library e {
801
801
  inco.allow(eaddress.unwrap(a), to);
802
802
  }
803
803
 
804
+ /// @notice Allows an address to access an elist
805
+ /// @param a The elist
806
+ /// @param to The address to allow
807
+ function allow(elist a, address to) internal {
808
+ inco.allow(elist.unwrap(a), to);
809
+ }
810
+
804
811
  /// @notice Reveals an encrypted uint256
805
812
  /// @param a The encrypted uint256
806
813
  function reveal(euint256 a) internal {
@@ -819,6 +826,12 @@ library e {
819
826
  inco.reveal(eaddress.unwrap(a));
820
827
  }
821
828
 
829
+ /// @notice Reveals an elist (makes all elements publicly readable without wallet authentication)
830
+ /// @param a The elist
831
+ function reveal(elist a) internal {
832
+ inco.reveal(elist.unwrap(a));
833
+ }
834
+
822
835
  /// @notice Verifies a decryption attestation for a euint256
823
836
  /// @param handle The encrypted handle
824
837
  /// @param value The claimed decrypted value
@@ -857,6 +870,12 @@ library e {
857
870
  allow(a, address(this));
858
871
  }
859
872
 
873
+ /// @notice Allows this contract to access an elist
874
+ /// @param a The elist
875
+ function allowThis(elist a) internal {
876
+ allow(a, address(this));
877
+ }
878
+
860
879
  /// @notice Checks if a user is allowed to access an encrypted uint256
861
880
  /// @param user The address to check
862
881
  /// @param a The encrypted uint256
@@ -814,6 +814,13 @@ library e {
814
814
  inco.allow(eaddress.unwrap(a), to);
815
815
  }
816
816
 
817
+ /// @notice Allows an address to access an elist
818
+ /// @param a The elist
819
+ /// @param to The address to allow
820
+ function allow(elist a, address to) internal {
821
+ inco.allow(elist.unwrap(a), to);
822
+ }
823
+
817
824
  /// @notice Reveals an encrypted uint256
818
825
  /// @param a The encrypted uint256
819
826
  function reveal(euint256 a) internal {
@@ -832,6 +839,12 @@ library e {
832
839
  inco.reveal(eaddress.unwrap(a));
833
840
  }
834
841
 
842
+ /// @notice Reveals an elist (makes all elements publicly readable without wallet authentication)
843
+ /// @param a The elist
844
+ function reveal(elist a) internal {
845
+ inco.reveal(elist.unwrap(a));
846
+ }
847
+
835
848
  /// @notice Verifies a decryption attestation for a euint256
836
849
  /// @param handle The encrypted handle
837
850
  /// @param value The claimed decrypted value
@@ -872,6 +885,12 @@ library e {
872
885
  allow(a, address(this));
873
886
  }
874
887
 
888
+ /// @notice Allows this contract to access an elist
889
+ /// @param a The elist
890
+ function allowThis(elist a) internal {
891
+ allow(a, address(this));
892
+ }
893
+
875
894
  /// @notice Checks if a user is allowed to access an encrypted uint256
876
895
  /// @param user The address to check
877
896
  /// @param a The encrypted uint256
@@ -10,7 +10,7 @@ import { ebool, euint256, eaddress, ETypes, elist, IndexOutOfRange, InvalidRange
10
10
  import { asBool } from "./shared/TypeUtils.sol";
11
11
  import { DecryptionAttestation, ElementAttestationWithProof } from "./lightning-parts/DecryptionAttester.types.sol";
12
12
 
13
- IncoLightning constant inco = IncoLightning(payable(0x168FDc3Ae19A5d5b03614578C58974FF30FCBe92));
13
+ IncoLightning constant inco = IncoLightning(payable(0x3cC345Eaa5bEe457AF9C0C3183335a67b62b0066));
14
14
  address constant deployedBy = 0x8202D2D747784Cb7D48868E44C42C4bf162a70BC;
15
15
 
16
16
  /// @notice Returns the ETypes enum value encoded in a handle
@@ -801,6 +801,13 @@ library e {
801
801
  inco.allow(eaddress.unwrap(a), to);
802
802
  }
803
803
 
804
+ /// @notice Allows an address to access an elist
805
+ /// @param a The elist
806
+ /// @param to The address to allow
807
+ function allow(elist a, address to) internal {
808
+ inco.allow(elist.unwrap(a), to);
809
+ }
810
+
804
811
  /// @notice Reveals an encrypted uint256
805
812
  /// @param a The encrypted uint256
806
813
  function reveal(euint256 a) internal {
@@ -819,6 +826,12 @@ library e {
819
826
  inco.reveal(eaddress.unwrap(a));
820
827
  }
821
828
 
829
+ /// @notice Reveals an elist (makes all elements publicly readable without wallet authentication)
830
+ /// @param a The elist
831
+ function reveal(elist a) internal {
832
+ inco.reveal(elist.unwrap(a));
833
+ }
834
+
822
835
  /// @notice Verifies a decryption attestation for a euint256
823
836
  /// @param handle The encrypted handle
824
837
  /// @param value The claimed decrypted value
@@ -857,6 +870,12 @@ library e {
857
870
  allow(a, address(this));
858
871
  }
859
872
 
873
+ /// @notice Allows this contract to access an elist
874
+ /// @param a The elist
875
+ function allowThis(elist a) internal {
876
+ allow(a, address(this));
877
+ }
878
+
860
879
  /// @notice Checks if a user is allowed to access an encrypted uint256
861
880
  /// @param user The address to check
862
881
  /// @param a The encrypted uint256
package/src/Types.sol CHANGED
@@ -284,7 +284,6 @@ uint8 constant HANDLE_INDEX = 0;
284
284
  // constant string makes cross-path collision resistance structural rather than incidental:
285
285
  // preimages from different derivation paths can never align byte-for-byte regardless of length.
286
286
  // These must be kept in sync with the Go (pkg/fhe) and TS (js/src/handle.ts) implementations.
287
- string constant SEP_INPUT_PREHANDLE = "inco/handle/input-prehandle";
288
287
  string constant SEP_INPUT_HANDLE = "inco/handle/input-handle";
289
288
  string constant SEP_INPUT_CONTEXT = "inco/handle/input-context";
290
289
  string constant SEP_OP_RESULT = "inco/handle/op-result";
@@ -9,4 +9,6 @@ interface IPCCSRouterExtended is IPCCSRouter {
9
9
 
10
10
  function setAuthorized(address caller, bool authorized) external;
11
11
 
12
+ function transferOwnership(address newOwner) external;
13
+
12
14
  }
@@ -801,6 +801,13 @@ library e {
801
801
  inco.allow(eaddress.unwrap(a), to);
802
802
  }
803
803
 
804
+ /// @notice Allows an address to access an elist
805
+ /// @param a The elist
806
+ /// @param to The address to allow
807
+ function allow(elist a, address to) internal {
808
+ inco.allow(elist.unwrap(a), to);
809
+ }
810
+
804
811
  /// @notice Reveals an encrypted uint256
805
812
  /// @param a The encrypted uint256
806
813
  function reveal(euint256 a) internal {
@@ -819,6 +826,12 @@ library e {
819
826
  inco.reveal(eaddress.unwrap(a));
820
827
  }
821
828
 
829
+ /// @notice Reveals an elist (makes all elements publicly readable without wallet authentication)
830
+ /// @param a The elist
831
+ function reveal(elist a) internal {
832
+ inco.reveal(elist.unwrap(a));
833
+ }
834
+
822
835
  /// @notice Verifies a decryption attestation for a euint256
823
836
  /// @param handle The encrypted handle
824
837
  /// @param value The claimed decrypted value
@@ -857,6 +870,12 @@ library e {
857
870
  allow(a, address(this));
858
871
  }
859
872
 
873
+ /// @notice Allows this contract to access an elist
874
+ /// @param a The elist
875
+ function allowThis(elist a) internal {
876
+ allow(a, address(this));
877
+ }
878
+
860
879
  /// @notice Checks if a user is allowed to access an encrypted uint256
861
880
  /// @param user The address to check
862
881
  /// @param a The encrypted uint256
@@ -801,6 +801,13 @@ library e {
801
801
  inco.allow(eaddress.unwrap(a), to);
802
802
  }
803
803
 
804
+ /// @notice Allows an address to access an elist
805
+ /// @param a The elist
806
+ /// @param to The address to allow
807
+ function allow(elist a, address to) internal {
808
+ inco.allow(elist.unwrap(a), to);
809
+ }
810
+
804
811
  /// @notice Reveals an encrypted uint256
805
812
  /// @param a The encrypted uint256
806
813
  function reveal(euint256 a) internal {
@@ -819,6 +826,12 @@ library e {
819
826
  inco.reveal(eaddress.unwrap(a));
820
827
  }
821
828
 
829
+ /// @notice Reveals an elist (makes all elements publicly readable without wallet authentication)
830
+ /// @param a The elist
831
+ function reveal(elist a) internal {
832
+ inco.reveal(elist.unwrap(a));
833
+ }
834
+
822
835
  /// @notice Verifies a decryption attestation for a euint256
823
836
  /// @param handle The encrypted handle
824
837
  /// @param value The claimed decrypted value
@@ -857,6 +870,12 @@ library e {
857
870
  allow(a, address(this));
858
871
  }
859
872
 
873
+ /// @notice Allows this contract to access an elist
874
+ /// @param a The elist
875
+ function allowThis(elist a) internal {
876
+ allow(a, address(this));
877
+ }
878
+
860
879
  /// @notice Checks if a user is allowed to access an encrypted uint256
861
880
  /// @param user The address to check
862
881
  /// @param a The encrypted uint256
@@ -801,6 +801,13 @@ library e {
801
801
  inco.allow(eaddress.unwrap(a), to);
802
802
  }
803
803
 
804
+ /// @notice Allows an address to access an elist
805
+ /// @param a The elist
806
+ /// @param to The address to allow
807
+ function allow(elist a, address to) internal {
808
+ inco.allow(elist.unwrap(a), to);
809
+ }
810
+
804
811
  /// @notice Reveals an encrypted uint256
805
812
  /// @param a The encrypted uint256
806
813
  function reveal(euint256 a) internal {
@@ -819,6 +826,12 @@ library e {
819
826
  inco.reveal(eaddress.unwrap(a));
820
827
  }
821
828
 
829
+ /// @notice Reveals an elist (makes all elements publicly readable without wallet authentication)
830
+ /// @param a The elist
831
+ function reveal(elist a) internal {
832
+ inco.reveal(elist.unwrap(a));
833
+ }
834
+
822
835
  /// @notice Verifies a decryption attestation for a euint256
823
836
  /// @param handle The encrypted handle
824
837
  /// @param value The claimed decrypted value
@@ -857,6 +870,12 @@ library e {
857
870
  allow(a, address(this));
858
871
  }
859
872
 
873
+ /// @notice Allows this contract to access an elist
874
+ /// @param a The elist
875
+ function allowThis(elist a) internal {
876
+ allow(a, address(this));
877
+ }
878
+
860
879
  /// @notice Checks if a user is allowed to access an encrypted uint256
861
880
  /// @param user The address to check
862
881
  /// @param a The encrypted uint256
@@ -801,6 +801,13 @@ library e {
801
801
  inco.allow(eaddress.unwrap(a), to);
802
802
  }
803
803
 
804
+ /// @notice Allows an address to access an elist
805
+ /// @param a The elist
806
+ /// @param to The address to allow
807
+ function allow(elist a, address to) internal {
808
+ inco.allow(elist.unwrap(a), to);
809
+ }
810
+
804
811
  /// @notice Reveals an encrypted uint256
805
812
  /// @param a The encrypted uint256
806
813
  function reveal(euint256 a) internal {
@@ -819,6 +826,12 @@ library e {
819
826
  inco.reveal(eaddress.unwrap(a));
820
827
  }
821
828
 
829
+ /// @notice Reveals an elist (makes all elements publicly readable without wallet authentication)
830
+ /// @param a The elist
831
+ function reveal(elist a) internal {
832
+ inco.reveal(elist.unwrap(a));
833
+ }
834
+
822
835
  /// @notice Verifies a decryption attestation for a euint256
823
836
  /// @param handle The encrypted handle
824
837
  /// @param value The claimed decrypted value
@@ -857,6 +870,12 @@ library e {
857
870
  allow(a, address(this));
858
871
  }
859
872
 
873
+ /// @notice Allows this contract to access an elist
874
+ /// @param a The elist
875
+ function allowThis(elist a) internal {
876
+ allow(a, address(this));
877
+ }
878
+
860
879
  /// @notice Checks if a user is allowed to access an encrypted uint256
861
880
  /// @param user The address to check
862
881
  /// @param a The encrypted uint256