The access control logic is fully programmable and onchain. Who has the right to decrypt and see a give ciphertext is visible onchain. To give access to an account (i.e an address) to a ciphertext, you can use theDocumentation Index
Fetch the complete documentation index at: https://docs.inco.org/llms.txt
Use this file to discover all available pages before exploring further.
e.allow function.
This will grant the address permanent access to seeing, publicly decrypting and computing over the ciphertext.
Since handles are immutable, sharing access to a variable to an account only grants access to the current value of the variable.
Whenever the variable is updated, the handle changes and the access to the new handle must be granted again.
For example, ou can share your current balance with an address, but if you update your balance, the address will not be able to see the new value.
e.allowThis(value) is an alias for e.allow(value, address(this)).
A common mistake is to forget to call allowThis on a variable after updating it.
This will result in the contract being unable to compute over the variable in future transactions.
Transient Allowance
e.transientAllow is not yet available in the SDK, but coming very soon.e.add are transiently allowed to be decrypted by the contract who called the operation.
That is why contracts can perform back to back operations using results of previous operations.
But since this allowance is transient, calling e.allowThis is necessary to allow the contract to compute over the result in future transactions.