SessionKit v1 · For Developers
One scan, signed in. SessionKit lets BLAC Wallet users log in to your site through a BLAC Code — no passwords, no forms, no email harvesting. Just a verified session, end-to-end encrypted. Need signatures? The same scan connects the wallet, and the user approves every one of them in the app.
Scan with BLAC Wallet
No redirects, no OAuth dance, no account creation. The wallet the user already trusts is the authenticator.
SessionKit generates a fresh key pair and renders the code — cryptographically bound to your domain.
BLAC Wallet verifies your domain, then shows the user exactly what you're requesting — nothing is shared until they approve.
A signed, per-domain user identity, delivered end-to-end encrypted. Ask for a sign:* scope and the channel stays open for signing. The relay in between sees only ciphertext.
Three steps from zero to "Login with BLAC" on your site.
Step 1
Generates your signing key pair and writes
.well-known/blac-session.json for you to host. That file is what lets BLAC Wallet verify your
codes really come from your domain. Your private key never leaves
your server.
$ npx @blaclabs/sessionkit init Step 2
Load it from our CDN pinned to an exact version and its integrity hash, so the browser runs only the file you reviewed. Prefer bundling? The npm package carries full TypeScript types.
<script
src="https://sessionkit.blaclabs.io/v1/0.2.1/sessionkit.js"
integrity="sha384-k0P8kGYblTAtiBWRRKBJwDYcA6gPW+J3VMyDKLIZdB+Pa5Z+OvzwnR7F1X1S2OCG"
crossorigin="anonymous"></script> $ npm install @blaclabs/sessionkit Step 3
Request only the scopes you need. Your backend signs the request with your domain key, SessionKit renders the BLAC Code, and the promise resolves when the user approves in the app. The quickstart has the signing endpoint.
const session = await BLACSession.connect({
scopes: ["address:solana"],
mount: document.getElementById("blac-connect"),
sign: (input) =>
fetch("/api/blac-sign", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify(input)
}).then((response) => response.json())
});
console.log(session.user.id); // stable ID, unique to your domain
console.log(session.user.solanaAddress); // only if granted You ask, the user decides. Every scope is shown in plain language on the approval screen — and only what's granted is ever shared.
identity A pairwise user ID unique to your domain, cryptographically verifiable.
profile:username The user's chosen BLAC username.
profile:avatar The user's profile picture.
address:solana The user's Solana address, with a proof that the key behind it signed. For NFTs, tokens, and on-chain checks.
address:evm The user's EVM address, with a proof that the key behind it signed.
favorites:read The user's favorite markets, read-only.
sign:solana Propose Solana messages and transactions. The wallet reviews each one with the user before it signs.
sign:evm Propose EVM messages and transactions on Ethereum and Polygon. Messages and typed data also on Arbitrum One.
trade:* Never available to third parties. A SessionKit session can never act on the user's BLAC trading account. A sign:* scope can only propose, and the user approves every signature in the wallet.
SessionKit is the same session layer BLAC Wallet uses itself. Trust comes from cryptography and user consent — never from secrecy.
Every BLAC Code is signed by a key served from your domain over TLS. A scam site can connect as itself — but it can never impersonate you.
The approval screen names your verified domain and lists every requested scope in plain language. Your users always see exactly what you ask for.
Each domain gets its own user ID, derived per-site. Two websites can never correlate the same user — and nobody gets a financial address without asking.
P-256 key agreement, HKDF-derived session keys, AES-GCM on every message. The relay forwards ciphertext it cannot read.
Known scam domains trigger a hard warning in the app before anything is shared. First-time domains are flagged as new. The user always keeps the final say.
Users see every connected site in the app and can revoke any session instantly. A revoked session is dead — no grace period, no residual access.
sessionkit.blaclabs.io/v1/0.2.1/ Every release lives at its own URL that never changes, with its integrity hash in the changelog. Your page runs the exact file you reviewed — upgrading is a one-line change you choose.
Breaking changes only ever land in a new major. Old majors keep working, because BLAC Wallet speaks every protocol version we've shipped — your integration never breaks behind your back.
SessionKit is in developer preview while the v1 API is frozen. Want your site among the first with Login with BLAC?