Skip to content

Commit

Permalink
style updates
Browse files Browse the repository at this point in the history
  • Loading branch information
deptofzane committed Mar 17, 2022
1 parent 659aaa8 commit 166ad23
Show file tree
Hide file tree
Showing 23 changed files with 169 additions and 96 deletions.
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/docs.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/AccessControlConditions/booleanLogic.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 4

# Boolean Logic

The Lit protocol supports boolean logic when checking conditions. Use an object with the "operator" property set to "and" or "or" to combine conditions.
Lit Protocol supports boolean logic when checking conditions. Use an object with the "operator" property set to "and" or "or" to combine conditions.

For example, if you wanted to check that the user is a member of a DAO or that they hold more than 0.00001 ETH, you could use the following:

Expand Down
4 changes: 2 additions & 2 deletions docs/AccessControlConditions/updateableConditions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 5

# Updateable Conditions

The Lit Protocol supports updating conditions by the creator of those conditions. This works for static and dynamic content.
Lit Protocol supports updating conditions by the creator of those conditions. This works for static and dynamic content.

To create an updateable condition, pass `permanant: false` when storing conditions in Lit:

Expand All @@ -29,7 +29,7 @@ The main idea here is that you just store the new condition in the same way you

### Static Content

To update the conditions of some static content, simply pass in the `encryptedSymmetricKey` instead of a `symmetricKey`. The `encryptedSymmetricKey` is hashed to create the "primary key" in the Lit protocol DB that represents the condition, so therefore you must pass it so that the Protocol knows which condition to update.
To update the conditions of some static content, simply pass in the `encryptedSymmetricKey` instead of a `symmetricKey`. The `encryptedSymmetricKey` is hashed to create the "primary key" in Lit Protocol DB that represents the condition, so therefore you must pass it so that the Protocol knows which condition to update.

For example:

Expand Down
7 changes: 0 additions & 7 deletions docs/SDK/apiDocs.md

This file was deleted.

6 changes: 3 additions & 3 deletions docs/SDK/dynamicContent.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 5
---

# Dynamic Content (Content loaded from a server)
# Dynamic Content (content loaded from a server)

## Verifying a JWT that was signed by the Lit network

Expand Down Expand Up @@ -33,7 +33,7 @@ Use dynamic content provisoning to put some dynamic content behind an on chain c

The "saveSigningCondition" function of the LitNodeClient is what you want to use for this, which is documented here: https://lit-protocol.github.io/lit-js-sdk/api_docs_html/index.html#litnodeclientsavesigningcondition

Note that you need an active connection to the Lit Protocol nodes to use this function. This connection can be made with the following code:
Note that you need an active connection to Lit Protocol nodes to use this function. This connection can be made with the following code:

```
const litNodeClient = new LitJsSdk.LitNodeClient()
Expand Down Expand Up @@ -93,7 +93,7 @@ Obtaining a signed JWT from the Lit network can be done via the getSignedToken f

**Important** You must call `litNodeClient.saveSigningCondition` to save a signing condition before you can request a signature and access a resource via a JWT. See the docs above for "Dynamic Content - Provisoning access to a resource" to learn how to do this.

Note that you need an active connection to the Lit Protocol nodes to use this function. This connection can be made with the following code:
Note that you need an active connection to Lit Protocol nodes to use this function. This connection can be made with the following code:

```
const litNodeClient = new LitJsSdk.LitNodeClient()
Expand Down
4 changes: 2 additions & 2 deletions docs/SDK/staticContent.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const accessControlConditions = [
]
```

Now, you can save the encryption key with the access control condition, which tells the Lit protocol that users that meet this access control condition should be able to decrypt.
Now, you can save the encryption key with the access control condition, which tells Lit Protocol that users that meet this access control condition should be able to decrypt.

```
const encryptedSymmetricKey = await window.litNodeClient.saveEncryptionKey({
Expand All @@ -63,7 +63,7 @@ If you followed the instructions above for "Storing any static content and manua

Make sure you have `accessControlConditions`, `encryptedSymmetricKey`, and the `encryptedString` variables you created when you stored the content.

There are 2 steps - you must obtain the decrypted symmetric key from the Lit protocol, and then you must decrypt the string using it.
There are 2 steps - you must obtain the decrypted symmetric key from Lit Protocol, and then you must decrypt the string using it.

First, obtain an authSig from the user. This will ask their metamask to sign a message proving they own their crypto address. Pass the chain you're using.

Expand Down
2 changes: 1 addition & 1 deletion docs/SDK/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 11
---

# Tests
# Testing

Currently we have manual tests that you can run in the browser in manual_tests.html. To run these, set up a HTTP server in the build folder. We use python for this with the built in SimpleHTTPServer module by running "python2 -m SimpleHTTPServer" and then going to "http://localhost:8000/manual_tests.html" in a browser.

Expand Down
4 changes: 2 additions & 2 deletions docs/ceramicIntegration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 9
---

# Ceramic Integration NPM module
# Ceramic Integration

<iframe
width="560"
Expand All @@ -16,7 +16,7 @@ sidebar_position: 9

## Why?

Ceramic is amazing, but doesn't have read permissions on data. Everything is public. With the Lit Protocol, you can specify who is able to decrypt and therefore read data based on on-chain conditions. This module allows you to integrate Ceramic with Lit.
Ceramic is amazing, but doesn't have read permissions on data. Everything is public. With Lit Protocol, you can specify who is able to decrypt and therefore read data based on on-chain conditions. This module allows you to integrate Ceramic with Lit.

For example, you could use this as your DB for a website for a DAO you're a apart of, and specify that only DAO members can decrypt the data stored in Ceramic.

Expand Down
32 changes: 31 additions & 1 deletion docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,41 @@ sidebar_position: 8

## JS SDK Examples

### Gating dynamic and interactive content inside a React app

This example code shows how to lock an entire React app behind a Lit JWT.

https://github.com/LIT-Protocol/lit-locked-react-app-minimal-example

### Minimal JWT verification example to gate dynamic content on a server

This repo is a minimal example to:

- Mint an NFT (client side)
- Provision access to a resource (a web url) behind ownership of that NFT (client side)
- Request a signed JWT from the Lit network to access that resource (client side)
- Verify the signature on that JWT (server side)

https://github.com/LIT-Protocol/lit-minimal-jwt-example

### Minting HTML NFTs

An example that showcases the ability to mint an HTML NFT with locked content that only the NFT owner can decrypt or see.

https://github.com/LIT-Protocol/MintLIT

### Using the Lit JS SDK entirely serverside

This shows how to use the Lit JS SDK to provision access to a resource, and then request access to it, entirely on the server side.

https://github.com/LIT-Protocol/lit-only-serverside-sdk-example


To see examples that utilize the Lit JS SDK, please visit the [JS SDK examples page](/docs/SDK/examples).

## Other Examples

- Use a Cloudflare worker to protect any URL with the Lit Protocol: https://github.com/LIT-Protocol/cloudflare-litgate-js
- Use a Cloudflare worker to protect any URL with Lit Protocol: https://github.com/LIT-Protocol/cloudflare-litgate-js

- Use Lit Protocol to gate a video or livestream with cloudflare: https://github.com/LIT-Protocol/lit-cloudflare-frontend and a corresponding tool to deploy a working cloudflare worker to your own cloudflare account: https://litgateway.com/apps/cloudflare

Expand Down
6 changes: 3 additions & 3 deletions docs/howItWorks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
sidebar_position: 3
---

# How does the Lit Protocol work?
# How does Lit Protocol work?

## Static Content - Encrypting / locking

This SDK will encrypt your content, and upload your conditions for decryption to each Lit Protocol node. You should then store the encrypted content in a place of your choosing (IPFS, Arweave, or even somewhere centralized). When someone wants to access the content, the SDK will request a message signature from the user's wallet that proves that they own the NFT associated with the content to each Lit Protocol node. The Lit Protocol nodes will then send down the decryption shares and the SDK will combine them and decrypt the content.
This SDK will encrypt your content, and upload your conditions for decryption to each Lit Protocol node. You should then store the encrypted content in a place of your choosing (IPFS, Arweave, or even somewhere centralized). When someone wants to access the content, the SDK will request a message signature from the user's wallet that proves that they own the NFT associated with the content to each Lit Protocol node. Lit Protocol nodes will then send down the decryption shares and the SDK will combine them and decrypt the content.

## Dynamic Content - Authorizing access to a resource via JWT

This SDK has the ability to create the authorization conditions for a given resource and store them with the Lit Protocol nodes. When someone requests a network signature because they are trying to access a resource (typically a server that serves some dynamic content), the SDK will request a message signature from the user's wallet that proves that they own the NFT associated with the resource to each Lit Protocol node. The Lit Protocol nodes will each verify that the user owns the NFT, sign the JWT to create a signature share, then send down that signature share. The SDK will combine the signature shares to obtain a signed JWT which can be presented to the resource to authenticate and authorize the user.
This SDK has the ability to create the authorization conditions for a given resource and store them with Lit Protocol nodes. When someone requests a network signature because they are trying to access a resource (typically a server that serves some dynamic content), the SDK will request a message signature from the user's wallet that proves that they own the NFT associated with the resource to each Lit Protocol node. Lit Protocol nodes will each verify that the user owns the NFT, sign the JWT to create a signature share, then send down that signature share. The SDK will combine the signature shares to obtain a signed JWT which can be presented to the resource to authenticate and authorize the user.
4 changes: 2 additions & 2 deletions docs/intro.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
sidebar_position: 1
slug: /
---

# Intro - Start Here
# Introduction

Lit Protocol is an open source, decentralized utility that uses encryption to provide blockchain users access to digital and real world experiences.

Expand Down
2 changes: 1 addition & 1 deletion docs/oauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 7

# Oauth Integrations

We've created oauth integrations with Zoom and Google Drive to provide the ability to protect Zoom meetings or Google Drive files using the Lit Protocol.
We've created oauth integrations with Zoom and Google Drive to provide the ability to protect Zoom meetings or Google Drive files using Lit Protocol.

Check out our code to see how it works

Expand Down
8 changes: 4 additions & 4 deletions docs/whatIsLit.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
sidebar_position: 2
---

# What is the Lit Protocol?
# What is Lit Protocol?

The Lit Protocol is a decentralized access control protocol running on top of Ethereum and other EVM chains. With LIT, you can harness on-chain access control conditions to do 4 main things:
Lit Protocol is a decentralized access control protocol running on top of Ethereum and other EVM chains. With LIT, you can harness on-chain access control conditions to do 4 main things:

- Encrypt and lock static content (images, videos, music, etc) behind an on chain condition (for example, posession of an NFT)
- Decrypt static content that was locked behind an on chain condition
- Authorize network signatures that provide access to dynamic content (for example, a server or network resource) behind an on chain condition
- Request a network signed JWT that provisions access and authorization to dynamic content behind an on chain condition.

With this functionality, the Lit protocol enables the creation of locked NFTs that can only be unlocked by owners of that NFT. It also enables provisioning access to a given server or network resource only to NFT owners. Rather than a simple JPEG, Lit enabled NFTs can be HTML/JS/CSS web pages that can be interactive and dynamic.
With this functionality, Lit Protocol enables the creation of locked NFTs that can only be unlocked by owners of that NFT. It also enables provisioning access to a given server or network resource only to NFT owners. Rather than a simple JPEG, Lit enabled NFTs can be HTML/JS/CSS web pages that can be interactive and dynamic.

## Features

Expand All @@ -24,4 +24,4 @@ With this functionality, the Lit protocol enables the creation of locked NFTs th

## State of the network today - AlphaNet

Right now, the Lit Protocol is in an alpha state (the "AlphaNet") and the creators are running all the nodes. It is unaudited and the nodes are not distributed yet. There are various security improvements to be made, and cryptoeconomic guarantees as a result of staking are not in place yet. Data is persistent and we plan to support this network in perpetuity. We are in the active process of decentralizing and working towards a Mainnet release.
Right now, Lit Protocol is in an alpha state (the "AlphaNet") and the creators are running all the nodes. It is unaudited and the nodes are not distributed yet. There are various security improvements to be made, and cryptoeconomic guarantees as a result of staking are not in place yet. Data is persistent and we plan to support this network in perpetuity. We are in the active process of decentralizing and working towards a Mainnet release.
54 changes: 30 additions & 24 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const config = {
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: '/',
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
editUrl: "https://github.com/LIT-Protocol/docs/edit/main/website/",
Expand Down Expand Up @@ -54,41 +55,27 @@ const config = {
},
items: [
{
type: "doc",
docId: "intro",
position: "left",
label: "Get Started",
},
{
type: "doc",
docId: "SDK/intro",
position: "left",
label: "JS SDK",
href: "https://lit-protocol.github.io/lit-js-sdk/api_docs_html/",
label: "API",
position: "right",
},
// {to: '/blog', label: 'Blog', position: 'left'},
{
href: "https://github.com/LIT-Protocol/lit-js-sdk",
label: "GitHub",
position: "right",
},
// {
// type: "doc",
// docId: "SDK/intro",
// position: "left",
// label: "JS SDK",
// },
// {to: '/blog', label: 'Blog', position: 'left'},
],
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "Get Started",
to: "/docs/intro",
},
{
label: "JS SDK",
to: "/docs/SDK/intro",
},
],
},
{
title: "Community",
items: [
Expand Down Expand Up @@ -119,12 +106,31 @@ const config = {
},
],
},
{
title: "Contact",
items: [
{
label: "Support",
to: "/support",
},
// {
// label: "JS SDK",
// to: "/docs/SDK/intro",
// },
],
},
],
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
algolia: {
appId: 'YWUCE5ITYO',
apiKey: '1fe09d38a47e88b82145913baa9aaceb',
indexName: 'litDeveloperDocs',

}
}),
// plugins: [
// [ // This plugin does NOT work. I am using netlify redirects instead.
Expand Down
2 changes: 1 addition & 1 deletion src/components/HomepageFeatures.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const FeatureList = [
Svg: require("../../static/img/undraw_travel_together_re_kjf2.svg").default,
description: (
<>
The Lit protocol is the only decentralized access control network. Other
Lit Protocol is the only decentralized access control network. Other
solutions involve a centralized provider to gate access to locked
content.
</>
Expand Down
13 changes: 13 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ html[data-theme="dark"] {
--ifm-background-color: #190741;
}

.navbar {
border-bottom: 1px solid rgba(204, 204, 204, 0.5)
;
}

/*.menu {*/
/* border-right: 1px solid #222;*/
/*}*/

.docusaurus-highlight-code-line {
background-color: rgba(0, 0, 0, 0.1);
display: block;
Expand All @@ -45,3 +54,7 @@ html[data-theme="dark"] .docusaurus-highlight-code-line {
.markdown > h2 {
--ifm-h2-font-size: 1.5rem;
}

.theme-edit-this-page {
display: none;
}
Loading

0 comments on commit 166ad23

Please sign in to comment.