Types
The Inco Lightning SDK provides encrypted types that serve as handles to encrypted values stored off-chain by the covalidator network.Euint128
Handle to an encrypted unsigned 128-bit integer.Euint128 type represents a reference to an encrypted value, not the encrypted data itself. The actual encrypted data is stored and processed by the covalidator network.
Ebool
Handle to an encrypted boolean value.EList
Handle to an encrypted list ofEuint128 or Ebool values.
EList bundles the 128-bit list handle together with the metadata the covalidator needs — the element type (list_type) and the number of elements (length), since the u128 handle is not self-describing. See EList for the full list of operations.
EListType
The type of each element contained in anEList. This is specified ahead of time and can not be changed.
Storing Handles
Handles are 16 bytes and can be stored directly in your account structs:Handles are deterministically derived from operations, so the same operation with the same inputs always produces the same handle.
Input Functions
Create encrypted values from client-encrypted ciphertext or plaintext.Example: Creating encrypted values
The last parameter in input and operation calls identifies whether the left-hand side operand is ciphertext (
0) or plaintext (1). Always pass 0 when working with encrypted handles.