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.
@BotFather → /mybots → your bot → Login Widget → Client ID.
……
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.
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.
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.
Save as tests/live-vector.tolk in the project, then run
acton test tests/live.test.tolk to verify this exact token inside TVM.