Skip to content

Dev Wallet#925

Open
hayes-mysten wants to merge 28 commits intomainfrom
mh--dev-wallet
Open

Dev Wallet#925
hayes-mysten wants to merge 28 commits intomainfrom
mh--dev-wallet

Conversation

@hayes-mysten
Copy link
Contributor

@hayes-mysten hayes-mysten commented Mar 4, 2026

Description

Adds @mysten/dev-wallet — a modular, wallet-standard-compliant dev wallet for Sui with pluggable key management and a request-queue signing flow. It replaces useUnsafeBurnerWallet with a real approval UI so developers can inspect what they're signing during development.

Key features:

  • Pluggable signer adapters (in-memory, WebCrypto, passkey, remote CLI)
  • Embedded mode (mount directly in your dApp) or standalone mode (run as a separate web app via npx)
  • Auto-approve policy for tests/CI, with optional fine-grained control
  • Lit-based UI with React wrappers via @lit/react
  • Works with existing dapp-kit hooks — no dApp code changes needed

Docs: https://sui-typescript-docs-git-mh-dev-wallet-mysten-labs.vercel.app/dev-wallet

Demo

Screen_Recording_2026-03-04_2.20_Compressed.mp4

Test plan

  • 238 node unit tests + 47 browser tests (vitest + playwright)
  • Manual testing of embedded and standalone modes

AI Assistance Notice

Please disclose the usage of AI. This is primarily to help inform reviewers of how careful they need to review PRs, and to keep track of AI usage across our team. Please fill this out accurately, and do not modify the content or heading for this section!

  • This PR was primarily written by AI.
  • I used AI for docs / tests, but manually wrote the source code.
  • I used AI to understand the problem space / repository.
  • I did not use AI for this PR.

@vercel
Copy link

vercel bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sui-typescript-docs Ready Ready Preview, Comment Mar 12, 2026 2:03am

Request Review

hayes-mysten and others added 7 commits March 4, 2026 16:03
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dev Wallet now provides a WalletInitializer that integrates with
dApp Kit's plugin system, using dApp Kit's networks and client
factory instead of managing its own configuration.

- Export WalletInitializer type from @mysten/dapp-kit-core
- Add devWalletInitializer() to @mysten/dev-wallet
- Update demo app to use the initializer pattern
- Update docs with recommended initializer usage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…paths

- Reorganize docs into guides/ and reference/ subdirectories
- Fix code accuracy issues across adapter docs (wrong method signatures,
  incorrect property values, missing API methods)
- Add devWalletClientInitializer for standalone wallet registration via
  walletInitializers (same pattern as embedded devWalletInitializer)
- Version CLI signer API paths: /api/accounts -> /api/v1/accounts,
  /api/sign-transaction -> /api/v1/sign-transaction
- Add CLI Signer API reference doc with full endpoint specs
- Document bookmarklet for zero-code-change wallet injection
- Reorder docs to show embedded (dApp Kit plugin) first, standalone second
- Remove misleading "no code changes needed" claims for standalone mode
- Add faucet instructions to Getting Started

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hayes-mysten hayes-mysten had a problem deploying to sui-typescript-aws-kms-test-env March 5, 2026 01:52 — with GitHub Actions Failure
Use a Vite plugin to preserve Lit @CustomElement() decorator calls
instead of disabling tree-shaking entirely, producing a smaller
standalone bundle. Expand README with step-by-step CLI account import
instructions, personal message signing caveat, and bookmarklet usage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add overrides for hono (>=4.12.4), @hono/node-server (>=1.19.10),
@tootallnate/once (>=3.0.1), and immutable (>=5.1.5) to resolve
6 security advisories. Remove stale minimatch overrides that are
no longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hayes-mysten hayes-mysten had a problem deploying to sui-typescript-aws-kms-test-env March 5, 2026 03:54 — with GitHub Actions Failure
- Fetch coin decimals from chain via getCoinMetadata instead of hardcoded map
- Use normalizeStructTag/parseStructTag from SDK for type matching (full package IDs)
- Replace custom address validation with isValidSuiAddress from SDK
- Add getDefaultLabel() to BaseSignerAdapter for cross-adapter label control
- Remove skipAuth option from CLI signing middleware (auth always required)
- Case-insensitive Bearer token scheme per RFC 7235
- DNS rebinding check now validates port in Host header
- Remove URL-safe chars from base64 validation (standard base64 only)
- Move parseWalletRequest from server/ to client/ (browser-side concern)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These are direct dependencies already at safe versions. Keep
@tootallnate/once and immutable overrides (deep transitive deps
that can't be updated directly).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hayes-mysten hayes-mysten marked this pull request as ready for review March 5, 2026 23:04
@hayes-mysten hayes-mysten requested review from a team as code owners March 5, 2026 23:04
@hayes-mysten hayes-mysten had a problem deploying to sui-typescript-aws-kms-test-env March 5, 2026 23:08 — with GitHub Actions Failure
@hayes-mysten hayes-mysten had a problem deploying to sui-typescript-aws-kms-test-env March 5, 2026 23:09 — with GitHub Actions Failure
Remove placeholder guide pages (demo-app, isolated-dev-keys,
localnet-and-custom-networks, persistent-wallet, quick-prototyping)
and add a practical quick start section to the README and index page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The dev-wallet browser tests (vitest + @vitest/browser-playwright) need
Chromium installed. Add a step to install it with system deps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hayes-mysten hayes-mysten had a problem deploying to sui-typescript-aws-kms-test-env March 6, 2026 01:00 — with GitHub Actions Failure
hayes-mysten and others added 3 commits March 11, 2026 17:08
- Remove ~1200 lines of AI-generated verbosity across source, tests, and docs
  (excessive comments, redundant assertions, AI-sounding prose)
- Fix double-notification bug in RemoteCliAdapter#restoreImportedAccounts
- Delete 6 dead CSS style exports never imported by any component
- Delete redundant shared-wallet.mdx, merge content into standalone-mode.mdx
- Fix accuracy issues in adapter, architecture, and API reference docs
- Fix broken symlinks: @mysten/sui and @mysten/wallet-standard now point to
  worktree packages (was pointing to main repo, causing type errors)
- Rebuild @mysten/sui to include PasskeyKeypair credentialId support
  (3-arg constructor + getCredentialId() method)
- All 254 tests pass, lint clean

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Follows the pattern of wallet-sdk and ledgerjs packages. Without this,
IDEs type-check test files without @types/node or vitest/globals, causing
spurious errors for Buffer, node:http imports, and vitest APIs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hayes-mysten hayes-mysten had a problem deploying to sui-typescript-aws-kms-test-env March 12, 2026 00:29 — with GitHub Actions Failure
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ndings

- Fix CI failure: `pnpm exec playwright install` now scoped to @mysten/dev-wallet
- Fix per-account error isolation in WebCryptoSignerAdapter.initialize()
- Replace brittle string-based auth error detection with AuthError class in RemoteCliAdapter
- Add explicit allowAutoSign default to BaseSignerAdapter
- Propagate destroy() to adapters in DevWallet
- Reject non-HTTP(S) URLs in addNetwork()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix prettier formatting in 4 dev-wallet MDX doc files
- Move @mysten/dev-wallet browser (Playwright) tests to dedicated
  dev-wallet-browser-tests.yml workflow, only triggered on changes
  to packages/dev-wallet/**
- Remove playwright install from main turborepo.yml
- Change dev-wallet test script to node-only (browser via separate CI)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant