> For the complete documentation index, see [llms.txt](https://geniusterminal.gitbook.io/genius-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://geniusterminal.gitbook.io/genius-docs/lit-protocol.md).

# Lit Protocol

## What is Lit Protocol?

To fully understand how Genius, a strong understand of Lit Protocol is essential. Below are the following pertinent terms and concepts as they apply to Genius with relevant Lit Documentation attached.

Lit Protocol is a signing and encryption network governed by authentication and authorization policies. This encryption network uses an EVM based L2 as it’s data and confirmation layer. For clarity the Lit Signing Network will be referred to as LIT\_NETWORK and the Lit EVM will be referred to as LIT\_EVM

### Programmable Key Pair (PKP)

The PKP is the core primitive of the Lit Protocol. It is an NFT minted on the LIT\_EVM that has a variety of properties, the most salient including

1. PublicKey - a unique hex string that translates into a cosmos and bitcoin address
2. ethAddress
3. NFT tokenId
4. Solana address (coming soon)
5. supportedAuthMethods

When Genius creates a cloud wallet for a user, we are minting a PKP for the user tied to their chosen auth method. The ethAddress, bitcoin address, cosmos address, and Solana address private keys are shared across LIT\_NETWORK nodes. Post this, the LIT\_NETWORK can conditionally sign, and send transaction on behalf of PKP/address if authorization/authentication conditions are satisfied.

\[<https://developer.litprotocol.com/v3/concepts/pkps-as-wallet>\\

\
<https://developer.litprotocol.com/v3/sdk/wallets/minting>]\(<https://developer.litprotocol.com/v3/concepts/pkps-as-wallet&#xD;&#xA;&#xD;&#xA;https://developer.litprotocol.com/v3/sdk/wallets/minting>)

### Auth Methods in Lit

Lit Supports multiple auth methods to create a PKP with and for authentication/authorization. This generally includes any OAuth based scheme as well as text message, email and a few others. The most important concept to note is that a Lit Action can be added an auth method to a PKP —> i.e it’s IPFS hash is added an auth method.

<https://developer.litprotocol.com/v3/sdk/wallets/auth-methods>

## Lit Actions

Lit Actions are pieces of javascript code that are stored on IPFS that the LIT\_NETWORK can run. You can think of Lit Actions as policies/javascript smart contracts that can be attached to PKPs. If the logic in the Lit Action passes, and the Lit Action is attached to the PKP with signing capabilities, then the Lit Action can sign and send transactions on behalf of that cloud wallet.

An important piece to note is that if a Lit Action is approved as an auth method/has signing capabilities on a PKP, it has full access to that PKP and anyone can initiate the Lit Action to run. Thus the burden is on the code/logic within the Lit Action to make sure it can only sign when the user desires it to sign.

Most of the Lit Actions within the Genius framework have the following general structure

1. Decrypt some data that the user encrypted previously for authentication
2. Check some external state based on decrypted user intstructions
3. If state passes logic conditions sign or send transaction

\[<https://developer.litprotocol.com/v3/sdk/serverless-signing/overview>\\

\
<https://developer.litprotocol.com/v3/sdk/serverless-signing/conditional-signing>]\(<https://developer.litprotocol.com/v3/sdk/serverless-signing/overview&#xD;&#xA;&#xD;&#xA;https://developer.litprotocol.com/v3/sdk/serverless-signing/conditional-signing>)

## Difference between Authorization & Authentication

This is pertinent for our MFA architecture. On wallet creation, the initial chosen auth method has authorization to sign anything. When MFA is implemented only the MFA Lit Action and Wallet Based Auth can sign transactions

<https://developer.litprotocol.com/v3/sdk/wallets/auth-methods/custom-auth#how-does-authentication-differ-from-authorization>

Scope 1 - Sign Anything == Authorization + Authentication

Scope 2 - Only sign messages == Authentication only

<https://developer.litprotocol.com/v3/sdk/wallets/minting-methods/mint-via-contracts#minting-a-pkp-and-adding-permitted-scopes>

## Capacity Credits

Capacity Credits/Rate Limit NFTs are how compute is purchased on the Lit Network. Capacity credits will be subsidized through the Genius Protocol. Everytime a user creates a session, they will be minted a capacity credit NFT for the duration of that session

<https://developer.litprotocol.com/v3/sdk/capacity-credits>

## Lit Security Considerations

\[<https://developer.litprotocol.com/v3/sdk/authentication/security>\\

\
<https://developer.litprotocol.com/v3/support/faq#security--trust-implications>]\(<https://developer.litprotocol.com/v3/sdk/authentication/security&#xD;&#xA;&#xD;&#xA;https://developer.litprotocol.com/v3/support/faq#security--trust-implications>)


---

# 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://geniusterminal.gitbook.io/genius-docs/lit-protocol.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.
