> 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/apps/wrappers.md).

# Wrappers

A wrapper holds a public asset and issues a confidential balance against it. The public asset sits in the wrapper contract. The claim on it is an `euint64`.

## Shield

The user deposits a public amount. The wrapper escrows that amount and credits an encrypted balance.

```solidity
function shield(externalEuint64 encryptedAmount, bytes calldata inputProof) external {
    euint64 amount = FHE.fromExternal(encryptedAmount, inputProof);
    balances[msg.sender] = FHE.add(balances[msg.sender], amount);
    FHE.allowThis(balances[msg.sender]);
    FHE.allow(balances[msg.sender], msg.sender);
}
```

The deposit transaction still reveals whatever public token transfer funded the escrow. The confidential balance after the credit does not.

## Move

Transfers between confidential balances use the same `confidentialTransfer` path as the [token](/apps/token.md). The escrowed public asset does not move per transfer.

## Unshield

Unshield burns a sealed balance and sends the public asset out. The moment you unshield, the outgoing public transfer reveals that amount. Only unshield what the user intends to make public.

If the burned amount must match the withdrawal, the contract checks that equality with encrypted comparison and `FHE.select`, then submits a public decrypt of the withdrawal size when the public token transfer needs a clear integer.

## Registry

A registry contract can list wrapper and token addresses so an app can discover them. The registry stores addresses. It does not store balances. Listing a contract does not grant decrypt rights. Each wrapper still writes its own access list.


---

# 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/apps/wrappers.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.
