Skip to content

feat(#93): wallet export/import (Lotus hex-KeyInfo) + import-lotus#106

Merged
Reiers merged 1 commit into
mainfrom
feat/93-wallet-import
Jul 1, 2026
Merged

feat(#93): wallet export/import (Lotus hex-KeyInfo) + import-lotus#106
Reiers merged 1 commit into
mainfrom
feat/93-wallet-import

Conversation

@Reiers

@Reiers Reiers commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Adds the #93 wallet migration surface:

  • lantern wallet export <addr> — hex(JSON(KeyInfo)), the exact lotus wallet export wire format; keys round-trip both directions.
  • lantern wallet import [hex|-] — one key from arg or stdin.
  • lantern wallet import-lotus <repo> — bulk import: walks <repo>/keystore, decodes base32 filenames (multiformats RawStdEncoding, same as Lotus fsrepo), filters wallet-* (host keys/jwt secrets skipped), imports each KeyInfo.

Everything lands in Lantern's passphrase-protected keystore via the existing wallet.Import; nothing unencrypted touches disk.

Tests: fake Lotus repo round-trip (base32 names, filtering, junk skipped, imported keys sign), hex wire round-trip, ~ expansion. Installer-question half of #93 deferred to the #87 installer polish pass; noting that on the issue.

Closes #93.

- 'lantern wallet export <addr>' prints hex(JSON(KeyInfo)), the exact
  wire format 'lotus wallet export' uses, so keys round-trip between
  Lotus and Lantern in either direction.
- 'lantern wallet import [hex|-]' imports one key from arg or stdin
  (pipe lotus wallet export straight in).
- 'lantern wallet import-lotus <repo>' walks <repo>/keystore, decodes
  the base32 (multiformats RawStdEncoding, same as Lotus fsrepo)
  filenames, filters wallet-* entries (libp2p host keys, jwt secrets
  etc are skipped), parses KeyInfo JSON and imports each key.
- Everything lands in Lantern's passphrase-protected keystore via the
  existing wallet.Import; nothing is written to disk unencrypted.
- go-base32 promoted from indirect to direct dep (already in the tree
  via libp2p).

Tests: fake Lotus repo keystore round-trip (base32 names, wallet-*
filtering, non-base32 junk skipped, imported keys sign), hex wire
format round-trip, ~ expansion.

Installer full-tier import question deferred to the #87 installer
polish pass - the CLI command is the load-bearing piece.
@Reiers Reiers merged commit efe199a into main Jul 1, 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.

Wallet import-from-lotus + export/import + installer question (password-protected)

1 participant