> 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/start/quick-start.md).

# Quick start

This walkthrough turns a public counter into a sealed one. The count is an `euint32`. The chain stores a handle. The coprocessor adds the encrypted step.

## 1. Start from a public counter

```solidity
contract Counter {
    uint32 public count;

    function increment(uint32 value) external {
        count += value;
    }
}
```

Anyone can read `count`. That is the leak.

## 2. Use the Arcan library

```solidity
import { FHE, euint32, externalEuint32 } from "@arcan/solidity/lib/FHE.sol";
import { ArcanConfig } from "@arcan/solidity/config/ArcanConfig.sol";

contract SealedCounter is ArcanConfig {
    euint32 internal count;

    function increment(externalEuint32 encryptedValue, bytes calldata inputProof) external {
        euint32 value = FHE.fromExternal(encryptedValue, inputProof);
        count = FHE.add(count, value);
        FHE.allowThis(count);
        FHE.allow(count, msg.sender);
    }

    function getCount() external view returns (euint32) {
        return count;
    }
}
```

`ArcanConfig` wires the contract to the Arcan host contracts on Robinhood: the access list and the executor that records FHE operations.

## 3. What changed

* `count` is no longer a public `uint32`.
* The user encrypts `value` in the app and sends the ciphertext with an input proof.
* `FHE.fromExternal` checks the proof and returns a handle.
* `FHE.add` records an addition. Robinhood does not add the plaintext. The coprocessor does.
* `FHE.allowThis` lets this contract keep using the new handle.
* `FHE.allow` lets the caller decrypt their own resulting count.

## 4. Call it from the app

The [Arcan SDK](/sdk/encrypt.md) encrypts the step on the device and submits `increment`. A later [user decrypt](/sdk/decrypt.md) opens the handle only if the access list includes that account.

`getCount` returns a handle. It is not a `view` that reveals the number.


---

# 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/start/quick-start.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.
