open-index/open-npm huggingface dataset:
npm package: @quarkid/core
Description: ## Descripción
Author: QuarkID
Latest version: 1.0.7

# @quarkid/core

## Descripción

`@quarkid/core` es un paquete fundamental que provee **infraestructura arquitectónica base** para el ecosistema QuarkID. Implementa patrones CQRS (Command Query Responsibility Segregation), mediadores, inyección de dependencias y un sistema de eventos ligero.

Este paquete **no agrega funcionalidad de negocio**, sino que expone abstracciones e infraestructura que son consumidas por otros paquetes del monorepo QuarkID.

## Tecnologías y Dependencias Clave

- **TypeScript** (~4.5.4)
- **reflect-metadata** (^0.1.13) - Soporte para decoradores y metadatos

### DevDependencies
- **Inversify** (^6.0.1) - Contenedor de inyección de dependencias
- **Jest** (^28.0.3) - Testing

## Instalación

### npm
```bash
npm install @quarkid/core
```

### yarn
```bash
yarn add @quarkid/core
```

### pnpm
```bash
pnpm add @quarkid/core
```

## API / Exports Principales

| Export | Descripción |
|--------|-------------|
| `ICommand` | Interfaz base para comandos CQRS |
| `ICommandHandler` | Interfaz para handlers de comandos |
| `INotification` | Interfaz base para notificaciones |
| `INotificationHandler` | Interfaz para handlers de notificaciones |
| `IMediator` / `Mediator` | Implementación del patrón Mediator para CQRS |
| `DIService` | Servicio de inyección de dependencias |
| `Injectable` | Decorador para marcar clases inyectables |
| `LiteEvent` | Sistema de eventos ligero y type-safe |

## Configuración / Variables de Entorno

⚠️ **No requiere configuración externa.** Es un paquete de infraestructura pura.

## Compatibilidad

- **Node.js**: >= 14.x
- **TypeScript**: >= 4.5.4
- **Entornos**: Backend (Node.js), puede funcionar en bundlers modernos (Webpack, Vite)

⚠️ **Nota**: Requiere soporte para decoradores TypeScript (`experimentalDecorators: true` en `tsconfig.json`).

## Versionado y Publicación

- **Versión actual**: `1.0.7`
- **Build previo**: Ejecutar `npm run build` antes de publicar
- **Estructura de salida**: `dist/index.js` (CommonJS)

## Licencia

**Apache-2.0**

Ver archivo [LICENSE](../../LICENSE) en la raíz del monorepo.

---

**Mantenido por**: QuarkID Team  
**Repositorio**: https://github.com/ssi-quarkid/Paquetes-NPMjs/tree/main
npm package: @quarkid/did-core
Description: This package define general interfaces to work with DID such as DIDDocument, DID Methods, Purposes, Services and Verification Methods.
Author: QuarkID
Latest version: 1.1.2

# DID Core
This package define general interfaces to work with DID such as DIDDocument, DID Methods, Purposes, Services and Verification Methods.

This packages is used by DID Registry and DID Resolver.

It does not add functionality or services but exposes the interfaces that will be used by the rest of the packages


## DID Document
```
export interface DIDDocument {
  "@context": string | string[] | undefined | null;
  id: string;
  verificationMethod: Array<VerificationMethodPublicKey58 | VerificationMethodGpg | VerificationMethodJwk>;
  authentication: Array<string | VerificationMethodPublicKey58 | VerificationMethodGpg | VerificationMethodJwk>;
  assertionMethod: Array<string | VerificationMethodPublicKey58 | VerificationMethodGpg | VerificationMethodJwk>;
  keyAgreement: Array<string | VerificationMethodPublicKey58 | VerificationMethodGpg | VerificationMethodJwk>;
  capabilityDelegation: Array<string | VerificationMethodPublicKey58 | VerificationMethodGpg | VerificationMethodJwk>;
  capabilityInvocation: Array<string | VerificationMethodPublicKey58 | VerificationMethodGpg | VerificationMethodJwk>;
  service?: Array<Service>
}
```

## Purpose
```
export abstract class Purpose {
    abstract name: string;
}

export class AuthenticationPurpose extends Purpose {
    name = "authentication";
    challenge?: string;

    public constructor(init?: Partial<AuthenticationPurpose>) {
        super();
        Object.assign(this, init);
    }
}

export class AssertionMethodPurpuse {
    name = "assertionMethod";
}

export class CapabilityInvocationPurpose {
    name = "capabilityInvocation";
}

export class KeyAgreementPurpose {
    name = "keyAgreement";
}
```

## Service
```
  id: string,
  type: string,
  serviceEndpoint: string | string[] | Record<string, string | string[]>
```

## Verification Methods
```
export interface VerificationMethod {
    id: string;
    type: string;
    controller: string;
}

export interface VerificationMethodPublicKeyHex extends VerificationMethod {
    type: VerificationMethodTypes.Ed25519VerificationKey2018 | VerificationMethodTypes.Bls12381G1Key2020 | VerificationMethodTypes.EcdsaSecp256k1VerificationKey2019;
    publicKeyHex: string;
}

export interface VerificationMethodPublicKey58 extends VerificationMethod {
    type: VerificationMethodTypes.Ed25519VerificationKey2018 | VerificationMethodTypes.Bls12381G1Key2020 | VerificationMethodTypes.EcdsaSecp256k1VerificationKey2019;
    publicKeyBase58: string;
}

export interface VerificationMethodGpg extends VerificationMethod {
    type: VerificationMethodTypes.GpgVerificationKey2020;
    publicKeyGpg: string;
}

export interface VerificationMethodJwk extends VerificationMethod {
    type: VerificationMethodTypes.JsonWebKey2020 | VerificationMethodTypes.EcdsaSecp256k1VerificationKey2019;

    publicKeyJwk: {
        crv: string;
        x: string;
        y: string;
        kty: string;
        kid?: string;
    };
}
```