Complete API reference for the Inco Lightning SDK.
Types
Encrypted data types and input functions
Operations
Arithmetic, comparison, bitwise, and control flow
Account Structs
CPI account structures for operations
Quick Reference
Types
Type
Description
Euint128
Handle to encrypted unsigned 128-bit integer
Ebool
Handle to encrypted boolean
Input Functions
Function
Description
new_euint128
Create encrypted u128 from ciphertext
new_ebool
Create encrypted bool from ciphertext
as_euint128
Convert plaintext u128 to encrypted handle
as_ebool
Convert plaintext bool to encrypted handle
Operations
Function
Description
e_add
Addition
e_sub
Subtraction
e_mul
Multiplication
e_rem
Remainder
e_ge, e_gt, e_le, e_lt, e_eq
Comparisons
e_and, e_or, e_not, e_shl, e_shr
Bitwise
e_rand
Random number generation
e_select
Conditional selection
Access Control
Function
Description
allow
Grant/revoke decryption access
is_allowed
Check decryption permission
is_validsignature
Verify attestation signatures
Every operation that produces a new handle requires calling allow() to grant decryption access. Use the remaining_accounts pattern to pass allowance PDAs and grant access in the same transaction. See Access Control for simulation patterns.