Capture a live Telegram id_token

Generates a throwaway Ed25519 session key, runs Login with Telegram with nonce = base64url(session public key), and turns the resulting id_token into the exact bytes TgWallet verifies on-chain. Everything runs in this page — no backend, no client secret.

Bot

@BotFather → /mybots → your bot → Login Widget → Client ID.

Session key

public key (hex)
nonce sent to Telegram

Kept in localStorage so a reload does not invalidate a token you just captured. Generating a new one invalidates any token already bound to the old key — log in again afterwards. In a real wallet this key never leaves the device and is worth at most one session.

Sign

The wallet verifies spending with isSignatureValid(requestCell.hash(), …) — TVM's CHKSIGNU, which is Ed25519 over the raw 32 bytes of a cell hash with no further hashing on either side. So this takes the hash itself, not the data behind it.

Subject check

Does Telegram hand the same sub to every application, or a different one per bot? The answer decides whether publishing it on-chain links this wallet to your account everywhere, or only to one app. Log in below with two different Client IDs.

Ready.