Skip to content

Comments

docs: SDK + plugins documentation overhaul#28

Merged
johnx25bd merged 11 commits intomainfrom
docs/sdk-plugins-overhaul
Feb 23, 2026
Merged

docs: SDK + plugins documentation overhaul#28
johnx25bd merged 11 commits intomainfrom
docs/sdk-plugins-overhaul

Conversation

@johnx25bd
Copy link
Member

Summary

  • Rewrites SDK Reference section to match actual @decentralized-geo/astral-sdk source (all 5 modules: location, compute, stamps, proofs, plugins)
  • Adds new top-level Plugins tab with documentation for MockPlugin, ProofMode, WitnessChain, and custom plugin authoring
  • Replaces inaccurate sdk/verify.mdx (fictional types, flat confidence score) with accurate sdk/stamps.mdx and sdk/location-proofs.mdx documenting the real CredibilityVector (4 dimensions, no single score)
  • All method signatures verified against TypeScript source

New pages (8)

  • sdk/stamps.mdx — StampsModule (collect, create, sign, verify)
  • sdk/location-proofs.mdx — ProofsModule (local + TEE verification, CredibilityVector)
  • sdk/plugins.mdx — Plugin system and PluginRegistry API
  • plugins/overview.mdx — Plugin ecosystem overview and status table
  • plugins/mock.mdx — MockPlugin configuration and usage
  • plugins/proofmode.mdx — ProofMode ZIP parsing, verification scope
  • plugins/witnesschain.mdx — WitnessChain concept and development status
  • plugins/custom.mdx — Custom plugin authoring guide

Updated pages (4)

  • mint.json — Plugins tab, updated SDK nav, verify→stamps redirect
  • sdk/overview.mdx — Full 5-module architecture
  • sdk/installation.mdx — Plugin imports and registration
  • sdk/compute.mdx — Corrected submit() signatures, VerifiedProof input type

Test plan

  • Run npx mintlify dev and verify all pages render
  • Confirm navigation links work across SDK and Plugins tabs
  • Verify /sdk/verify redirects to /sdk/stamps
  • Check code examples are syntactically valid
  • Cross-reference method signatures with SDK source

Add top-level Plugins tab with overview, mock, proofmode,
witnesschain, and custom plugin pages. Update SDK Reference
nav to include stamps, location-proofs, and plugins pages.
Remove sdk/verify from nav and add redirect to sdk/stamps.
Update overview to show all 5 modules (location, compute, stamps,
proofs, plugins), add apiKey to config, and link to all SDK pages.
Update installation with plugin submodule imports and registration
examples.
Add sdk/stamps.mdx covering StampsModule: collect, create, sign,
verify with accurate signatures from source. Add
sdk/location-proofs.mdx covering ProofsModule with local and TEE
verification modes, full CredibilityVector type documentation
(4 dimensions, no single score), and multi-stamp examples.
Document LocationProofPlugin interface, PluginRegistry API
(register, get, has, list, all, withMethod), runtime detection,
MockPlugin quick reference, and custom plugin authoring guide.
Document both submit() input formats (DelegatedAttestation and
{attestation, delegatedAttestation}), add VerifiedLocationProof
as input type, confirm options is required for spatial methods.
Add top-level Plugins section with five pages:
- overview: plugin ecosystem, pipeline, status table
- mock: built-in test plugin with full pipeline example
- proofmode: ZIP bundle parsing, create, verify, signal fields
- witnesschain: network triangulation concept, development status
- custom: guide for building custom plugins
Copy link
Member Author

@johnx25bd johnx25bd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submitting pending review to unblock.

"name": "SDK",
"url": "sdk"
},
{
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plugins should be the second tab
Concepts - Plugins - SDK - API.

Nice and tidy

@johnx25bd
Copy link
Member Author

Detailed review: SDK + plugins documentation overhaul

This PR is a significant improvement — it replaces inaccurate docs (the old sdk/verify.mdx with fictional types and a flat confidence score) with documentation that matches the actual SDK source. The new stamps, proofs, and plugins pages are well-structured and the CredibilityVector documentation correctly reflects the 4-dimension model. The Plugins top-level tab is a good IA decision.

That said, I found several issues worth addressing before merge, organized by severity.


HIGH — Accuracy issues to fix

1. ProofMode create() may not exist as a standard interface method

plugins/proofmode.mdx documents create() as a standard plugin interface method ("wraps createStampFromBundle() for use with the StampsModule"). But in the actual source (plugin-proofmode/src/index.ts), only createStampFromBundle(bundle: ParsedBundle) and verify() are implemented as methods on the class. There's no create(signals: RawSignals) method matching the LocationProofPlugin interface signature.

The plugin status table in plugins/overview.mdx shows create: Yes for ProofMode — if create() doesn't actually exist as a standard interface method, this is misleading. The StampsModule.create({ plugin: 'proofmode' }, signals) call path would fail at runtime because the plugin lacks the method.

Suggestion: Verify whether create() is actually implemented. If not, update the status table to show create: — and document that ProofMode uses the non-standard createStampFromBundle() flow instead. The proofmode.mdx page already explains the bundle-based workflow well — just make the status table match reality.

2. sdk/verify.mdx is orphaned

The PR removes sdk/verify from navigation and adds a redirect to sdk/stamps, but the actual file sdk/verify.mdx still exists on disk. This creates dead weight — the old file with its inaccurate types (CredibilityAssessment, flat confidence score, wrong method signatures) is still in the repo. Anyone browsing the file tree could be confused by finding outdated content.

Suggestion: Delete sdk/verify.mdx in this PR since it's being fully replaced by sdk/stamps.mdx and sdk/location-proofs.mdx.

3. GeoJSON.Feature silently removed from compute Input type

sdk/compute.mdx previously listed GeoJSON.Feature as a valid Input type (with "geometry extracted" note). The PR removes it without comment. If the SDK still accepts Features, this is a documentation regression. If it was intentionally removed from the SDK, the change is correct but should be noted in the PR description.

Suggestion: Verify against the SDK source and either restore the type or add a brief note explaining the removal.


MEDIUM — Content and consistency issues

4. Content overlap between sdk/plugins.mdx and plugins/custom.mdx

Both pages contain a custom plugin writing guide with nearly identical code examples. sdk/plugins.mdx has a "How to write a custom plugin" section (~50 lines of example code), and plugins/custom.mdx has a full guide with the same interface and patterns. This duplication will drift as the interface evolves.

Suggestion: Keep the full guide in plugins/custom.mdx only. In sdk/plugins.mdx, replace the inline example with a brief mention and a link: "See Building a custom plugin for the complete guide."

5. Complete example removed from sdk/compute.mdx

The PR deletes the end-to-end compute example (creating an attestation, checking proximity, estimating gas, submitting). This was the most practical example on the page — it showed the full flow from attestation to onchain submission. While the individual method docs are solid, losing the integrated example makes it harder for developers to see how the pieces connect.

Suggestion: Consider keeping a shorter version of the complete example, or at minimum link to a guide that demonstrates the full compute workflow.

6. Float timestamps in claim examples

In sdk/location-proofs.mdx, the claim example uses:

time: { start: Date.now() / 1000 - 60, end: Date.now() / 1000 }

Date.now() / 1000 produces a float (e.g., 1700000000.123), but the TimeBounds fields are documented as "Unix seconds" (integers). The complete example later on the same page correctly uses Math.floor(Date.now() / 1000).

Suggestion: Use Math.floor(Date.now() / 1000) consistently in all claim examples.

7. apiKey added to config without context

sdk/overview.mdx shows apiKey: 'your-api-key' in the package structure example, and sdk/installation.mdx documents apiKey?: string in AstralConfig. But there's no explanation of when an API key is needed, how to obtain one, or which endpoints require it. A developer seeing this will wonder whether they need a key to get started.

Suggestion: Add a brief note — even one sentence — explaining when apiKey is needed (e.g., "Required for TEE verification and hosted stamp verification" or similar).


LOW — Style and polish

8. Sentence case corrections — good

The PR consistently corrects title case headers to sentence case throughout ("Compute Module" → "Compute module", "Input Types" → "Input types", etc.). This matches the project style guide and improves consistency.

9. WitnessChain interface is aspirational

plugins/witnesschain.mdx documents a WitnessChainChallengeResult interface with specific fields (KnowLoc, KnowLocUncertainty, consolidated_result, etc.). Since the plugin has no source code yet, this interface is aspirational. The "In development" warning at the top covers this adequately, but consider adding a note that field names may change.

10. Navigation ordering is well-considered

The SDK Reference nav progression (overview → installation → location → stamps → location-proofs → plugins → compute → eas → migration) moves from core concepts through the new plugin system to existing modules. Logical and well done.


Summary

The PR is a substantial quality improvement over the existing docs. The core documentation (stamps, proofs, CredibilityVector, plugin interface) is accurate against the SDK source. The main things to address before merge:

  1. Verify ProofMode create() accuracy — affects the plugin status table and example code paths
  2. Delete the orphaned sdk/verify.mdx — prevents confusion from stale content
  3. Confirm GeoJSON.Feature removal from compute Input type
  4. Deduplicate custom plugin guide between sdk/plugins.mdx and plugins/custom.mdx

Everything else is polish. Nice work on this overhaul.

ProofMode does not implement the standard create(signals) interface
method. Update status tables and docs to reflect that stamp creation
uses the bundle-based parseBundle() + createStampFromBundle() flow.
Content replaced by sdk/stamps.mdx and sdk/location-proofs.mdx.
File contained inaccurate types (flat confidence score, fictional
CredibilityAssessment). Redirect already in mint.json.
- Restore complete example in compute.mdx showing full workflow
- Use Math.floor() for timestamps in claim examples
- Clarify apiKey is for TEE verification and hosted endpoints
ProofMode now implements the standard create(signals) method,
accepting ZIP data via signals.data.zipData. Update docs to show
the standard pipeline flow and restore create: Yes in status
tables. Keep parseBundle/createStampFromBundle as documented
lower-level helpers.

Refs: location-proofs/plugin-proofmode#5
@johnx25bd johnx25bd merged commit 677832b into main Feb 23, 2026
1 check passed
@johnx25bd johnx25bd deleted the docs/sdk-plugins-overhaul branch February 23, 2026 22:08
johnx25bd added a commit that referenced this pull request Feb 24, 2026
Bring in PRs #27 and #28 (SDK + plugins overhaul, API reference
rewrite) as authoritative technical references
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