Skip to content

feat(types): define canonical GuildPass SDK V2 public domain types (closes #488) - #506

Merged
Lakes41 merged 1 commit into
Adamantine-guild:mainfrom
rupesh-kumar-sah:feat/issue-488-public-domain-types
Sep 17, 2026
Merged

Lakes41 merged 1 commit into
Adamantine-guild:mainfrom
rupesh-kumar-sah:feat/issue-488-public-domain-types

Conversation

@rupesh-kumar-sah

Copy link
Copy Markdown
Contributor

Description

This PR resolves #488 by establishing the canonical public domain types for GuildPass SDK V2, representing Guilds, Members, Passes, Access Policies, Activity Events, and Stellar accounts.

Changes

  1. src/types/domain.ts:
    • Defined Guild interface with Stellar owner account and optional Soroban contractId.
    • Defined Member interface and MemberRole union type ('owner' | 'admin' | 'moderator' | 'member').
    • Defined Pass interface and PassStatus union type ('active' | 'expired' | 'revoked' | 'pending').
    • Defined AccessPolicy and AccessPolicyRule interfaces.
    • Defined ActivityEvent interface and ActivityEventType union type.
    • Defined canonical Network and StellarAccount types.
    • Pure domain models without internal database leaks or frontend-only assumptions.
  2. src/types/index.ts:
    • Exported all domain types through the public package entry point.
  3. tests/domainTypes.test.ts:
    • Added unit test suite ensuring full runtime conformance and TypeScript compilation of all domain types.

Verification

  • pnpm typecheck (tsc --noEmit): Passed with 0 errors
  • pnpm build (tsup): Clean ESM and type definitions output
  • pnpm test (vitest): 24 test files passed, 685 tests passed, 0 failures

Closes #488

Closes Adamantine-guild#488

- Define public SDK domain contracts for Guild, Member, Pass, AccessPolicy,
  AccessPolicyRule, ActivityEvent, StellarAccount, and Network.
- Align public type shapes with Core contracts while maintaining clean
  consumer-facing interfaces without internal persistence leaks.
- Ensure Stellar-first representation with zero EVM assumptions.
- Export all public domain types from the package entry point.
- Add Vitest test suite validating type conformity and contracts.
@Lakes41
Lakes41 merged commit 063270d 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.

Define the GuildPass SDK V2 public domain types

2 participants