Repository navigation
feat(kit): every platform from one clip.config.ts: desktop-kit, mobile-kit, create-clip-wallet for extension, desktop and phone - #12
Merged
Conversation
…it; clip.config languages, app ids, scheme The desktop and phone apps become libraries driven by clip.config.ts, the way the extension became @clip-wallet/extension-kit: apps/desktop and apps/mobile now only hold Clip Wallet's brand (clip.config.ts, icons) and one-line entrypoints. - packages/desktop-kit: the main process, preloads, renderer pages, native-messaging host and their unit tests (moved from apps/desktop). clipDesktop() builds the electron-vite config (resolved config as virtual:clip-wallet/config, icon inlined as the dapp-facing identity, pages' title and CSP, native host bundled after the main build, mainnet checklist); electronBuilderConfig() maps the config to electron-builder (app id, product/executable/artifact names, deep-link scheme, Chromium locales for the offered languages, icons, env-driven signing and update publishing). The app id, scheme, TON Connect key, window title, user-agent scrub and WalletConnect metadata come from the config. - packages/mobile-kit: the screens, background host, in-app browser, plugins and their vitest + jest-expo suites (moved from apps/mobile). expoConfig() maps the config to app.config (name, slug, scheme, bundle id, package, icons, adaptive icon and splash on the accent colour, permission texts); withClipWallet() wires Metro (the resolved config as a generated virtual module, Node shims, one React). Keychain services are <rdns>.vault / <rdns>.devicekey (unchanged for Clip Wallet); the onboarding icon is passed in by the app; Ledger BLE loads through import(). - @clip-wallet/config: languages, appId, scheme, desktop/mobile id overrides, fees/usage reserved for Clip Cloud (off, never acted on); platformIds(); @clip-wallet/config/node (loadClipConfigSync, buildEnv, resolveBuildConfig, iconDataUri, openChecklistItems). - @clip-wallet/i18n + ui + both kits: only the languages clip.config offers are matched and listed. - Harness allow-list, brand renderer and tests, CI workflows follow the move. Verified: pnpm -r typecheck, pnpm -r test, pnpm harness; apps/desktop build + both Playwright e2e specs (2/2); apps/mobile expo export --platform ios (28 MB Hermes bundle). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tension, desktop, mobile
`npx create-clip-wallet my-wallet` now makes the wallet on every platform: packages/extension (WXT on
@clip-wallet/extension-kit), packages/desktop (Electron on @clip-wallet/desktop-kit) and packages/mobile (Expo on
@clip-wallet/mobile-kit), plus packages/nextjs with --scaffold-hbar. Each depends only on published @clip-wallet/*
packages; one clip.config.ts + wallet.identity.json at the project root drives all of them.
- Template (templates/scaffold-hbar-clip-wallet): clip.config.ts, wallet.identity.json, the logo, MAINNET.md, .env and
.keys/ move to the root; new packages/desktop (clipDesktop(), electronBuilderConfig(), one-line entrypoints,
entitlements) and packages/mobile (expoConfig(), withClipWallet(), registerClipWallet(), eas.json); the dapp reads the
identity from the root; root scripts dev:/desktop:/mobile:*; docs/signing.md (store accounts and code-signing
variable names, no secrets); README, AGENTS.md, llms.txt, MAINNET.md, .harness, CI and the provenance check cover
every platform, with platform:<part> / only:<part> markers.
- CLI: --platforms, --scaffold-hbar, --id, --logo (alias --icon), --languages, prompts for each, per-platform next
steps; `brand` command (pnpm wallet:brand). selectParts() removes unchosen folders, scripts and doc blocks, so
--scaffold-hbar with every platform is still byte-for-byte the create-scaffold-hbar project.
- Icons (src/icons.mjs, Node built-ins only): PNG decode/encode, premultiplied area-average resampling, ICO and ICNS
writers; extension 16–128, macOS .icns, Windows .ico, Linux 16–1024, tray + macOS template, iOS icon (opaque, on the
accent), Android adaptive + monochrome, splash. SVG logos rasterised once with @resvg/resvg-js, rsvg-convert, sips or
ImageMagick, whichever is installed. A later accent change keeps a custom logo.
- extension-kit: clipWallet({ configDir }) for a shared clip.config.ts; store zips named after the wallet.
- Harness: kit projects are recognised by the root config; every present platform must build through its kit
(clipWallet, clipDesktop + electronBuilderConfig, expoConfig + withClipWallet); appId may not be org.coldai.*.
- Kit e2e (tools/kit/e2e.mjs): every platform from the tarballs — identity and icons; install, harness, types;
extension build, manifest, extension id and EIP-6963 in Chromium; desktop build, electron-builder for the host (macOS
arm64 .app + zip) with bundle id, name, scheme and icon checked, packaged app launched headless to onboarding; Expo
config, expo export (iOS + Android) and expo prebuild with ids, name, scheme and icons checked; mainnet refused by
the harness and all three builds; security floor; --dapp builds the Scaffold-HBAR dapp.
Verified: pnpm -r typecheck, pnpm -r test, pnpm harness, pnpm pack-all, pnpm kit:e2e --dapp,
pnpm kit:e2e:scaffold-hbar (create-scaffold-hbar@latest, projects identical), apps/desktop Playwright e2e (2/2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cs for the platform kits - Docs site (apps/docs/src/kit): the "launch your own wallet" pages cover every platform. index (the platforms, the project layout with the config, identity, logo, MAINNET.md, .env and .keys/ at the root), create-clip-wallet (options, prompts, next steps, what it writes, icons from one logo, commands, the Scaffold-HBAR route, how kit:e2e tests it), config (platform settings: appId, desktop/mobile ids, scheme, languages, fees/usage reserved), build-and-ship (extension with configDir, desktop app, phone app, what the harness checks) and a new signing page (store accounts and code-signing variable names, never values) in the sidebar. Snippets for the project's wxt.config.ts, electron.vite.config.ts and app.config.ts are typechecked against the kits; the snippet test knows the kit project's scripts; reference.ts documents the new clip.config settings. - Repo layout, vault-importer rules and the engine diagram follow the kits; @module headers on the new entry files for the API reference; pako's declarations are referenced from gunzip.ts so other programs typecheck it. - create-clip-wallet, @clip-wallet/config, desktop-kit and mobile-kit READMEs (Install, Example, Documentation); apps/desktop and apps/mobile READMEs point at the kits; AGENTS.md (layout, commands, a desktop/phone recipe, the template recipe) and llms.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…caping, a file-system race) - Linear scans instead of polynomial regexes on input: trimming hyphens in slugOfName() and platformIds() (@clip-wallet/config), the networks and languages arrays create-clip-wallet writes into clip.config.ts, the platform markers stripParts() reads (matched on the trimmed line), the "-u-…nu-" check in numberLocale() (@clip-wallet/i18n), and the trailing slashes of the media proxy base (@clip-wallet/media-client). - tools/harness/check.mjs (and the template's byte-for-byte copy) and tools/kit/e2e.mjs escape every regex metacharacter, backslash included, when they build a RegExp from a binding, module or app id. - selectParts() reads each marked file and skips one that isn't there, instead of checking first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd unit tests on every runner; repro bundle
- ci.yml: pnpm --filter "{./services/**}..." (with braces) also installs packages/link and backup-client, which the
services typecheck against; the old selector installed only the services.
- desktop.yml: the Playwright step runs with --conditions=development, as `pnpm e2e` does locally (its helpers import
workspace packages from source; nothing is built to dist/ in that job).
- desktop-kit tests on Windows: the clip-app path test uses the platform's own paths, and the launcher's POSIX mode
is checked off Windows only.
- repro.yml: full history, so repro-check.sh's bundle of the commit can be fetched in each container.
- create-clip-wallet scaffold tests get 60 s each: copying the template and rendering every icon takes several
seconds on a shared runner.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…un can be read back - pnpm-workspace.yaml: shellEmulator, so scripts that set variables POSIX-style (NODE_OPTIONS=--conditions=development electron-vite build, the desktop app's dist:*, the extension's build) run the same way under cmd.exe; the desktop workflow's Windows build stopped at "'NODE_OPTIONS' is not recognized". - scripts/repro-check.sh: the container writes the checksums as root under umask 077; it now makes them readable, so the host can compare the two runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shayansal
added a commit
that referenced
this pull request
Oct 7, 2026
feat(networks): 85 of the 87 CLPR networks, 93 mainnets: 9 chain packages, Chainflip, STRATO, Arc (stacked on #12)
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.
npx create-clip-wallet my-walletnow makes the wallet on every platform from one rootclip.config.ts: a browser extension, a desktop app (macOS, Windows, Linux) and a phone app (iOS, Android), plus the Scaffold-HBAR dapp with--scaffold-hbar. The desktop and phone apps become libraries the same way the extension became@clip-wallet/extension-kit.Ported from the pre-publication history onto
main: Apache-2.0 everywhere (including the new packages' LICENSE and NOTICE), the Low audit fixes kept (MOB-02 and PLG-02 moved with the mobile code intomobile-kit), crypto dependencies pinned exactly, vitest 4.1.11, andshayan@coldai.orgcontacts.pnpm-lock.yamlwas regenerated withpnpm install.Generated layout
Parts you don't choose are removed: their folders, root scripts, and the
platform:<part>blocks in the docs and CI. With--scaffold-hbarand every platform, the result is byte-for-byte thecreate-scaffold-hbarproject.CLI
New options:
--platforms,--scaffold-hbar,--id,--logo(alias--icon) and--languages. Without--yesit asks for each one. The newbrandcommand (pnpm wallet:brand) re-renders every icon from the logo. Icons are made with Node alone: PNG encode and decode, area-average resampling, and ICO and ICNS writers. SVG logos are rasterised once by resvg, rsvg-convert, sips or ImageMagick.New packages
@clip-wallet/desktop-kit: the main process, preloads, pages and native-messaging host, moved fromapps/desktop.clipDesktop()builds the electron-vite config.electronBuilderConfig()mapsclip.config.tsto electron-builder: app id, product, executable and artifact names, scheme, locales, icons, and signing only when its env vars are set.@clip-wallet/mobile-kit: the screens, background host, in-app browser and plugins, moved fromapps/mobile.expoConfig()builds the app config.withClipWallet()wires Metro.@clip-wallet/configgainslanguages,appId,scheme,desktop/mobileid overrides,fees/usage(reserved, never acted on),platformIds(), and@clip-wallet/config/node.apps/desktopandapps/mobileare now only Clip Wallet's brand on the kits, likeapps/extension.Docs
docs/kit-platforms.mdis folded into the docs site and removed:kit/index,create-clip-wallet,config(new Platforms section) andbuild-and-ship(desktop and phone sections) are updated.kit/signingpage, added to the sidebar.wxt.config.ts,electron.vite.config.tsandapp.config.tsare typechecked snippets.Test results (local, macOS arm64, Node 24)
pnpm install --frozen-lockfilepnpm -r typecheckpnpm -r testpnpm harnesspnpm pack-allpnpm kit:e2e --dapppnpm kit:e2e:scaffold-hbarapps/desktop)apps/extension)link.spectimed out once in the first full run, then passed alone and in a second full run.gitleaks giton the 3 commitsBuild sizes from
kit:e2e(a kit-built wallet, every platform):out/(main, preloads, renderer)Acme-Wallet-0.1.0-mac-arm64.zipAcme Wallet.app(mac-arm64)dist/(expo export)CI fixes in this PR
On
main, the services job and the reproducible-build check already failed, and the desktop workflow failed on every runner. The new packages also brought CodeQL alerts. The last three commits fix all of these:selectParts()is removed.--filter "{./services/**}...". Without the braces, pnpm installed only the services, notpackages/link.--conditions=development.shellEmulator: truelets Windows runNODE_OPTIONS=… electron-vite build.Not built here
desktopworkflow buildsapps/desktopfor Windows (NSIS + zip) and Linux (AppImage, deb, tar.gz), unsigned, in CI only.expo export(iOS and Android) andexpo prebuildonly. There was no Xcode or Gradle build and no EAS.Needs accounts or certificates (owner)
None of these is needed to build. The variable names are in
kit/signingand the project'sdocs/signing.md.🤖 Generated with Claude Code