# Architecture

The iuth architecture is designed as a hybrid control system. It bridges the high-speed decision-making of local robotics (Edge) with the immutable security of the blockchain (On-chain) and the flexibility of human oversight (User App).

Unlike traditional crypto wallets where the device *is* the signer, iuth separates the Initiator (Robot) from the Approver (Human).

***

<figure><img src="/files/hsPb44LDRcvDkvKieGfG" alt=""><figcaption></figcaption></figure>

#### The High-Level Data Flow

The following diagram illustrates the lifecycle of a typical interaction within the iuth ecosystem:

The ecosystem consists of four distinct layers:

**1. The Managed Device (The Initiator)**

* Role: The physical robot or AI agent operating in the real world.
* Tech Stack: `iuth-sdk` (Python/C++ for ROS2).
* Key Function:
  * It holds a Session Key (Public Key derived from the owner) for identification.
  * It cannot move funds directly. It can only construct "Transactions" or "Intents" (in the form of Solana Actions) to be signed by the Controller.

**2. The Controller Node (The Authority)**

* Role: The iOS/Android application installed on the owner's device.
* Tech Stack: React Native / Swift, Mobile Secure Element.
* Key Function:
  * Acts as the Primary Signer. It holds the encrypted Master Private Key.
  * Contains the Policy Engine (e.g., "Auto-approve under $5").
  * Receives requests from robots via a secure P2P channel or an on-chain relay.

**3. The Settlement Layer (Solana)**

* Role: The source of truth for ownership and transaction history.
* Tech Stack: Solana Program (Smart Contract), Account Compression (for logs).
* Key Function:
  * Validates that the signer matches the robot's registered owner.
  * Executes logic: transferring SOL/USDC, updating access logs, or triggering Token Extensions hooks.

**4. The Bridge Gateway (Real World Integration)**

* Role: Translates crypto transactions into physical actions.
* Tech Stack: Oracle Nodes, Payment APIs (Stripe/Visa Issuing).
* Key Function:
  * Financial: Listens for on-chain payment events and instantly issues a One-time Virtual Card (MFC) for the robot to use at a legacy terminal.
  * Physical: Interacts with IoT APIs (e.g., smart locks) upon cryptographic proof of authorization.


---

# Agent Instructions: 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 current page URL with the `ask` query parameter:

```
GET https://docs.iuth.it/architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
