Skip to content

Feat/symbol - #551

Merged
BigBen-7 merged 16 commits into
Lead-Studios:mainfrom
nafiuishaaq:feat/symbol
Aug 28, 2026
Merged

Feat/symbol#551
BigBen-7 merged 16 commits into
Lead-Studios:mainfrom
nafiuishaaq:feat/symbol

Conversation

@nafiuishaaq

@nafiuishaaq nafiuishaaq commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Summary of Changes

1. Updated src/index.ts to export all missing symbols from the codebase:

  • Client-related additions: Added VeriTixClientExtended, createSafeToJSON, createSafeInspect, VeriTixSDK, and createFromFreighter
  • Types addition: Added missing BatchSettlementResult from src/types/index.ts
  • New module classes: Added all new module exports including EventsService, EventDashboard, EventGalleryService, RevenueAnalyticsModule, TicketAnalyticsModule, CollaboratorModule, TicketPurchaseModule
  • Module types: Added all interfaces and types from new modules (Event, EventFilter, DashboardMetrics, etc.)
  • Module constants: Added TRANSACTION_CHARGE_RATE and MAX_COLLABORATORS_PER_EVENT
  • Utility additions: Added missing scVal conversion functions (from ./utils/scval) and XDR parsers (from ./utils/parsers) which were exported in src/utils/index.ts but not in the root index.ts
  • closes chore: add index barrel exports — ensure every public symbol is exported from src/index.ts #505

2. Fixed src/modules/freighter-factory.ts: Added missing import for VeriTixClient which was causing a compilation error.

3. Fixed src/client.ts: Changed keypair from private to protected to allow access from the extended VeriTixClientExtended class in client-extended.ts, which fixes the TypeScript access modifier error.

All exported symbols in the src/ directory are now properly exported from the root src/index.ts, so consumers importing from @veritix/contract-sdk can access all of them! The TypeScript compiler will now pass without errors, confirming there are no orphaned types.
closes #502

Summary of Changes

1. Updated src/utils/errors.ts to add new error codes for all missing cases:

2. Fixed all raw throw new Error instances across src/modules and src/utils:

  • src/modules/ticket/ticket-purchase.service.ts: Added import for VeriTixError/VeriTixErrorCode, replaced errors with InvalidAmount and InsufficientBalance
  • src/modules/collaborator/collaborator.service.ts: Added import, replaced errors with appropriate collaborator-specific error codes
  • src/modules/freighter-factory.ts: Added import, replaced Freighter not found error with FreighterNotFound code
  • src/modules/splitter.ts: All not implemented errors replaced with NotImplemented code
  • src/modules/user.ts: Added import, all not implemented errors replaced with NotImplemented
  • src/client.ts: All "call connect() first" errors replaced with ClientNotConnected, fixed the last raw error in lazy server proxy
  • src/utils/scval.ts: Added import, all scVal conversion errors replaced with InvalidInput
  • src/utils/parsers.ts: Added import, all parsing errors replaced with InvalidInput
  • closes chore: enforce consistent error throwing pattern — every module must throw VeriTixError not raw Error #504

All errors in the codebase now use VeriTixError with an appropriate error code, allowing consumers to use type-safe error branching! The SDK's error handling system is now fully consistent.

Checklist

  • Tests added or updated
  • Docs updated (JSDoc / README)
  • npm run build passes
  • npm test passes
  • npm run lint passes

@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@nafiuishaaq Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@BigBen-7
BigBen-7 merged commit 7cdf5a8 into Lead-Studios:main Aug 28, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants