npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gtcx/domain

v2.0.0

Published

Commodity-agnostic domain services for GTCX Protocol - 10/10 architectural compliance

Readme

@gtcx/domain

Domain models, event system, offline queue, and schema migrations.

Installation

pnpm add @gtcx/domain

Quick Start

import { DomainEventFactory, InMemoryEventEmitter } from '@gtcx/domain';
import { OfflineQueue, InMemoryQueueStorage } from '@gtcx/domain';

const factory = new DomainEventFactory('corr-1');
const emitter = new InMemoryEventEmitter();
emitter.onAny((e) => console.log(e.type));

const event = factory.registration('registration.started', { sessionId: 's1' });
emitter.emit(event);

const queue = new OfflineQueue(new InMemoryQueueStorage());
await queue.enqueue('registration', { lotId: 'lot-001' });

When to use @gtcx/domain vs @gtcx/types

  • @gtcx/domain — Business-domain types and runtime services for application layers. Import from here when building registration, trading, or compliance workflows. Provides: AssetLot, Transaction, Trader, ComplianceRecord, Zod schemas, event system, metrics, offline queue, and AI integration hooks.

  • @gtcx/types — Protocol-level types with zero runtime code. Import from there when working directly with the six verification protocols (TradePass, GeoTag, GCI, VaultMark, PvP) or identity primitives.

Both can be used together. Protocol types flow into domain types at the service boundary.

Module Map

| Concern | Canonical package | Domain re-export? | | ------------------------------------------ | ----------------------------- | ---------------------- | | Types, schemas, versioning, migrations | @gtcx/domain | n/a (owned here) | | Events (types, payloads, factory, emitter) | @gtcx/events | Yes — backwards compat | | Metrics | @gtcx/domain/metrics | n/a (owned here) | | AI logging | @gtcx/domain/ai-logging | n/a (owned here) | | AI integration | @gtcx/domain/ai-integration | n/a (owned here) | | Offline queue | @gtcx/domain/offline | n/a (owned here) |

New code should import events directly from @gtcx/events. The re-exports from @gtcx/domain and @gtcx/domain/events remain for backwards compatibility.

Sub-exports

| Path | Description | | ----------------------------- | --------------------------------------------------- | | @gtcx/domain/schemas | Zod validation schemas | | @gtcx/domain/events | Event factory and emitter (re-exports @gtcx/events) | | @gtcx/domain/offline | Offline queue and storage | | @gtcx/domain/metrics | Metrics collection | | @gtcx/domain/migrations | Schema migrations | | @gtcx/domain/versioning | API versioning | | @gtcx/domain/ai-logging | AI operation logging | | @gtcx/domain/ai-integration | AI integration hooks |

Related

License

MIT