JSPM

@lit-protocol/auth-browser

3.2.1-dev.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5654
  • Score
    100M100P100Q136047F
  • License MIT

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

Quick Start

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.

node.js / browser

yarn add @lit-protocol/auth-browser

Vanilla JS (UMD)

<script src="https://cdn.jsdelivr.net/npm/@lit-protocol/auth-browser-vanilla/auth-browser.js"></script>
<script>
  console.log(LitJsSdk_authBrowser);
</script>

Generate an authSig with long expiration

const expiration = new Date(Date.now() + 1000 * 60 * 60 * 99999).toISOString();

const authSig = LitJsSdk_authBrowser.checkAndSignAuthMessage({chain: 'ethereum', expiration: expiration});