Skip to content

docs(sdk): bring the README up to date with the shipped SDK and indexer - #31

Merged
YazarAyobami merged 2 commits into
mainfrom
docs/readme-refresh
Oct 8, 2026
Merged

YazarAyobami merged 2 commits into
mainfrom
docs/readme-refresh

Conversation

@YazarAyobami

Copy link
Copy Markdown
Contributor

What and why

The README's status line said "the indexer is still being scaffolded." It is built, deployed, and serving testnet data. Anyone reading the repo before contributing gets the wrong picture of what exists, and the public API surface was undocumented outside packages/sdk/API.md.

Changes

  • Status corrected: @kinlock/sdk v0.3.0 and @kinlock/indexer both shipped; live indexer URL in the header.
  • The 16 public exports grouped by purpose: writes (createLock/release/refund/decline, each build-simulate-sign-submit), chain reads (getLock, getPayee), links (buildClaimLink/parseClaimLink/buildRequestLink/parseRequestLink), preflight (5 checks, 3 blocking / 2 warning, unknown never passes as OK), verifyReceipt (tier 1 and 2; tier 3 pending the archive decision), and primitives (toBaseUnits, fromBaseUnits, generateSalt, computeRefHash, USDC_DECIMALS, KinlockError, NotImplementedError, Lock/Payee/Tranche).
  • Documented the two invariants callers must respect: money is bigint in code and a decimal string in JSON, never number; the claim reference and salt live only in the URL fragment, and ref_hash is SHA-256 over the NFC-trimmed reference bytes then 16 raw salt bytes (ADR-0024).
  • Indexer section: cursor persistence, (tx_hash, event_index) idempotency, GapError stops rather than skipping, append-only chain_events, and the routes (/health returns 503 when lagging, /locks, /locks/:id, /payees, /events/:txHash/:eventIndex). Explicit that these are list endpoints and money pages read chain.
  • Publish flow: sdk-v* tag produces a GitHub Release with the .tgz attached (ADR-0026), not npm.

Hard rules / invariants touched

2 (chain is truth), 5 (no personal data; the claim-link fragment never reaches a server), and the amount-typing rule from the SDK section of ARCHITECTURE.md. Documenting existing behavior; no code changed.

Tests

Docs only. Every export name and signature checked against packages/sdk/src/index.ts; route list against the indexer's registered handlers; the preflight check/block split against the preflight implementation; the version against the release tag. Nothing claimed from the v0.3 docs.

Docs / ADR

README.md only; packages/sdk/API.md remains the per-export reference and is linked. No ADR needed.

Roadmap

No row changes. Changelog entry added (2026-10-08, docs/readme-refresh, sdk).

Assumptions and open questions

  • I left the indexer's tier-3 receipt verification described as "pending the archive decision" rather than guessing a date.
  • Branch from origin/main, so it does not carry the unmerged doc-sync commit. Rebase if that lands first.

It still said the indexer was being scaffolded, but it is built and
running on testnet. Document the 16 public exports, the bigint and
claim-link-fragment invariants, the list API routes, and the published
release flow.
@YazarAyobami
YazarAyobami requested a review from a team as a code owner October 8, 2026 14:00
@YazarAyobami
YazarAyobami merged commit fe5f8ce into main Oct 8, 2026
4 checks 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.

1 participant