Operations
Inco Lightning provides arithmetic, comparison, and bitwise operations on encrypted values.Arithmetic Operations
All arithmetic operations return anEuint128.
Example: Encrypted Addition
Comparison Operations
Comparison operations return anEbool.
Bitwise Operations
CPI Context Pattern
All operations require a CPI context with the Inco Lightning program:The last parameter in operation calls identifies whether the left-hand side operand is ciphertext (
0) or plaintext (1). Always pass 0 when working with encrypted handles.