Skip to content

Commit

Permalink
docs reorg (#92)
Browse files Browse the repository at this point in the history
* docs sidebar reorg

---------

Co-authored-by: debie <[email protected]>
  • Loading branch information
a1ttech and debbly authored Jun 6, 2023
1 parent 49c5336 commit aedfe44
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 42 deletions.
15 changes: 0 additions & 15 deletions docs/LitActions/mintGrantBurn.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 3
---

# PKPs as an MPC Wallet Solution
# MPC Wallet Solution

:::note
**STATE OF THE NETWORK**
Expand All @@ -19,11 +19,11 @@ Need some `LIT` test tokens to mint a PKP? Get some from the [faucet](https://fa

:::

## MPC as a Key Management Solution
## Multi-Party Computation (MPC) as a Key Management Solution

Applied generally, multi-party computation (MPC) allows multiple parties to collectively compute a function over a set of private inputs without ever revealing the inputs themselves. In the context of key management, MPC can be used to generate distributed shares of a public/private key pair (which can be utilized for encryption and signing), without ever exposing the private key in its entirety. This means no one party ever has full control over the underlying key pair, eliminating single points of failure that exist in "centralized" key management ecosystems. An in-depth look at the current state of the MPC wallet space is explored in [this article](https://medium.com/1kxnetwork/wallets-91c7c3457578) published by 1kx.

## PKPs as Distrbuted Custody Wallets
## Programmable Key Pairs as Distributed Custody Wallets

Lit’s [Programmable Key Pairs (PKPs)](/pkp/intro) product can be utilized by app developers to build a white-label MPC wallet solution that delivers a more flexible and seamless onboarding experience to their end users.

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

You can mint an NFT from our PKP contract on Chronicle - Lit's custom EVM rollup testnet - [here](https://explorer.litprotocol.com/mint-pkp). This NFT represents the root ownership of the PKP. The NFT owner can grant other users (via a wallet address) or grant Lit Actions the ability to use the PKP to sign and decrypt data. They also have the ability to assign additional authentication methods, described at the bottom of the page.

You can also use our handy auth helper contract on Polygon Mumbai [here](https://github.com/LIT-Protocol/LitNodeContracts/blob/main/contracts/PKPHelper.sol) and you can find the contract addresses [here](https://explorer.litprotocol.com/contracts)
You can also use our handy auth helper contract on Chronicle [here](https://github.com/LIT-Protocol/LitNodeContracts/blob/main/contracts/PKPHelper.sol) and you can find the contract addresses [here](https://explorer.litprotocol.com/contracts)

## Mint via Social

Expand Down
11 changes: 10 additions & 1 deletion docs/resources/pkpsAndActions.md → docs/pkp/pkpsAndActions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 4
---

# Using PKPs with Lit Actions
Expand All @@ -12,6 +12,15 @@ As a distributed key management network, Lit provides developers with the abilit

A user can [create a new PKP](/pkp/minting) and [grant a Lit Action](/LitActions/mintGrantBurn) the right to sign using it. This means the distributed key has the ability to sign and decrypt arbitrary data based on pre-defined logic and conditions.

### Using Mint/Grant/Burn

Mint/Grant/Burn is an optional pattern that allows you to prove that a PKP was not used to sign anything before it was approved to use a Lit Action.

Suppose you have a Lit Action that will check if a number is prime, and if it is, sign that number. If it is not prime, the Lit Action will abort. If you were able to mint a PKP, assign it to that Lit Action, and then burn the PKP in a single atomic transaction, then it would be provable that the PKP was not used to sign anything before it was approved to use the Lit Action. In this case, you could trust that any numbers signed with that PKP are indeed prime, without needing to check them yourself. This creates a powerful way to prove the output of any JS code by checking that 1) the signature is valid, 2) the lit action code is correct, and 3) that the PKP was minted using this Mint/Grant/Burn pattern.

The function to do this is called Mint/Grant/Burn. You mint the PKP, grant access for a Lit Action to use it, and then burn the PKP in a single transaction. Burning the PKP destroys the ability to grant access for a Lit Action to use it, so you know that no other Lit Action can ever use that PKP.
You can see the definition of a MintGrantBurn fuction in the contract source code [here](https://github.com/LIT-Protocol/LitNodeContracts/blob/main/contracts/PKPNFT.sol#L157)

## Why is this useful?

A programmable distributed key is a primitive with a number of potential use-cases. For example, using a PKP and Lit Actions for [onboarding web2 users](https://spark.litprotocol.com/wallet-abstraction-with-google-oauth/) to wallets based on modern multi-factor authentication and without relying on a central authority or key custodian.
Expand Down
22 changes: 21 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,28 @@ force = false
status = 301
force = false

# 6/5/23

[[redirects]]
from = "/LitActions/usingPKPsAndActions"
to = "/resources/pkpsAndActions"
status = 301
force = false
force = false

[[redirects]]
from = "/resources/pkpsAndActions"
to = "/pkp/pkpsAndActions"
status = 301
force = false

[[redirects]]
from = "/LitActions/mintGrantBurn"
to = "/pkp/pkpsAndActions"
status = 301
force = false

[[redirects]]
from = "/resources/pkpsAsWallet"
to = "/concepts/pkpsAsWallet"
status = 301
force = false
33 changes: 13 additions & 20 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,23 @@ const sidebars = {
items: [
"intro/overview",
"intro/whatIsLitProtocol",
"intro/usecases",
"intro/rollup",
"intro/usecases",
],
},
{
type: "category",
label: "Access Control",
label: "Concepts",
collapsible: false,
className: "category-not-collapsible",
items: [
"concepts/pkpsAsWallet",
],
},
{
type: "category",
label: "Access Control",
collapsible: true,
items: [
"accessControl/intro",
{
Expand Down Expand Up @@ -97,12 +105,12 @@ const sidebars = {
{
type: "category",
label: "Programmable Key Pairs",
collapsible: false,
className: "category-not-collapsible",
collapsible: true,
items: [
"pkp/intro",
"pkp/minting",
"pkp/authHelpers",
"pkp/pkpsAndActions",
"pkp/usage",
"pkp/walletconnect",
"pkp/toolsAndExamples",
Expand All @@ -111,14 +119,12 @@ const sidebars = {
{
type: "category",
label: "Lit Actions",
collapsible: false,
className: "category-not-collapsible",
collapsible: true,
items: [
"LitActions/intro",
"LitActions/getlitCli",
"LitActions/helloWorld",
"LitActions/bestPractices",
"LitActions/mintGrantBurn",
{
type: "category",
label: "Working With Lit Actions",
Expand Down Expand Up @@ -272,24 +278,11 @@ const sidebars = {
className: "category-not-collapsible",
items: [
"resources/howItWorks",
"resources/pkpsAndActions",
"resources/pkpsAsWallet",
"resources/supportedChains",
"resources/contracts",
"resources/glossary",
],
},
// {
// type: "category",
// label: "Ecosystem",
// collapsible: false,
// className: "category-not-collapsible",
// items: [
// "Ecosystem/litGrants",
// "Ecosystem/community",
// "Ecosystem/projects",
// ],
// },
{
type: "category",
label: "Support",
Expand Down
2 changes: 1 addition & 1 deletion src/components/CardSections/CoreConcepts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function CoreConceptsSection({ title, className }) {
<Card
title="💳 Distributed Cloud Wallets"
description="Learn how you can leverage PKPs to create MPC wallets with support for Web2 authentication."
to="/resources/pkpsAsWallet"
to="/concepts/pkpsAsWallet"
/>
<Card
title="🧩 Use Cases"
Expand Down

0 comments on commit aedfe44

Please sign in to comment.