JavaScript SDK

Complete SDK reference and configuration

/

SDK Overview

The Lemma JavaScript SDK provides client-side authentication with local credential verification.

Configuration

JavaScript
const wallet = new LemmaWallet({ // Optional debug: false, apiBase: 'https://lemma.id' // override only if needed });

Core Methods

init()

Initialize the wallet. Call once on page load.

JavaScript
await wallet.init(); // Returns: void

isUnlocked()

Check if wallet is currently unlocked.

JavaScript
const unlocked = await wallet.isUnlocked(); // Returns: boolean

derivePPID()

Get the user's pairwise identifier for your site.

JavaScript
const ppid = await wallet.derivePPID(); // Returns: string (hex-encoded HMAC)

More Methods

See SDK Methods Reference for the complete list.