@credo-ts/anoncreds 0.6.0-pr-2143-20250106173054 → 0.6.0-pr-2195-20250217183709

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 (167) hide show
  1. package/build/AnonCredsApi.js +7 -4
  2. package/build/AnonCredsApi.js.map +1 -1
  3. package/build/AnonCredsModuleConfig.js +2 -4
  4. package/build/AnonCredsModuleConfig.js.map +1 -1
  5. package/build/anoncreds-rs/AnonCredsDataIntegrityService.js +13 -14
  6. package/build/anoncreds-rs/AnonCredsDataIntegrityService.js.map +1 -1
  7. package/build/anoncreds-rs/AnonCredsRsHolderService.js +22 -28
  8. package/build/anoncreds-rs/AnonCredsRsHolderService.js.map +1 -1
  9. package/build/anoncreds-rs/AnonCredsRsIssuerService.js +23 -17
  10. package/build/anoncreds-rs/AnonCredsRsIssuerService.js.map +1 -1
  11. package/build/anoncreds-rs/AnonCredsRsVerifierService.js +6 -7
  12. package/build/anoncreds-rs/AnonCredsRsVerifierService.js.map +1 -1
  13. package/build/anoncreds-rs/utils.js +3 -3
  14. package/build/anoncreds-rs/utils.js.map +1 -1
  15. package/build/formats/AnonCredsCredentialFormat.d.ts +1 -1
  16. package/build/formats/AnonCredsCredentialFormatService.d.ts +3 -2
  17. package/build/formats/AnonCredsCredentialFormatService.js +26 -39
  18. package/build/formats/AnonCredsCredentialFormatService.js.map +1 -1
  19. package/build/formats/AnonCredsProofFormat.d.ts +1 -1
  20. package/build/formats/AnonCredsProofFormatService.d.ts +2 -1
  21. package/build/formats/AnonCredsProofFormatService.js +26 -27
  22. package/build/formats/AnonCredsProofFormatService.js.map +1 -1
  23. package/build/formats/DataIntegrityCredentialFormatService.d.ts +3 -2
  24. package/build/formats/DataIntegrityCredentialFormatService.js +82 -83
  25. package/build/formats/DataIntegrityCredentialFormatService.js.map +1 -1
  26. package/build/formats/LegacyIndyCredentialFormat.d.ts +1 -1
  27. package/build/formats/LegacyIndyCredentialFormatService.d.ts +3 -2
  28. package/build/formats/LegacyIndyCredentialFormatService.js +19 -32
  29. package/build/formats/LegacyIndyCredentialFormatService.js.map +1 -1
  30. package/build/formats/LegacyIndyProofFormat.d.ts +1 -1
  31. package/build/formats/LegacyIndyProofFormatService.d.ts +2 -1
  32. package/build/formats/LegacyIndyProofFormatService.js +28 -30
  33. package/build/formats/LegacyIndyProofFormatService.js.map +1 -1
  34. package/build/models/AnonCredsProofRequest.js +2 -3
  35. package/build/models/AnonCredsProofRequest.js.map +1 -1
  36. package/build/models/AnonCredsRequestedAttribute.js +1 -2
  37. package/build/models/AnonCredsRequestedAttribute.js.map +1 -1
  38. package/build/models/AnonCredsRequestedPredicate.js +1 -2
  39. package/build/models/AnonCredsRequestedPredicate.js.map +1 -1
  40. package/build/models/AnonCredsRestriction.js +2 -3
  41. package/build/models/AnonCredsRestriction.js.map +1 -1
  42. package/build/protocols/credentials/v1/V1CredentialProtocol.d.ts +4 -3
  43. package/build/protocols/credentials/v1/V1CredentialProtocol.js +159 -155
  44. package/build/protocols/credentials/v1/V1CredentialProtocol.js.map +1 -1
  45. package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.d.ts +2 -2
  46. package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.js +2 -2
  47. package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.js.map +1 -1
  48. package/build/protocols/credentials/v1/handlers/V1CredentialAckHandler.d.ts +1 -1
  49. package/build/protocols/credentials/v1/handlers/V1CredentialProblemReportHandler.d.ts +1 -1
  50. package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.d.ts +2 -2
  51. package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.js +2 -1
  52. package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.js.map +1 -1
  53. package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.d.ts +2 -2
  54. package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.js +2 -2
  55. package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.js.map +1 -1
  56. package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.d.ts +2 -2
  57. package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.js +2 -2
  58. package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.js.map +1 -1
  59. package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.d.ts +2 -2
  60. package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.js +2 -1
  61. package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.js.map +1 -1
  62. package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.d.ts +3 -3
  63. package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.js +4 -4
  64. package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.js.map +1 -1
  65. package/build/protocols/credentials/v1/messages/V1CredentialPreview.d.ts +3 -3
  66. package/build/protocols/credentials/v1/messages/V1CredentialPreview.js +8 -7
  67. package/build/protocols/credentials/v1/messages/V1CredentialPreview.js.map +1 -1
  68. package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.d.ts +3 -3
  69. package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.js +4 -4
  70. package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.js.map +1 -1
  71. package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.d.ts +2 -2
  72. package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.js +8 -10
  73. package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.js.map +1 -1
  74. package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.d.ts +2 -2
  75. package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.js +7 -8
  76. package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.js.map +1 -1
  77. package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.d.ts +3 -3
  78. package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.js +5 -6
  79. package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.js.map +1 -1
  80. package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.d.ts +2 -2
  81. package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.js +7 -8
  82. package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.js.map +1 -1
  83. package/build/protocols/proofs/v1/V1ProofProtocol.d.ts +4 -3
  84. package/build/protocols/proofs/v1/V1ProofProtocol.js +147 -156
  85. package/build/protocols/proofs/v1/V1ProofProtocol.js.map +1 -1
  86. package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.d.ts +2 -2
  87. package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.js +2 -2
  88. package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.js.map +1 -1
  89. package/build/protocols/proofs/v1/handlers/V1PresentationAckHandler.d.ts +1 -1
  90. package/build/protocols/proofs/v1/handlers/V1PresentationHandler.d.ts +2 -2
  91. package/build/protocols/proofs/v1/handlers/V1PresentationHandler.js +2 -1
  92. package/build/protocols/proofs/v1/handlers/V1PresentationHandler.js.map +1 -1
  93. package/build/protocols/proofs/v1/handlers/V1PresentationProblemReportHandler.d.ts +1 -1
  94. package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.d.ts +2 -2
  95. package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.js +2 -2
  96. package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.js.map +1 -1
  97. package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.d.ts +2 -2
  98. package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.js +2 -2
  99. package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.js.map +1 -1
  100. package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.d.ts +3 -3
  101. package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.js +4 -4
  102. package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.js.map +1 -1
  103. package/build/protocols/proofs/v1/messages/V1PresentationMessage.d.ts +2 -2
  104. package/build/protocols/proofs/v1/messages/V1PresentationMessage.js +9 -11
  105. package/build/protocols/proofs/v1/messages/V1PresentationMessage.js.map +1 -1
  106. package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.d.ts +3 -3
  107. package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.js +4 -4
  108. package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.js.map +1 -1
  109. package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.d.ts +2 -2
  110. package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.js +5 -6
  111. package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.js.map +1 -1
  112. package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.d.ts +2 -2
  113. package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.js +8 -10
  114. package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.js.map +1 -1
  115. package/build/protocols/proofs/v1/models/V1PresentationPreview.d.ts +1 -1
  116. package/build/protocols/proofs/v1/models/V1PresentationPreview.js +6 -6
  117. package/build/protocols/proofs/v1/models/V1PresentationPreview.js.map +1 -1
  118. package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.js +6 -4
  119. package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.js.map +1 -1
  120. package/build/repository/AnonCredsCredentialDefinitionRecord.js +11 -4
  121. package/build/repository/AnonCredsCredentialDefinitionRecord.js.map +1 -1
  122. package/build/repository/AnonCredsCredentialRecord.js +12 -4
  123. package/build/repository/AnonCredsCredentialRecord.js.map +1 -1
  124. package/build/repository/AnonCredsKeyCorrectnessProofRecord.js +6 -4
  125. package/build/repository/AnonCredsKeyCorrectnessProofRecord.js.map +1 -1
  126. package/build/repository/AnonCredsLinkSecretRecord.js +5 -3
  127. package/build/repository/AnonCredsLinkSecretRecord.js.map +1 -1
  128. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.js +8 -4
  129. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.js.map +1 -1
  130. package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.js +7 -4
  131. package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.js.map +1 -1
  132. package/build/repository/AnonCredsSchemaRecord.js +11 -4
  133. package/build/repository/AnonCredsSchemaRecord.js.map +1 -1
  134. package/build/services/tails/BasicTailsFileService.js +2 -3
  135. package/build/services/tails/BasicTailsFileService.js.map +1 -1
  136. package/build/updates/0.3.1-0.4/credentialExchangeRecord.d.ts +2 -1
  137. package/build/updates/0.3.1-0.4/credentialExchangeRecord.js +2 -2
  138. package/build/updates/0.3.1-0.4/credentialExchangeRecord.js.map +1 -1
  139. package/build/updates/0.3.1-0.4/linkSecret.js +2 -3
  140. package/build/updates/0.3.1-0.4/linkSecret.js.map +1 -1
  141. package/build/updates/0.4-0.5/anonCredsCredentialRecord.js +4 -4
  142. package/build/updates/0.4-0.5/anonCredsCredentialRecord.js.map +1 -1
  143. package/build/utils/bytesToBigint.d.ts +1 -0
  144. package/build/utils/bytesToBigint.js +14 -0
  145. package/build/utils/bytesToBigint.js.map +1 -0
  146. package/build/utils/composeAutoAccept.d.ts +1 -1
  147. package/build/utils/composeAutoAccept.js +3 -5
  148. package/build/utils/composeAutoAccept.js.map +1 -1
  149. package/build/utils/createRequestFromPreview.js +3 -4
  150. package/build/utils/createRequestFromPreview.js.map +1 -1
  151. package/build/utils/credential.d.ts +1 -1
  152. package/build/utils/credential.js +10 -10
  153. package/build/utils/credential.js.map +1 -1
  154. package/build/utils/credentialPreviewAttributes.d.ts +1 -1
  155. package/build/utils/credentialPreviewAttributes.js +1 -1
  156. package/build/utils/credentialPreviewAttributes.js.map +1 -1
  157. package/build/utils/getCredentialsForAnonCredsRequest.js +2 -3
  158. package/build/utils/getCredentialsForAnonCredsRequest.js.map +1 -1
  159. package/build/utils/getRevocationRegistries.js +13 -5
  160. package/build/utils/getRevocationRegistries.js.map +1 -1
  161. package/build/utils/indyIdentifiers.js +23 -12
  162. package/build/utils/indyIdentifiers.js.map +1 -1
  163. package/build/utils/proofRequest.js +7 -10
  164. package/build/utils/proofRequest.js.map +1 -1
  165. package/build/utils/w3cAnonCredsUtils.js +29 -21
  166. package/build/utils/w3cAnonCredsUtils.js.map +1 -1
  167. package/package.json +4 -5
@@ -10,28 +10,26 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.V1IssueCredentialMessage = exports.INDY_CREDENTIAL_ATTACHMENT_ID = void 0;
13
- const core_1 = require("@credo-ts/core");
13
+ const didcomm_1 = require("@credo-ts/didcomm");
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const class_validator_1 = require("class-validator");
16
16
  exports.INDY_CREDENTIAL_ATTACHMENT_ID = 'libindy-cred-0';
17
- class V1IssueCredentialMessage extends core_1.AgentMessage {
17
+ class V1IssueCredentialMessage extends didcomm_1.AgentMessage {
18
18
  constructor(options) {
19
- var _a;
20
19
  super();
21
20
  this.allowDidSovPrefix = true;
22
21
  this.type = V1IssueCredentialMessage.type.messageTypeUri;
23
22
  if (options) {
24
- this.id = (_a = options.id) !== null && _a !== void 0 ? _a : this.generateId();
23
+ this.id = options.id ?? this.generateId();
25
24
  this.comment = options.comment;
26
25
  this.credentialAttachments = options.credentialAttachments;
27
26
  this.appendedAttachments = options.attachments;
28
27
  }
29
28
  }
30
29
  get indyCredential() {
31
- var _a;
32
30
  const attachment = this.credentialAttachments.find((attachment) => attachment.id === exports.INDY_CREDENTIAL_ATTACHMENT_ID);
33
31
  // Extract credential from attachment
34
- const credentialJson = (_a = attachment === null || attachment === void 0 ? void 0 : attachment.getDataAsJson()) !== null && _a !== void 0 ? _a : null;
32
+ const credentialJson = attachment?.getDataAsJson() ?? null;
35
33
  return credentialJson;
36
34
  }
37
35
  getCredentialAttachmentById(id) {
@@ -39,9 +37,9 @@ class V1IssueCredentialMessage extends core_1.AgentMessage {
39
37
  }
40
38
  }
41
39
  exports.V1IssueCredentialMessage = V1IssueCredentialMessage;
42
- V1IssueCredentialMessage.type = (0, core_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/issue-credential');
40
+ V1IssueCredentialMessage.type = (0, didcomm_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/issue-credential');
43
41
  __decorate([
44
- (0, core_1.IsValidMessageType)(V1IssueCredentialMessage.type),
42
+ (0, didcomm_1.IsValidMessageType)(V1IssueCredentialMessage.type),
45
43
  __metadata("design:type", Object)
46
44
  ], V1IssueCredentialMessage.prototype, "type", void 0);
47
45
  __decorate([
@@ -51,12 +49,12 @@ __decorate([
51
49
  ], V1IssueCredentialMessage.prototype, "comment", void 0);
52
50
  __decorate([
53
51
  (0, class_transformer_1.Expose)({ name: 'credentials~attach' }),
54
- (0, class_transformer_1.Type)(() => core_1.Attachment),
52
+ (0, class_transformer_1.Type)(() => didcomm_1.Attachment),
55
53
  (0, class_validator_1.IsArray)(),
56
54
  (0, class_validator_1.ValidateNested)({
57
55
  each: true,
58
56
  }),
59
- (0, class_validator_1.IsInstance)(core_1.Attachment, { each: true }),
57
+ (0, class_validator_1.IsInstance)(didcomm_1.Attachment, { each: true }),
60
58
  __metadata("design:type", Array)
61
59
  ], V1IssueCredentialMessage.prototype, "credentialAttachments", void 0);
62
60
  //# sourceMappingURL=V1IssueCredentialMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"V1IssueCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1IssueCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,yCAA+F;AAC/F,yDAAgD;AAChD,qDAA2F;AAE9E,QAAA,6BAA6B,GAAG,gBAAgB,CAAA;AAS7D,MAAa,wBAAyB,SAAQ,mBAAY;IAGxD,YAAmB,OAAwC;;QACzD,KAAK,EAAE,CAAA;QAHO,sBAAiB,GAAG,IAAI,CAAA;QAcxB,SAAI,GAAG,wBAAwB,CAAC,IAAI,CAAC,cAAc,CAAA;QATjE,I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AAC,iBAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;uEACI"}
1
+ {"version":3,"file":"V1IssueCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1IssueCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,+CAAkG;AAClG,yDAAgD;AAChD,qDAA2F;AAE9E,QAAA,6BAA6B,GAAG,gBAAgB,CAAA;AAS7D,MAAa,wBAAyB,SAAQ,sBAAY;IAGxD,YAAmB,OAAwC;QACzD,KAAK,EAAE,CAAA;QAHO,sBAAiB,GAAG,IAAI,CAAA;QAcxB,SAAI,GAAG,wBAAwB,CAAC,IAAI,CAAC,cAAc,CAAA;QATjE,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAA;YAC1D,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAA;QAChD,CAAC;IACH,CAAC;IAmBD,IAAW,cAAc;QACvB,MAAM,UAAU,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,qCAA6B,CAAC,CAAA;QAEnH,qCAAqC;QACrC,MAAM,cAAc,GAAG,UAAU,EAAE,aAAa,EAAuB,IAAI,IAAI,CAAA;QAE/E,OAAO,cAAc,CAAA;IACvB,CAAC;IAEM,2BAA2B,CAAC,EAAU;QAC3C,OAAO,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;IAC9E,CAAC;;AA1CH,4DA2CC;AA3BwB,6BAAI,GAAG,IAAA,0BAAgB,EAAC,2DAA2D,CAAC,AAAhF,CAAgF;AAD3F;IADf,IAAA,4BAAkB,EAAC,wBAAwB,CAAC,IAAI,CAAC;;sDACiB;AAK5D;IAFN,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACU;AAShB;IAPN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC;IACtC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,oBAAU,CAAC;IACtB,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC;QACd,IAAI,EAAE,IAAI;KACX,CAAC;IACD,IAAA,4BAAU,EAAC,oBAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;uEACI"}
@@ -1,5 +1,5 @@
1
1
  import type { AnonCredsCredentialOffer } from '../../../../models';
2
- import { Attachment, AgentMessage } from '@credo-ts/core';
2
+ import { Attachment, AgentMessage } from '@credo-ts/didcomm';
3
3
  import { V1CredentialPreview } from './V1CredentialPreview';
4
4
  export declare const INDY_CREDENTIAL_OFFER_ATTACHMENT_ID = "libindy-cred-offer-0";
5
5
  export interface V1OfferCredentialMessageOptions {
@@ -18,7 +18,7 @@ export declare class V1OfferCredentialMessage extends AgentMessage {
18
18
  readonly allowDidSovPrefix = true;
19
19
  constructor(options: V1OfferCredentialMessageOptions);
20
20
  readonly type: string;
21
- static readonly type: import("@credo-ts/core").ParsedMessageType;
21
+ static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
22
22
  comment?: string;
23
23
  credentialPreview: V1CredentialPreview;
24
24
  offerAttachments: Attachment[];
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.V1OfferCredentialMessage = exports.INDY_CREDENTIAL_OFFER_ATTACHMENT_ID = void 0;
13
- const core_1 = require("@credo-ts/core");
13
+ const didcomm_1 = require("@credo-ts/didcomm");
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const class_validator_1 = require("class-validator");
16
16
  const V1CredentialPreview_1 = require("./V1CredentialPreview");
@@ -20,7 +20,7 @@ exports.INDY_CREDENTIAL_OFFER_ATTACHMENT_ID = 'libindy-cred-offer-0';
20
20
  *
21
21
  * @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential/README.md#offer-credential
22
22
  */
23
- class V1OfferCredentialMessage extends core_1.AgentMessage {
23
+ class V1OfferCredentialMessage extends didcomm_1.AgentMessage {
24
24
  constructor(options) {
25
25
  super();
26
26
  this.allowDidSovPrefix = true;
@@ -34,10 +34,9 @@ class V1OfferCredentialMessage extends core_1.AgentMessage {
34
34
  }
35
35
  }
36
36
  get indyCredentialOffer() {
37
- var _a;
38
37
  const attachment = this.offerAttachments.find((attachment) => attachment.id === exports.INDY_CREDENTIAL_OFFER_ATTACHMENT_ID);
39
38
  // Extract credential offer from attachment
40
- const credentialOfferJson = (_a = attachment === null || attachment === void 0 ? void 0 : attachment.getDataAsJson()) !== null && _a !== void 0 ? _a : null;
39
+ const credentialOfferJson = attachment?.getDataAsJson() ?? null;
41
40
  return credentialOfferJson;
42
41
  }
43
42
  getOfferAttachmentById(id) {
@@ -45,9 +44,9 @@ class V1OfferCredentialMessage extends core_1.AgentMessage {
45
44
  }
46
45
  }
47
46
  exports.V1OfferCredentialMessage = V1OfferCredentialMessage;
48
- V1OfferCredentialMessage.type = (0, core_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/offer-credential');
47
+ V1OfferCredentialMessage.type = (0, didcomm_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/offer-credential');
49
48
  __decorate([
50
- (0, core_1.IsValidMessageType)(V1OfferCredentialMessage.type),
49
+ (0, didcomm_1.IsValidMessageType)(V1OfferCredentialMessage.type),
51
50
  __metadata("design:type", Object)
52
51
  ], V1OfferCredentialMessage.prototype, "type", void 0);
53
52
  __decorate([
@@ -64,12 +63,12 @@ __decorate([
64
63
  ], V1OfferCredentialMessage.prototype, "credentialPreview", void 0);
65
64
  __decorate([
66
65
  (0, class_transformer_1.Expose)({ name: 'offers~attach' }),
67
- (0, class_transformer_1.Type)(() => core_1.Attachment),
66
+ (0, class_transformer_1.Type)(() => didcomm_1.Attachment),
68
67
  (0, class_validator_1.IsArray)(),
69
68
  (0, class_validator_1.ValidateNested)({
70
69
  each: true,
71
70
  }),
72
- (0, class_validator_1.IsInstance)(core_1.Attachment, { each: true }),
71
+ (0, class_validator_1.IsInstance)(didcomm_1.Attachment, { each: true }),
73
72
  __metadata("design:type", Array)
74
73
  ], V1OfferCredentialMessage.prototype, "offerAttachments", void 0);
75
74
  //# sourceMappingURL=V1OfferCredentialMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"V1OfferCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1OfferCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,yCAA+F;AAC/F,yDAAgD;AAChD,qDAA2F;AAE3F,+DAA2D;AAE9C,QAAA,mCAAmC,GAAG,sBAAsB,CAAA;AAUzE;;;;GAIG;AACH,MAAa,wBAAyB,SAAQ,mBAAY;IAGxD,YAAmB,OAAwC;QACzD,KAAK,EAAE,CAAA;QAHO,sBAAiB,GAAG,IAAI,CAAA;QAexB,SAAI,GAAG,wBAAwB,CAAC,IAAI,CAAC,cAAc,CAAA;QAVjE,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAA;YAClD,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAA;YAChD,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAA;QAChD,CAAC;IACH,CAAC;IAyB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AAG,IAAA,0BAAgB,EAAC,2DAA2D,CAAC,AAAhF,CAAgF;AAD3F;IADf,IAAA,4BAAkB,EAAC,wBAAwB,CAAC,IAAI,CAAC;;sDACiB;AAK5D;IAFN,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACU;AAMhB;IAJN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC;IACtC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,yCAAmB,CAAC;IAC/B,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,EAAC,yCAAmB,CAAC;8BACL,yCAAmB;mEAAA;AASvC;IAPN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;IACjC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,oBAAU,CAAC;IACtB,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC;QACd,IAAI,EAAE,IAAI;KACX,CAAC;IACD,IAAA,4BAAU,EAAC,oBAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;kEACD"}
@@ -1,5 +1,5 @@
1
- import type { Attachment } from '@credo-ts/core';
2
- import { AgentMessage } from '@credo-ts/core';
1
+ import type { Attachment } from '@credo-ts/didcomm';
2
+ import { AgentMessage } from '@credo-ts/didcomm';
3
3
  import { V1CredentialPreview } from './V1CredentialPreview';
4
4
  export interface V1ProposeCredentialMessageOptions {
5
5
  id?: string;
@@ -22,7 +22,7 @@ export declare class V1ProposeCredentialMessage extends AgentMessage {
22
22
  readonly allowDidSovPrefix = true;
23
23
  constructor(options: V1ProposeCredentialMessageOptions);
24
24
  readonly type: string;
25
- static readonly type: import("@credo-ts/core").ParsedMessageType;
25
+ static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
26
26
  /**
27
27
  * Human readable information about this Credential Proposal,
28
28
  * so the proposal can be evaluated by human judgment.
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.V1ProposeCredentialMessage = void 0;
13
- const core_1 = require("@credo-ts/core");
13
+ const didcomm_1 = require("@credo-ts/didcomm");
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const class_validator_1 = require("class-validator");
16
16
  const utils_1 = require("../../../../utils");
@@ -20,14 +20,13 @@ const V1CredentialPreview_1 = require("./V1CredentialPreview");
20
20
  *
21
21
  * @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential/README.md#propose-credential
22
22
  */
23
- class V1ProposeCredentialMessage extends core_1.AgentMessage {
23
+ class V1ProposeCredentialMessage extends didcomm_1.AgentMessage {
24
24
  constructor(options) {
25
- var _a;
26
25
  super();
27
26
  this.allowDidSovPrefix = true;
28
27
  this.type = V1ProposeCredentialMessage.type.messageTypeUri;
29
28
  if (options) {
30
- this.id = (_a = options.id) !== null && _a !== void 0 ? _a : this.generateId();
29
+ this.id = options.id ?? this.generateId();
31
30
  this.comment = options.comment;
32
31
  this.credentialPreview = options.credentialPreview;
33
32
  this.schemaIssuerDid = options.schemaIssuerDid;
@@ -41,9 +40,9 @@ class V1ProposeCredentialMessage extends core_1.AgentMessage {
41
40
  }
42
41
  }
43
42
  exports.V1ProposeCredentialMessage = V1ProposeCredentialMessage;
44
- V1ProposeCredentialMessage.type = (0, core_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/propose-credential');
43
+ V1ProposeCredentialMessage.type = (0, didcomm_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/propose-credential');
45
44
  __decorate([
46
- (0, core_1.IsValidMessageType)(V1ProposeCredentialMessage.type),
45
+ (0, didcomm_1.IsValidMessageType)(V1ProposeCredentialMessage.type),
47
46
  __metadata("design:type", Object)
48
47
  ], V1ProposeCredentialMessage.prototype, "type", void 0);
49
48
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"V1ProposeCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials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"version":3,"file":"V1ProposeCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1ProposeCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,+CAAsF;AACtF,yDAAgD;AAChD,qDAA2F;AAE3F,6CAK0B;AAE1B,+DAA2D;AAe3D;;;;GAIG;AACH,MAAa,0BAA2B,SAAQ,sBAAY;IAG1D,YAAmB,OAA0C;QAC3D,KAAK,EAAE,CAAA;QAHO,sBAAiB,GAAG,IAAI,CAAA;QAoBxB,SAAI,GAAG,0BAA0B,CAAC,IAAI,CAAC,cAAc,CAAA;QAfnE,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAA;YAClD,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAA;YAC9C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;YAChC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAA;YACpC,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAA;YAC1C,IAAI,CAAC,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAA;YAC5D,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAA;YAClC,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAA;QAChD,CAAC;IACH,CAAC;;AAlBH,gEAgGC;AA1EwB,+BAAI,GAAG,IAAA,0BAAgB,EAAC,6DAA6D,CAAC,AAAlF,CAAkF;AAD7F;IADf,IAAA,4BAAkB,EAAC,0BAA0B,CAAC,IAAI,CAAC;;wDACiB;AAS9D;IAFN,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAA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ACZ,IAAA,yBAAO,EAAC,+BAAuB,CAAC;;6DACR"}
@@ -1,5 +1,5 @@
1
1
  import type { LegacyIndyCredentialRequest } from '../../../../formats';
2
- import { Attachment, AgentMessage } from '@credo-ts/core';
2
+ import { Attachment, AgentMessage } from '@credo-ts/didcomm';
3
3
  export declare const INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID = "libindy-cred-request-0";
4
4
  export interface V1RequestCredentialMessageOptions {
5
5
  id?: string;
@@ -11,7 +11,7 @@ export declare class V1RequestCredentialMessage extends AgentMessage {
11
11
  readonly allowDidSovPrefix = true;
12
12
  constructor(options: V1RequestCredentialMessageOptions);
13
13
  readonly type: string;
14
- static readonly type: import("@credo-ts/core").ParsedMessageType;
14
+ static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
15
15
  comment?: string;
16
16
  requestAttachments: Attachment[];
17
17
  get indyCredentialRequest(): LegacyIndyCredentialRequest | null;
@@ -10,11 +10,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.V1RequestCredentialMessage = exports.INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID = void 0;
13
- const core_1 = require("@credo-ts/core");
13
+ const didcomm_1 = require("@credo-ts/didcomm");
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const class_validator_1 = require("class-validator");
16
16
  exports.INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID = 'libindy-cred-request-0';
17
- class V1RequestCredentialMessage extends core_1.AgentMessage {
17
+ class V1RequestCredentialMessage extends didcomm_1.AgentMessage {
18
18
  constructor(options) {
19
19
  super();
20
20
  this.allowDidSovPrefix = true;
@@ -27,10 +27,9 @@ class V1RequestCredentialMessage extends core_1.AgentMessage {
27
27
  }
28
28
  }
29
29
  get indyCredentialRequest() {
30
- var _a;
31
30
  const attachment = this.requestAttachments.find((attachment) => attachment.id === exports.INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID);
32
31
  // Extract proof request from attachment
33
- const credentialReqJson = (_a = attachment === null || attachment === void 0 ? void 0 : attachment.getDataAsJson()) !== null && _a !== void 0 ? _a : null;
32
+ const credentialReqJson = attachment?.getDataAsJson() ?? null;
34
33
  return credentialReqJson;
35
34
  }
36
35
  getRequestAttachmentById(id) {
@@ -38,9 +37,9 @@ class V1RequestCredentialMessage extends core_1.AgentMessage {
38
37
  }
39
38
  }
40
39
  exports.V1RequestCredentialMessage = V1RequestCredentialMessage;
41
- V1RequestCredentialMessage.type = (0, core_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/request-credential');
40
+ V1RequestCredentialMessage.type = (0, didcomm_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/request-credential');
42
41
  __decorate([
43
- (0, core_1.IsValidMessageType)(V1RequestCredentialMessage.type),
42
+ (0, didcomm_1.IsValidMessageType)(V1RequestCredentialMessage.type),
44
43
  __metadata("design:type", Object)
45
44
  ], V1RequestCredentialMessage.prototype, "type", void 0);
46
45
  __decorate([
@@ -50,12 +49,12 @@ __decorate([
50
49
  ], V1RequestCredentialMessage.prototype, "comment", void 0);
51
50
  __decorate([
52
51
  (0, class_transformer_1.Expose)({ name: 'requests~attach' }),
53
- (0, class_transformer_1.Type)(() => core_1.Attachment),
52
+ (0, class_transformer_1.Type)(() => didcomm_1.Attachment),
54
53
  (0, class_validator_1.IsArray)(),
55
54
  (0, class_validator_1.ValidateNested)({
56
55
  each: true,
57
56
  }),
58
- (0, class_validator_1.IsInstance)(core_1.Attachment, { each: true }),
57
+ (0, class_validator_1.IsInstance)(didcomm_1.Attachment, { each: true }),
59
58
  __metadata("design:type", Array)
60
59
  ], V1RequestCredentialMessage.prototype, "requestAttachments", void 0);
61
60
  //# sourceMappingURL=V1RequestCredentialMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"V1RequestCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1RequestCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA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;IACV,IAAA,4BAAU,GAAE;;2DACU;AAShB;IAPN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IACnC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iBAAU,CAAC;IACtB,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC;QACd,IAAI,EAAE,IAAI;KACX,CAAC;IACD,IAAA,4BAAU,EAAC,iBAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sEACC"}
1
+ {"version":3,"file":"V1RequestCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1RequestCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,+CAAkG;AAClG,yDAAgD;AAChD,qDAA2F;AAE9E,QAAA,qCAAqC,GAAG,wBAAwB,CAAA;AAS7E,MAAa,0BAA2B,SAAQ,sBAAY;IAG1D,YAAmB,OAA0C;QAC3D,KAAK,EAAE,CAAA;QAHO,sBAAiB,GAAG,IAAI,CAAA;QAcxB,SAAI,GAAG,0BAA0B,CAAC,IAAI,CAAC,cAAc,CAAA;QATnE,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAA;YACpD,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAA;QAChD,CAAC;IACH,CAAC;IAmBD,IAAW,qBAAqB;QAC9B,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAC7C,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,6CAAqC,CACxE,CAAA;QACD,wCAAwC;QACxC,MAAM,iBAAiB,GAAG,UAAU,EAAE,aAAa,EAA+B,IAAI,IAAI,CAAA;QAE1F,OAAO,iBAAiB,CAAA;IAC1B,CAAC;IAEM,wBAAwB,CAAC,EAAU;QACxC,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;IAC3E,CAAC;;AA3CH,gEA4CC;AA5BwB,+BAAI,GAAG,IAAA,0BAAgB,EAAC,6DAA6D,CAAC,AAAlF,CAAkF;AAD7F;IADf,IAAA,4BAAkB,EAAC,0BAA0B,CAAC,IAAI,CAAC;;wDACiB;AAK9D;IAFN,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2DACU;AAShB;IAPN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IACnC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,oBAAU,CAAC;IACtB,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC;QACd,IAAI,EAAE,IAAI;KACX,CAAC;IACD,IAAA,4BAAU,EAAC,oBAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sEACC"}
@@ -1,6 +1,7 @@
1
1
  import type { LegacyIndyProofFormatService } from '../../../formats';
2
- import type { ProofProtocol, DependencyManager, FeatureRegistry, AgentContext, ProofProtocolOptions, InboundMessageContext, AgentMessage, ProblemReportMessage, GetProofFormatDataReturn, ProofFormat } from '@credo-ts/core';
3
- import { BaseProofProtocol, ProofExchangeRecord } from '@credo-ts/core';
2
+ import type { AgentContext } from '@credo-ts/core';
3
+ import type { ProofProtocol, ProofProtocolOptions, InboundMessageContext, AgentMessage, ProblemReportMessage, GetProofFormatDataReturn, ProofFormat, FeatureRegistry, MessageHandlerRegistry } from '@credo-ts/didcomm';
4
+ import { BaseProofProtocol, ProofExchangeRecord } from '@credo-ts/didcomm';
4
5
  import { V1PresentationAckMessage, V1PresentationMessage, V1ProposePresentationMessage, V1RequestPresentationMessage } from './messages';
5
6
  export interface V1ProofProtocolConfig {
6
7
  indyProofFormat: LegacyIndyProofFormatService;
@@ -15,7 +16,7 @@ export declare class V1ProofProtocol extends BaseProofProtocol implements ProofP
15
16
  /**
16
17
  * Registers the protocol implementation (handlers, feature registry) on the agent.
17
18
  */
18
- register(dependencyManager: DependencyManager, featureRegistry: FeatureRegistry): void;
19
+ register(messageHandlerRegistry: MessageHandlerRegistry, featureRegistry: FeatureRegistry): void;
19
20
  createProposal(agentContext: AgentContext, { proofFormats, connectionRecord, comment, parentThreadId, autoAcceptProof, }: ProofProtocolOptions.CreateProofProposalOptions<[LegacyIndyProofFormatService]>): Promise<ProofProtocolOptions.ProofProtocolMsgReturnType<V1ProposePresentationMessage>>;
20
21
  processProposal(messageContext: InboundMessageContext<V1ProposePresentationMessage>): Promise<ProofExchangeRecord>;
21
22
  acceptProposal(agentContext: AgentContext, { proofRecord, proofFormats, comment, autoAcceptProof, }: ProofProtocolOptions.AcceptProofProposalOptions<[LegacyIndyProofFormatService]>): Promise<ProofProtocolOptions.ProofProtocolMsgReturnType<V1RequestPresentationMessage>>;