Seedelf-Wallet

Chunk 15 plan: dApps, starting with the public connector

Why: on 2026-09-25 the user set the wallet’s next goal: use smart contracts on Cardano privately. That’s the hardest part of the roadmap, so it’s done in steps. The first step is what Lace already does: a CIP-30 connector for the public account, behind a Settings switch. After that comes a dApp browser inside the wallet, where private interactions become possible, and Minswap is the first dApp. Branch web-wallet/dapp-connector, one PR into seedelf-web-wallet.

Status (2026-09-25)

Built: the public connector, the whole of This chunk below. Rust, worker, content scripts, the connector’s window and Settings, with Rust, Vitest and Playwright tests. Committed as fe8b774; the user chose to keep building on this branch and open one PR at the end. Step 2 built: a swap through Minswap in a private session (Step 2, Built). Fixed after: the connector’s off state took the wallet’s own Koios access with it, which Koios’s CORS change on 2026-09-25 made fatal (Koios and CORS). Not done: a live run against a real dApp. On preprod, a site that lists wallets from window.cardano will offer Seedelf Wallet. Minswap won’t (see Minswap).

Start here

  1. git fetch origin && git checkout web-wallet/dapp-connector
  2. Read this plan and the newest roadmap handoff note.
  3. Build and test (from extension/): npm run build && npm test && npm run e2e. The WebAssembly tests: cargo test -p seedelf-wasm from seedelf-platform/.

The steps

Step What Where
1 The public connector. CIP-30 for the public account, the way Lace does it, off until the user turns it on in Settings. This chunk
2 Private sessions. A one-time account funded from the private balance, used by a dApp, and swept back into Seedelf. The user’s first design, below. Next chunk
3 The dApp browser. dApps listed in the wallet. Each opens either as a site or inside the wallet, as Eternl does, and runs in a private session. Minswap first. Next chunk, or its own
4 Private CIP-30. Any site connects to a private session instead of the public account, chosen per site. Built in chunk 15c

This chunk: the public connector

Decided (the user, 2026-09-25)

Decided in the build

Koios cost

Koios and CORS (2026-09-25)

Tests

For the user

Private interactions (step 2 on)

The user’s two designs (2026-09-25):

  1. Round trip through a new account: private UTxO → a paying UTxO and a collateral UTxO on a random, never-used public account → the dApp uses that account → the contract pays back to it → back into the private balance, spending both the return and the collateral.
  2. Straight from Seedelf: private UTxO plus giveme.my’s collateral → the contract → a random account → back into the private balance.

Which one fits depends on the dApp. giveme.my can’t witness a chained transaction: it checks every input against the chain first, as found in chunk 8. So a dApp whose flow chains transactions needs design 1, and design 2 works only for a dApp that doesn’t.

What design 1 needs (docs: flows.md, keys-and-accounts.md):

What design 2 needs:

Minswap

Checked on 2026-09-25 against the preprod site (testnet-preprod.minswap.org) and its JavaScript:

Checked when working out (a)’s steps (2026-09-25):

The choice for the next chunk (the user’s):

Step 2: private sessions, and swaps through them

Decided (the user, 2026-09-25)

Built (2026-09-25)

A swap in a private session, end to end, as A swap (A1), step by step below says. The flow is in flows.md, the design in architecture.md.

A private session

A swap (A1), step by step

  1. Quote: /estimate. Minswap sees the pair, the amount and the IP address.
  2. Out: a Seedelf spend with giveme.my’s collateral. It pays the one-time account:
    • the amount, plus what the swap costs (fees, and the deposits the orders pay back);
    • 5 ₳ as the account’s own collateral.

    The change goes back into Seedelf.

  3. Wait for Out to confirm. The aggregator builds from its own view of the chain.
  4. Swap:
    • /build-tx with the one-time account as sender returns an unsigned transaction.
    • The connector’s inspectDappTx reads it against that account. It may spend only that account’s UTxOs; it pays order contracts; its change goes back to the account.
    • The user reviews it, the account’s key signs, and it’s submitted through Koios.
  5. Fill: batchers pay the proceeds to the account.
    • The wallet watches only while it’s open, never in the background.
    • It reads the account’s UTxOs, and asks /pending-orders about the account while an order is open.
  6. No fill: /cancel-tx, signed by the account, and the refund lands at the account. The account’s collateral is what the cancel’s script needs.
  7. Back: a key-signed move-in of everything at the account into Seedelf, under fresh registers: proceeds, change, returned deposits and collateral. The session closes, and the account is never used again.

What links:

Recovery