cardano-wasm demo: multi-wallet management - #1270
Open
palas wants to merge 2 commits into
Open
Conversation
- generate stake-enabled wallets; restore from bech32 signing keys - editable alias, collapsible cards, keys & hashes (blurred secrets), copy address, forget dialog - mainnet/preprod/preview switch with wasm address re-derivation - console panel (capped, scroll pinned to newest) and toast - module skeleton: Types, State, Update, View, Wasm, Net, Format, Ports
palas
requested review from
CarlosLopezDeLara,
Jimbo4350,
carbolymer,
disassembler and
erikd
as code owners
July 28, 2026 01:26
palas
marked this pull request as draft
July 28, 2026 01:27
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the first “real” functionality to the cardano-wasm browser demo by wiring Elm UI/state to the cardano-wasm JS wrapper via ports, enabling multi-wallet generation/restoration and network switching with address re-derivation.
Changes:
- Introduce Elm module skeleton (Types/State/Update/View/Wasm/Net/Format/Ports) implementing wallet list UI, console/toast, and modal flows.
- Expand
web/ports.jsport glue to generate/restore stake wallets and derive addresses for different networks. - Add Herald changelog fragment for the
cardano-wasmdemo feature set.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| cardano-wasm/demo/web/ports.js | Implements Elm↔JS port handlers for wallet generation/restoration, address derivation, and clipboard writes. |
| cardano-wasm/demo/src/Wasm.elm | Encodes outbound port commands and decodes inbound results/errors from JS. |
| cardano-wasm/demo/src/View.elm | Adds the demo UI: wallets list/cards, restore form, console, modal, and toast. |
| cardano-wasm/demo/src/Update.elm | Implements TEA update logic for network switching, wallet flows, logging, and copy/toast behavior. |
| cardano-wasm/demo/src/Types.elm | Defines demo model, wallet/key types, and message/event types. |
| cardano-wasm/demo/src/State.elm | Provides initial model and pure helpers for wallet management, logging, and toast timer. |
| cardano-wasm/demo/src/Ports.elm | Declares the raw Elm ports used by the demo. |
| cardano-wasm/demo/src/Net.elm | Adds static network tables/tags/magic and faucet/explorer URLs. |
| cardano-wasm/demo/src/Main.elm | Wires Browser.element, subscriptions, and module boundaries together. |
| cardano-wasm/demo/src/Format.elm | Adds formatting/parsing helpers (ADA/lovelace conversion, shortening, defaults). |
| .changes/20260718_cardano_wasm_demo_wallets.yml | Declares the demo’s multi-wallet management as a feature for cardano-wasm. |
- default to the Preview network, matching the banner's testnet-only advice - faucet: style the link itself as a button (a button inside an anchor is invalid HTML) and add rel="noopener noreferrer" - parse ADA amounts as exact decimals instead of via floats - ignore clipboard write failures instead of leaking a rejected promise
palas
marked this pull request as ready for review
July 29, 2026 01:19
palas
force-pushed
the
wasm-demo-wallet-management
branch
from
July 29, 2026 01:19
770c84f to
00e6e02
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
This is a follow up to: #1257
It adds the initial functionalities of the demo:
How to trust this PR
cardano-wasm/demo/+ a changelog fragment; CI already compiles it (elm make --optimize) and checkselm-format.cardano-wasm-demoartifact over http and click through.web/ports.js).elm-testsin a future PR.Checklist
.changes/