refactor: port the CLI off NDK and drop @nostr-dev-kit/ndk entirely #47

Merged
padreug merged 1 commit from fix/drop-ndk-cli into dev 2026-06-27 00:58:26 +00:00

1 commit

Author SHA1 Message Date
8d56536d2d refactor: port the CLI off NDK and drop @nostr-dev-kit/ndk entirely
Some checks failed
Docker image / build-and-push-image (push) Has been cancelled
Final NDK removal (follow-up to #44/#45). The standalone CLI (src/client.ts)
was the last NDK user — a NIP-46 *client* (NDKNip46Signer). Ported to a small
nostr-tools client so the dependency can leave the repo completely.

- src/nip46-client.ts — a minimal NIP-46 client over the RelayPool, the inverse
  of the daemon's Nip46Transport: send requests to a remote signer, match
  responses by id, surface auth_url prompts; nip44 envelope. Methods: connect /
  signEvent / createAccount.
- src/client.ts — rebuilt on it. nip05/npub/bare-domain resolution via
  nostr-tools nip05.queryProfile + nip19; local client key stored as hex;
  publish via the pool. Dropped the now-unused websocket-polyfill import.
- package.json + pnpm-lock.yaml — `@nostr-dev-kit/ndk` removed (and its orphaned
  transitive deps; lockfile reconciled with `pnpm install --lockfile-only`, no
  version-format change).

`grep -r @nostr-dev-kit/ndk src` is now empty; all three bundles (index, daemon,
client) build with 0 NDK references. Tests: lifecycle 7 / relay 2 / nip46 1 /
admin 2 green; tsc at the pre-existing baseline.

Refs: #44, #45, #43, #42, #41
2026-06-27 02:56:04 +02:00