Skip to content

Commit dd4a818

Browse files
docs: update auth package READMEs with improved descriptions
Co-Authored-By: [email protected] <[email protected]>
1 parent b3f6537 commit dd4a818

File tree

3 files changed

+100
-16
lines changed

3 files changed

+100
-16
lines changed
Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,39 @@
1-
# Quick Start
1+
# Access Control Conditions
22

3-
This submodule provides functionalities for formatting and canonicalizing data, validating and creating digital signatures, and hashing various types of conditions and identifiers in a deterministic way to ensure data integrity and security within the LIT protocol.
3+
A comprehensive toolkit for managing access control conditions within the Lit Protocol ecosystem. This package provides functionalities for formatting, validating, and securing access control rules.
44

5-
### node.js / browser
5+
## Installation
66

7-
```
7+
```bash
88
yarn add @lit-protocol/access-control-conditions
99
```
10+
11+
## Quick Start
12+
13+
```typescript
14+
import {
15+
validateAccessControlConditions,
16+
hashAccessControlConditions
17+
} from '@lit-protocol/access-control-conditions';
18+
19+
// Validate conditions
20+
const isValid = await validateAccessControlConditions(conditions);
21+
22+
// Hash conditions for verification
23+
const hash = await hashAccessControlConditions(conditions);
24+
```
25+
26+
## Key Features
27+
28+
- Data formatting and canonicalization
29+
- Digital signature validation and creation
30+
- Deterministic condition hashing
31+
- Access control rule validation
32+
- Secure identifier management
33+
34+
## Core Operations
35+
36+
- Condition Validation: Verify access control rules
37+
- Hash Generation: Create deterministic hashes
38+
- Signature Management: Handle digital signatures
39+
- Data Canonicalization: Ensure consistent formats

packages/auth-browser/README.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,40 @@
1-
# Quick Start
1+
# Auth Browser
22

3-
This submodule provides functionalities from various modules within the Lit SDK, enabling users to authenticate in the browser and connect to different blockchain networks (Ethereum, Cosmos, and Solana) with convenience, while also providing a function to disconnect from the Ethereum network.
3+
Browser-specific authentication utilities for the Lit Protocol, enabling seamless connection to various blockchain networks including Ethereum, Cosmos, and Solana.
44

5-
### node.js / browser
5+
## Installation
66

7-
```
7+
```bash
88
yarn add @lit-protocol/auth-browser
99
```
1010

11-
## Generate an authSig with long expiration
11+
## Quick Start
12+
13+
```typescript
14+
import { checkAndSignAuthMessage } from '@lit-protocol/auth-browser';
1215

16+
// Generate an authSig with long expiration
17+
const expiration = new Date(Date.now() + 1000 * 60 * 60 * 24 * 30).toISOString();
18+
const authSig = await checkAndSignAuthMessage({
19+
chain: 'ethereum',
20+
expiration: expiration
21+
});
1322
```
14-
const expiration = new Date(Date.now() + 1000 * 60 * 60 * 99999).toISOString();
1523

16-
const authSig = LitJsSdk_authBrowser.checkAndSignAuthMessage({chain: 'ethereum', expiration: expiration});
24+
## Key Features
1725

18-
```
26+
- Multi-chain authentication support
27+
- Ethereum
28+
- Cosmos
29+
- Solana
30+
- Convenient network connection management
31+
- Automatic signature generation
32+
- Flexible expiration handling
33+
- Network disconnection utilities
34+
35+
## Authentication Methods
36+
37+
- Standard Authentication: Quick connect with default settings
38+
- Custom Expiration: Control signature validity period
39+
- Multi-Chain Support: Connect to different networks
40+
- Network Management: Connect and disconnect as needed

packages/auth-helpers/README.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,41 @@
1-
# Quick Start
1+
# Auth Helpers
22

3-
This submodule manages permissions and capabilities related to accessing specific resources on the blockchain. It utilizes features from the 'siwe' and 'siwe-recap' libraries to verify and handle data, allowing users to encode and decode session capabilities, add proofs and attenuations (specific resource permissions), and verify whether certain capabilities for a resource are supported. It also provides the ability to add capabilities to 'siwe' messages and provides methods specifically tailored to the LIT protocol, enabling adding and verifying capabilities for specific LIT resources.
3+
Advanced authentication utilities for managing blockchain resource permissions and capabilities within the Lit Protocol ecosystem. Built on top of SIWE (Sign-In with Ethereum) and SIWE-RECAP for robust authentication flows.
44

5-
### node.js / browser
5+
## Installation
66

7-
```
7+
```bash
88
yarn add @lit-protocol/auth-helpers
99
```
10+
11+
## Quick Start
12+
13+
```typescript
14+
import {
15+
encodeSessionCapabilities,
16+
verifyCapabilities
17+
} from '@lit-protocol/auth-helpers';
18+
19+
// Encode session capabilities
20+
const encoded = await encodeSessionCapabilities(capabilities);
21+
22+
// Verify resource capabilities
23+
const isValid = await verifyCapabilities(resource, capabilities);
24+
```
25+
26+
## Key Features
27+
28+
- Session capability management
29+
- SIWE integration and extensions
30+
- Resource permission handling
31+
- Proof and attestation support
32+
- Custom capability verification
33+
- Lit Protocol-specific methods
34+
35+
## Core Functionality
36+
37+
- Capability Encoding/Decoding: Manage session permissions
38+
- Resource Verification: Check access rights
39+
- SIWE Message Enhancement: Add capability information
40+
- Permission Management: Handle resource access
41+
- Proof System: Manage attestations and verifications

0 commit comments

Comments
 (0)