Skip to content

Commit

Permalink
docs: improve package descriptions and standardize README formatting
Browse files Browse the repository at this point in the history
- Add comprehensive package descriptions
- Standardize README structure across packages
- Add installation and quick start sections
- Include key features and core functionality
- Fix formatting issues from linter
- Update root README with core systems overview

Co-Authored-By: [email protected] <[email protected]>
  • Loading branch information
1 parent 14b4c41 commit 873aacf
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 23 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,28 @@ yarn graph

![](https://i.ibb.co/2dLyMTW/Screenshot-2022-11-15-at-15-18-46.png)

# Core Systems and Services

The Lit Protocol SDK provides the following core systems:

- Cryptographic key management (PKP - Public Key Protocol)
- Blockchain wallet interactions (Ethereum, Solana, Cosmos)
- Decentralized authentication and authorization
- Distributed computing and signing
- Smart contract management
- Access control and encryption services

# Main Functions and Classes

Key components available across packages:

- `PKPEthersWallet`: Ethereum wallet management for PKP
- `LitNodeClient`: Network interaction client
- `executeJs()`: Decentralized JavaScript execution
- `signMessageWithEncryptedKey()`: Cryptographic signing
- `generatePrivateKey()`: Key generation utilities
- `TinnyEnvironment`: Testing environment setup

# FAQs & Common Errors

<details>
Expand Down
4 changes: 2 additions & 2 deletions packages/access-control-conditions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ yarn add @lit-protocol/access-control-conditions
## Quick Start

```typescript
import {
import {
validateAccessControlConditions,
hashAccessControlConditions
hashAccessControlConditions,
} from '@lit-protocol/access-control-conditions';

// Validate conditions
Expand Down
6 changes: 4 additions & 2 deletions packages/auth-browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ yarn add @lit-protocol/auth-browser
import { checkAndSignAuthMessage } from '@lit-protocol/auth-browser';

// Generate an authSig with long expiration
const expiration = new Date(Date.now() + 1000 * 60 * 60 * 24 * 30).toISOString();
const expiration = new Date(
Date.now() + 1000 * 60 * 60 * 24 * 30
).toISOString();
const authSig = await checkAndSignAuthMessage({
chain: 'ethereum',
expiration: expiration
expiration: expiration,
});
```

Expand Down
4 changes: 2 additions & 2 deletions packages/auth-helpers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ yarn add @lit-protocol/auth-helpers
## Quick Start

```typescript
import {
import {
encodeSessionCapabilities,
verifyCapabilities
verifyCapabilities,
} from '@lit-protocol/auth-helpers';

// Encode session capabilities
Expand Down
5 changes: 1 addition & 4 deletions packages/crypto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ yarn add @lit-protocol/crypto
## Quick Start

```typescript
import {
generatePrivateKey,
encryptWithSignature
} from '@lit-protocol/crypto';
import { generatePrivateKey, encryptWithSignature } from '@lit-protocol/crypto';

// Generate a new private key
const privateKey = await generatePrivateKey();
Expand Down
2 changes: 1 addition & 1 deletion packages/lit-auth-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { LitAuthClient } from '@lit-protocol/lit-auth-client';

// Initialize the auth client
const client = new LitAuthClient({
redirectUri: 'https://your-app.com/callback'
redirectUri: 'https://your-app.com/callback',
});

// Handle social login
Expand Down
14 changes: 7 additions & 7 deletions packages/pkp-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ const signature = await pkpBase.runLitAction(dataToSign, 'sign');

## Core Methods

| Method | Description |
| ------ | ----------- |
| `init()` | Initialize and connect to LIT node |
| `compressPubKey()` | Compress public keys |
| `runLitAction()` | Execute LIT actions |
| `createAndSetSessionSigs()` | Manage session signatures |
| `ensureLitNodeClientReady()` | Verify node connection |
| Method | Description |
| ---------------------------- | ---------------------------------- |
| `init()` | Initialize and connect to LIT node |
| `compressPubKey()` | Compress public keys |
| `runLitAction()` | Execute LIT actions |
| `createAndSetSessionSigs()` | Manage session signatures |
| `ensureLitNodeClientReady()` | Verify node connection |

## Development

Expand Down
2 changes: 1 addition & 1 deletion packages/pkp-ethers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const address = await wallet.getAddress();
// Sign transaction
const signedTx = await wallet.signTransaction({
to: recipient,
value: ethers.utils.parseEther("0.1"),
value: ethers.utils.parseEther('0.1'),
});
```

Expand Down
4 changes: 2 additions & 2 deletions packages/pkp-walletconnect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const client = new PKPWalletConnect({
name: 'Your App',
description: 'Your app description',
url: 'https://your-app.com',
icons: ['https://your-app.com/icon.png']
}
icons: ['https://your-app.com/icon.png'],
},
});

// Handle session proposals
Expand Down
4 changes: 2 additions & 2 deletions packages/types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ yarn add @lit-protocol/types
## Quick Start

```typescript
import {
import {
AccessControlConditions,
ChainProperties,
AuthStatus,
WalletProvider
WalletProvider,
} from '@lit-protocol/types';

// Use types in your code
Expand Down

0 comments on commit 873aacf

Please sign in to comment.