Skip to content

feat: add versioned wallet discovery output - #46

Merged
kassandraoftroy merged 2 commits into
kassandraoftroy:mainfrom
dmarzzz:feat/versioned-wallet-list-json
Sep 7, 2026
Merged

feat: add versioned wallet discovery output#46
kassandraoftroy merged 2 commits 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.

@kassandraoftroy

Copy link
Copy Markdown
Owner

is there any reason why kohaku list-wallets --non-interactive isn't enough (already returns JSON and you can infer network of the wallet with testnet flag) @dmarzzz

@kassandraoftroy

Copy link
Copy Markdown
Owner

ok i read the issue and I'm fine with this since it's so small though i do feel eventually we shouldn't have too many different output formats floating around for the same commands and get some standardization.

@kassandraoftroy
kassandraoftroy merged commit e7d8e9d into kassandraoftroy:main Sep 7, 2026
1 check passed
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.

2 participants