Skip to content

Add packages/types/ shared TypeScript types package #368

Description

@Levi-Ojukwu

Description
Types like Invoice, ReputationScore, GovernanceProposal, and SupportedToken are defined separately in the SDK and must be duplicated or re-declared in the indexer and notifications service. A shared types package eliminates this duplication and ensures type consistency across the entire ecosystem.

Requirements and context

  • Create packages/types/src/ with shared domain types: Invoice, InvoiceState, ReputationScore, GovernanceProposal, ProposalAction, ContractStats, SupportedToken, TokenConfig, ILNEvent union type
  • SDK, CLI, indexer, and notifications all import from @invoice-liquidity/types
  • Keep the types package dependency-free (no runtime dependencies)
  • Write type-level tests using tsd or expect-type

Suggested execution

git checkout -b feat/shared-types-package
  • Create packages/types/ package
  • Extract types from SDK and indexer into the shared package
  • Update all imports across the monorepo

Example commit message
feat: add shared types package for consistent domain types across monorepo


Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions