Skip to content

feat: add versioned wallet discovery output - #46

Open
dmarzzz wants to merge 1 commit into
kassandraoftroy:mainfrom
dmarzzz:feat/versioned-wallet-list-json
Open

feat: add versioned wallet discovery output#46
dmarzzz wants to merge 1 commit into
kassandraoftroy:mainfrom
dmarzzz:feat/versioned-wallet-list-json

Conversation

@dmarzzz

@dmarzzz dmarzzz commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an opt-in, versioned machine-readable wallet discovery contract:

kohaku list-wallets --format json-v1

The response is a single JSON document with:

  • kind: "kohaku-cli/wallet-list"
  • version: 1
  • a deterministically ordered wallet array
  • normalized network
  • numeric chainId
  • CAIP-2 caip2

This is intentionally a narrow first increment. Stable wallet IDs and versioned output for creation/address allocation can follow after the envelope is reviewed.

Compatibility

  • Existing interactive output is unchanged.
  • Existing list-wallets --non-interactive JSON is unchanged.
  • The new contract is used only when --format json-v1 is supplied.
  • Wallet ordering uses a locale-independent UTF-16 total order.

Verification

  • TypeScript typecheck
  • Full test suite: 302 tests across 113 suites
  • Production build
  • git diff --check
  • Tests cover empty/mixed-network listings, legacy output, option validation, and case-variant ordering

Relates to #44.

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