Package Exports
- @lit-protocol/auth-browser
- @lit-protocol/auth-browser/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@lit-protocol/auth-browser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Auth Browser
Browser-specific authentication utilities for the Lit Protocol, enabling seamless connection to various blockchain networks including Ethereum, Cosmos, and Solana.
Installation
yarn add @lit-protocol/auth-browser
Quick Start
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,
});
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