@inco/lightning 0.10.0-devnet-3 → 0.11.0-testnet-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 (38) hide show
  1. package/manifest.yaml +23 -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 +19 -0
  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/libs/incoLightning_alphanet_v0_297966649.sol +19 -0
  13. package/src/libs/incoLightning_alphanet_v1_725458969.sol +19 -0
  14. package/src/libs/incoLightning_alphanet_v2_976644394.sol +19 -0
  15. package/src/libs/incoLightning_demonet_v0_863421733.sol +19 -0
  16. package/src/libs/incoLightning_demonet_v2_467437523.sol +19 -0
  17. package/src/libs/incoLightning_devnet_v0_340846814.sol +19 -0
  18. package/src/libs/incoLightning_devnet_v10_266391127.sol +19 -0
  19. package/src/libs/incoLightning_devnet_v1_904635675.sol +19 -0
  20. package/src/libs/incoLightning_devnet_v2_295237520.sol +19 -0
  21. package/src/libs/incoLightning_devnet_v3_976859633.sol +19 -0
  22. package/src/libs/incoLightning_devnet_v4_409204766.sol +19 -0
  23. package/src/libs/incoLightning_devnet_v5_203964628.sol +19 -0
  24. package/src/libs/incoLightning_devnet_v6_281949651.sol +19 -0
  25. package/src/libs/incoLightning_devnet_v7_24560427.sol +19 -0
  26. package/src/libs/incoLightning_devnet_v8_985328058.sol +19 -0
  27. package/src/libs/incoLightning_devnet_v9_269218568.sol +19 -0
  28. package/src/libs/incoLightning_testnet_v0_183408998.sol +19 -0
  29. package/src/libs/incoLightning_testnet_v11_340321378.sol +1242 -0
  30. package/src/libs/incoLightning_testnet_v2_889158349.sol +19 -0
  31. package/src/lightning-parts/EncryptedOperations.sol +2 -9
  32. package/src/lightning-parts/primitives/EListHandleMetadata.sol +6 -6
  33. package/src/lightning-parts/primitives/HandleGeneration.sol +3 -10
  34. package/src/lightning-parts/primitives/HandleMetadata.sol +10 -10
  35. package/src/lightning-parts/test/HandleMetadata.t.sol +22 -40
  36. package/src/test/IncoTest.sol +2 -3
  37. package/src/test/TestLib.t.sol +65 -0
  38. package/src/version/IncoLightningConfig.sol +1 -1
@@ -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
@@ -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
@@ -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