# Architecture

Wepin is composed of the following entities.

<figure><img src="/files/5Erw8n9gwf9KsyKHFB8X" alt=""><figcaption></figcaption></figure>

* Cloud: Wepin is a cloud-based wallet service offered in the form of SaaS (Software as a Service). It utilizes a Key Management System (KMS) to enable users to encrypt their private keys securely and a Customer Identity Access Manager (CIAM) as a means to verify credentials for stored key data.
* Authentication Provider&#x73;**:** Authentication providers support users in creating and controlling their wallets using information from their existing systems for signing up and logging in.
* Widge&#x74;**:** The widget is an application built into apps to easily utilize Wepin wallet functionalities. By installing the Wepin SDK, users can easily access wallet functions within the app, and the app can easily load and interact with the user's address as needed.
* Wepin Serve&#x72;**:** The Wepin server is the backend system that contains the core functionalities of the service responsible for all processing interactions with the wallet and blockchain. It connects to blockchain nodes to broadcast transactions and read holding assets and is responsible for generating and signing keys upon user request. Computations and Operations related to the private key, such as key generation and signing, are executed in a Trusted Execution Environment (TEE), ensuring that the Wepin server does not have access to users' private keys.

Check the flow for operations using private keys in Wepin through the link below.

<table data-view="cards"><thead><tr><th align="center"></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center"><strong>Key Generation</strong></td><td><a href="/files/0yPDaKMdEIbF24CIVAzM">/files/0yPDaKMdEIbF24CIVAzM</a></td><td><a href="/pages/TrPxOmHEYHyCMeX0qPkH">/pages/TrPxOmHEYHyCMeX0qPkH</a></td></tr><tr><td align="center"><strong>Signing</strong></td><td><a href="/files/dMHFlTbw32IoAQZ2OCh8">/files/dMHFlTbw32IoAQZ2OCh8</a></td><td><a href="/pages/tCtyHlP5mYl3CvZ6ijUt">/pages/tCtyHlP5mYl3CvZ6ijUt</a></td></tr><tr><td align="center"><strong>Key Backup</strong></td><td><a href="/files/ux6xLfOfdXY0KHly1yWQ">/files/ux6xLfOfdXY0KHly1yWQ</a></td><td><a href="/pages/ibo4ZbsfJSJ5HriVftas">/pages/ibo4ZbsfJSJ5HriVftas</a></td></tr></tbody></table>


---

# 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.wepin.io/en/wepin/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.
