Skip to content

feat: type PeckRow.source_handle for foreign-namespace user numbers - #3

Open
kryp2 wants to merge 1 commit into
masterfrom
feat/source-handle
Open

kryp2 wants to merge 1 commit into
masterfrom
feat/source-handle

Conversation

@kryp2

@kryp2 kryp2 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • peck-overlay-schema PR #66 shipped source_handle on /v1/feed and /v1/thread rows where app: 'zanaadu' — a source-scoped alias read from Zanaadu's on-chain user-number registry (e.g. 033663d2… + @14).
  • This SDK is the read-lens over the same overlay, so PeckRow should type the field consumers will actually see.
  • Adds SourceHandle (exported) and PeckRow.source_handle?: SourceHandle. Purely additive — no existing field's type or semantics changed.

Contract carried over from the canonical source (peck-overlay-schema/src/zanaadu/userNumbers.ts + ZANAADU_POSTANCHOR_FORMAT.md §13)

  • namespace is mandatory so the value can never render bare and be mistaken for a peck handle (@14 · zanaadu).
  • Comes in addition to author — never replaces it.
  • Omitted (not null) on rows where the author has no number — absence is a valid, measured state at the source, not a gap.
  • membership_proof: 'none' says the number is read from Zanaadu's registry counter (cross-checked 7/7 against their own UI) but their sparse-Merkle-tree membership proof is not independently verified by us.
  • numbers?: number[] only appears when a key owns more than one; value/number is the lowest (tie-break for "primary" is not proven on-chain).

Version bumped 0.2.0 → 0.3.0 (additive, non-breaking).

Test plan

  • npx tsc --noEmit — clean (run via node:22 Docker container, no local Node in this environment)
  • npm run build (tsup) — builds ESM + .d.ts successfully
  • npm publish — left to Thomas; this PR does not publish

🤖 Generated with Claude Code

peck-overlay-schema PR #66 added source_handle to /v1/feed and
/v1/thread rows for app: 'zanaadu' — a source-scoped alias read from
Zanaadu's on-chain user-number registry, additive to (never a
replacement for) author. Types it here so consumers of this SDK see
the same contract: mandatory namespace, optional numbers[] for
multi-number owners, and membership_proof: 'none' spelling out that
the value is read from the registry, not Merkle-verified.

Bumps to 0.3.0 (additive, non-breaking).

Co-Authored-By: Claude Fable 5 <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