All functions exposed by the Inco library
ebool
: Encrypted bool
euint256
: Encrypted uint256
euint256
.
All binary operations may use either an euint256
or a regular uint256
as the first or second argument, or two euint256
s
Name | Function | Type |
---|---|---|
Addition | e.add | Binary |
Subtraction | e.sub | Binary |
Multiplication | e.mul | Binary |
Division | e.div | Binary |
Remainder | e.rem | Binary |
BitAnd | e.and | Binary |
BitOr | e.or | Binary |
BitXor | e.xor | Binary |
Shift Right | e.shr | Binary |
Shift Left | e.shl | Binary |
Rotate Right | e.rotr | Binary |
Rotate Left | e.rotl | Binary |
Name | Function | Type | Returns |
---|---|---|---|
Equal | e.eq | Binary | ebool |
Not equal | e.ne | Binary | ebool |
Greater than or equal | e.ge | Binary | ebool |
Greater than | e.gt | Binary | ebool |
Less than or equal | e.le | Binary | ebool |
Less than | e.lt | Binary | ebool |
Min | e.min | Binary | euint256 |
Max | e.max | Binary | euint256 |
Not | e.not | Unary | ebool |
e.select(ebool, euint256, euint256) returns(euint256)
: Select between two euint256
s based on an ebool
conditione.select(ebool, ebool, ebool) returns(ebool)
: Select between two ebool
s on the first ebool
conditione.asEuint256(uint256) returns(euint256)
: Convert a uint256
to an euint256
(trivial encrypt)e.asEbool(bool) returns(ebool)
: Convert a bool
to an ebool
(trivial encrypt)e.newEuint256(bytes memory input) returns(euint256)
: Create a new euint256
from a ciphertexte.newEbool(bytes memory input) returns(ebool)
: Create a new ebool
from a ciphertexte.allow(address)
: Allow a user to access the value permanentlye.allowThis()
: Allow the current contract to access the value permanentlye.isAllowed(address, e-value) returns(bool)
: Check if a user is allowed to access the value (transient or permanent)e.requestDecryption(euint256 value, bytes4 callbackSelector, bytes memory callbackData) returns (uint256 requestId)
: Request decryption of an euint256
e.requestDecryption(ebool value, bytes4 callbackSelector, bytes memory callbackData) returns (uint256 requestId)
: Request decryption of an ebool