> For the complete documentation index, see [llms.txt](https://docs.zkid.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zkid.app/readme/architecture.md).

# Architecture

The architecture of zkID-Login essentially consists of two sides (Dapp, zkID Wallet) interacting through *some Message Transport System*.

![Architecture Figure](/files/FLr1vFC0JlpHxtrP7JtL)

## zkID Wallet

Users can experience a brand new way of 'Login Mechanism' via zkID Wallet. This is a product that overturns *Traditional Internet Thinking* by allowing users to login only when their identity meeting some certain KYC Requirements of Service Providers.

Any presentation of data must be authorized by its owner, and the user can select which data to be displayed instead of providing all the details of a credential, which achieves '*prove one's identity with the least data*'.

## Provider

Provider is the RPC-API interface. Developers could invoke the `Provider` to accomplish zkID Login easily. The Provider contains the API below:

* provider.isAuth()
  * To query if the authorization is permitted by the User
* provider.requestAuth()
  * To request for an authorization from the User
* provider.requestAuthAndLogin()
  * To send request for authorization and request DID login
* provider.isLocked()
  * To check whether the wallet is locked
* provider.getCurrentDid()
  * To get the DID information of the current DID
* provider.didLogin(`param`)
  * To help the User to login with DID
* provider.requestCredentialDigest(`params`)
  * To help the User to login with Credential Digest Disclosure
* provider.requestCredentialContent(`params`)
  * To help the User to login with Credential Selective Disclosure and All Credential Content Disclosure
* ...

> For more coding details of the `Provider`, please check [our Github](https://github.com/zCloak-Network/zkid-login/blob/master/packages/providers/src/base/Provider.ts).


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.zkid.app/readme/architecture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
