-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update auth package READMEs with improved descriptions
Co-Authored-By: [email protected] <[email protected]>
- Loading branch information
1 parent
b3f6537
commit dd4a818
Showing
3 changed files
with
100 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,39 @@ | ||
# Quick Start | ||
# Access Control Conditions | ||
|
||
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. | ||
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. | ||
|
||
### node.js / browser | ||
## Installation | ||
|
||
``` | ||
```bash | ||
yarn add @lit-protocol/access-control-conditions | ||
``` | ||
|
||
## Quick Start | ||
|
||
```typescript | ||
import { | ||
validateAccessControlConditions, | ||
hashAccessControlConditions | ||
} from '@lit-protocol/access-control-conditions'; | ||
|
||
// Validate conditions | ||
const isValid = await validateAccessControlConditions(conditions); | ||
|
||
// Hash conditions for verification | ||
const hash = await hashAccessControlConditions(conditions); | ||
``` | ||
|
||
## Key Features | ||
|
||
- Data formatting and canonicalization | ||
- Digital signature validation and creation | ||
- Deterministic condition hashing | ||
- Access control rule validation | ||
- Secure identifier management | ||
|
||
## Core Operations | ||
|
||
- Condition Validation: Verify access control rules | ||
- Hash Generation: Create deterministic hashes | ||
- Signature Management: Handle digital signatures | ||
- Data Canonicalization: Ensure consistent formats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,40 @@ | ||
# Quick Start | ||
# Auth Browser | ||
|
||
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. | ||
Browser-specific authentication utilities for the Lit Protocol, enabling seamless connection to various blockchain networks including Ethereum, Cosmos, and Solana. | ||
|
||
### node.js / browser | ||
## Installation | ||
|
||
``` | ||
```bash | ||
yarn add @lit-protocol/auth-browser | ||
``` | ||
|
||
## Generate an authSig with long expiration | ||
## Quick Start | ||
|
||
```typescript | ||
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 authSig = await checkAndSignAuthMessage({ | ||
chain: 'ethereum', | ||
expiration: expiration | ||
}); | ||
``` | ||
const expiration = new Date(Date.now() + 1000 * 60 * 60 * 99999).toISOString(); | ||
|
||
const authSig = LitJsSdk_authBrowser.checkAndSignAuthMessage({chain: 'ethereum', expiration: expiration}); | ||
## Key Features | ||
|
||
``` | ||
- Multi-chain authentication support | ||
- Ethereum | ||
- Cosmos | ||
- Solana | ||
- Convenient network connection management | ||
- Automatic signature generation | ||
- Flexible expiration handling | ||
- Network disconnection utilities | ||
|
||
## Authentication Methods | ||
|
||
- Standard Authentication: Quick connect with default settings | ||
- Custom Expiration: Control signature validity period | ||
- Multi-Chain Support: Connect to different networks | ||
- Network Management: Connect and disconnect as needed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,41 @@ | ||
# Quick Start | ||
# Auth Helpers | ||
|
||
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. | ||
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. | ||
|
||
### node.js / browser | ||
## Installation | ||
|
||
``` | ||
```bash | ||
yarn add @lit-protocol/auth-helpers | ||
``` | ||
|
||
## Quick Start | ||
|
||
```typescript | ||
import { | ||
encodeSessionCapabilities, | ||
verifyCapabilities | ||
} from '@lit-protocol/auth-helpers'; | ||
|
||
// Encode session capabilities | ||
const encoded = await encodeSessionCapabilities(capabilities); | ||
|
||
// Verify resource capabilities | ||
const isValid = await verifyCapabilities(resource, capabilities); | ||
``` | ||
|
||
## Key Features | ||
|
||
- Session capability management | ||
- SIWE integration and extensions | ||
- Resource permission handling | ||
- Proof and attestation support | ||
- Custom capability verification | ||
- Lit Protocol-specific methods | ||
|
||
## Core Functionality | ||
|
||
- Capability Encoding/Decoding: Manage session permissions | ||
- Resource Verification: Check access rights | ||
- SIWE Message Enhancement: Add capability information | ||
- Permission Management: Handle resource access | ||
- Proof System: Manage attestations and verifications |