Step 4 of chunk 15: a site connects to a private session instead of the public account. The site talks standard CIP-30 to window.cardano.seedelf and sees an ordinary key account: a one-time account funded from the private balance. Nothing is asked of dApps.
Why here (the user, 2026-09-25): most people use dApps on the dApps’ own sites, not in the wallet’s dApp browser. Built on web-wallet/dapp-connector, in PR #262.
enable() answer, so a site that reads the balance straight away sees the money.dappPassword is on. A site’s request leads to it, as it does to a signature. Top up and Bring it back start in the wallet, not at a site, so they don’t ask, as the wallet’s own sends don’t.getRewardAddresses, then signData with it). WebAssembly takes the stake key’s index with the request (stakeIndex, 2/i for session i, 0 for the public account).getCollateral gives it, and getUtxos leaves it out, as the public account’s is left out.getUsedAddresses and getChangeAddress give the session’s address, and getUnusedAddresses gives none.enable() still answers once the money is there, and a site that went away finds itself connected next time.WebAssembly (wasm/src/cip30.rs, lib.rs)
TxRequest and DataRequest take stakeIndex (default 0).OneTimeAccounts.rewardAddress(network, index).sessionDataSigner and signSessionData: CIP-8 with a session’s keys.Worker
sessions.ts:
site: { origin }.siteOutBuild/siteOutSubmit: the funding, as a swap’s (Make public’s builder, giveme.my).topUpBuild/topUpSubmit: another funding payment into the same account.disconnect: closes an empty site session.dapp.ts:
session?: index. Every call resolves who it talks to (the public account, or session i): reads, collateral, addresses, signing (inspectSessionTx/signSessionTx, with the session’s key and stake index), signData, submitting, and chaining (the signed outputs are kept per account).dapp-private-build builds the funding for the connect waiting in the window.dapp-answer with the funding’s hash sends it, records the connection, and marks the request funding.enable() answers.UI
stakeIndex on TxRequest and DataRequest, OneTimeAccounts.rewardAddress, sessionDataSigner/signSessionData. Rust 2 new tests (session_test.rs): a session signs data with its payment key and with its own stake key, and a withdrawal from its reward account with its stake key. Neither works with the public account’s stake index.sessions.ts: site records, siteOutBuild/siteOutSubmit, topUpBuild/topUpSubmit, disconnect, siteAccount, accountUtxos, and buildFunding shared with a swap’s funding. A site’s session doesn’t close at its return.dapp.ts: every path resolves the site’s account. Also privateBuild, answer(…, fund), the funding watch, and disconnectSession.screens/SiteSessions.tsx: the dApps page’s Sites, each session’s page, and Top up.dapp.test.ts:
enable() waits for the money, even with the window closed;Playwright 1: the connect window’s private path up to giveme.my’s recorded refusal, and the unfunded session under Sites, then disconnected.
SessionService.claimBuild/claimSubmit (session-claim-build/-submit), and screens/ClaimAll.tsx, from a card on the dApps page.sessions.test.ts): two sessions come back in two transactions; an empty one and a swap that runs itself are left out, saying why.