open-index/open-npm huggingface dataset:
npm package: @sovrahq/ami-agent-plugin
Description: Ami Agent Plugin
Author: QuarkID
Latest version: 0.1.4

# @quarkid/ami-agent-plugin

## Descripción

`@quarkid/ami-agent-plugin` es un **plugin para @quarkid/agent** que integra funcionalidad AMI (Advanced Messaging Interface) directamente en el agente. Permite que el agente QuarkID gestione chats y mensajería avanzada sin necesidad de instanciar `@quarkid/ami-sdk` por separado.

Este plugin extiende las capacidades del agente con soporte para conversaciones DIDComm estructuradas, estados de mensaje y gestión de threads.

## Tecnologías y Dependencias Clave

- **TypeScript** (^4.5.4)
- **@quarkid/ami-core** (0.1.2) - Core AMI
- **@quarkid/ami-sdk** (0.1.3) - SDK AMI completo

### PeerDependencies
- **@quarkid/agent** (0.10.0-7)
- **@quarkid/one-click-agent-plugin** (0.3.2)

### DevDependencies
- **Jest** (^28.0.3) / **ts-jest** (^28.0.1) - Testing

## Instalación

### npm
```bash
npm install @quarkid/ami-agent-plugin @quarkid/agent
```

### yarn
```bash
yarn add @quarkid/ami-agent-plugin @quarkid/agent
```

### pnpm
```bash
pnpm add @quarkid/ami-agent-plugin @quarkid/agent
```

⚠️ **Nota**: Requiere `@quarkid/agent` como peerDependency.

## API / Exports Principales

| Export | Descripción |
|--------|-------------|
| `AMIAgentPlugin` | Clase del plugin AMI para el agente |

**Integración con Agent:**

```typescript
import { Agent } from "@quarkid/agent";
import { AMIAgentPlugin } from "@quarkid/ami-agent-plugin";

const amiPlugin = new AMIAgentPlugin({
  // ... configuración
});

const agent = new Agent({
  // ... configuración del agente
  agentPlugins: [amiPlugin]
});
```

## Configuración / Variables de Entorno

⚠️ **No requiere variables de entorno propias**, pero depende de la configuración del agente host.

## Compatibilidad

- **Node.js**: >= 17.x (inferido de `@types/node": "^17.0.27"`)
- **TypeScript**: >= 4.5.4
- **Entornos**: Backend (Node.js)

## Versionado y Publicación

- **Versión actual**: `0.1.3`
- **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: @sovrahq/ami-core
Description: ## Descripción
Author: QuarkID
Latest version: 0.1.2

# @quarkid/ami-core

## Descripción

`@quarkid/ami-core` provee la **infraestructura base para AMI** (Advanced Messaging Interface), un sistema de mensajería avanzado sobre DIDComm. Define modelos de mensajes, eventos, storage y utilidades core que son utilizadas por `@quarkid/ami-sdk` y otros componentes AMI.

Implementa tipos de mensajes estándar, ACKs, problem reports y gestión de threads de conversación, siguiendo especificaciones DIDComm.

## Tecnologías y Dependencias Clave

- **TypeScript** (^4.5.4)
- **@quarkid/did-core** (1.1.2) - Modelos de DID y DIDComm

### DevDependencies
- **Jest** (^28.0.3) / **ts-jest** (^28.0.1) - Testing

## Instalación

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

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

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

## API / Exports Principales

| Export | Descripción |
|--------|-------------|
| `AMICore` | Clase principal de AMI Core |
| `Message` / `StandardMessage` / `AckMessage` / `ProblemReportMessage` | Modelos de mensajes |
| `MessageBodyModel` / `StandardMessageBodyModel` / `ProblemReportBodyModel` | Modelos de cuerpos de mensaje |
| `MessageTypes` | Enum de tipos de mensaje |
| `ContentType` | Enum de tipos de contenido (text, image, video, audio, file) |
| `ACKStatus` | Enum de estados de ACK (sent, delivered, read) |
| `PlsACKOnValues` | Enum de valores de solicitud de ACK |
| `IMessageStorage` / `IMessageThreadStorage` | Interfaces de storage |
| `StandardMessageEvent` / `ACKMessageEvent` / `ProblemReportMessageEvent` | Eventos de mensajes |
| `Guid` | Utilidad de generación de GUIDs |
| `DIDCommMessage` | Re-export de @quarkid/did-core |

## Configuración / Variables de Entorno

⚠️ **No requiere configuración externa.** Es un paquete de modelos e infraestructura base.

## Compatibilidad

- **Node.js**: >= 17.x (inferido de `@types/node": "^17.0.27"`)
- **TypeScript**: >= 4.5.4
- **Entornos**: Backend (Node.js), Frontend compatible

## Versionado y Publicación

- **Versión actual**: `0.1.2`
- **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: @sovrahq/ami-sdk
Description: ## Descripción
Author: QuarkID
Latest version: 0.1.3

# @quarkid/ami-sdk

## Descripción

`@quarkid/ami-sdk` es el **SDK completo para AMI** (Advanced Messaging Interface), proveyendo funcionalidad de alto nivel para aplicaciones de mensajería descentralizada. Implementa gestión de chats, mensajes con estados (enviado/entregado/leído), soporte para archivos multimedia, chunking de mensajes grandes y encoders personalizados.

Construido sobre `@quarkid/ami-core` y `@quarkid/kms-core`, permite crear aplicaciones de chat seguras y descentralizadas usando DIDs.

## Tecnologías y Dependencias Clave

- **TypeScript** (^4.5.4)
- **@quarkid/ami-core** (0.1.2) - Core AMI
- **@quarkid/kms-core** (1.4.0-4) - KMS Core

### DevDependencies
- **@quarkid/agent** (0.10.0-7) - Testing
- **Jest** (^28.0.3) / **ts-jest** (^28.0.1) - Testing

## Instalación

### npm
```bash
npm install @quarkid/ami-sdk
```

### yarn
```bash
yarn add @quarkid/ami-sdk
```

### pnpm
```bash
pnpm add @quarkid/ami-sdk
```

## API / Exports Principales

| Export | Descripción |
|--------|-------------|
| `AMISDK` | Clase principal del SDK AMI |
| `Chat` / `IChat` | Modelo e interfaz de chat |
| `ChatStorage` / `IChatStorage` | Storage de chats |
| `MessageStorage` / `MessageThreadStorage` | Storage de mensajes (de ami-core) |
| `ChatMessage` / `IncomingChatMessage` / `OutgoingChatMessage` | Modelos de mensajes de chat |
| `IncomingChatMessageStatus` / `OutgoingChatMessageStatus` | Estados de mensajes |
| `IEncoder` | Interfaz de encoder |
| `ChunkedEncoder` | Encoder para mensajes grandes (chunking) |
| `StandardEncoder` | Encoder estándar |
| `IStorage` | Interfaz genérica de storage |
| `getFileExtension` | Utilidad para detectar extensión de archivos |
| Re-exports de `@quarkid/ami-core` | Message, MessageTypes, ContentType, eventos, etc. |

**Métodos principales de `AMISDK`:**
- `createChat(withDid)` - Crea nuevo chat con un DID
- `sendMessage(chatId, content, contentType)` - Envía mensaje
- `receiveMessage(message)` - Procesa mensaje recibido
- `getChats()` - Obtiene lista de chats
- `getChatMessages(chatId)` - Obtiene mensajes de un chat
- `markAsRead(chatId, messageId)` - Marca mensaje como leído

## Configuración / Variables de Entorno

**Configuración requerida:**

```typescript
const ami = new AMISDK({
  did: "did:quarkid:...",
  kms: kmsInstance,
  chatStorage: chatStorageImpl,
  messageStorage: messageStorageImpl,
  // ... opciones adicionales
});
```

## Compatibilidad

- **Node.js**: >= 17.x (inferido de `@types/node": "^17.0.27"`)
- **TypeScript**: >= 4.5.4
- **Entornos**: Backend (Node.js), puede adaptarse para Frontend/Mobile

## Versionado y Publicación

- **Versión actual**: `0.1.3`
- **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: @sovrahq/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: @sovrahq/did-comm
Description: This package exposes the functionality to pack and unpack messages using DIDComm.
Author: QuarkID
Latest version: 1.1.2

# DID Registry

This package exposes the functionality to pack and unpack messages using DIDComm.

To pack a message, you need to provide a recipient DID and the content to be encrypted.
Internally, this service uses Extrimian KMS Client to retrieve the sender DIDComm keys and also uses
Extrimian Modena resolver to fetch the sender DID Document and get its DIDComm public keys.

To unpack a message, you need to provide the content to be decrypted. This uses Extrimian KMS
Client to retrieve the recipient DIDComm keys.
npm package: @sovrahq/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;
    };
}
```
npm package: @sovrahq/did-registry
Description: This package exposes the functionality to create and publish DIDs using Modena Registry.
Author: QuarkID
Latest version: 1.5.3

# DID Registry
This package exposes the functionality to create and publish DIDs using Modena Registry.

To create a new DID, you need to provide some public keys. You can use Extrimian KMS to generate the private keys. 

The next example shows how to create a new DID using Extrimian Registry and Extrimian KMS.

```
import { KMSClient } from "@quarkid/kms-client";
import { Did } from "@quarkid/did-registry";
import { AssertionMethodPurpuse, KeyAgreementPurpose } from "@quarkid/did-core";
import { LANG, Suite } from "@quarkid/kms-core";

const kms = new KMSClient({
    lang: LANG.en,
    storage: new SecureStorage(),
});

const updateKey = await kms.create(Suite.ES256k);
const recoveryKey = await kms.create(Suite.ES256k);

const didComm = await kms.create(Suite.DIDComm);
const bbsbls = await kms.create(Suite.Bbsbls2020);

const didService = new Did();

const longDID = await didService.createDID({
    updateKey: updateKey.publicKeyJWK,
    recoveryKey: recoveryKey.publicKeyJWK,
    verificationMethods: [{
        id: "bbsbls",
        type: "Bls12381G1Key2020",
        publicKeyJwk: bbsbls.publicKeyJWK,
        purpose: [new AssertionMethodPurpuse()]
    },
    {
        id: "didComm",
        type: "X25519KeyAgreementKey2019",
        publicKeyJwk: didComm.publicKeyJWK,
        purpose: [new KeyAgreementPurpose()]
    }],
})
```

KMS applies dependency inversion concepts so it requires send a SecureStorage by its constructor.

To learn more about the Extrimian KMS read the documentation:
@quarkid/kms-client

createDID request returns a CreateDIDResponse

```
export interface CreateDIDResponse {
    recoveryKey: IJWK;
    updateKey: IJWK;
    document: IonDocumentModel;
    longDid: string;
    didUniqueSuffix: string;
}
```

Then you could publish your LongDID using the CreateDIDResponse:

```
const registry = new Did();

return await registry.publishDID({
    modenaApiURL: getModenaApiURL(),
    createDIDResponse: createDID,
});
```

Publish a did requires a Modena API URL, which represents a modena node running as a service.

You can provide your own Modena node or use a public node.
npm package: @sovrahq/did-resolver
Description: This package exposes the functionality to resolve DIDs using Modena Resolvers.
Author: QuarkID
Latest version: 1.4.6

# DID Resolver
This package exposes the functionality to resolve DIDs using Modena Resolvers.

```
import { DIDModenaResolver } from "@quarkid/did-resolver"

const resolver = new DIDModenaResolver({ modenaURL: getModenaApiURL() });
const didDocument = await resolver.resolveDID(did);
```

Resolve a DID using Modena Resolver requires a Modena API URL, which represents a modena node running as a service.

You can provide your own Modena node or use a public node.
npm package: @sovrahq/kms-core
Description: This package exposes interfaces to be implemented by KMS concrete implementations like Extrimian KMS Client.
Author: QuarkID
Latest version: 1.4.0-6

# Extrimian - KMS Core
This package exposes interfaces to be implemented by KMS concrete implementations like Extrimian KMS Client.

## Interfaces and Enums
```
export interface KMSStorage {
    add(key: string, data: any): Promise<void>;
    get(key: string): Promise<any>;
    getAll(): Promise<Map<string, any>>;
    update(key: string, data: any);
    remove(key: string);
}
```

```
export interface IKeyPair {
    readonly privateKey: string;
    readonly publicKey: string;
}
```

```
export interface IKMS {
    create(suite: Suite): Promise<{ publicKeyJWK: IJWK }>;
    sign(suite: Suite, publicKeyJWK: IJWK, content: any): Promise<string>;
    signVC(suite: Suite,
        publicKeyJWK: IJWK,
        vc: any,
        did: string,
        verificationMethodId: string,
        purpose: Purpose): Promise<VerifiableCredential>;
    pack(publicKeyJWK: IJWK, toHexPublicKeys: string[], contentToSign: string): Promise<string>;
    unpack(publicKeyJWK: IJWK, packedContent: string): Promise<string>;
    export(publicKeyJWK: IJWK): Promise<any>;
    getPublicKeysBySuiteType(suite: Suite): Promise<IJWK[]>;
    getAllPublicKeys(): Promise<IJWK[]>;
}
```

```
export enum LANG {
    en = 'en',
    es = 'es',
    fr = 'fr',
    it = 'it',
}
```

```
export enum Suite {
    ES256k = "es256k",
    DIDComm = "didcomm",
    Bbsbls2020 = "bbsbls2020"
}
```

This package does not add functionality or features, it just exposes interfaces to be used by other packages.