@credo-ts/core 0.5.0-alpha.146 → 0.5.0-alpha.147

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/build/agent/getOutboundMessageContext.js +3 -3
  2. package/build/agent/getOutboundMessageContext.js.map +1 -1
  3. package/build/modules/credentials/models/CredentialRole.d.ts +4 -0
  4. package/build/modules/credentials/models/CredentialRole.js +9 -0
  5. package/build/modules/credentials/models/CredentialRole.js.map +1 -0
  6. package/build/modules/credentials/models/index.d.ts +1 -0
  7. package/build/modules/credentials/models/index.js +1 -0
  8. package/build/modules/credentials/models/index.js.map +1 -1
  9. package/build/modules/credentials/protocol/BaseCredentialProtocol.js +2 -2
  10. package/build/modules/credentials/protocol/BaseCredentialProtocol.js.map +1 -1
  11. package/build/modules/credentials/protocol/v2/CredentialFormatCoordinator.js +21 -21
  12. package/build/modules/credentials/protocol/v2/CredentialFormatCoordinator.js.map +1 -1
  13. package/build/modules/credentials/protocol/v2/V2CredentialProtocol.js +19 -13
  14. package/build/modules/credentials/protocol/v2/V2CredentialProtocol.js.map +1 -1
  15. package/build/modules/credentials/repository/CredentialExchangeRecord.d.ts +5 -0
  16. package/build/modules/credentials/repository/CredentialExchangeRecord.js +2 -1
  17. package/build/modules/credentials/repository/CredentialExchangeRecord.js.map +1 -1
  18. package/build/modules/proofs/models/ProofRole.d.ts +4 -0
  19. package/build/modules/proofs/models/ProofRole.js +9 -0
  20. package/build/modules/proofs/models/ProofRole.js.map +1 -0
  21. package/build/modules/proofs/models/index.d.ts +1 -0
  22. package/build/modules/proofs/models/index.js +1 -0
  23. package/build/modules/proofs/models/index.js.map +1 -1
  24. package/build/modules/proofs/protocol/BaseProofProtocol.js +2 -2
  25. package/build/modules/proofs/protocol/BaseProofProtocol.js.map +1 -1
  26. package/build/modules/proofs/protocol/v2/ProofFormatCoordinator.js +17 -17
  27. package/build/modules/proofs/protocol/v2/ProofFormatCoordinator.js.map +1 -1
  28. package/build/modules/proofs/protocol/v2/V2ProofProtocol.d.ts +1 -2
  29. package/build/modules/proofs/protocol/v2/V2ProofProtocol.js +18 -15
  30. package/build/modules/proofs/protocol/v2/V2ProofProtocol.js.map +1 -1
  31. package/build/modules/proofs/protocol/v2/handlers/V2PresentationHandler.js +2 -2
  32. package/build/modules/proofs/protocol/v2/handlers/V2PresentationHandler.js.map +1 -1
  33. package/build/modules/proofs/repository/ProofExchangeRecord.d.ts +5 -1
  34. package/build/modules/proofs/repository/ProofExchangeRecord.js +2 -1
  35. package/build/modules/proofs/repository/ProofExchangeRecord.js.map +1 -1
  36. package/build/storage/migration/updates/0.1-0.2/credential.d.ts +2 -2
  37. package/build/storage/migration/updates/0.1-0.2/credential.js +12 -12
  38. package/build/storage/migration/updates/0.1-0.2/credential.js.map +1 -1
  39. package/build/storage/migration/updates/0.2-0.3/proof.d.ts +2 -2
  40. package/build/storage/migration/updates/0.2-0.3/proof.js +12 -12
  41. package/build/storage/migration/updates/0.2-0.3/proof.js.map +1 -1
  42. package/build/storage/migration/updates/0.4-0.5/credentialExchangeRecord.d.ts +17 -0
  43. package/build/storage/migration/updates/0.4-0.5/credentialExchangeRecord.js +107 -0
  44. package/build/storage/migration/updates/0.4-0.5/credentialExchangeRecord.js.map +1 -0
  45. package/build/storage/migration/updates/0.4-0.5/index.js +4 -0
  46. package/build/storage/migration/updates/0.4-0.5/index.js.map +1 -1
  47. package/build/storage/migration/updates/0.4-0.5/proofExchangeRecord.d.ts +17 -0
  48. package/build/storage/migration/updates/0.4-0.5/proofExchangeRecord.js +88 -0
  49. package/build/storage/migration/updates/0.4-0.5/proofExchangeRecord.js.map +1 -0
  50. package/package.json +2 -2
@@ -7,7 +7,7 @@ const error_1 = require("../error");
7
7
  const oob_1 = require("../modules/oob");
8
8
  const outOfBandRecordMetadataTypes_1 = require("../modules/oob/repository/outOfBandRecordMetadataTypes");
9
9
  const routing_1 = require("../modules/routing");
10
- const storage_1 = require("../storage");
10
+ const didcomm_1 = require("../storage/didcomm");
11
11
  const uuid_1 = require("../utils/uuid");
12
12
  const models_1 = require("./models");
13
13
  /**
@@ -190,9 +190,9 @@ async function addExchangeDataToMessage(agentContext, { message, ourService, out
190
190
  // TODO: we should store this in the OOB record, but that would be a breaking change for now.
191
191
  // We can change this in 0.5.0
192
192
  message.service = ServiceDecorator_1.ServiceDecorator.fromResolvedDidCommService(ourService);
193
- await agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository).saveOrUpdateAgentMessage(agentContext, {
193
+ await agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository).saveOrUpdateAgentMessage(agentContext, {
194
194
  agentMessage: message,
195
- role: storage_1.DidCommMessageRole.Sender,
195
+ role: didcomm_1.DidCommMessageRole.Sender,
196
196
  associatedRecordId: associatedRecord.id,
197
197
  });
198
198
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getOutboundMessageContext.js","sourceRoot":"","sources":["../../src/agent/getOutboundMessageContext.ts"],"names":[],"mappings":";;;AAOA,sCAA+B;AAC/B,6EAAyE;AACzE,oCAAqC;AACrC,wCAAqG;AACrG,yGAAoG;AACpG,gDAAmD;AACnD,wCAAyE;AACzE,wCAAoC;AAEpC,qCAAiD;AAEjD;;;;GAIG;AAEH;;;GAGG;AACI,KAAK,UAAU,yBAAyB,CAC7C,YAA0B,EAC1B,EACE,OAAO,EACP,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,GAOhB;IAED,wGAAwG;IACxG,sGAAsG;IACtG,IAAI,gBAAgB,EAAE;QACpB,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAC9B,iDAAiD,OAAO,CAAC,EAAE,oBAAoB,gBAAgB,CAAC,EAAE,EAAE,CACrG,CAAA;QACD,OAAO,IAAI,+BAAsB,CAAC,OAAO,EAAE;YACzC,YAAY;YACZ,gBAAgB;YAChB,UAAU,EAAE,gBAAgB;SAC7B,CAAC,CAAA;KACH;IAED,IAAI,CAAC,mBAAmB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ACH,CAAC;AAED,KAAK,UAAU,wBAAwB,CACrC,YAA0B,EAC1B,EACE,OAAO,EACP,UAAU,EACV,eAAe,EACf,gBAAgB,GAMjB;IAED,MAAM,wBAAwB,GAAG,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,QAAQ,CAAC,GAAG,CAAC,0DAA2B,CAAC,gBAAgB,CAAC,CAAA;IAE5G,gEAAgE;IAChE,kEAAkE;IAClE,IAAI,eAAe,IAAI,CAAA,wBAAwB,aAAxB,wBAAwB,uBAAxB,wBAAwB,CAAE,oBAAoB,MAAK,oBAAc,CAAC,cAAc,EAAE;QACvG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACnB,OAAO,CAAC,SAAS,CAAC;gBAChB,cAAc,EAAE,eAAe,CAAC,mBAAmB,CAAC,EAAE;aACvD,CAAC,CAAA;SACH;aAAM;YACL,OAAO,CAAC,MAAM,CAAC,cAAc,GAAG,eAAe,CAAC,mBAAmB,CAAC,EAAE,CAAA;SACvE;KACF;IAED,+FAA+F;IAC/F,6FAA6F;IAC7F,8BAA8B;IAC9B,OAAO,CAAC,OAAO,GAAG,mCAAgB,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAA;IAEzE,MAAM,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,kCAAwB,CAAC,CAAC,wBAAwB,CAAC,YAAY,EAAE;QAC5G,YAAY,EAAE,OAAO;QACrB,IAAI,EAAE,4BAAkB,CAAC,MAAM;QAC/B,kBAAkB,EAAE,gBAAgB,CAAC,EAAE;KACxC,CAAC,CAAA;AACJ,CAAC"}
1
+ {"version":3,"file":"getOutboundMessageContext.js","sourceRoot":"","sources":["../../src/agent/getOutboundMessageContext.ts"],"names":[],"mappings":";;;AAOA,sCAA+B;AAC/B,6EAAyE;AACzE,oCAAqC;AACrC,wCAAqG;AACrG,yGAAoG;AACpG,gDAAmD;AACnD,gDAAiF;AACjF,wCAAoC;AAEpC,qCAAiD;AAEjD;;;;GAIG;AAEH;;;GAG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OAAO,CAAC,kCAAwB,CAAC,CAAC,wBAAwB,CAAC,YAAY,EAAE;QAC5G,YAAY,EAAE,OAAO;QACrB,IAAI,EAAE,4BAAkB,CAAC,MAAM;QAC/B,kBAAkB,EAAE,gBAAgB,CAAC,EAAE;KACxC,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare enum CredentialRole {
2
+ Issuer = "issuer",
3
+ Holder = "holder"
4
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CredentialRole = void 0;
4
+ var CredentialRole;
5
+ (function (CredentialRole) {
6
+ CredentialRole["Issuer"] = "issuer";
7
+ CredentialRole["Holder"] = "holder";
8
+ })(CredentialRole = exports.CredentialRole || (exports.CredentialRole = {}));
9
+ //# sourceMappingURL=CredentialRole.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CredentialRole.js","sourceRoot":"","sources":["../../../../src/modules/credentials/models/CredentialRole.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;AACnB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB"}
@@ -4,3 +4,4 @@ export * from './CredentialAutoAcceptType';
4
4
  export * from './CredentialFormatSpec';
5
5
  export * from './CredentialState';
6
6
  export * from './CredentialProblemReportReason';
7
+ export * from './CredentialRole';
@@ -20,4 +20,5 @@ __exportStar(require("./CredentialAutoAcceptType"), exports);
20
20
  __exportStar(require("./CredentialFormatSpec"), exports);
21
21
  __exportStar(require("./CredentialState"), exports);
22
22
  __exportStar(require("./CredentialProblemReportReason"), exports);
23
+ __exportStar(require("./CredentialRole"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/credentials/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAwC;AACxC,+DAA4C;AAC5C,6DAA0C;AAC1C,yDAAsC;AACtC,oDAAiC;AACjC,kEAA+C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/credentials/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAwC;AACxC,+DAA4C;AAC5C,6DAA0C;AAC1C,yDAAsC;AACtC,oDAAiC;AACjC,kEAA+C;AAC/C,mDAAgC"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BaseCredentialProtocol = void 0;
4
4
  const EventEmitter_1 = require("../../../agent/EventEmitter");
5
- const storage_1 = require("../../../storage");
5
+ const didcomm_1 = require("../../../storage/didcomm");
6
6
  const CredentialEvents_1 = require("../CredentialEvents");
7
7
  const CredentialState_1 = require("../models/CredentialState");
8
8
  const repository_1 = require("../repository");
@@ -91,7 +91,7 @@ class BaseCredentialProtocol {
91
91
  async delete(agentContext, credentialRecord, options) {
92
92
  var _a, _b;
93
93
  const credentialRepository = agentContext.dependencyManager.resolve(repository_1.CredentialRepository);
94
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
94
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
95
95
  await credentialRepository.delete(agentContext, credentialRecord);
96
96
  const deleteAssociatedCredentials = (_a = options === null || options === void 0 ? void 0 : options.deleteAssociatedCredentials) !== null && _a !== void 0 ? _a : true;
97
97
  const deleteAssociatedDidCommMessages = (_b = options === null || options === void 0 ? void 0 : options.deleteAssociatedDidCommMessages) !== null && _b !== void 0 ? _b : true;
@@ -1 +1 @@
1
- {"version":3,"file":"BaseCredentialProtocol.js","sourceRoot":"","sources":["../../../../src/modules/credentials/protocol/BaseCredentialProtocol.ts"],"names":[],"mappings":";;;AA2BA,8DAA0D;AAC1D,8CAA2D;AAC3D,0DAA0D;AAC1D,+DAA2D;AAC3D,8CAAoD;AAEpD;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AAC,OAAO,CAAC,iCAAoB,CAAC,CAAA;QAEzF,OAAO,oBAAoB,CAAC,gBAAgB,CAAC,YAAY,EAAE;YACzD,YAAY;YACZ,QAAQ;SACT,CAAC,CAAA;IACJ,CAAC;IAED;;;;;;OAMG;IACI,2BAA2B,CAChC,YAA0B,EAC1B,QAAgB,EAChB,YAAqB;QAErB,MAAM,oBAAoB,GAAG,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,iCAAoB,CAAC,CAAA;QAEzF,OAAO,oBAAoB,CAAC,iBAAiB,CAAC,YAAY,EAAE;YAC1D,YAAY;YACZ,QAAQ;SACT,CAAC,CAAA;IACJ,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,YAA0B,EAAE,gBAA0C;QACxF,MAAM,oBAAoB,GAAG,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,iCAAoB,CAAC,CAAA;QAEzF,OAAO,MAAM,oBAAoB,CAAC,MAAM,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAA;IAC1E,CAAC;CACF;AA3RD,wDA2RC"}
1
+ {"version":3,"file":"BaseCredentialProtocol.js","sourceRoot":"","sources":["../../../../src/modules/credentials/protocol/BaseCredentialProtocol.ts"],"names":[],"mappings":";;;AA2BA,8DAA0D;AAC1D,sDAAmE;AACnE,0DAA0D;AAC1D,+DAA2D;AAC3D,8CAAoD;AAEpD;;;GAGG;AACH,MAAsB,sBAAsB;IA2F1C;;;;;OAKG;IACI,KAAK,CAAC,oBAAoB,CAC/B,cAA2D;QAE3D,MAAM,EAAE,OAAO,EAAE,8BAA8B,EAAE,YAAY,EAAE,GAAG,cAAc,CAAA;QAEhF,MAAM,UAAU,GAAG,cAAc,CAAC,qBAAqB,EAAE,CAAA;QAEzD,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,6CAA6C,8BAA8B,CAAC,EAAE,EAAE,CAAC,CAAA;QAElH,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAC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;SACT,CAAC,CAAA;IACJ,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,YAA0B,EAAE,gBAA0C;QACxF,MAAM,oBAAoB,GAAG,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,iCAAoB,CAAC,CAAA;QAEzF,OAAO,MAAM,oBAAoB,CAAC,MAAM,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAA;IAC1E,CAAC;CACF;AA3RD,wDA2RC"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CredentialFormatCoordinator = void 0;
4
4
  const CredoError_1 = require("../../../../error/CredoError");
5
- const storage_1 = require("../../../../storage");
5
+ const didcomm_1 = require("../../../../storage/didcomm");
6
6
  const messages_1 = require("./messages");
7
7
  class CredentialFormatCoordinator {
8
8
  /**
@@ -13,7 +13,7 @@ class CredentialFormatCoordinator {
13
13
  *
14
14
  */
15
15
  async createProposal(agentContext, { credentialFormats, formatServices, credentialRecord, comment, goalCode, goal, }) {
16
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
16
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
17
17
  // create message. there are two arrays in each message, one for formats the other for attachments
18
18
  const formats = [];
19
19
  const proposalAttachments = [];
@@ -44,13 +44,13 @@ class CredentialFormatCoordinator {
44
44
  message.setThread({ threadId: credentialRecord.threadId, parentThreadId: credentialRecord.parentThreadId });
45
45
  await didCommMessageRepository.saveOrUpdateAgentMessage(agentContext, {
46
46
  agentMessage: message,
47
- role: storage_1.DidCommMessageRole.Sender,
47
+ role: didcomm_1.DidCommMessageRole.Sender,
48
48
  associatedRecordId: credentialRecord.id,
49
49
  });
50
50
  return message;
51
51
  }
52
52
  async processProposal(agentContext, { credentialRecord, message, formatServices, }) {
53
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
53
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
54
54
  for (const formatService of formatServices) {
55
55
  const attachment = this.getAttachmentForService(formatService, message.formats, message.proposalAttachments);
56
56
  await formatService.processProposal(agentContext, {
@@ -60,13 +60,13 @@ class CredentialFormatCoordinator {
60
60
  }
61
61
  await didCommMessageRepository.saveOrUpdateAgentMessage(agentContext, {
62
62
  agentMessage: message,
63
- role: storage_1.DidCommMessageRole.Receiver,
63
+ role: didcomm_1.DidCommMessageRole.Receiver,
64
64
  associatedRecordId: credentialRecord.id,
65
65
  });
66
66
  }
67
67
  async acceptProposal(agentContext, { credentialRecord, credentialFormats, formatServices, comment, goalCode, goal, }) {
68
68
  var _a;
69
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
69
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
70
70
  // create message. there are two arrays in each message, one for formats the other for attachments
71
71
  const formats = [];
72
72
  const offerAttachments = [];
@@ -114,7 +114,7 @@ class CredentialFormatCoordinator {
114
114
  await didCommMessageRepository.saveOrUpdateAgentMessage(agentContext, {
115
115
  agentMessage: message,
116
116
  associatedRecordId: credentialRecord.id,
117
- role: storage_1.DidCommMessageRole.Sender,
117
+ role: didcomm_1.DidCommMessageRole.Sender,
118
118
  });
119
119
  return message;
120
120
  }
@@ -126,7 +126,7 @@ class CredentialFormatCoordinator {
126
126
  *
127
127
  */
128
128
  async createOffer(agentContext, { credentialFormats, formatServices, credentialRecord, comment, goalCode, goal, }) {
129
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
129
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
130
130
  // create message. there are two arrays in each message, one for formats the other for attachments
131
131
  const formats = [];
132
132
  const offerAttachments = [];
@@ -163,13 +163,13 @@ class CredentialFormatCoordinator {
163
163
  message.setThread({ threadId: credentialRecord.threadId, parentThreadId: credentialRecord.parentThreadId });
164
164
  await didCommMessageRepository.saveOrUpdateAgentMessage(agentContext, {
165
165
  agentMessage: message,
166
- role: storage_1.DidCommMessageRole.Sender,
166
+ role: didcomm_1.DidCommMessageRole.Sender,
167
167
  associatedRecordId: credentialRecord.id,
168
168
  });
169
169
  return message;
170
170
  }
171
171
  async processOffer(agentContext, { credentialRecord, message, formatServices, }) {
172
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
172
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
173
173
  for (const formatService of formatServices) {
174
174
  const attachment = this.getAttachmentForService(formatService, message.formats, message.offerAttachments);
175
175
  await formatService.processOffer(agentContext, {
@@ -179,13 +179,13 @@ class CredentialFormatCoordinator {
179
179
  }
180
180
  await didCommMessageRepository.saveOrUpdateAgentMessage(agentContext, {
181
181
  agentMessage: message,
182
- role: storage_1.DidCommMessageRole.Receiver,
182
+ role: didcomm_1.DidCommMessageRole.Receiver,
183
183
  associatedRecordId: credentialRecord.id,
184
184
  });
185
185
  }
186
186
  async acceptOffer(agentContext, { credentialRecord, credentialFormats, formatServices, comment, goalCode, goal, }) {
187
187
  var _a;
188
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
188
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
189
189
  const offerMessage = await didCommMessageRepository.getAgentMessage(agentContext, {
190
190
  associatedRecordId: credentialRecord.id,
191
191
  messageClass: messages_1.V2OfferCredentialMessage,
@@ -219,7 +219,7 @@ class CredentialFormatCoordinator {
219
219
  await didCommMessageRepository.saveOrUpdateAgentMessage(agentContext, {
220
220
  agentMessage: message,
221
221
  associatedRecordId: credentialRecord.id,
222
- role: storage_1.DidCommMessageRole.Sender,
222
+ role: didcomm_1.DidCommMessageRole.Sender,
223
223
  });
224
224
  return message;
225
225
  }
@@ -231,7 +231,7 @@ class CredentialFormatCoordinator {
231
231
  *
232
232
  */
233
233
  async createRequest(agentContext, { credentialFormats, formatServices, credentialRecord, comment, goalCode, goal, }) {
234
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
234
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
235
235
  // create message. there are two arrays in each message, one for formats the other for attachments
236
236
  const formats = [];
237
237
  const requestAttachments = [];
@@ -253,13 +253,13 @@ class CredentialFormatCoordinator {
253
253
  message.setThread({ threadId: credentialRecord.threadId, parentThreadId: credentialRecord.parentThreadId });
254
254
  await didCommMessageRepository.saveOrUpdateAgentMessage(agentContext, {
255
255
  agentMessage: message,
256
- role: storage_1.DidCommMessageRole.Sender,
256
+ role: didcomm_1.DidCommMessageRole.Sender,
257
257
  associatedRecordId: credentialRecord.id,
258
258
  });
259
259
  return message;
260
260
  }
261
261
  async processRequest(agentContext, { credentialRecord, message, formatServices, }) {
262
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
262
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
263
263
  for (const formatService of formatServices) {
264
264
  const attachment = this.getAttachmentForService(formatService, message.formats, message.requestAttachments);
265
265
  await formatService.processRequest(agentContext, {
@@ -269,12 +269,12 @@ class CredentialFormatCoordinator {
269
269
  }
270
270
  await didCommMessageRepository.saveOrUpdateAgentMessage(agentContext, {
271
271
  agentMessage: message,
272
- role: storage_1.DidCommMessageRole.Receiver,
272
+ role: didcomm_1.DidCommMessageRole.Receiver,
273
273
  associatedRecordId: credentialRecord.id,
274
274
  });
275
275
  }
276
276
  async acceptRequest(agentContext, { credentialRecord, credentialFormats, formatServices, comment, goalCode, goal, }) {
277
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
277
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
278
278
  const requestMessage = await didCommMessageRepository.getAgentMessage(agentContext, {
279
279
  associatedRecordId: credentialRecord.id,
280
280
  messageClass: messages_1.V2RequestCredentialMessage,
@@ -313,12 +313,12 @@ class CredentialFormatCoordinator {
313
313
  await didCommMessageRepository.saveOrUpdateAgentMessage(agentContext, {
314
314
  agentMessage: message,
315
315
  associatedRecordId: credentialRecord.id,
316
- role: storage_1.DidCommMessageRole.Sender,
316
+ role: didcomm_1.DidCommMessageRole.Sender,
317
317
  });
318
318
  return message;
319
319
  }
320
320
  async processCredential(agentContext, { credentialRecord, message, requestMessage, formatServices, }) {
321
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
321
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
322
322
  const offerMessage = await didCommMessageRepository.getAgentMessage(agentContext, {
323
323
  associatedRecordId: credentialRecord.id,
324
324
  messageClass: messages_1.V2OfferCredentialMessage,
@@ -337,7 +337,7 @@ class CredentialFormatCoordinator {
337
337
  }
338
338
  await didCommMessageRepository.saveOrUpdateAgentMessage(agentContext, {
339
339
  agentMessage: message,
340
- role: storage_1.DidCommMessageRole.Receiver,
340
+ role: didcomm_1.DidCommMessageRole.Receiver,
341
341
  associatedRecordId: credentialRecord.id,
342
342
  });
343
343
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CredentialFormatCoordinator.js","sourceRoot":"","sources":["../../../../../src/modules/credentials/protocol/v2/CredentialFormatCoordinator.ts"],"names":[],"mappings":";;;AAMA,6DAAyD;AACzD,iDAAkF;AAElF,yCAMmB;AAEnB,MAAa,2BAA2B;IACtC;;;;;;OAMG;IACI,KAAK,CAAC,cAAc,CACzB,YAA0B,EAC1B,EACE,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,OAAO,EACP,QAAQ,EACR,IAAI,GAQL;QAED,MAAM,wBAAwB,GAAG,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,kCAAwB,CAAC,CAAA;QAEjG,kGAAkG;QAClG,MAAM,OAAO,GAA2B,EAAE,CAAA;QAC1C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uBAAgD,EAAE,OAA+B;QACjH,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,uBAAuB,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;QAE9F,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,uBAAU,CAAC,mCAAmC,uBAAuB,CAAC,SAAS,EAAE,CAAC,CAAA;QAEzG,OAAO,MAAM,CAAC,YAAY,CAAA;IAC5B,CAAC;CACF;AAhmBD,kEAgmBC"}
1
+ {"version":3,"file":"CredentialFormatCoordinator.js","sourceRoot":"","sources":["../../../../../src/modules/credentials/protocol/v2/CredentialFormatCoordinator.ts"],"names":[],"mappings":";;;AAMA,6DAAyD;AACzD,yDAA0F;AAE1F,yCAMmB;AAEnB,MAAa,2BAA2B;IACtC;;;;;;OAMG;IACI,KAAK,CAAC,cAAc,CACzB,YAA0B,EAC1B,EACE,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,OAAO,EACP,QAAQ,EACR,IAAI,GAQL;QAED,MAAM,wBAAwB,GAAG,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,kCAAwB,CAAC,CAAA;QAEjG,kGAAkG;QAClG,MAAM,OAAO,GAA2B,EAAE,CAAA;QAC1C,MAAM,mBAAmB,GAAiB,EAAE,CAAA;QAC5C,IAAI,iBAAkD,CAAA;QAEtD,KAAK,MAAM,aAAa,IAAI,cAAc,EAAE;YAC1C,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,MAAM,aAAa,CAAC,cAAc,CAAC,YAAY,EAAE;gBACjG,iBAAiB;gBACjB,gBAAgB;aACjB,CAAC,CAAA;YAEF,IAAI,iBAAiB,EAAE;gBACrB,iBAAiB,GAAG,IAAI,8BAAmB,CAAC;oBAC1C,UAAU,EAAE,iBAAiB;iBAC9B,CAAC,CAAA;aACH;YAED,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,C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ocol_1 = require("../../../../agent/models/features/Protocol");
5
5
  const error_1 = require("../../../../error");
6
- const storage_1 = require("../../../../storage");
6
+ const didcomm_1 = require("../../../../storage/didcomm");
7
7
  const uuid_1 = require("../../../../utils/uuid");
8
8
  const common_1 = require("../../../common");
9
9
  const connections_1 = require("../../../connections");
@@ -64,6 +64,7 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
64
64
  connectionId: connectionRecord.id,
65
65
  threadId: (0, uuid_1.uuid)(),
66
66
  state: models_1.CredentialState.ProposalSent,
67
+ role: models_1.CredentialRole.Holder,
67
68
  autoAcceptCredential,
68
69
  protocolVersion: 'v2',
69
70
  });
@@ -91,7 +92,7 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
91
92
  const { message: proposalMessage, connection, agentContext } = messageContext;
92
93
  agentContext.config.logger.debug(`Processing credential proposal with id ${proposalMessage.id}`);
93
94
  const credentialRepository = agentContext.dependencyManager.resolve(repository_1.CredentialRepository);
94
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
95
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
95
96
  const connectionService = agentContext.dependencyManager.resolve(connections_1.ConnectionService);
96
97
  let credentialRecord = await this.findByThreadAndConnectionId(messageContext.agentContext, proposalMessage.threadId, connection === null || connection === void 0 ? void 0 : connection.id);
97
98
  const formatServices = this.getFormatServicesFromMessage(proposalMessage.formats);
@@ -132,6 +133,7 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
132
133
  threadId: proposalMessage.threadId,
133
134
  parentThreadId: (_a = proposalMessage.thread) === null || _a === void 0 ? void 0 : _a.parentThreadId,
134
135
  state: models_1.CredentialState.ProposalReceived,
136
+ role: models_1.CredentialRole.Issuer,
135
137
  protocolVersion: 'v2',
136
138
  });
137
139
  await this.credentialFormatCoordinator.processProposal(messageContext.agentContext, {
@@ -149,7 +151,7 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
149
151
  // Assert
150
152
  credentialRecord.assertProtocolVersion('v2');
151
153
  credentialRecord.assertState(models_1.CredentialState.ProposalReceived);
152
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
154
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
153
155
  // Use empty credentialFormats if not provided to denote all formats should be accepted
154
156
  let formatServices = this.getFormatServices(credentialFormats !== null && credentialFormats !== void 0 ? credentialFormats : {});
155
157
  // if no format services could be extracted from the credentialFormats
@@ -228,6 +230,7 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
228
230
  connectionId: connectionRecord === null || connectionRecord === void 0 ? void 0 : connectionRecord.id,
229
231
  threadId: (0, uuid_1.uuid)(),
230
232
  state: models_1.CredentialState.OfferSent,
233
+ role: models_1.CredentialRole.Issuer,
231
234
  autoAcceptCredential,
232
235
  protocolVersion: 'v2',
233
236
  });
@@ -255,7 +258,7 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
255
258
  const { message: offerMessage, connection, agentContext } = messageContext;
256
259
  agentContext.config.logger.debug(`Processing credential offer with id ${offerMessage.id}`);
257
260
  const credentialRepository = agentContext.dependencyManager.resolve(repository_1.CredentialRepository);
258
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
261
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
259
262
  const connectionService = agentContext.dependencyManager.resolve(connections_1.ConnectionService);
260
263
  let credentialRecord = await this.findByThreadAndConnectionId(messageContext.agentContext, offerMessage.threadId, connection === null || connection === void 0 ? void 0 : connection.id);
261
264
  const formatServices = this.getFormatServicesFromMessage(offerMessage.formats);
@@ -296,6 +299,7 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
296
299
  threadId: offerMessage.threadId,
297
300
  parentThreadId: (_a = offerMessage.thread) === null || _a === void 0 ? void 0 : _a.parentThreadId,
298
301
  state: models_1.CredentialState.OfferReceived,
302
+ role: models_1.CredentialRole.Holder,
299
303
  protocolVersion: 'v2',
300
304
  });
301
305
  await this.credentialFormatCoordinator.processOffer(messageContext.agentContext, {
@@ -311,7 +315,7 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
311
315
  }
312
316
  }
313
317
  async acceptOffer(agentContext, { credentialRecord, autoAcceptCredential, comment, goal, goalCode, credentialFormats, }) {
314
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
318
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
315
319
  // Assert
316
320
  credentialRecord.assertProtocolVersion('v2');
317
321
  credentialRecord.assertState(models_1.CredentialState.OfferReceived);
@@ -389,6 +393,7 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
389
393
  connectionId: connectionRecord.id,
390
394
  threadId: (0, uuid_1.uuid)(),
391
395
  state: models_1.CredentialState.RequestSent,
396
+ role: models_1.CredentialRole.Holder,
392
397
  autoAcceptCredential,
393
398
  protocolVersion: 'v2',
394
399
  });
@@ -419,7 +424,7 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
419
424
  var _a;
420
425
  const { message: requestMessage, connection, agentContext } = messageContext;
421
426
  const credentialRepository = agentContext.dependencyManager.resolve(repository_1.CredentialRepository);
422
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
427
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
423
428
  const connectionService = agentContext.dependencyManager.resolve(connections_1.ConnectionService);
424
429
  agentContext.config.logger.debug(`Processing credential request with id ${requestMessage.id}`);
425
430
  let credentialRecord = await this.findByThreadAndConnectionId(messageContext.agentContext, requestMessage.threadId);
@@ -469,6 +474,7 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
469
474
  threadId: requestMessage.threadId,
470
475
  parentThreadId: (_a = requestMessage.thread) === null || _a === void 0 ? void 0 : _a.parentThreadId,
471
476
  state: models_1.CredentialState.RequestReceived,
477
+ role: models_1.CredentialRole.Issuer,
472
478
  protocolVersion: 'v2',
473
479
  });
474
480
  await this.credentialFormatCoordinator.processRequest(messageContext.agentContext, {
@@ -484,7 +490,7 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
484
490
  }
485
491
  }
486
492
  async acceptRequest(agentContext, { credentialRecord, autoAcceptCredential, comment, goal, goalCode, credentialFormats, }) {
487
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
493
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
488
494
  // Assert
489
495
  credentialRecord.assertProtocolVersion('v2');
490
496
  credentialRecord.assertState(models_1.CredentialState.RequestReceived);
@@ -529,7 +535,7 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
529
535
  */
530
536
  async processCredential(messageContext) {
531
537
  const { message: credentialMessage, connection, agentContext } = messageContext;
532
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
538
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
533
539
  const connectionService = agentContext.dependencyManager.resolve(connections_1.ConnectionService);
534
540
  agentContext.config.logger.debug(`Processing credential with id ${credentialMessage.id}`);
535
541
  const credentialRecord = await this.getByThreadAndConnectionId(messageContext.agentContext, credentialMessage.threadId, connection === null || connection === void 0 ? void 0 : connection.id);
@@ -590,7 +596,7 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
590
596
  async processAck(messageContext) {
591
597
  const { message: ackMessage, connection, agentContext } = messageContext;
592
598
  agentContext.config.logger.debug(`Processing credential ack with id ${ackMessage.id}`);
593
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
599
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
594
600
  const connectionService = agentContext.dependencyManager.resolve(connections_1.ConnectionService);
595
601
  const credentialRecord = await this.getByThreadAndConnectionId(messageContext.agentContext, ackMessage.threadId, connection === null || connection === void 0 ? void 0 : connection.id);
596
602
  credentialRecord.connectionId = connection === null || connection === void 0 ? void 0 : connection.id;
@@ -782,28 +788,28 @@ class V2CredentialProtocol extends BaseCredentialProtocol_1.BaseCredentialProtoc
782
788
  return true;
783
789
  }
784
790
  async findProposalMessage(agentContext, credentialExchangeId) {
785
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
791
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
786
792
  return didCommMessageRepository.findAgentMessage(agentContext, {
787
793
  associatedRecordId: credentialExchangeId,
788
794
  messageClass: messages_1.V2ProposeCredentialMessage,
789
795
  });
790
796
  }
791
797
  async findOfferMessage(agentContext, credentialExchangeId) {
792
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
798
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
793
799
  return await didCommMessageRepository.findAgentMessage(agentContext, {
794
800
  associatedRecordId: credentialExchangeId,
795
801
  messageClass: messages_1.V2OfferCredentialMessage,
796
802
  });
797
803
  }
798
804
  async findRequestMessage(agentContext, credentialExchangeId) {
799
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
805
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
800
806
  return await didCommMessageRepository.findAgentMessage(agentContext, {
801
807
  associatedRecordId: credentialExchangeId,
802
808
  messageClass: messages_1.V2RequestCredentialMessage,
803
809
  });
804
810
  }
805
811
  async findCredentialMessage(agentContext, credentialExchangeId) {
806
- const didCommMessageRepository = agentContext.dependencyManager.resolve(storage_1.DidCommMessageRepository);
812
+ const didCommMessageRepository = agentContext.dependencyManager.resolve(didcomm_1.DidCommMessageRepository);
807
813
  return await didCommMessageRepository.findAgentMessage(agentContext, {
808
814
  associatedRecordId: credentialExchangeId,
809
815
  messageClass: messages_1.V2IssueCredentialMessage,