> For the complete documentation index, see [llms.txt](https://docs.arcan.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arcan.finance/solidity/types.md).

# Encrypted types

Encrypted types are the confidential counterparts of Solidity values. A confidential token balance is an `euint64`. A hidden flag is an `ebool`. A hidden recipient can be an `eaddress`.

## In the contract

| Type                  | Meaning                                               |
| --------------------- | ----------------------------------------------------- |
| `ebool`               | Encrypted boolean                                     |
| `euint8` … `euint256` | Encrypted unsigned integers                           |
| `eaddress`            | Encrypted address                                     |
| `ebytes`              | Encrypted byte array, where the operation supports it |

## From the user

Inputs that were encrypted off-chain use the external form:

| Type                                  | Meaning                  |
| ------------------------------------- | ------------------------ |
| `externalEbool`                       | Encrypted boolean input  |
| `externalEuint8` … `externalEuint256` | Encrypted integer inputs |
| `externalEaddress`                    | Encrypted address input  |

An external value is not usable in `FHE.add` until `FHE.fromExternal` checks the input proof and returns the internal type.

## Lifting a public value

Sometimes a public number has to enter an encrypted expression. `FHE.asEuint64` and `FHE.asEbool` lift it. This is a trivial encryption. The original number is still visible, because it was public. Use it for constants and plaintext arguments, not for hiding a user amount.

```solidity
euint64 unit = FHE.asEuint64(1);
ebool yes = FHE.asEbool(true);
```

## Casting

`FHE.asEuint32` can widen or narrow another encrypted integer. Narrowing drops the high bits inside the ciphertext. Widening pads with encrypted zeros. The width change does not reveal the value.

## Initialization

`FHE.isInitialized` reports whether a handle has been set. An uninitialized integer behaves as an encryption of zero in arithmetic. Initialize balances explicitly before you depend on them.

## Token balances

Use `euint64` for confidential token amounts. That matches the ERC-7984 shape: the call looks like an ERC-20 call, and the amount is a 64-bit ciphertext handle.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.arcan.finance/solidity/types.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
