> For the complete documentation index, see [llms.txt](https://shinkalabs.gitbook.io/hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shinkalabs.gitbook.io/hub/andromeda/how-it-works.md).

# How it works

Andromeda sits between your application and two cryptographic networks on Solana. You only ever talk to the Andromeda API.

```
   Your application
   REST  /  MCP  /  Webhooks
          |
          |  X-Api-Key
          v
   +-------------------------------+
   |        Andromeda API          |
   |  auth, quotas, idempotency,   |
   |  MCP server, webhooks, audit, |
   |  auto-batching, gas sponsor   |
   +---------------+---------------+
                   |
        +----------+-----------+
        v                      v
   MPC engine             FHE engine
   (Ika 2PC-MPC)          (Encrypt)
        |                      |
        v                      v
   Ika validator          Encrypt network
     network              (Solana devnet)

   Solana devnet
   8 Quasar policy programs hold the dWallet authority
   and validate every signature via runtime precompiles
```

## The pieces

* **The Andromeda API.** A single HTTPS surface. It authenticates you with an API key, enforces quotas, runs the MCP server, signs Solana transactions as a gas sponsor where needed, fans out webhooks, records the audit log, and forwards your request to whichever engine handles it. Public endpoints (`/capabilities`, `/openapi.json`, `/v1/pricing`) need no key.
* **The MPC engine (Ika).** Performs threshold key generation and signing. A dWallet's key material is split; signing is a protocol, not a stored secret. The engine returns raw signatures. See [dWallets & 2PC-MPC](/hub/andromeda/concepts/dwallets.md).
* **The FHE engine (Encrypt).** Evaluates computations over encrypted data. Used directly for confidential primitives and as the gate in [Confidential workflows](/hub/andromeda/guides/confidential-workflows.md). See [Confidential computing (FHE)](/hub/andromeda/concepts/fhe.md).
* **The on-chain programs.** Eight Quasar programs on Solana devnet. They hold the signing authority of a dWallet and enforce policy. Every approval they emit is validated by a Solana runtime precompile, so the API cannot forge it. See [On-chain programs](/hub/andromeda/on-chain-programs/overview.md).

## The request shape

Most write operations follow a two-step pattern so a private key never leaves the client:

1. You call a `.../prepare` (or `.../challenge`) endpoint. Andromeda returns either an unsigned transaction (base64) or a 32-byte challenge.
2. You sign locally, then call `.../submit` with the signature. Andromeda assembles the final transaction (often paying the gas itself) and broadcasts it.

Read operations are plain `GET`s. See [Custody-free model](/hub/andromeda/concepts/custody-free.md) and [Wallet-agnostic & challenge auth](/hub/andromeda/concepts/wallet-agnostic.md) for why it works this way.

## What runs where

You never address the engines directly. They sit on a private network behind the Andromeda API. From your side there is one base URL, one auth header, and one consistent set of conventions documented in the [API reference](/hub/andromeda/api-reference/overview.md).


---

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

```
GET https://shinkalabs.gitbook.io/hub/andromeda/how-it-works.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.
