{"_id":"@2060.io/credo-ts-didcomm-receipts","_rev":"4-2233129312272154913f640e46968f7a","name":"@2060.io/credo-ts-didcomm-receipts","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.7":{"name":"@2060.io/credo-ts-didcomm-receipts","version":"0.0.7","license":"Apache-2.0","_id":"@2060.io/credo-ts-didcomm-receipts@0.0.7","maintainers":[{"name":"genaris","email":"gentilester@gmail.com"}],"homepage":"https://github.com/2060-io/credo-ts-didcomm-ext/tree/main/packages/receipts","bugs":{"url":"https://github.com/2060-io/credo-ts-didcomm-ext/issues"},"dist":{"shasum":"8ec7ea4aac65a74c75ddbf9a299b7f39f03de7df","tarball":"https://registry.npmjs.org/@2060.io/credo-ts-didcomm-receipts/-/credo-ts-didcomm-receipts-0.0.7.tgz","fileCount":42,"integrity":"sha512-PTl636yjq9xglqFe1GPzic/4QI6Zu/2HQ94ToDY9mmEo0g7eRQ4S/0pEEHZdWdBY3WYIsZUd3Y78QGi/ZrzAqg==","signatures":[{"sig":"MEQCIFHxdzI77O3fRtY7sQ+66FN7hzhFuVhYcdgd+NUJ49LXAiBXPqJjR/m8Dx6U8dA/OfdqFD8b3P3+cbDvBVNU0f7INw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47025},"main":"build/index","types":"build/index","gitHead":"b83881d4a9632603ec167e0e981092a50fc53259","scripts":{"test":"jest","build":"yarn run clean && yarn run compile","clean":"rimraf -rf ./build","compile":"tsc -p tsconfig.build.json","prettier":"prettier --ignore-path .gitignore '**/*.+(js|json|ts|md|yml|yaml)'","check-types":"tsc --noEmit -p tsconfig.build.json","check-format":"yarn prettier --check","prepublishOnly":"yarn run build"},"_npmUser":{"name":"genaris","email":"gentilester@gmail.com"},"repository":{"url":"git+https://github.com/2060-io/credo-ts-didcomm-ext.git","type":"git","directory":"packages/receipts"},"_npmVersion":"10.8.2","description":"DIDComm Message Receipts protocol implementation for @credo-ts/core","directories":{},"_nodeVersion":"20.18.2","dependencies":{"rxjs":"^7.2.0","uuid":"^9.0.0","tsyringe":"^4.8.0","@credo-ts/core":"0.5.13","class-validator":"^0.14.1","reflect-metadata":"^0.1.13","class-transformer":"^0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/uuid":"^9.0.0","@credo-ts/node":"0.5.13","@credo-ts/askar":"0.5.13","@types/node-fetch":"^2.6.4","@hyperledger/aries-askar-nodejs":"0.2.3"},"_npmOperationalInternal":{"tmp":"tmp/credo-ts-didcomm-receipts_0.0.7_1739656626268_0.009326477775028152","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"@2060.io/credo-ts-didcomm-receipts","version":"0.0.8","license":"Apache-2.0","_id":"@2060.io/credo-ts-didcomm-receipts@0.0.8","maintainers":[{"name":"genaris","email":"gentilester@gmail.com"}],"homepage":"https://github.com/2060-io/credo-ts-didcomm-ext/tree/main/packages/receipts","bugs":{"url":"https://github.com/2060-io/credo-ts-didcomm-ext/issues"},"dist":{"shasum":"a39b9ae4cd4fe111f1a33fdb07c16b89c2812ab9","tarball":"https://registry.npmjs.org/@2060.io/credo-ts-didcomm-receipts/-/credo-ts-didcomm-receipts-0.0.8.tgz","fileCount":6,"integrity":"sha512-E6rV+ychwhT4D2El3mgpvPr2Ouhy8AdlFMXX5BPJpugM6w2Ua5aWBES2GHR93suRI7VJdA8El0HneRRccdGxgg==","signatures":[{"sig":"MEUCIQCLGd82FO8cQCLGtj5LWEslcvc5ZT+WZ5yHAlYOSBNUqgIgJyzIxpiZ3jvgki4a1Ar+ZmptNg5+Twn7AlFnT/M/O8U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@2060.io%2fcredo-ts-didcomm-receipts@0.0.8","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":48400},"main":"./build/index.mjs","type":"module","_from":"file:2060.io-credo-ts-didcomm-receipts-0.0.8.tgz","types":"./build/index.d.mts","module":"./build/index.mjs","exports":{".":{"types":"./build/index.d.mts","default":"./build/index.mjs"}},"scripts":{"test":"vitest","build":"tsdown --config ./tsdown.config.ts","clean":"rimraf -rf ./build","compile":"tsc -p tsconfig.build.json","prettier":"prettier --ignore-path .gitignore '**/*.+(js|json|ts|md|yml|yaml)'","check-types":"tsc --noEmit -p tsconfig.build.json","check-format":"pnpm prettier --check"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:19e33b5b-443c-43b2-8c6c-8602590de1cd"}},"_resolved":"/tmp/7d103ed63ec5a5f0aa36ebc9fb1a4da9/2060.io-credo-ts-didcomm-receipts-0.0.8.tgz","_integrity":"sha512-E6rV+ychwhT4D2El3mgpvPr2Ouhy8AdlFMXX5BPJpugM6w2Ua5aWBES2GHR93suRI7VJdA8El0HneRRccdGxgg==","repository":{"url":"git+https://github.com/2060-io/credo-ts-didcomm-ext.git","type":"git","directory":"packages/receipts"},"_npmVersion":"11.7.0","description":"DIDComm Message Receipts protocol implementation for @credo-ts/core","directories":{},"_nodeVersion":"22.21.1","dependencies":{"rxjs":"^7.2.0","uuid":"^9.0.0","tsyringe":"^4.8.0","@credo-ts/core":"^0.6.1","class-validator":"^0.14.1","reflect-metadata":"^0.1.13","@credo-ts/didcomm":"^0.6.1","class-transformer":"^0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/uuid":"^9.0.0","@credo-ts/node":"^0.6.1","@credo-ts/askar":"^0.6.1","@types/node-fetch":"^2.6.4","@openwallet-foundation/askar-nodejs":"^0.4.3","@openwallet-foundation/askar-shared":"^0.4.3"},"_npmOperationalInternal":{"tmp":"tmp/credo-ts-didcomm-receipts_0.0.8_1766087124548_0.839343386463776","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@2060.io/credo-ts-didcomm-receipts","version":"0.1.0","license":"Apache-2.0","_id":"@2060.io/credo-ts-didcomm-receipts@0.1.0","maintainers":[{"name":"genaris","email":"gentilester@gmail.com"}],"homepage":"https://github.com/2060-io/credo-ts-didcomm-ext/tree/main/packages/receipts","bugs":{"url":"https://github.com/2060-io/credo-ts-didcomm-ext/issues"},"dist":{"shasum":"e96301b415e270e10f21541e72aa2a4ab7164bd0","tarball":"https://registry.npmjs.org/@2060.io/credo-ts-didcomm-receipts/-/credo-ts-didcomm-receipts-0.1.0.tgz","fileCount":6,"integrity":"sha512-od0iApN2msfPEVCqG+OxYRKFRCrI5Dmwlp0AMXm7hHCZevIKE6XfXMLzNVX3TbbZorHZiyZnGlo3pOYcskyNMw==","signatures":[{"sig":"MEUCIQDmABqSgiWnei1x+KAGJb2JNjDu/aJQnFPlyPijhEYFXAIgBwS5NWoQHUWP3x60ELLP4h4SQmbqHWiHlHg9BrC/HXc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@2060.io%2fcredo-ts-didcomm-receipts@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":48265},"main":"./build/index.mjs","type":"module","_from":"file:2060.io-credo-ts-didcomm-receipts-0.1.0.tgz","types":"./build/index.d.mts","module":"./build/index.mjs","exports":{".":{"types":"./build/index.d.mts","default":"./build/index.mjs"}},"scripts":{"test":"vitest","build":"tsdown --config ./tsdown.config.ts","clean":"rimraf -rf ./build","compile":"tsc -p tsconfig.build.json","prettier":"prettier --ignore-path .gitignore '**/*.+(js|json|ts|md|yml|yaml)'","check-types":"tsc --noEmit -p tsconfig.build.json","check-format":"pnpm prettier --check"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:19e33b5b-443c-43b2-8c6c-8602590de1cd"}},"_resolved":"/tmp/26ac2251240d605c9fe20eedb369ed84/2060.io-credo-ts-didcomm-receipts-0.1.0.tgz","_integrity":"sha512-od0iApN2msfPEVCqG+OxYRKFRCrI5Dmwlp0AMXm7hHCZevIKE6XfXMLzNVX3TbbZorHZiyZnGlo3pOYcskyNMw==","repository":{"url":"git+https://github.com/2060-io/credo-ts-didcomm-ext.git","type":"git","directory":"packages/receipts"},"_npmVersion":"11.11.0","description":"DIDComm Message Receipts protocol implementation for @credo-ts/core","directories":{},"_nodeVersion":"22.22.0","dependencies":{"rxjs":"^7.2.0","uuid":"^9.0.0","tsyringe":"^4.10.0","@credo-ts/core":"^0.6.1","class-validator":"^0.14.1","reflect-metadata":"^0.1.13","@credo-ts/didcomm":"^0.6.1","class-transformer":"^0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/uuid":"^9.0.0","@credo-ts/node":"^0.6.1","@credo-ts/askar":"^0.6.1","@types/node-fetch":"^2.6.4","@openwallet-foundation/askar-nodejs":"^0.4.3","@openwallet-foundation/askar-shared":"^0.4.3"},"_npmOperationalInternal":{"tmp":"tmp/credo-ts-didcomm-receipts_0.1.0_1773177357260_0.9781008815157046","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@2060.io/credo-ts-didcomm-receipts","type":"module","main":"./build/index.mjs","module":"./build/index.mjs","types":"./build/index.d.mts","version":"0.1.1","exports":{".":{"types":"./build/index.d.mts","default":"./build/index.mjs"}},"publishConfig":{"access":"public"},"license":"Apache-2.0","description":"DIDComm Message Receipts protocol implementation for @credo-ts/core","homepage":"https://github.com/2060-io/credo-ts-didcomm-ext/tree/main/packages/receipts","repository":{"type":"git","url":"git+https://github.com/2060-io/credo-ts-didcomm-ext.git","directory":"packages/receipts"},"bugs":{"url":"https://github.com/2060-io/credo-ts-didcomm-ext/issues"},"devDependencies":{"@credo-ts/askar":"^0.6.1","@credo-ts/core":"^0.6.1","@credo-ts/didcomm":"^0.6.1","@credo-ts/node":"^0.6.1","@openwallet-foundation/askar-nodejs":"^0.4.3","@openwallet-foundation/askar-shared":"^0.4.3","@types/node-fetch":"^2.6.4","@types/uuid":"^9.0.0"},"peerDependencies":{"@credo-ts/core":"^0.6.1","@credo-ts/didcomm":"^0.6.1"},"dependencies":{"class-transformer":"^0.5.1","class-validator":"^0.14.1","reflect-metadata":"^0.1.13","rxjs":"^7.2.0","tsyringe":"^4.10.0","uuid":"^9.0.0"},"scripts":{"build":"tsdown --config ./tsdown.config.ts","clean":"rimraf -rf ./build","compile":"tsc -p tsconfig.build.json","check-types":"tsc --noEmit -p tsconfig.build.json","check-format":"pnpm prettier --check","prettier":"prettier --ignore-path .gitignore '**/*.+(js|json|ts|md|yml|yaml)'","test":"vitest"},"_id":"@2060.io/credo-ts-didcomm-receipts@0.1.1","_integrity":"sha512-91oSmGpY9F1YWwAnNBLT4aCLN4Phbt6PavjNy82gXBMCfC1HodQraAdiUjG6MeCPmacQjihv8rPNVWNFENtXIw==","_resolved":"/tmp/ce2deeae481ba47d055d5256cca10115/2060.io-credo-ts-didcomm-receipts-0.1.1.tgz","_from":"file:2060.io-credo-ts-didcomm-receipts-0.1.1.tgz","_nodeVersion":"22.22.0","_npmVersion":"11.11.0","dist":{"integrity":"sha512-91oSmGpY9F1YWwAnNBLT4aCLN4Phbt6PavjNy82gXBMCfC1HodQraAdiUjG6MeCPmacQjihv8rPNVWNFENtXIw==","shasum":"b4f7cea76138427858b5decc01900ec731ee1e46","tarball":"https://registry.npmjs.org/@2060.io/credo-ts-didcomm-receipts/-/credo-ts-didcomm-receipts-0.1.1.tgz","fileCount":6,"unpackedSize":48360,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@2060.io%2fcredo-ts-didcomm-receipts@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFwgSNzYjTHQz71kjll67JoZGofSZduXE/w2Xbz75YasAiBUW4QSmZmA9nZMckLY92wMs0BqAwS91j8eVomipPJ/TA=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:19e33b5b-443c-43b2-8c6c-8602590de1cd"}},"directories":{},"maintainers":[{"name":"genaris","email":"gentilester@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/credo-ts-didcomm-receipts_0.1.1_1773252415251_0.07793776882148817"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-15T21:57:06.180Z","modified":"2026-03-11T18:06:55.714Z","0.0.7":"2025-02-15T21:57:06.436Z","0.0.8":"2025-12-18T19:45:24.704Z","0.1.0":"2026-03-10T21:15:57.384Z","0.1.1":"2026-03-11T18:06:55.387Z"},"bugs":{"url":"https://github.com/2060-io/credo-ts-didcomm-ext/issues"},"license":"Apache-2.0","homepage":"https://github.com/2060-io/credo-ts-didcomm-ext/tree/main/packages/receipts","repository":{"type":"git","url":"git+https://github.com/2060-io/credo-ts-didcomm-ext.git","directory":"packages/receipts"},"description":"DIDComm Message Receipts protocol implementation for @credo-ts/core","maintainers":[{"name":"genaris","email":"gentilester@gmail.com"}],"readme":"# Credo Extension Module for Message Receipts Protocol\n\n![Credo logo](https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png)\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://raw.githubusercontent.com/openwallet-foundation/credo-ts-ext/main/LICENSE)\n[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](https://www.typescriptlang.org/)\n[![@2060.io/credo-ts-didcomm-receipts](https://img.shields.io/npm/v/@2060.io/credo-ts-didcomm-receipts)](https://www.npmjs.com/package/credo-ts-didcomm-receipts)\n\n## Overview\n\nThe **Message Receipts** extension module for [Credo](https://github.com/openwallet-foundation/credo-ts) enables agents to manage [Receipts protocol](https://didcomm.org/receipts/1.0/), allowing tracking and acknowledgment of message states (e.g., received, viewed) between agents.\n\n## Installation\n\n```bash\nnpm install @2060.io/credo-ts-didcomm-receipts\n```\n\n## Usage\n\nAdding the Module to Your Agent\nTo use the Receipts module, add it to your agent's modules configuration:\n\n```typescript\nimport { ReceiptsModule } from '@2060.io/credo-ts-didcomm-receipts'\n\nconst agent = new Agent({\n  modules: {\n    // ...other modules\n    receipts: new ReceiptsModule(),\n  },\n})\n```\n\n### Sending Message Receipts\n\nTo send message receipts (e.g., when a message is received or viewed):\n\n```typescript\nawait agent.modules.receipts.send({\n  connectionId: connection.id,\n  receipts: [\n    { messageId: 'message-id', state: MessageState.Received },\n    { messageId: 'message-id', state: MessageState.Viewed },\n  ],\n})\n```\n\n### Requesting Message Receipts\n\nTo request receipts for specific messages or message types:\n\n```typescript\nawait agent.modules.receipts.request({\n  connectionId: connection.id,\n  requestedReceipts: [\n    {\n      messageType: 'https://didcomm.org/my-protocol/1.0/my-message',\n      states: [MessageState.Received, MessageState.Viewed],\n    },\n  ],\n})\n```\n\n### Handling Receipt Events\n\nSubscribe to receipt events to react to incoming receipts:\n\n```typescript\nimport { ReceiptsEventTypes, MessageReceiptsReceivedEvent } from '@2060.io/credo-ts-didcomm-receipts'\n\nagent.events.on(ReceiptsEventTypes.MessageReceiptsReceived, async ({ payload }: MessageReceiptsReceivedEvent) => {\n  const connectionId = payload.connectionId\n  const receipts = payload.receipts\n\n  receipts.forEach((receipt) => {\n    const { messageId, timestamp, state } = receipt\n    sendMessageStateUpdatedEvent({ agent, messageId, connectionId, state, timestamp, config })\n  })\n})\n```\n\n### Features\n\n- **Send Message Receipts**: Notify other agents about message states (received, viewed, etc.).\n- **Request Receipts**: Ask for receipts for specific messages or message types.\n- **Event Subscription**: Listen for receipt events to update UI or trigger workflows.\n- **Protocol Integration**: Seamless integration with Credo agent and DIDComm protocols.\n\n## API Reference\n\nSee the [source code](./src/) for details on available classes and methods:\n\n- [`DidCommReceiptsApi`:](./src/DidCommReceiptsApi.ts) Main API for sending and requesting receipts.\n- [`DidCommReceiptsService`:](./src/services/DidCommReceiptsService.ts) Internal service for receipt logic.\n- [`DidCommReceiptsModule`:](./src/DidCommReceiptsModule.ts) Module integration for Credo agent.\n\n## License\n\nApache 2.0\n\n---\n\nFor more information, see the [didcomm.org](https://didcomm.org/receipts/1.0/).\n","readmeFilename":"README.md"}