Skip to content

docs: document GuildPass SDK V2 public API and usage examples (closes #500) - #504

Merged
Lakes41 merged 1 commit into
Adamantine-guild:mainfrom
rupesh-kumar-sah:docs/issue-500-v2-api-documentation
Sep 17, 2026
Merged

Lakes41 merged 1 commit into
Adamantine-guild:mainfrom
rupesh-kumar-sah:docs/issue-500-v2-api-documentation

Conversation

@rupesh-kumar-sah

Copy link
Copy Markdown
Contributor

Description

This PR resolves #500 by documenting the GuildPass SDK V2 public API surface, providing practical usage guides, a comprehensive API reference, and a runnable quickstart script.

Changes

  1. README.md:
    • Added a dedicated V2 Quickstart and Usage Guide.
    • Documented client initialization, testnet/mainnet configuration options, and custom headers.
    • Provided copy-pasteable examples for Stellar account validation (parseStellarAccountId, isStellarAccountId), community access control evaluation (client.access.check), and structured error handling.
    • Linked to detailed reference docs and example code.
  2. docs/api-reference.md:
    • Created comprehensive reference documentation covering:
      • GuildPassClient configuration (baseUrl, timeoutMs, headers).
      • Stellar helper functions (parseStellarAccountId, isStellarAccountId, safeParseStellarAccountId).
      • Access resource methods (client.access.check) and domain types (AccessCheckRequest, AccessDecision).
      • Pagination helpers (paginate, collectAll, createPaginatedApi).
      • Typed error hierarchy (GuildPassError, HttpError, NetworkError, TimeoutError, ConfigurationError).
      • Security and secret redaction utilities (redactSecret, fingerprintSecret).
  3. examples/quickstart.ts:
    • Added a complete runnable TypeScript quickstart demonstrating client setup, account validation, access evaluation, pagination, and error handling.
  4. tests/documentationExamples.test.ts:
    • Added test suite validating all documented API patterns against the actual SDK runtime to guarantee zero documentation drift.

Verification

Executed full verification suite:

  • pnpm typecheck (tsc --noEmit): Passed cleanly
  • pnpm build (tsup): ESM & DTS build success
  • pnpm test (vitest): 24 test files passed, 685 tests passed, 0 failures

Closes #500

Closes Adamantine-guild#500

- Add V2 quickstart, client initialization, Stellar account validation,
  access check evaluation, and typed error handling examples to README.md.
- Create docs/api-reference.md providing detailed reference documentation for
  GuildPassClient, Stellar helpers, AccessResource, pagination, and error hierarchy.
- Add examples/quickstart.ts demonstrating an end-to-end runnable integration.
- Add tests/documentationExamples.test.ts to validate all documentation examples
  against the SDK runtime with 100% test pass guarantee.
@Lakes41
Lakes41 merged commit cc7459c into Adamantine-guild:main Sep 17, 2026
2 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.

Document the GuildPass SDK V2 public API and usage examples

2 participants