UNPKG

@lit-protocol/auth-browser

Version:

Browser-specific authentication utilities for the Lit Protocol, enabling seamless connection to various blockchain networks including Ethereum, Cosmos, and Solana.

16 lines (15 loc) 1.14 kB
import { AuthCallbackParams, AuthSig } from '@lit-protocol/types'; /** * SUPPORTED CHAINS: EVM, Solana, Cosmos * * !! NOTE !! * This function is purely used for crafting the authSig for access control conditions & decryption. For SessionSigs, you can pass the `authSig` as `jsParams` * or Eth Wallet Auth Method for `signSessionKey` and claiming, but you won't be able to use this to add resource ability requests in the SIWE message. Instead, you should provide your own signer to the authNeededCallback parameter for the getSessionSigs method. * * Check for an existing cryptographic authentication signature and create one of it does not exist. This is used to prove ownership of a given crypto wallet address to the Lit nodes. The result is stored in LocalStorage so the user doesn't have to sign every time they perform an operation. * * @param { AuthCallbackParams } * * @returns { AuthSig } The AuthSig created or retrieved */ export declare const checkAndSignAuthMessage: ({ chain, resources, switchChain, expiration, uri, cosmosWalletType, walletConnectProjectId, nonce, }: AuthCallbackParams) => Promise<AuthSig>;