@credo-ts/anoncreds 0.6.1-pr-2091-20241119140918 → 0.6.2-alpha-20251210145840

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 (837) hide show
  1. package/build/AnonCredsApi.d.mts +113 -0
  2. package/build/AnonCredsApi.d.mts.map +1 -0
  3. package/build/AnonCredsApi.mjs +439 -0
  4. package/build/AnonCredsApi.mjs.map +1 -0
  5. package/build/AnonCredsApiOptions.d.mts +28 -0
  6. package/build/AnonCredsApiOptions.d.mts.map +1 -0
  7. package/build/AnonCredsModule.d.mts +29 -0
  8. package/build/AnonCredsModule.d.mts.map +1 -0
  9. package/build/AnonCredsModule.mjs +62 -0
  10. package/build/AnonCredsModule.mjs.map +1 -0
  11. package/build/AnonCredsModuleConfig.d.mts +79 -0
  12. package/build/AnonCredsModuleConfig.d.mts.map +1 -0
  13. package/build/AnonCredsModuleConfig.mjs +31 -0
  14. package/build/AnonCredsModuleConfig.mjs.map +1 -0
  15. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorate.mjs +10 -0
  16. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateMetadata.mjs +7 -0
  17. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateParam.mjs +9 -0
  18. package/build/anoncreds-rs/AnonCredsDataIntegrityService.mjs +203 -0
  19. package/build/anoncreds-rs/AnonCredsDataIntegrityService.mjs.map +1 -0
  20. package/build/anoncreds-rs/AnonCredsRsHolderService.mjs +488 -0
  21. package/build/anoncreds-rs/AnonCredsRsHolderService.mjs.map +1 -0
  22. package/build/anoncreds-rs/AnonCredsRsIssuerService.mjs +213 -0
  23. package/build/anoncreds-rs/AnonCredsRsIssuerService.mjs.map +1 -0
  24. package/build/anoncreds-rs/AnonCredsRsVerifierService.mjs +122 -0
  25. package/build/anoncreds-rs/AnonCredsRsVerifierService.mjs.map +1 -0
  26. package/build/anoncreds-rs/index.mjs +3 -0
  27. package/build/anoncreds-rs/utils.mjs +60 -0
  28. package/build/anoncreds-rs/utils.mjs.map +1 -0
  29. package/build/error/AnonCredsError.d.mts +13 -0
  30. package/build/error/AnonCredsError.d.mts.map +1 -0
  31. package/build/error/AnonCredsError.mjs +12 -0
  32. package/build/error/AnonCredsError.mjs.map +1 -0
  33. package/build/error/AnonCredsRsError.d.mts +13 -0
  34. package/build/error/AnonCredsRsError.d.mts.map +1 -0
  35. package/build/error/AnonCredsRsError.mjs +12 -0
  36. package/build/error/AnonCredsRsError.mjs.map +1 -0
  37. package/build/error/AnonCredsStoreRecordError.d.mts +13 -0
  38. package/build/error/AnonCredsStoreRecordError.d.mts.map +1 -0
  39. package/build/error/AnonCredsStoreRecordError.mjs +12 -0
  40. package/build/error/AnonCredsStoreRecordError.mjs.map +1 -0
  41. package/build/error/index.d.mts +3 -0
  42. package/build/error/index.mjs +3 -0
  43. package/build/formats/AnonCredsDidCommCredentialFormat.d.mts +82 -0
  44. package/build/formats/AnonCredsDidCommCredentialFormat.d.mts.map +1 -0
  45. package/build/formats/AnonCredsDidCommCredentialFormatService.d.mts +120 -0
  46. package/build/formats/AnonCredsDidCommCredentialFormatService.d.mts.map +1 -0
  47. package/build/formats/AnonCredsDidCommCredentialFormatService.mjs +331 -0
  48. package/build/formats/AnonCredsDidCommCredentialFormatService.mjs.map +1 -0
  49. package/build/formats/AnonCredsDidCommProofFormat.d.mts +77 -0
  50. package/build/formats/AnonCredsDidCommProofFormat.d.mts.map +1 -0
  51. package/build/formats/AnonCredsDidCommProofFormatService.d.mts +93 -0
  52. package/build/formats/AnonCredsDidCommProofFormatService.d.mts.map +1 -0
  53. package/build/formats/AnonCredsDidCommProofFormatService.mjs +250 -0
  54. package/build/formats/AnonCredsDidCommProofFormatService.mjs.map +1 -0
  55. package/build/formats/DataIntegrityDidCommCredentialFormatService.d.mts +118 -0
  56. package/build/formats/DataIntegrityDidCommCredentialFormatService.d.mts.map +1 -0
  57. package/build/formats/DataIntegrityDidCommCredentialFormatService.mjs +587 -0
  58. package/build/formats/DataIntegrityDidCommCredentialFormatService.mjs.map +1 -0
  59. package/build/formats/LegacyIndyDidCommCredentialFormat.d.mts +38 -0
  60. package/build/formats/LegacyIndyDidCommCredentialFormat.d.mts.map +1 -0
  61. package/build/formats/LegacyIndyDidCommCredentialFormatService.d.mts +122 -0
  62. package/build/formats/LegacyIndyDidCommCredentialFormatService.d.mts.map +1 -0
  63. package/build/formats/LegacyIndyDidCommCredentialFormatService.mjs +309 -0
  64. package/build/formats/LegacyIndyDidCommCredentialFormatService.mjs.map +1 -0
  65. package/build/formats/LegacyIndyDidCommProofFormat.d.mts +36 -0
  66. package/build/formats/LegacyIndyDidCommProofFormat.d.mts.map +1 -0
  67. package/build/formats/LegacyIndyDidCommProofFormatService.d.mts +98 -0
  68. package/build/formats/LegacyIndyDidCommProofFormatService.d.mts.map +1 -0
  69. package/build/formats/LegacyIndyDidCommProofFormatService.mjs +322 -0
  70. package/build/formats/LegacyIndyDidCommProofFormatService.mjs.map +1 -0
  71. package/build/formats/index.d.mts +9 -0
  72. package/build/formats/index.mjs +5 -0
  73. package/build/index.d.mts +86 -0
  74. package/build/index.mjs +69 -0
  75. package/build/models/AnonCredsCredentialProposal.mjs +75 -0
  76. package/build/models/AnonCredsCredentialProposal.mjs.map +1 -0
  77. package/build/models/AnonCredsProofRequest.mjs +62 -0
  78. package/build/models/AnonCredsProofRequest.mjs.map +1 -0
  79. package/build/models/AnonCredsRequestedAttribute.mjs +50 -0
  80. package/build/models/AnonCredsRequestedAttribute.mjs.map +1 -0
  81. package/build/models/AnonCredsRequestedPredicate.mjs +53 -0
  82. package/build/models/AnonCredsRequestedPredicate.mjs.map +1 -0
  83. package/build/models/AnonCredsRestriction.d.mts +29 -0
  84. package/build/models/AnonCredsRestriction.d.mts.map +1 -0
  85. package/build/models/AnonCredsRestriction.mjs +137 -0
  86. package/build/models/AnonCredsRestriction.mjs.map +1 -0
  87. package/build/models/AnonCredsRestrictionWrapper.d.mts +9 -0
  88. package/build/models/AnonCredsRestrictionWrapper.d.mts.map +1 -0
  89. package/build/models/AnonCredsRestrictionWrapper.mjs +18 -0
  90. package/build/models/AnonCredsRestrictionWrapper.mjs.map +1 -0
  91. package/build/models/AnonCredsRevocationInterval.mjs +27 -0
  92. package/build/models/AnonCredsRevocationInterval.mjs.map +1 -0
  93. package/build/models/exchange.d.mts +104 -0
  94. package/build/models/exchange.d.mts.map +1 -0
  95. package/build/models/exchange.mjs +11 -0
  96. package/build/models/exchange.mjs.map +1 -0
  97. package/build/models/index.d.mts +4 -0
  98. package/build/models/index.mjs +2 -0
  99. package/build/models/internal.d.mts +40 -0
  100. package/build/models/internal.d.mts.map +1 -0
  101. package/build/models/registry.d.mts +44 -0
  102. package/build/models/registry.d.mts.map +1 -0
  103. package/build/models/utils.d.mts +27 -0
  104. package/build/models/utils.d.mts.map +1 -0
  105. package/build/protocols/credentials/v1/DidCommCredentialV1Protocol.d.mts +215 -0
  106. package/build/protocols/credentials/v1/DidCommCredentialV1Protocol.d.mts.map +1 -0
  107. package/build/protocols/credentials/v1/DidCommCredentialV1Protocol.mjs +827 -0
  108. package/build/protocols/credentials/v1/DidCommCredentialV1Protocol.mjs.map +1 -0
  109. package/build/protocols/credentials/v1/handlers/DidCommCredentialV1AckHandler.mjs +17 -0
  110. package/build/protocols/credentials/v1/handlers/DidCommCredentialV1AckHandler.mjs.map +1 -0
  111. package/build/protocols/credentials/v1/handlers/DidCommCredentialV1ProblemReportHandler.mjs +17 -0
  112. package/build/protocols/credentials/v1/handlers/DidCommCredentialV1ProblemReportHandler.mjs.map +1 -0
  113. package/build/protocols/credentials/v1/handlers/DidCommIssueCredentialV1Handler.mjs +36 -0
  114. package/build/protocols/credentials/v1/handlers/DidCommIssueCredentialV1Handler.mjs.map +1 -0
  115. package/build/protocols/credentials/v1/handlers/DidCommOfferCredentialV1Handler.mjs +32 -0
  116. package/build/protocols/credentials/v1/handlers/DidCommOfferCredentialV1Handler.mjs.map +1 -0
  117. package/build/protocols/credentials/v1/handlers/DidCommProposeCredentialV1Handler.mjs +35 -0
  118. package/build/protocols/credentials/v1/handlers/DidCommProposeCredentialV1Handler.mjs.map +1 -0
  119. package/build/protocols/credentials/v1/handlers/DidCommRequestCredentialV1Handler.mjs +36 -0
  120. package/build/protocols/credentials/v1/handlers/DidCommRequestCredentialV1Handler.mjs.map +1 -0
  121. package/build/protocols/credentials/v1/handlers/index.mjs +6 -0
  122. package/build/protocols/credentials/v1/index.d.mts +9 -0
  123. package/build/protocols/credentials/v1/index.mjs +9 -0
  124. package/build/protocols/credentials/v1/messages/DidCommCredentialV1AckMessage.d.mts +16 -0
  125. package/build/protocols/credentials/v1/messages/DidCommCredentialV1AckMessage.d.mts.map +1 -0
  126. package/build/protocols/credentials/v1/messages/DidCommCredentialV1AckMessage.mjs +21 -0
  127. package/build/protocols/credentials/v1/messages/DidCommCredentialV1AckMessage.mjs.map +1 -0
  128. package/build/protocols/credentials/v1/messages/DidCommCredentialV1Preview.d.mts +32 -0
  129. package/build/protocols/credentials/v1/messages/DidCommCredentialV1Preview.d.mts.map +1 -0
  130. package/build/protocols/credentials/v1/messages/DidCommCredentialV1Preview.mjs +57 -0
  131. package/build/protocols/credentials/v1/messages/DidCommCredentialV1Preview.mjs.map +1 -0
  132. package/build/protocols/credentials/v1/messages/DidCommCredentialV1ProblemReportMessage.d.mts +16 -0
  133. package/build/protocols/credentials/v1/messages/DidCommCredentialV1ProblemReportMessage.d.mts.map +1 -0
  134. package/build/protocols/credentials/v1/messages/DidCommCredentialV1ProblemReportMessage.mjs +21 -0
  135. package/build/protocols/credentials/v1/messages/DidCommCredentialV1ProblemReportMessage.mjs.map +1 -0
  136. package/build/protocols/credentials/v1/messages/DidCommIssueCredentialV1Message.d.mts +26 -0
  137. package/build/protocols/credentials/v1/messages/DidCommIssueCredentialV1Message.d.mts.map +1 -0
  138. package/build/protocols/credentials/v1/messages/DidCommIssueCredentialV1Message.mjs +46 -0
  139. package/build/protocols/credentials/v1/messages/DidCommIssueCredentialV1Message.mjs.map +1 -0
  140. package/build/protocols/credentials/v1/messages/DidCommOfferCredentialV1Message.d.mts +34 -0
  141. package/build/protocols/credentials/v1/messages/DidCommOfferCredentialV1Message.d.mts.map +1 -0
  142. package/build/protocols/credentials/v1/messages/DidCommOfferCredentialV1Message.mjs +61 -0
  143. package/build/protocols/credentials/v1/messages/DidCommOfferCredentialV1Message.mjs.map +1 -0
  144. package/build/protocols/credentials/v1/messages/DidCommProposeCredentialV1Message.d.mts +64 -0
  145. package/build/protocols/credentials/v1/messages/DidCommProposeCredentialV1Message.d.mts.map +1 -0
  146. package/build/protocols/credentials/v1/messages/DidCommProposeCredentialV1Message.mjs +95 -0
  147. package/build/protocols/credentials/v1/messages/DidCommProposeCredentialV1Message.mjs.map +1 -0
  148. package/build/protocols/credentials/v1/messages/DidCommRequestCredentialV1Message.d.mts +26 -0
  149. package/build/protocols/credentials/v1/messages/DidCommRequestCredentialV1Message.d.mts.map +1 -0
  150. package/build/protocols/credentials/v1/messages/DidCommRequestCredentialV1Message.mjs +46 -0
  151. package/build/protocols/credentials/v1/messages/DidCommRequestCredentialV1Message.mjs.map +1 -0
  152. package/build/protocols/credentials/v1/messages/index.d.mts +7 -0
  153. package/build/protocols/credentials/v1/messages/index.mjs +7 -0
  154. package/build/protocols/index.d.mts +18 -0
  155. package/build/protocols/index.mjs +18 -0
  156. package/build/protocols/proofs/v1/DidCommProofV1Protocol.d.mts +105 -0
  157. package/build/protocols/proofs/v1/DidCommProofV1Protocol.d.mts.map +1 -0
  158. package/build/protocols/proofs/v1/DidCommProofV1Protocol.mjs +723 -0
  159. package/build/protocols/proofs/v1/DidCommProofV1Protocol.mjs.map +1 -0
  160. package/build/protocols/proofs/v1/errors/DidCommPresentationV1ProblemReportError.d.mts +18 -0
  161. package/build/protocols/proofs/v1/errors/DidCommPresentationV1ProblemReportError.d.mts.map +1 -0
  162. package/build/protocols/proofs/v1/errors/DidCommPresentationV1ProblemReportError.mjs +19 -0
  163. package/build/protocols/proofs/v1/errors/DidCommPresentationV1ProblemReportError.mjs.map +1 -0
  164. package/build/protocols/proofs/v1/errors/index.d.mts +1 -0
  165. package/build/protocols/proofs/v1/errors/index.mjs +1 -0
  166. package/build/protocols/proofs/v1/handlers/DidCommPresentationV1AckHandler.mjs +17 -0
  167. package/build/protocols/proofs/v1/handlers/DidCommPresentationV1AckHandler.mjs.map +1 -0
  168. package/build/protocols/proofs/v1/handlers/DidCommPresentationV1Handler.mjs +36 -0
  169. package/build/protocols/proofs/v1/handlers/DidCommPresentationV1Handler.mjs.map +1 -0
  170. package/build/protocols/proofs/v1/handlers/DidCommPresentationV1ProblemReportHandler.mjs +16 -0
  171. package/build/protocols/proofs/v1/handlers/DidCommPresentationV1ProblemReportHandler.mjs.map +1 -0
  172. package/build/protocols/proofs/v1/handlers/DidCommProposePresentationV1Handler.mjs +35 -0
  173. package/build/protocols/proofs/v1/handlers/DidCommProposePresentationV1Handler.mjs.map +1 -0
  174. package/build/protocols/proofs/v1/handlers/DidCommRequestPresentationV1Handler.mjs +32 -0
  175. package/build/protocols/proofs/v1/handlers/DidCommRequestPresentationV1Handler.mjs.map +1 -0
  176. package/build/protocols/proofs/v1/handlers/index.mjs +5 -0
  177. package/build/protocols/proofs/v1/index.d.mts +11 -0
  178. package/build/protocols/proofs/v1/index.mjs +11 -0
  179. package/build/protocols/proofs/v1/messages/DidCommPresentationV1AckMessage.d.mts +12 -0
  180. package/build/protocols/proofs/v1/messages/DidCommPresentationV1AckMessage.d.mts.map +1 -0
  181. package/build/protocols/proofs/v1/messages/DidCommPresentationV1AckMessage.mjs +18 -0
  182. package/build/protocols/proofs/v1/messages/DidCommPresentationV1AckMessage.mjs.map +1 -0
  183. package/build/protocols/proofs/v1/messages/DidCommPresentationV1Message.d.mts +38 -0
  184. package/build/protocols/proofs/v1/messages/DidCommPresentationV1Message.d.mts.map +1 -0
  185. package/build/protocols/proofs/v1/messages/DidCommPresentationV1Message.mjs +52 -0
  186. package/build/protocols/proofs/v1/messages/DidCommPresentationV1Message.mjs.map +1 -0
  187. package/build/protocols/proofs/v1/messages/DidCommPresentationV1ProblemReportMessage.d.mts +16 -0
  188. package/build/protocols/proofs/v1/messages/DidCommPresentationV1ProblemReportMessage.d.mts.map +1 -0
  189. package/build/protocols/proofs/v1/messages/DidCommPresentationV1ProblemReportMessage.mjs +21 -0
  190. package/build/protocols/proofs/v1/messages/DidCommPresentationV1ProblemReportMessage.mjs.map +1 -0
  191. package/build/protocols/proofs/v1/messages/DidCommProposePresentationV1Message.d.mts +32 -0
  192. package/build/protocols/proofs/v1/messages/DidCommProposePresentationV1Message.d.mts.map +1 -0
  193. package/build/protocols/proofs/v1/messages/DidCommProposePresentationV1Message.mjs +44 -0
  194. package/build/protocols/proofs/v1/messages/DidCommProposePresentationV1Message.mjs.map +1 -0
  195. package/build/protocols/proofs/v1/messages/DidCommRequestPresentationV1Message.d.mts +36 -0
  196. package/build/protocols/proofs/v1/messages/DidCommRequestPresentationV1Message.d.mts.map +1 -0
  197. package/build/protocols/proofs/v1/messages/DidCommRequestPresentationV1Message.mjs +50 -0
  198. package/build/protocols/proofs/v1/messages/DidCommRequestPresentationV1Message.mjs.map +1 -0
  199. package/build/protocols/proofs/v1/messages/index.d.mts +5 -0
  200. package/build/protocols/proofs/v1/messages/index.mjs +5 -0
  201. package/build/protocols/proofs/v1/models/DidCommPresentationV1Preview.d.mts +57 -0
  202. package/build/protocols/proofs/v1/models/DidCommPresentationV1Preview.d.mts.map +1 -0
  203. package/build/protocols/proofs/v1/models/DidCommPresentationV1Preview.mjs +113 -0
  204. package/build/protocols/proofs/v1/models/DidCommPresentationV1Preview.mjs.map +1 -0
  205. package/build/protocols/proofs/v1/models/index.d.mts +1 -0
  206. package/build/protocols/proofs/v1/models/index.mjs +1 -0
  207. package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.d.mts +25 -0
  208. package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.d.mts.map +1 -0
  209. package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.mjs +26 -0
  210. package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.mjs.map +1 -0
  211. package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.d.mts +12 -0
  212. package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.d.mts.map +1 -0
  213. package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.mjs +28 -0
  214. package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.mjs.map +1 -0
  215. package/build/repository/AnonCredsCredentialDefinitionRecord.d.mts +44 -0
  216. package/build/repository/AnonCredsCredentialDefinitionRecord.d.mts.map +1 -0
  217. package/build/repository/AnonCredsCredentialDefinitionRecord.mjs +38 -0
  218. package/build/repository/AnonCredsCredentialDefinitionRecord.mjs.map +1 -0
  219. package/build/repository/AnonCredsCredentialDefinitionRepository.d.mts +12 -0
  220. package/build/repository/AnonCredsCredentialDefinitionRepository.d.mts.map +1 -0
  221. package/build/repository/AnonCredsCredentialDefinitionRepository.mjs +28 -0
  222. package/build/repository/AnonCredsCredentialDefinitionRepository.mjs.map +1 -0
  223. package/build/repository/AnonCredsCredentialRecord.d.mts +53 -0
  224. package/build/repository/AnonCredsCredentialRecord.d.mts.map +1 -0
  225. package/build/repository/AnonCredsCredentialRecord.mjs +46 -0
  226. package/build/repository/AnonCredsCredentialRecord.mjs.map +1 -0
  227. package/build/repository/AnonCredsCredentialRepository.d.mts +14 -0
  228. package/build/repository/AnonCredsCredentialRepository.d.mts.map +1 -0
  229. package/build/repository/AnonCredsCredentialRepository.mjs +34 -0
  230. package/build/repository/AnonCredsCredentialRepository.mjs.map +1 -0
  231. package/build/repository/AnonCredsKeyCorrectnessProofRecord.d.mts +25 -0
  232. package/build/repository/AnonCredsKeyCorrectnessProofRecord.d.mts.map +1 -0
  233. package/build/repository/AnonCredsKeyCorrectnessProofRecord.mjs +26 -0
  234. package/build/repository/AnonCredsKeyCorrectnessProofRecord.mjs.map +1 -0
  235. package/build/repository/AnonCredsKeyCorrectnessProofRepository.d.mts +12 -0
  236. package/build/repository/AnonCredsKeyCorrectnessProofRepository.d.mts.map +1 -0
  237. package/build/repository/AnonCredsKeyCorrectnessProofRepository.mjs +28 -0
  238. package/build/repository/AnonCredsKeyCorrectnessProofRepository.mjs.map +1 -0
  239. package/build/repository/AnonCredsLinkSecretRecord.d.mts +28 -0
  240. package/build/repository/AnonCredsLinkSecretRecord.d.mts.map +1 -0
  241. package/build/repository/AnonCredsLinkSecretRecord.mjs +25 -0
  242. package/build/repository/AnonCredsLinkSecretRecord.mjs.map +1 -0
  243. package/build/repository/AnonCredsLinkSecretRepository.d.mts +14 -0
  244. package/build/repository/AnonCredsLinkSecretRepository.d.mts.map +1 -0
  245. package/build/repository/AnonCredsLinkSecretRepository.mjs +34 -0
  246. package/build/repository/AnonCredsLinkSecretRepository.mjs.map +1 -0
  247. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.d.mts +37 -0
  248. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.d.mts.map +1 -0
  249. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.mjs +35 -0
  250. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.mjs.map +1 -0
  251. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.d.mts +13 -0
  252. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.d.mts.map +1 -0
  253. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.mjs +34 -0
  254. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.mjs.map +1 -0
  255. package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.d.mts +30 -0
  256. package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.d.mts.map +1 -0
  257. package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.mjs +27 -0
  258. package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.mjs.map +1 -0
  259. package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.d.mts +13 -0
  260. package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.d.mts.map +1 -0
  261. package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.mjs +31 -0
  262. package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.mjs.map +1 -0
  263. package/build/repository/AnonCredsSchemaRecord.d.mts +44 -0
  264. package/build/repository/AnonCredsSchemaRecord.d.mts.map +1 -0
  265. package/build/repository/AnonCredsSchemaRecord.mjs +38 -0
  266. package/build/repository/AnonCredsSchemaRecord.mjs.map +1 -0
  267. package/build/repository/AnonCredsSchemaRepository.d.mts +12 -0
  268. package/build/repository/AnonCredsSchemaRepository.d.mts.map +1 -0
  269. package/build/repository/AnonCredsSchemaRepository.mjs +28 -0
  270. package/build/repository/AnonCredsSchemaRepository.mjs.map +1 -0
  271. package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.mts +14 -0
  272. package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.mts.map +1 -0
  273. package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.mjs +10 -0
  274. package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.mjs.map +1 -0
  275. package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.mts +14 -0
  276. package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.mts.map +1 -0
  277. package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.mjs +10 -0
  278. package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.mjs.map +1 -0
  279. package/build/repository/anonCredsSchemaRecordMetadataTypes.d.mts +14 -0
  280. package/build/repository/anonCredsSchemaRecordMetadataTypes.d.mts.map +1 -0
  281. package/build/repository/index.d.mts +16 -0
  282. package/build/repository/index.mjs +16 -0
  283. package/build/services/AnonCredsHolderService.d.mts +28 -0
  284. package/build/services/AnonCredsHolderService.d.mts.map +1 -0
  285. package/build/services/AnonCredsHolderService.mjs +6 -0
  286. package/build/services/AnonCredsHolderService.mjs.map +1 -0
  287. package/build/services/AnonCredsHolderServiceOptions.d.mts +107 -0
  288. package/build/services/AnonCredsHolderServiceOptions.d.mts.map +1 -0
  289. package/build/services/AnonCredsIssuerService.d.mts +19 -0
  290. package/build/services/AnonCredsIssuerService.d.mts.map +1 -0
  291. package/build/services/AnonCredsIssuerService.mjs +6 -0
  292. package/build/services/AnonCredsIssuerService.mjs.map +1 -0
  293. package/build/services/AnonCredsIssuerServiceOptions.d.mts +66 -0
  294. package/build/services/AnonCredsIssuerServiceOptions.d.mts.map +1 -0
  295. package/build/services/AnonCredsVerifierService.d.mts +12 -0
  296. package/build/services/AnonCredsVerifierService.d.mts.map +1 -0
  297. package/build/services/AnonCredsVerifierService.mjs +6 -0
  298. package/build/services/AnonCredsVerifierService.mjs.map +1 -0
  299. package/build/services/AnonCredsVerifierServiceOptions.d.mts +30 -0
  300. package/build/services/AnonCredsVerifierServiceOptions.d.mts.map +1 -0
  301. package/build/services/index.d.mts +17 -0
  302. package/build/services/index.mjs +7 -0
  303. package/build/services/registry/AnonCredsRegistry.d.mts +43 -0
  304. package/build/services/registry/AnonCredsRegistry.d.mts.map +1 -0
  305. package/build/services/registry/AnonCredsRegistryService.d.mts +27 -0
  306. package/build/services/registry/AnonCredsRegistryService.d.mts.map +1 -0
  307. package/build/services/registry/AnonCredsRegistryService.mjs +226 -0
  308. package/build/services/registry/AnonCredsRegistryService.mjs.map +1 -0
  309. package/build/services/registry/CredentialDefinitionOptions.d.mts +39 -0
  310. package/build/services/registry/CredentialDefinitionOptions.d.mts.map +1 -0
  311. package/build/services/registry/RevocationRegistryDefinitionOptions.d.mts +39 -0
  312. package/build/services/registry/RevocationRegistryDefinitionOptions.d.mts.map +1 -0
  313. package/build/services/registry/RevocationStatusListOptions.d.mts +37 -0
  314. package/build/services/registry/RevocationStatusListOptions.d.mts.map +1 -0
  315. package/build/services/registry/SchemaOptions.d.mts +39 -0
  316. package/build/services/registry/SchemaOptions.d.mts.map +1 -0
  317. package/build/services/registry/base.d.mts +65 -0
  318. package/build/services/registry/base.d.mts.map +1 -0
  319. package/build/services/registry/index.d.mts +7 -0
  320. package/build/services/registry/index.mjs +1 -0
  321. package/build/services/tails/BasicTailsFileService.d.mts +29 -0
  322. package/build/services/tails/BasicTailsFileService.d.mts.map +1 -0
  323. package/build/services/tails/BasicTailsFileService.mjs +52 -0
  324. package/build/services/tails/BasicTailsFileService.mjs.map +1 -0
  325. package/build/services/tails/TailsFileService.d.mts +48 -0
  326. package/build/services/tails/TailsFileService.d.mts.map +1 -0
  327. package/build/services/tails/index.d.mts +2 -0
  328. package/build/services/tails/index.mjs +1 -0
  329. package/build/updates/0.3.1-0.4/credentialDefinition.mjs +49 -0
  330. package/build/updates/0.3.1-0.4/credentialDefinition.mjs.map +1 -0
  331. package/build/updates/0.3.1-0.4/credentialExchangeRecord.mjs +118 -0
  332. package/build/updates/0.3.1-0.4/credentialExchangeRecord.mjs.map +1 -0
  333. package/build/updates/0.3.1-0.4/index.d.mts +7 -0
  334. package/build/updates/0.3.1-0.4/index.d.mts.map +1 -0
  335. package/build/updates/0.3.1-0.4/index.mjs +16 -0
  336. package/build/updates/0.3.1-0.4/index.mjs.map +1 -0
  337. package/build/updates/0.3.1-0.4/linkSecret.mjs +21 -0
  338. package/build/updates/0.3.1-0.4/linkSecret.mjs.map +1 -0
  339. package/build/updates/0.3.1-0.4/schema.mjs +39 -0
  340. package/build/updates/0.3.1-0.4/schema.mjs.map +1 -0
  341. package/build/updates/0.4-0.5/anonCredsCredentialRecord.mjs +126 -0
  342. package/build/updates/0.4-0.5/anonCredsCredentialRecord.mjs.map +1 -0
  343. package/build/updates/0.4-0.5/index.d.mts +7 -0
  344. package/build/updates/0.4-0.5/index.d.mts.map +1 -0
  345. package/build/updates/0.4-0.5/index.mjs +10 -0
  346. package/build/updates/0.4-0.5/index.mjs.map +1 -0
  347. package/build/utils/anonCredsObjects.d.mts +27 -0
  348. package/build/utils/anonCredsObjects.d.mts.map +1 -0
  349. package/build/utils/anonCredsObjects.mjs +57 -0
  350. package/build/utils/anonCredsObjects.mjs.map +1 -0
  351. package/build/utils/areRequestsEqual.d.mts +1 -0
  352. package/build/utils/areRequestsEqual.mjs +86 -0
  353. package/build/utils/areRequestsEqual.mjs.map +1 -0
  354. package/build/utils/bytesToBigint.mjs +11 -0
  355. package/build/utils/bytesToBigint.mjs.map +1 -0
  356. package/build/utils/composeAutoAccept.d.mts +1 -0
  357. package/build/utils/composeAutoAccept.mjs +25 -0
  358. package/build/utils/composeAutoAccept.mjs.map +1 -0
  359. package/build/utils/createRequestFromPreview.d.mts +2 -0
  360. package/build/utils/createRequestFromPreview.mjs +50 -0
  361. package/build/utils/createRequestFromPreview.mjs.map +1 -0
  362. package/build/utils/credential.d.mts +12 -0
  363. package/build/utils/credential.d.mts.map +1 -0
  364. package/build/utils/credential.mjs +119 -0
  365. package/build/utils/credential.mjs.map +1 -0
  366. package/build/utils/credentialPreviewAttributes.d.mts +1 -0
  367. package/build/utils/credentialPreviewAttributes.mjs +21 -0
  368. package/build/utils/credentialPreviewAttributes.mjs.map +1 -0
  369. package/build/utils/getCredentialsForAnonCredsRequest.d.mts +11 -0
  370. package/build/utils/getCredentialsForAnonCredsRequest.d.mts.map +1 -0
  371. package/build/utils/getCredentialsForAnonCredsRequest.mjs +70 -0
  372. package/build/utils/getCredentialsForAnonCredsRequest.mjs.map +1 -0
  373. package/build/utils/getRevocationRegistries.d.mts +4 -0
  374. package/build/utils/getRevocationRegistries.mjs +121 -0
  375. package/build/utils/getRevocationRegistries.mjs.map +1 -0
  376. package/build/utils/hasDuplicateGroupNames.d.mts +1 -0
  377. package/build/utils/hasDuplicateGroupNames.mjs +22 -0
  378. package/build/utils/hasDuplicateGroupNames.mjs.map +1 -0
  379. package/build/utils/index.d.mts +17 -0
  380. package/build/utils/index.mjs +17 -0
  381. package/build/utils/indyIdentifiers.d.mts +71 -0
  382. package/build/utils/indyIdentifiers.d.mts.map +1 -0
  383. package/build/utils/indyIdentifiers.mjs +249 -0
  384. package/build/utils/indyIdentifiers.mjs.map +1 -0
  385. package/build/utils/isMap.d.mts +1 -0
  386. package/build/utils/isMap.mjs +19 -0
  387. package/build/utils/isMap.mjs.map +1 -0
  388. package/build/utils/linkSecret.d.mts +13 -0
  389. package/build/utils/linkSecret.d.mts.map +1 -0
  390. package/build/utils/linkSecret.mjs +35 -0
  391. package/build/utils/linkSecret.mjs.map +1 -0
  392. package/build/utils/metadata.d.mts +30 -0
  393. package/build/utils/metadata.d.mts.map +1 -0
  394. package/build/utils/metadata.mjs +23 -0
  395. package/build/utils/metadata.mjs.map +1 -0
  396. package/build/utils/proofRequest.mjs +10 -0
  397. package/build/utils/proofRequest.mjs.map +1 -0
  398. package/build/utils/proverDid.d.mts +12 -0
  399. package/build/utils/proverDid.d.mts.map +1 -0
  400. package/build/utils/proverDid.mjs +17 -0
  401. package/build/utils/proverDid.mjs.map +1 -0
  402. package/build/utils/revocationInterval.d.mts +12 -0
  403. package/build/utils/revocationInterval.d.mts.map +1 -0
  404. package/build/utils/revocationInterval.mjs +11 -0
  405. package/build/utils/revocationInterval.mjs.map +1 -0
  406. package/build/utils/sortRequestedCredentialsMatches.d.mts +1 -0
  407. package/build/utils/sortRequestedCredentialsMatches.mjs +22 -0
  408. package/build/utils/sortRequestedCredentialsMatches.mjs.map +1 -0
  409. package/build/utils/timestamp.d.mts +5 -0
  410. package/build/utils/timestamp.d.mts.map +1 -0
  411. package/build/utils/timestamp.mjs +6 -0
  412. package/build/utils/timestamp.mjs.map +1 -0
  413. package/build/utils/w3cAnonCredsUtils.d.mts +28 -0
  414. package/build/utils/w3cAnonCredsUtils.d.mts.map +1 -0
  415. package/build/utils/w3cAnonCredsUtils.mjs +101 -0
  416. package/build/utils/w3cAnonCredsUtils.mjs.map +1 -0
  417. package/package.json +20 -21
  418. package/build/AnonCredsApi.d.ts +0 -97
  419. package/build/AnonCredsApi.js +0 -582
  420. package/build/AnonCredsApi.js.map +0 -1
  421. package/build/AnonCredsApiOptions.d.ts +0 -24
  422. package/build/AnonCredsApiOptions.js +0 -3
  423. package/build/AnonCredsApiOptions.js.map +0 -1
  424. package/build/AnonCredsModule.d.ts +0 -24
  425. package/build/AnonCredsModule.js +0 -56
  426. package/build/AnonCredsModule.js.map +0 -1
  427. package/build/AnonCredsModuleConfig.d.ts +0 -72
  428. package/build/AnonCredsModuleConfig.js +0 -31
  429. package/build/AnonCredsModuleConfig.js.map +0 -1
  430. package/build/anoncreds-rs/AnonCredsDataIntegrityService.d.ts +0 -27
  431. package/build/anoncreds-rs/AnonCredsDataIntegrityService.js +0 -241
  432. package/build/anoncreds-rs/AnonCredsDataIntegrityService.js.map +0 -1
  433. package/build/anoncreds-rs/AnonCredsRsHolderService.d.ts +0 -38
  434. package/build/anoncreds-rs/AnonCredsRsHolderService.js +0 -622
  435. package/build/anoncreds-rs/AnonCredsRsHolderService.js.map +0 -1
  436. package/build/anoncreds-rs/AnonCredsRsIssuerService.d.ts +0 -12
  437. package/build/anoncreds-rs/AnonCredsRsIssuerService.js +0 -253
  438. package/build/anoncreds-rs/AnonCredsRsIssuerService.js.map +0 -1
  439. package/build/anoncreds-rs/AnonCredsRsVerifierService.d.ts +0 -8
  440. package/build/anoncreds-rs/AnonCredsRsVerifierService.js +0 -157
  441. package/build/anoncreds-rs/AnonCredsRsVerifierService.js.map +0 -1
  442. package/build/anoncreds-rs/index.d.ts +0 -3
  443. package/build/anoncreds-rs/index.js +0 -10
  444. package/build/anoncreds-rs/index.js.map +0 -1
  445. package/build/anoncreds-rs/utils.d.ts +0 -23
  446. package/build/anoncreds-rs/utils.js +0 -71
  447. package/build/anoncreds-rs/utils.js.map +0 -1
  448. package/build/error/AnonCredsError.d.ts +0 -6
  449. package/build/error/AnonCredsError.js +0 -11
  450. package/build/error/AnonCredsError.js.map +0 -1
  451. package/build/error/AnonCredsRsError.d.ts +0 -6
  452. package/build/error/AnonCredsRsError.js +0 -11
  453. package/build/error/AnonCredsRsError.js.map +0 -1
  454. package/build/error/AnonCredsStoreRecordError.d.ts +0 -6
  455. package/build/error/AnonCredsStoreRecordError.js +0 -11
  456. package/build/error/AnonCredsStoreRecordError.js.map +0 -1
  457. package/build/error/index.d.ts +0 -3
  458. package/build/error/index.js +0 -20
  459. package/build/error/index.js.map +0 -1
  460. package/build/formats/AnonCredsCredentialFormat.d.ts +0 -79
  461. package/build/formats/AnonCredsCredentialFormat.js +0 -3
  462. package/build/formats/AnonCredsCredentialFormat.js.map +0 -1
  463. package/build/formats/AnonCredsCredentialFormatService.d.ts +0 -80
  464. package/build/formats/AnonCredsCredentialFormatService.js +0 -433
  465. package/build/formats/AnonCredsCredentialFormatService.js.map +0 -1
  466. package/build/formats/AnonCredsProofFormat.d.ts +0 -70
  467. package/build/formats/AnonCredsProofFormat.js +0 -3
  468. package/build/formats/AnonCredsProofFormat.js.map +0 -1
  469. package/build/formats/AnonCredsProofFormatService.d.ts +0 -55
  470. package/build/formats/AnonCredsProofFormatService.js +0 -289
  471. package/build/formats/AnonCredsProofFormatService.js.map +0 -1
  472. package/build/formats/DataIntegrityCredentialFormatService.d.ts +0 -89
  473. package/build/formats/DataIntegrityCredentialFormatService.js +0 -773
  474. package/build/formats/DataIntegrityCredentialFormatService.js.map +0 -1
  475. package/build/formats/LegacyIndyCredentialFormat.d.ts +0 -32
  476. package/build/formats/LegacyIndyCredentialFormat.js +0 -3
  477. package/build/formats/LegacyIndyCredentialFormat.js.map +0 -1
  478. package/build/formats/LegacyIndyCredentialFormatService.d.ts +0 -80
  479. package/build/formats/LegacyIndyCredentialFormatService.js +0 -379
  480. package/build/formats/LegacyIndyCredentialFormatService.js.map +0 -1
  481. package/build/formats/LegacyIndyProofFormat.d.ts +0 -29
  482. package/build/formats/LegacyIndyProofFormat.js +0 -3
  483. package/build/formats/LegacyIndyProofFormat.js.map +0 -1
  484. package/build/formats/LegacyIndyProofFormatService.d.ts +0 -58
  485. package/build/formats/LegacyIndyProofFormatService.js +0 -374
  486. package/build/formats/LegacyIndyProofFormatService.js.map +0 -1
  487. package/build/formats/index.d.ts +0 -9
  488. package/build/formats/index.js +0 -32
  489. package/build/formats/index.js.map +0 -1
  490. package/build/index.d.ts +0 -21
  491. package/build/index.js +0 -54
  492. package/build/index.js.map +0 -1
  493. package/build/models/AnonCredsCredentialProposal.d.ts +0 -62
  494. package/build/models/AnonCredsCredentialProposal.js +0 -81
  495. package/build/models/AnonCredsCredentialProposal.js.map +0 -1
  496. package/build/models/AnonCredsProofRequest.d.ts +0 -27
  497. package/build/models/AnonCredsProofRequest.js +0 -82
  498. package/build/models/AnonCredsProofRequest.js.map +0 -1
  499. package/build/models/AnonCredsRequestedAttribute.d.ts +0 -16
  500. package/build/models/AnonCredsRequestedAttribute.js +0 -56
  501. package/build/models/AnonCredsRequestedAttribute.js.map +0 -1
  502. package/build/models/AnonCredsRequestedPredicate.d.ts +0 -19
  503. package/build/models/AnonCredsRequestedPredicate.js +0 -61
  504. package/build/models/AnonCredsRequestedPredicate.js.map +0 -1
  505. package/build/models/AnonCredsRestriction.d.ts +0 -55
  506. package/build/models/AnonCredsRestriction.js +0 -160
  507. package/build/models/AnonCredsRestriction.js.map +0 -1
  508. package/build/models/AnonCredsRestrictionWrapper.d.ts +0 -4
  509. package/build/models/AnonCredsRestrictionWrapper.js +0 -25
  510. package/build/models/AnonCredsRestrictionWrapper.js.map +0 -1
  511. package/build/models/AnonCredsRevocationInterval.d.ts +0 -5
  512. package/build/models/AnonCredsRevocationInterval.js +0 -33
  513. package/build/models/AnonCredsRevocationInterval.js.map +0 -1
  514. package/build/models/exchange.d.ts +0 -99
  515. package/build/models/exchange.js +0 -5
  516. package/build/models/exchange.js.map +0 -1
  517. package/build/models/index.d.ts +0 -4
  518. package/build/models/index.js +0 -21
  519. package/build/models/index.js.map +0 -1
  520. package/build/models/internal.d.ts +0 -35
  521. package/build/models/internal.js +0 -3
  522. package/build/models/internal.js.map +0 -1
  523. package/build/models/registry.d.ts +0 -39
  524. package/build/models/registry.js +0 -3
  525. package/build/models/registry.js.map +0 -1
  526. package/build/models/utils.d.ts +0 -22
  527. package/build/models/utils.js +0 -3
  528. package/build/models/utils.js.map +0 -1
  529. package/build/protocols/credentials/v1/V1CredentialProtocol.d.ts +0 -162
  530. package/build/protocols/credentials/v1/V1CredentialProtocol.js +0 -948
  531. package/build/protocols/credentials/v1/V1CredentialProtocol.js.map +0 -1
  532. package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.d.ts +0 -10
  533. package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.js +0 -18
  534. package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.js.map +0 -1
  535. package/build/protocols/credentials/v1/errors/index.d.ts +0 -1
  536. package/build/protocols/credentials/v1/errors/index.js +0 -6
  537. package/build/protocols/credentials/v1/errors/index.js.map +0 -1
  538. package/build/protocols/credentials/v1/handlers/V1CredentialAckHandler.d.ts +0 -9
  539. package/build/protocols/credentials/v1/handlers/V1CredentialAckHandler.js +0 -15
  540. package/build/protocols/credentials/v1/handlers/V1CredentialAckHandler.js.map +0 -1
  541. package/build/protocols/credentials/v1/handlers/V1CredentialProblemReportHandler.d.ts +0 -9
  542. package/build/protocols/credentials/v1/handlers/V1CredentialProblemReportHandler.js +0 -15
  543. package/build/protocols/credentials/v1/handlers/V1CredentialProblemReportHandler.js.map +0 -1
  544. package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.d.ts +0 -10
  545. package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.js +0 -40
  546. package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.js.map +0 -1
  547. package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.d.ts +0 -10
  548. package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.js +0 -33
  549. package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.js.map +0 -1
  550. package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.d.ts +0 -10
  551. package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.js +0 -38
  552. package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.js.map +0 -1
  553. package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.d.ts +0 -10
  554. package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.js +0 -40
  555. package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.js.map +0 -1
  556. package/build/protocols/credentials/v1/handlers/index.d.ts +0 -6
  557. package/build/protocols/credentials/v1/handlers/index.js +0 -23
  558. package/build/protocols/credentials/v1/handlers/index.js.map +0 -1
  559. package/build/protocols/credentials/v1/index.d.ts +0 -2
  560. package/build/protocols/credentials/v1/index.js +0 -19
  561. package/build/protocols/credentials/v1/index.js.map +0 -1
  562. package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.d.ts +0 -16
  563. package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.js +0 -34
  564. package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.js.map +0 -1
  565. package/build/protocols/credentials/v1/messages/V1CredentialPreview.d.ts +0 -26
  566. package/build/protocols/credentials/v1/messages/V1CredentialPreview.js +0 -69
  567. package/build/protocols/credentials/v1/messages/V1CredentialPreview.js.map +0 -1
  568. package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.d.ts +0 -16
  569. package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.js +0 -34
  570. package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.js.map +0 -1
  571. package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.d.ts +0 -19
  572. package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.js +0 -62
  573. package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.js.map +0 -1
  574. package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.d.ts +0 -27
  575. package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.js +0 -75
  576. package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.js.map +0 -1
  577. package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.d.ts +0 -59
  578. package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.js +0 -109
  579. package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.js.map +0 -1
  580. package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.d.ts +0 -19
  581. package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.js +0 -61
  582. package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.js.map +0 -1
  583. package/build/protocols/credentials/v1/messages/index.d.ts +0 -7
  584. package/build/protocols/credentials/v1/messages/index.js +0 -24
  585. package/build/protocols/credentials/v1/messages/index.js.map +0 -1
  586. package/build/protocols/index.d.ts +0 -2
  587. package/build/protocols/index.js +0 -19
  588. package/build/protocols/index.js.map +0 -1
  589. package/build/protocols/proofs/v1/V1ProofProtocol.d.ts +0 -50
  590. package/build/protocols/proofs/v1/V1ProofProtocol.js +0 -864
  591. package/build/protocols/proofs/v1/V1ProofProtocol.js.map +0 -1
  592. package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.d.ts +0 -12
  593. package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.js +0 -19
  594. package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.js.map +0 -1
  595. package/build/protocols/proofs/v1/errors/index.d.ts +0 -1
  596. package/build/protocols/proofs/v1/errors/index.js +0 -18
  597. package/build/protocols/proofs/v1/errors/index.js.map +0 -1
  598. package/build/protocols/proofs/v1/handlers/V1PresentationAckHandler.d.ts +0 -9
  599. package/build/protocols/proofs/v1/handlers/V1PresentationAckHandler.js +0 -15
  600. package/build/protocols/proofs/v1/handlers/V1PresentationAckHandler.js.map +0 -1
  601. package/build/protocols/proofs/v1/handlers/V1PresentationHandler.d.ts +0 -10
  602. package/build/protocols/proofs/v1/handlers/V1PresentationHandler.js +0 -40
  603. package/build/protocols/proofs/v1/handlers/V1PresentationHandler.js.map +0 -1
  604. package/build/protocols/proofs/v1/handlers/V1PresentationProblemReportHandler.d.ts +0 -9
  605. package/build/protocols/proofs/v1/handlers/V1PresentationProblemReportHandler.js +0 -15
  606. package/build/protocols/proofs/v1/handlers/V1PresentationProblemReportHandler.js.map +0 -1
  607. package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.d.ts +0 -11
  608. package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.js +0 -38
  609. package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.js.map +0 -1
  610. package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.d.ts +0 -10
  611. package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.js +0 -35
  612. package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.js.map +0 -1
  613. package/build/protocols/proofs/v1/handlers/index.d.ts +0 -5
  614. package/build/protocols/proofs/v1/handlers/index.js +0 -22
  615. package/build/protocols/proofs/v1/handlers/index.js.map +0 -1
  616. package/build/protocols/proofs/v1/index.d.ts +0 -4
  617. package/build/protocols/proofs/v1/index.js +0 -21
  618. package/build/protocols/proofs/v1/index.js.map +0 -1
  619. package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.d.ts +0 -8
  620. package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.js +0 -27
  621. package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.js.map +0 -1
  622. package/build/protocols/proofs/v1/messages/V1PresentationMessage.d.ts +0 -31
  623. package/build/protocols/proofs/v1/messages/V1PresentationMessage.js +0 -67
  624. package/build/protocols/proofs/v1/messages/V1PresentationMessage.js.map +0 -1
  625. package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.d.ts +0 -16
  626. package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.js +0 -34
  627. package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.js.map +0 -1
  628. package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.d.ts +0 -26
  629. package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.js +0 -53
  630. package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.js.map +0 -1
  631. package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.d.ts +0 -29
  632. package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.js +0 -65
  633. package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.js.map +0 -1
  634. package/build/protocols/proofs/v1/messages/index.d.ts +0 -5
  635. package/build/protocols/proofs/v1/messages/index.js +0 -22
  636. package/build/protocols/proofs/v1/messages/index.js.map +0 -1
  637. package/build/protocols/proofs/v1/models/V1PresentationPreview.d.ts +0 -50
  638. package/build/protocols/proofs/v1/models/V1PresentationPreview.js +0 -130
  639. package/build/protocols/proofs/v1/models/V1PresentationPreview.js.map +0 -1
  640. package/build/protocols/proofs/v1/models/index.d.ts +0 -1
  641. package/build/protocols/proofs/v1/models/index.js +0 -18
  642. package/build/protocols/proofs/v1/models/index.js.map +0 -1
  643. package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.d.ts +0 -21
  644. package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.js +0 -23
  645. package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.js.map +0 -1
  646. package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.d.ts +0 -8
  647. package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.js +0 -35
  648. package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.js.map +0 -1
  649. package/build/repository/AnonCredsCredentialDefinitionRecord.d.ts +0 -39
  650. package/build/repository/AnonCredsCredentialDefinitionRecord.js +0 -30
  651. package/build/repository/AnonCredsCredentialDefinitionRecord.js.map +0 -1
  652. package/build/repository/AnonCredsCredentialDefinitionRepository.d.ts +0 -8
  653. package/build/repository/AnonCredsCredentialDefinitionRepository.js +0 -53
  654. package/build/repository/AnonCredsCredentialDefinitionRepository.js.map +0 -1
  655. package/build/repository/AnonCredsCredentialRecord.d.ts +0 -48
  656. package/build/repository/AnonCredsCredentialRecord.js +0 -37
  657. package/build/repository/AnonCredsCredentialRecord.js.map +0 -1
  658. package/build/repository/AnonCredsCredentialRepository.d.ts +0 -10
  659. package/build/repository/AnonCredsCredentialRepository.js +0 -41
  660. package/build/repository/AnonCredsCredentialRepository.js.map +0 -1
  661. package/build/repository/AnonCredsKeyCorrectnessProofRecord.d.ts +0 -21
  662. package/build/repository/AnonCredsKeyCorrectnessProofRecord.js +0 -23
  663. package/build/repository/AnonCredsKeyCorrectnessProofRecord.js.map +0 -1
  664. package/build/repository/AnonCredsKeyCorrectnessProofRepository.d.ts +0 -8
  665. package/build/repository/AnonCredsKeyCorrectnessProofRepository.js +0 -35
  666. package/build/repository/AnonCredsKeyCorrectnessProofRepository.js.map +0 -1
  667. package/build/repository/AnonCredsLinkSecretRecord.d.ts +0 -23
  668. package/build/repository/AnonCredsLinkSecretRecord.js +0 -22
  669. package/build/repository/AnonCredsLinkSecretRecord.js.map +0 -1
  670. package/build/repository/AnonCredsLinkSecretRepository.d.ts +0 -10
  671. package/build/repository/AnonCredsLinkSecretRepository.js +0 -41
  672. package/build/repository/AnonCredsLinkSecretRepository.js.map +0 -1
  673. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.d.ts +0 -34
  674. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.js +0 -30
  675. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.js.map +0 -1
  676. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.d.ts +0 -10
  677. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.js +0 -38
  678. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.js.map +0 -1
  679. package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.d.ts +0 -25
  680. package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.js +0 -23
  681. package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.js.map +0 -1
  682. package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.d.ts +0 -9
  683. package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.js +0 -38
  684. package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.js.map +0 -1
  685. package/build/repository/AnonCredsSchemaRecord.d.ts +0 -39
  686. package/build/repository/AnonCredsSchemaRecord.js +0 -30
  687. package/build/repository/AnonCredsSchemaRecord.js.map +0 -1
  688. package/build/repository/AnonCredsSchemaRepository.d.ts +0 -8
  689. package/build/repository/AnonCredsSchemaRepository.js +0 -53
  690. package/build/repository/AnonCredsSchemaRepository.js.map +0 -1
  691. package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.ts +0 -9
  692. package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.js +0 -9
  693. package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.js.map +0 -1
  694. package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.ts +0 -9
  695. package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.js +0 -9
  696. package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.js.map +0 -1
  697. package/build/repository/anonCredsSchemaRecordMetadataTypes.d.ts +0 -9
  698. package/build/repository/anonCredsSchemaRecordMetadataTypes.js +0 -9
  699. package/build/repository/anonCredsSchemaRecordMetadataTypes.js.map +0 -1
  700. package/build/repository/index.d.ts +0 -16
  701. package/build/repository/index.js +0 -33
  702. package/build/repository/index.js.map +0 -1
  703. package/build/services/AnonCredsHolderService.d.ts +0 -18
  704. package/build/services/AnonCredsHolderService.js +0 -5
  705. package/build/services/AnonCredsHolderService.js.map +0 -1
  706. package/build/services/AnonCredsHolderServiceOptions.d.ts +0 -101
  707. package/build/services/AnonCredsHolderServiceOptions.js +0 -3
  708. package/build/services/AnonCredsHolderServiceOptions.js.map +0 -1
  709. package/build/services/AnonCredsIssuerService.d.ts +0 -14
  710. package/build/services/AnonCredsIssuerService.js +0 -5
  711. package/build/services/AnonCredsIssuerService.js.map +0 -1
  712. package/build/services/AnonCredsIssuerServiceOptions.d.ts +0 -61
  713. package/build/services/AnonCredsIssuerServiceOptions.js +0 -3
  714. package/build/services/AnonCredsIssuerServiceOptions.js.map +0 -1
  715. package/build/services/AnonCredsVerifierService.d.ts +0 -7
  716. package/build/services/AnonCredsVerifierService.js +0 -5
  717. package/build/services/AnonCredsVerifierService.js.map +0 -1
  718. package/build/services/AnonCredsVerifierServiceOptions.d.ts +0 -25
  719. package/build/services/AnonCredsVerifierServiceOptions.js +0 -3
  720. package/build/services/AnonCredsVerifierServiceOptions.js.map +0 -1
  721. package/build/services/index.d.ts +0 -8
  722. package/build/services/index.js +0 -27
  723. package/build/services/index.js.map +0 -1
  724. package/build/services/registry/AnonCredsRegistry.d.ts +0 -25
  725. package/build/services/registry/AnonCredsRegistry.js +0 -3
  726. package/build/services/registry/AnonCredsRegistry.js.map +0 -1
  727. package/build/services/registry/AnonCredsRegistryService.d.ts +0 -10
  728. package/build/services/registry/AnonCredsRegistryService.js +0 -33
  729. package/build/services/registry/AnonCredsRegistryService.js.map +0 -1
  730. package/build/services/registry/CredentialDefinitionOptions.d.ts +0 -34
  731. package/build/services/registry/CredentialDefinitionOptions.js +0 -3
  732. package/build/services/registry/CredentialDefinitionOptions.js.map +0 -1
  733. package/build/services/registry/RevocationRegistryDefinitionOptions.d.ts +0 -34
  734. package/build/services/registry/RevocationRegistryDefinitionOptions.js +0 -3
  735. package/build/services/registry/RevocationRegistryDefinitionOptions.js.map +0 -1
  736. package/build/services/registry/RevocationStatusListOptions.d.ts +0 -32
  737. package/build/services/registry/RevocationStatusListOptions.js +0 -3
  738. package/build/services/registry/RevocationStatusListOptions.js.map +0 -1
  739. package/build/services/registry/SchemaOptions.d.ts +0 -34
  740. package/build/services/registry/SchemaOptions.js +0 -3
  741. package/build/services/registry/SchemaOptions.js.map +0 -1
  742. package/build/services/registry/base.d.ts +0 -19
  743. package/build/services/registry/base.js +0 -3
  744. package/build/services/registry/base.js.map +0 -1
  745. package/build/services/registry/index.d.ts +0 -7
  746. package/build/services/registry/index.js +0 -23
  747. package/build/services/registry/index.js.map +0 -1
  748. package/build/services/tails/BasicTailsFileService.d.ts +0 -23
  749. package/build/services/tails/BasicTailsFileService.js +0 -65
  750. package/build/services/tails/BasicTailsFileService.js.map +0 -1
  751. package/build/services/tails/TailsFileService.d.ts +0 -42
  752. package/build/services/tails/TailsFileService.js +0 -3
  753. package/build/services/tails/TailsFileService.js.map +0 -1
  754. package/build/services/tails/index.d.ts +0 -2
  755. package/build/services/tails/index.js +0 -19
  756. package/build/services/tails/index.js.map +0 -1
  757. package/build/updates/0.3.1-0.4/credentialDefinition.d.ts +0 -18
  758. package/build/updates/0.3.1-0.4/credentialDefinition.js +0 -56
  759. package/build/updates/0.3.1-0.4/credentialDefinition.js.map +0 -1
  760. package/build/updates/0.3.1-0.4/credentialExchangeRecord.d.ts +0 -69
  761. package/build/updates/0.3.1-0.4/credentialExchangeRecord.js +0 -121
  762. package/build/updates/0.3.1-0.4/credentialExchangeRecord.js.map +0 -1
  763. package/build/updates/0.3.1-0.4/index.d.ts +0 -2
  764. package/build/updates/0.3.1-0.4/index.js +0 -14
  765. package/build/updates/0.3.1-0.4/index.js.map +0 -1
  766. package/build/updates/0.3.1-0.4/linkSecret.d.ts +0 -6
  767. package/build/updates/0.3.1-0.4/linkSecret.js +0 -35
  768. package/build/updates/0.3.1-0.4/linkSecret.js.map +0 -1
  769. package/build/updates/0.3.1-0.4/schema.d.ts +0 -15
  770. package/build/updates/0.3.1-0.4/schema.js +0 -41
  771. package/build/updates/0.3.1-0.4/schema.js.map +0 -1
  772. package/build/updates/0.4-0.5/anonCredsCredentialRecord.d.ts +0 -5
  773. package/build/updates/0.4-0.5/anonCredsCredentialRecord.js +0 -149
  774. package/build/updates/0.4-0.5/anonCredsCredentialRecord.js.map +0 -1
  775. package/build/updates/0.4-0.5/index.d.ts +0 -2
  776. package/build/updates/0.4-0.5/index.js +0 -8
  777. package/build/updates/0.4-0.5/index.js.map +0 -1
  778. package/build/utils/anonCredsObjects.d.ts +0 -26
  779. package/build/utils/anonCredsObjects.js +0 -81
  780. package/build/utils/anonCredsObjects.js.map +0 -1
  781. package/build/utils/areRequestsEqual.d.ts +0 -6
  782. package/build/utils/areRequestsEqual.js +0 -135
  783. package/build/utils/areRequestsEqual.js.map +0 -1
  784. package/build/utils/composeAutoAccept.d.ts +0 -15
  785. package/build/utils/composeAutoAccept.js +0 -26
  786. package/build/utils/composeAutoAccept.js.map +0 -1
  787. package/build/utils/createRequestFromPreview.d.ts +0 -10
  788. package/build/utils/createRequestFromPreview.js +0 -71
  789. package/build/utils/createRequestFromPreview.js.map +0 -1
  790. package/build/utils/credential.d.ts +0 -68
  791. package/build/utils/credential.js +0 -188
  792. package/build/utils/credential.js.map +0 -1
  793. package/build/utils/credentialPreviewAttributes.d.ts +0 -2
  794. package/build/utils/credentialPreviewAttributes.js +0 -24
  795. package/build/utils/credentialPreviewAttributes.js.map +0 -1
  796. package/build/utils/getCredentialsForAnonCredsRequest.d.ts +0 -4
  797. package/build/utils/getCredentialsForAnonCredsRequest.js +0 -81
  798. package/build/utils/getCredentialsForAnonCredsRequest.js.map +0 -1
  799. package/build/utils/getRevocationRegistries.d.ts +0 -14
  800. package/build/utils/getRevocationRegistries.js +0 -151
  801. package/build/utils/getRevocationRegistries.js.map +0 -1
  802. package/build/utils/hasDuplicateGroupNames.d.ts +0 -2
  803. package/build/utils/hasDuplicateGroupNames.js +0 -22
  804. package/build/utils/hasDuplicateGroupNames.js.map +0 -1
  805. package/build/utils/index.d.ts +0 -17
  806. package/build/utils/index.js +0 -48
  807. package/build/utils/index.js.map +0 -1
  808. package/build/utils/indyIdentifiers.d.ts +0 -66
  809. package/build/utils/indyIdentifiers.js +0 -298
  810. package/build/utils/indyIdentifiers.js.map +0 -1
  811. package/build/utils/isMap.d.ts +0 -5
  812. package/build/utils/isMap.js +0 -17
  813. package/build/utils/isMap.js.map +0 -1
  814. package/build/utils/linkSecret.d.ts +0 -9
  815. package/build/utils/linkSecret.js +0 -43
  816. package/build/utils/linkSecret.js.map +0 -1
  817. package/build/utils/metadata.d.ts +0 -35
  818. package/build/utils/metadata.js +0 -24
  819. package/build/utils/metadata.js.map +0 -1
  820. package/build/utils/proofRequest.d.ts +0 -2
  821. package/build/utils/proofRequest.js +0 -21
  822. package/build/utils/proofRequest.js.map +0 -1
  823. package/build/utils/proverDid.d.ts +0 -8
  824. package/build/utils/proverDid.js +0 -15
  825. package/build/utils/proverDid.js.map +0 -1
  826. package/build/utils/revocationInterval.d.ts +0 -7
  827. package/build/utils/revocationInterval.js +0 -14
  828. package/build/utils/revocationInterval.js.map +0 -1
  829. package/build/utils/sortRequestedCredentialsMatches.d.ts +0 -8
  830. package/build/utils/sortRequestedCredentialsMatches.js +0 -31
  831. package/build/utils/sortRequestedCredentialsMatches.js.map +0 -1
  832. package/build/utils/timestamp.d.ts +0 -1
  833. package/build/utils/timestamp.js +0 -7
  834. package/build/utils/timestamp.js.map +0 -1
  835. package/build/utils/w3cAnonCredsUtils.d.ts +0 -37
  836. package/build/utils/w3cAnonCredsUtils.js +0 -132
  837. package/build/utils/w3cAnonCredsUtils.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnonCredsDidCommCredentialFormatService.mjs","names":["revocationRegistryDefinitionId: string | undefined","revocationRegistryIndex: number | undefined","revocationStatusList: AnonCredsRevocationStatusList | undefined"],"sources":["../../src/formats/AnonCredsDidCommCredentialFormatService.ts"],"sourcesContent":["import type { AgentContext } from '@credo-ts/core'\nimport { CredoError, JsonEncoder, JsonTransformer, MessageValidator, utils } from '@credo-ts/core'\nimport type {\n DidCommCredentialExchangeRecord,\n DidCommCredentialFormatAcceptOfferOptions,\n DidCommCredentialFormatAcceptProposalOptions,\n DidCommCredentialFormatAcceptRequestOptions,\n DidCommCredentialFormatAutoRespondCredentialOptions,\n DidCommCredentialFormatAutoRespondOfferOptions,\n DidCommCredentialFormatAutoRespondProposalOptions,\n DidCommCredentialFormatAutoRespondRequestOptions,\n DidCommCredentialFormatCreateOfferOptions,\n DidCommCredentialFormatCreateOfferReturn,\n DidCommCredentialFormatCreateProposalOptions,\n DidCommCredentialFormatCreateProposalReturn,\n DidCommCredentialFormatCreateReturn,\n DidCommCredentialFormatProcessCredentialOptions,\n DidCommCredentialFormatProcessOptions,\n DidCommCredentialFormatService,\n DidCommCredentialPreviewAttributeOptions,\n} from '@credo-ts/didcomm'\nimport {\n DidCommAttachment,\n DidCommCredentialFormatSpec,\n DidCommCredentialProblemReportReason,\n DidCommProblemReportError,\n} from '@credo-ts/didcomm'\nimport type {\n AnonCredsCredential,\n AnonCredsCredentialOffer,\n AnonCredsCredentialRequest,\n AnonCredsRevocationStatusList,\n} from '../models'\nimport { AnonCredsCredentialProposal } from '../models/AnonCredsCredentialProposal'\nimport {\n AnonCredsCredentialDefinitionRepository,\n AnonCredsRevocationRegistryDefinitionPrivateRepository,\n AnonCredsRevocationRegistryState,\n} from '../repository'\nimport type { AnonCredsHolderService, AnonCredsIssuerService } from '../services'\nimport { AnonCredsHolderServiceSymbol, AnonCredsIssuerServiceSymbol } from '../services'\nimport {\n dateToTimestamp,\n fetchCredentialDefinition,\n fetchRevocationRegistryDefinition,\n fetchRevocationStatusList,\n fetchSchema,\n} from '../utils'\nimport {\n assertAttributesMatch,\n assertCredentialValuesMatch,\n checkCredentialValuesMatch,\n convertAttributesToCredentialValues,\n} from '../utils/credential'\nimport type { AnonCredsCredentialMetadata, AnonCredsCredentialRequestMetadata } from '../utils/metadata'\nimport { AnonCredsCredentialMetadataKey, AnonCredsCredentialRequestMetadataKey } from '../utils/metadata'\nimport { getStoreCredentialOptions } from '../utils/w3cAnonCredsUtils'\nimport type {\n AnonCredsDidCommCredentialFormat,\n AnonCredsDidCommCredentialProposalFormat,\n} from './AnonCredsDidCommCredentialFormat'\n\nconst ANONCREDS_CREDENTIAL_OFFER = 'anoncreds/credential-offer@v1.0'\nconst ANONCREDS_CREDENTIAL_REQUEST = 'anoncreds/credential-request@v1.0'\nconst ANONCREDS_CREDENTIAL_FILTER = 'anoncreds/credential-filter@v1.0'\nconst ANONCREDS_CREDENTIAL = 'anoncreds/credential@v1.0'\n\nexport class AnonCredsDidCommCredentialFormatService\n implements DidCommCredentialFormatService<AnonCredsDidCommCredentialFormat>\n{\n /** formatKey is the key used when calling agent.credentials.xxx with credentialFormats.anoncreds */\n public readonly formatKey = 'anoncreds' as const\n\n /**\n * credentialRecordType is the type of record that stores the credential. It is stored in the credential\n * record binding in the credential exchange record.\n */\n public readonly credentialRecordType = 'w3c' as const\n\n /**\n * Create a {@link AttachmentFormats} object dependent on the message type.\n *\n * @param options The object containing all the options for the proposed credential\n * @returns object containing associated attachment, format and optionally the credential preview\n *\n */\n public async createProposal(\n _agentContext: AgentContext,\n {\n credentialFormats,\n credentialExchangeRecord,\n }: DidCommCredentialFormatCreateProposalOptions<AnonCredsDidCommCredentialFormat>\n ): Promise<DidCommCredentialFormatCreateProposalReturn> {\n const format = new DidCommCredentialFormatSpec({\n format: ANONCREDS_CREDENTIAL_FILTER,\n })\n\n const anoncredsFormat = credentialFormats.anoncreds\n\n if (!anoncredsFormat) {\n throw new CredoError('Missing anoncreds payload in createProposal')\n }\n\n const { attributes, ...anoncredsCredentialProposal } = anoncredsFormat\n const proposal = new AnonCredsCredentialProposal(anoncredsCredentialProposal)\n\n try {\n MessageValidator.validateSync(proposal)\n } catch (_error) {\n throw new CredoError(`Invalid proposal supplied: ${anoncredsCredentialProposal} in AnonCredsFormatService`)\n }\n\n const attachment = this.getFormatData(JsonTransformer.toJSON(proposal), format.attachmentId)\n\n // Set the metadata\n credentialExchangeRecord.metadata.set<AnonCredsCredentialMetadata>(AnonCredsCredentialMetadataKey, {\n schemaId: proposal.schemaId,\n credentialDefinitionId: proposal.credentialDefinitionId,\n })\n\n return { format, attachment, previewAttributes: attributes }\n }\n\n public async processProposal(\n _agentContext: AgentContext,\n { attachment }: DidCommCredentialFormatProcessOptions\n ): Promise<void> {\n const proposalJson = attachment.getDataAsJson()\n\n JsonTransformer.fromJSON(proposalJson, AnonCredsCredentialProposal)\n }\n\n public async acceptProposal(\n agentContext: AgentContext,\n {\n attachmentId,\n credentialFormats,\n credentialExchangeRecord,\n proposalAttachment,\n }: DidCommCredentialFormatAcceptProposalOptions<AnonCredsDidCommCredentialFormat>\n ): Promise<DidCommCredentialFormatCreateOfferReturn> {\n const anoncredsFormat = credentialFormats?.anoncreds\n\n const proposalJson = proposalAttachment.getDataAsJson<AnonCredsDidCommCredentialProposalFormat>()\n const credentialDefinitionId = anoncredsFormat?.credentialDefinitionId ?? proposalJson.cred_def_id\n\n const attributes = anoncredsFormat?.attributes ?? credentialExchangeRecord.credentialAttributes\n\n if (!credentialDefinitionId) {\n throw new CredoError('No credential definition id in proposal or provided as input to accept proposal method.')\n }\n\n if (!attributes) {\n throw new CredoError('No attributes in proposal or provided as input to accept proposal method.')\n }\n\n const { format, attachment, previewAttributes } = await this.createAnonCredsOffer(agentContext, {\n credentialExchangeRecord,\n attachmentId,\n attributes,\n credentialDefinitionId,\n revocationRegistryDefinitionId: anoncredsFormat?.revocationRegistryDefinitionId,\n revocationRegistryIndex: anoncredsFormat?.revocationRegistryIndex,\n })\n\n return { format, attachment, previewAttributes }\n }\n\n /**\n * Create a credential attachment format for a credential request.\n *\n * @param options The object containing all the options for the credential offer\n * @returns object containing associated attachment, formats and offersAttach elements\n *\n */\n public async createOffer(\n agentContext: AgentContext,\n {\n credentialFormats,\n credentialExchangeRecord,\n attachmentId,\n }: DidCommCredentialFormatCreateOfferOptions<AnonCredsDidCommCredentialFormat>\n ): Promise<DidCommCredentialFormatCreateOfferReturn> {\n const anoncredsFormat = credentialFormats.anoncreds\n\n if (!anoncredsFormat) {\n throw new CredoError('Missing anoncreds credential format data')\n }\n\n const { format, attachment, previewAttributes } = await this.createAnonCredsOffer(agentContext, {\n credentialExchangeRecord,\n attachmentId,\n attributes: anoncredsFormat.attributes,\n credentialDefinitionId: anoncredsFormat.credentialDefinitionId,\n revocationRegistryDefinitionId: anoncredsFormat.revocationRegistryDefinitionId,\n revocationRegistryIndex: anoncredsFormat.revocationRegistryIndex,\n })\n\n return { format, attachment, previewAttributes }\n }\n\n public async processOffer(\n agentContext: AgentContext,\n { attachment, credentialExchangeRecord }: DidCommCredentialFormatProcessOptions\n ) {\n agentContext.config.logger.debug(\n `Processing anoncreds credential offer for credential record ${credentialExchangeRecord.id}`\n )\n\n const credOffer = attachment.getDataAsJson<AnonCredsCredentialOffer>()\n\n if (!credOffer.schema_id || !credOffer.cred_def_id) {\n throw new DidCommProblemReportError('Invalid credential offer', {\n problemCode: DidCommCredentialProblemReportReason.IssuanceAbandoned,\n })\n }\n }\n\n public async acceptOffer(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n attachmentId,\n offerAttachment,\n credentialFormats,\n }: DidCommCredentialFormatAcceptOfferOptions<AnonCredsDidCommCredentialFormat>\n ): Promise<DidCommCredentialFormatCreateReturn> {\n const holderService = agentContext.dependencyManager.resolve<AnonCredsHolderService>(AnonCredsHolderServiceSymbol)\n\n const credentialOffer = offerAttachment.getDataAsJson<AnonCredsCredentialOffer>()\n\n // Get credential definition\n const { credentialDefinition } = await fetchCredentialDefinition(agentContext, credentialOffer.cred_def_id)\n\n const { credentialRequest, credentialRequestMetadata } = await holderService.createCredentialRequest(agentContext, {\n credentialOffer,\n credentialDefinition,\n linkSecretId: credentialFormats?.anoncreds?.linkSecretId,\n })\n\n credentialExchangeRecord.metadata.set<AnonCredsCredentialRequestMetadata>(\n AnonCredsCredentialRequestMetadataKey,\n credentialRequestMetadata\n )\n credentialExchangeRecord.metadata.set<AnonCredsCredentialMetadata>(AnonCredsCredentialMetadataKey, {\n credentialDefinitionId: credentialOffer.cred_def_id,\n schemaId: credentialOffer.schema_id,\n })\n\n const format = new DidCommCredentialFormatSpec({\n attachmentId,\n format: ANONCREDS_CREDENTIAL_REQUEST,\n })\n\n const attachment = this.getFormatData(credentialRequest, format.attachmentId)\n return { format, attachment }\n }\n\n /**\n * Starting from a request is not supported for anoncreds credentials, this method only throws an error.\n */\n public async createRequest(): Promise<DidCommCredentialFormatCreateReturn> {\n throw new CredoError('Starting from a request is not supported for anoncreds credentials')\n }\n\n /**\n * We don't have any models to validate an anoncreds request object, for now this method does nothing\n */\n public async processRequest(\n _agentContext: AgentContext,\n _options: DidCommCredentialFormatProcessOptions\n ): Promise<void> {\n // not needed for anoncreds\n }\n\n public async acceptRequest(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n attachmentId,\n offerAttachment,\n requestAttachment,\n }: DidCommCredentialFormatAcceptRequestOptions<AnonCredsDidCommCredentialFormat>\n ): Promise<DidCommCredentialFormatCreateReturn> {\n // Assert credential attributes\n const credentialAttributes = credentialExchangeRecord.credentialAttributes\n if (!credentialAttributes) {\n throw new CredoError(\n `Missing required credential attribute values on credential record with id ${credentialExchangeRecord.id}`\n )\n }\n\n const anonCredsIssuerService =\n agentContext.dependencyManager.resolve<AnonCredsIssuerService>(AnonCredsIssuerServiceSymbol)\n\n const credentialOffer = offerAttachment?.getDataAsJson<AnonCredsCredentialOffer>()\n if (!credentialOffer) throw new CredoError('Missing anoncreds credential offer in createCredential')\n\n const credentialRequest = requestAttachment.getDataAsJson<AnonCredsCredentialRequest>()\n if (!credentialRequest) throw new CredoError('Missing anoncreds credential request in createCredential')\n\n // We check locally for credential definition info. If it supports revocation, we need to search locally for\n // an active revocation registry\n const credentialDefinition = (\n await agentContext.dependencyManager\n .resolve(AnonCredsCredentialDefinitionRepository)\n .getByCredentialDefinitionId(agentContext, credentialRequest.cred_def_id)\n ).credentialDefinition.value\n\n let revocationRegistryDefinitionId: string | undefined\n let revocationRegistryIndex: number | undefined\n let revocationStatusList: AnonCredsRevocationStatusList | undefined\n\n if (credentialDefinition.revocation) {\n const credentialMetadata =\n credentialExchangeRecord.metadata.get<AnonCredsCredentialMetadata>(AnonCredsCredentialMetadataKey)\n revocationRegistryDefinitionId = credentialMetadata?.revocationRegistryId\n if (credentialMetadata?.credentialRevocationId) {\n revocationRegistryIndex = Number(credentialMetadata.credentialRevocationId)\n }\n\n if (!revocationRegistryDefinitionId || revocationRegistryIndex === undefined) {\n throw new CredoError(\n 'Revocation registry definition id and revocation index are mandatory to issue AnonCreds revocable credentials'\n )\n }\n const revocationRegistryDefinitionPrivateRecord = await agentContext.dependencyManager\n .resolve(AnonCredsRevocationRegistryDefinitionPrivateRepository)\n .getByRevocationRegistryDefinitionId(agentContext, revocationRegistryDefinitionId)\n\n if (revocationRegistryDefinitionPrivateRecord.state !== AnonCredsRevocationRegistryState.Active) {\n throw new CredoError(\n `Revocation registry ${revocationRegistryDefinitionId} is in ${revocationRegistryDefinitionPrivateRecord.state} state`\n )\n }\n\n const revocationStatusListResult = await fetchRevocationStatusList(\n agentContext,\n revocationRegistryDefinitionId,\n dateToTimestamp(new Date())\n )\n revocationStatusList = revocationStatusListResult.revocationStatusList\n }\n\n const { credential, credentialRevocationId } = await anonCredsIssuerService.createCredential(agentContext, {\n credentialOffer,\n credentialRequest,\n credentialValues: convertAttributesToCredentialValues(credentialAttributes),\n revocationRegistryDefinitionId,\n revocationRegistryIndex,\n revocationStatusList,\n })\n\n // If the credential is revocable, store the revocation identifiers in the credential record\n if (credential.rev_reg_id) {\n credentialExchangeRecord.metadata.add<AnonCredsCredentialMetadata>(AnonCredsCredentialMetadataKey, {\n revocationRegistryId: revocationRegistryDefinitionId ?? undefined,\n credentialRevocationId: credentialRevocationId ?? undefined,\n })\n credentialExchangeRecord.setTags({\n anonCredsRevocationRegistryId: revocationRegistryDefinitionId,\n anonCredsCredentialRevocationId: credentialRevocationId,\n })\n }\n\n const format = new DidCommCredentialFormatSpec({\n attachmentId,\n format: ANONCREDS_CREDENTIAL,\n })\n\n const attachment = this.getFormatData(credential, format.attachmentId)\n return { format, attachment }\n }\n\n /**\n * Processes an incoming credential - retrieve metadata, retrieve payload and store it in wallet\n * @param options the issue credential message wrapped inside this object\n * @param credentialExchangeRecord the credential exchange record for this credential\n */\n public async processCredential(\n agentContext: AgentContext,\n { credentialExchangeRecord, attachment }: DidCommCredentialFormatProcessCredentialOptions\n ): Promise<void> {\n const credentialRequestMetadata = credentialExchangeRecord.metadata.get<AnonCredsCredentialRequestMetadata>(\n AnonCredsCredentialRequestMetadataKey\n )\n\n const anonCredsHolderService =\n agentContext.dependencyManager.resolve<AnonCredsHolderService>(AnonCredsHolderServiceSymbol)\n\n if (!credentialRequestMetadata) {\n throw new CredoError(\n `Missing required request metadata for credential exchange with thread id with id ${credentialExchangeRecord.id}`\n )\n }\n\n if (!credentialExchangeRecord.credentialAttributes) {\n throw new CredoError('Missing credential attributes on credential record. Unable to check credential attributes')\n }\n\n const anonCredsCredential = attachment.getDataAsJson<AnonCredsCredential>()\n\n const { credentialDefinition, credentialDefinitionId } = await fetchCredentialDefinition(\n agentContext,\n anonCredsCredential.cred_def_id\n )\n const { schema, indyNamespace } = await fetchSchema(agentContext, anonCredsCredential.schema_id)\n\n // Resolve revocation registry if credential is revocable\n const revocationRegistryResult = anonCredsCredential.rev_reg_id\n ? await fetchRevocationRegistryDefinition(agentContext, anonCredsCredential.rev_reg_id)\n : undefined\n\n // assert the credential values match the offer values\n const recordCredentialValues = convertAttributesToCredentialValues(credentialExchangeRecord.credentialAttributes)\n assertCredentialValuesMatch(anonCredsCredential.values, recordCredentialValues)\n\n const storeCredentialOptions = getStoreCredentialOptions(\n {\n credentialId: utils.uuid(),\n credentialRequestMetadata,\n credential: anonCredsCredential,\n credentialDefinitionId,\n credentialDefinition,\n schema,\n revocationRegistry: revocationRegistryResult?.revocationRegistryDefinition\n ? {\n definition: revocationRegistryResult.revocationRegistryDefinition,\n id: revocationRegistryResult.revocationRegistryDefinitionId,\n }\n : undefined,\n },\n indyNamespace\n )\n\n const credentialId = await anonCredsHolderService.storeCredential(agentContext, storeCredentialOptions)\n\n // If the credential is revocable, store the revocation identifiers in the credential record\n if (anonCredsCredential.rev_reg_id) {\n const credential = await anonCredsHolderService.getCredential(agentContext, { id: credentialId })\n\n credentialExchangeRecord.metadata.add<AnonCredsCredentialMetadata>(AnonCredsCredentialMetadataKey, {\n credentialRevocationId: credential.credentialRevocationId ?? undefined,\n revocationRegistryId: credential.revocationRegistryId ?? undefined,\n })\n credentialExchangeRecord.setTags({\n anonCredsRevocationRegistryId: credential.revocationRegistryId,\n anonCredsCredentialRevocationId: credential.credentialRevocationId,\n })\n }\n\n credentialExchangeRecord.credentials.push({\n credentialRecordType: this.credentialRecordType,\n credentialRecordId: credentialId,\n })\n }\n\n public supportsFormat(format: string): boolean {\n const supportedFormats = [\n ANONCREDS_CREDENTIAL_REQUEST,\n ANONCREDS_CREDENTIAL_OFFER,\n ANONCREDS_CREDENTIAL_FILTER,\n ANONCREDS_CREDENTIAL,\n ]\n\n return supportedFormats.includes(format)\n }\n\n /**\n * Gets the attachment object for a given attachmentId. We need to get out the correct attachmentId for\n * anoncreds and then find the corresponding attachment (if there is one)\n * @param formats the formats object containing the attachmentId\n * @param messageAttachments the attachments containing the payload\n * @returns The DidCommAttachment if found or undefined\n *\n */\n public getAttachment(\n formats: DidCommCredentialFormatSpec[],\n messageAttachments: DidCommAttachment[]\n ): DidCommAttachment | undefined {\n const supportedAttachmentIds = formats.filter((f) => this.supportsFormat(f.format)).map((f) => f.attachmentId)\n const supportedAttachment = messageAttachments.find((attachment) => supportedAttachmentIds.includes(attachment.id))\n\n return supportedAttachment\n }\n\n public async deleteCredentialById(agentContext: AgentContext, credentialRecordId: string): Promise<void> {\n const anonCredsHolderService =\n agentContext.dependencyManager.resolve<AnonCredsHolderService>(AnonCredsHolderServiceSymbol)\n\n await anonCredsHolderService.deleteCredential(agentContext, credentialRecordId)\n }\n\n public async shouldAutoRespondToProposal(\n _agentContext: AgentContext,\n { offerAttachment, proposalAttachment }: DidCommCredentialFormatAutoRespondProposalOptions\n ) {\n const proposalJson = proposalAttachment.getDataAsJson<AnonCredsDidCommCredentialProposalFormat>()\n const offerJson = offerAttachment.getDataAsJson<AnonCredsCredentialOffer>()\n\n // We want to make sure the credential definition matches.\n // TODO: If no credential definition is present on the proposal, we could check whether the other fields\n // of the proposal match with the credential definition id.\n return proposalJson.cred_def_id === offerJson.cred_def_id\n }\n\n public async shouldAutoRespondToOffer(\n _agentContext: AgentContext,\n { offerAttachment, proposalAttachment }: DidCommCredentialFormatAutoRespondOfferOptions\n ) {\n const proposalJson = proposalAttachment.getDataAsJson<AnonCredsDidCommCredentialProposalFormat>()\n const offerJson = offerAttachment.getDataAsJson<AnonCredsCredentialOffer>()\n\n // We want to make sure the credential definition matches.\n // TODO: If no credential definition is present on the proposal, we could check whether the other fields\n // of the proposal match with the credential definition id.\n return proposalJson.cred_def_id === offerJson.cred_def_id\n }\n\n public async shouldAutoRespondToRequest(\n _agentContext: AgentContext,\n { offerAttachment, requestAttachment }: DidCommCredentialFormatAutoRespondRequestOptions\n ) {\n const credentialOfferJson = offerAttachment.getDataAsJson<AnonCredsCredentialOffer>()\n const credentialRequestJson = requestAttachment.getDataAsJson<AnonCredsCredentialRequest>()\n\n return credentialOfferJson.cred_def_id === credentialRequestJson.cred_def_id\n }\n\n public async shouldAutoRespondToCredential(\n _agentContext: AgentContext,\n {\n credentialExchangeRecord,\n requestAttachment,\n credentialAttachment,\n }: DidCommCredentialFormatAutoRespondCredentialOptions\n ) {\n const credentialJson = credentialAttachment.getDataAsJson<AnonCredsCredential>()\n const credentialRequestJson = requestAttachment.getDataAsJson<AnonCredsCredentialRequest>()\n\n // make sure the credential definition matches\n if (credentialJson.cred_def_id !== credentialRequestJson.cred_def_id) return false\n\n // If we don't have any attributes stored we can't compare so always return false.\n if (!credentialExchangeRecord.credentialAttributes) return false\n const attributeValues = convertAttributesToCredentialValues(credentialExchangeRecord.credentialAttributes)\n\n // check whether the values match the values in the record\n return checkCredentialValuesMatch(attributeValues, credentialJson.values)\n }\n\n private async createAnonCredsOffer(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n attachmentId,\n credentialDefinitionId,\n revocationRegistryDefinitionId,\n revocationRegistryIndex,\n attributes,\n }: {\n credentialDefinitionId: string\n revocationRegistryDefinitionId?: string\n revocationRegistryIndex?: number\n credentialExchangeRecord: DidCommCredentialExchangeRecord\n attachmentId?: string\n attributes: DidCommCredentialPreviewAttributeOptions[]\n }\n ): Promise<DidCommCredentialFormatCreateOfferReturn> {\n const anonCredsIssuerService =\n agentContext.dependencyManager.resolve<AnonCredsIssuerService>(AnonCredsIssuerServiceSymbol)\n\n // if the proposal has an attachment Id use that, otherwise the generated id of the formats object\n const format = new DidCommCredentialFormatSpec({\n attachmentId: attachmentId,\n format: ANONCREDS_CREDENTIAL_OFFER,\n })\n\n const offer = await anonCredsIssuerService.createCredentialOffer(agentContext, {\n credentialDefinitionId,\n })\n\n await this.assertPreviewAttributesMatchSchemaAttributes(agentContext, offer, attributes)\n\n // We check locally for credential definition info. If it supports revocation, revocationRegistryIndex\n // and revocationRegistryDefinitionId are mandatory\n const credentialDefinition = (\n await agentContext.dependencyManager\n .resolve(AnonCredsCredentialDefinitionRepository)\n .getByCredentialDefinitionId(agentContext, offer.cred_def_id)\n ).credentialDefinition.value\n\n if (credentialDefinition.revocation) {\n if (!revocationRegistryDefinitionId || revocationRegistryIndex === undefined) {\n throw new CredoError(\n 'AnonCreds revocable credentials require revocationRegistryDefinitionId and revocationRegistryIndex'\n )\n }\n\n // Set revocation tags\n credentialExchangeRecord.setTags({\n anonCredsRevocationRegistryId: revocationRegistryDefinitionId,\n anonCredsCredentialRevocationId: revocationRegistryIndex.toString(),\n })\n }\n\n // Set the metadata\n credentialExchangeRecord.metadata.set<AnonCredsCredentialMetadata>(AnonCredsCredentialMetadataKey, {\n schemaId: offer.schema_id,\n credentialDefinitionId: offer.cred_def_id,\n credentialRevocationId: revocationRegistryIndex?.toString(),\n revocationRegistryId: revocationRegistryDefinitionId,\n })\n\n const attachment = this.getFormatData(offer, format.attachmentId)\n\n return { format, attachment, previewAttributes: attributes }\n }\n\n private async assertPreviewAttributesMatchSchemaAttributes(\n agentContext: AgentContext,\n offer: AnonCredsCredentialOffer,\n attributes: DidCommCredentialPreviewAttributeOptions[]\n ): Promise<void> {\n const { schema } = await fetchSchema(agentContext, offer.schema_id)\n\n assertAttributesMatch(schema, attributes)\n }\n\n /**\n * Returns an object of type {@link DidCommAttachment} for use in credential exchange messages.\n * It looks up the correct format identifier and encodes the data as a base64 attachment.\n *\n * @param data The data to include in the attach object\n * @param id the attach id from the formats component of the message\n */\n public getFormatData(data: unknown, id: string): DidCommAttachment {\n const attachment = new DidCommAttachment({\n id,\n mimeType: 'application/json',\n data: {\n base64: JsonEncoder.toBase64(data),\n },\n })\n\n return attachment\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA8DA,MAAM,6BAA6B;AACnC,MAAM,+BAA+B;AACrC,MAAM,8BAA8B;AACpC,MAAM,uBAAuB;AAE7B,IAAa,0CAAb,MAEA;;OAEkB,YAAY;OAMZ,uBAAuB;;;;;;;;;CASvC,MAAa,eACX,eACA,EACE,mBACA,4BAEoD;EACtD,MAAM,SAAS,IAAI,4BAA4B,EAC7C,QAAQ,6BACT,CAAC;EAEF,MAAM,kBAAkB,kBAAkB;AAE1C,MAAI,CAAC,gBACH,OAAM,IAAI,WAAW,8CAA8C;EAGrE,MAAM,EAAE,YAAY,GAAG,gCAAgC;EACvD,MAAM,WAAW,IAAI,4BAA4B,4BAA4B;AAE7E,MAAI;AACF,oBAAiB,aAAa,SAAS;WAChC,QAAQ;AACf,SAAM,IAAI,WAAW,8BAA8B,4BAA4B,4BAA4B;;EAG7G,MAAM,aAAa,KAAK,cAAc,gBAAgB,OAAO,SAAS,EAAE,OAAO,aAAa;AAG5F,2BAAyB,SAAS,IAAiC,gCAAgC;GACjG,UAAU,SAAS;GACnB,wBAAwB,SAAS;GAClC,CAAC;AAEF,SAAO;GAAE;GAAQ;GAAY,mBAAmB;GAAY;;CAG9D,MAAa,gBACX,eACA,EAAE,cACa;EACf,MAAM,eAAe,WAAW,eAAe;AAE/C,kBAAgB,SAAS,cAAc,4BAA4B;;CAGrE,MAAa,eACX,cACA,EACE,cACA,mBACA,0BACA,sBAEiD;EACnD,MAAM,kBAAkB,mBA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;GAAE;GAAQ,YAFE,KAAK,cAAc,OAAO,OAAO,aAAa;GAEpC,mBAAmB;GAAY;;CAG9D,MAAc,6CACZ,cACA,OACA,YACe;EACf,MAAM,EAAE,WAAW,MAAM,YAAY,cAAc,MAAM,UAAU;AAEnE,wBAAsB,QAAQ,WAAW;;;;;;;;;CAU3C,AAAO,cAAc,MAAe,IAA+B;AASjE,SARmB,IAAI,kBAAkB;GACvC;GACA,UAAU;GACV,MAAM,EACJ,QAAQ,YAAY,SAAS,KAAK,EACnC;GACF,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { AnonCredsNonRevokedInterval, AnonCredsPredicateType, AnonCredsProof, AnonCredsProofRequest, AnonCredsRequestedAttribute, AnonCredsRequestedPredicate } from "../models/exchange.mjs";
2
+ import { AnonCredsRequestedAttributeMatch, AnonCredsRequestedPredicateMatch, AnonCredsSelectedCredentials } from "../models/internal.mjs";
3
+ import "../models/index.mjs";
4
+ import { DidCommProofFormat } from "@credo-ts/didcomm";
5
+
6
+ //#region src/formats/AnonCredsDidCommProofFormat.d.ts
7
+ interface AnonCredsPresentationPreviewAttribute {
8
+ name: string;
9
+ credentialDefinitionId?: string;
10
+ mimeType?: string;
11
+ value?: string;
12
+ referent?: string;
13
+ }
14
+ interface AnonCredsPresentationPreviewPredicate {
15
+ name: string;
16
+ credentialDefinitionId: string;
17
+ predicate: AnonCredsPredicateType;
18
+ threshold: number;
19
+ }
20
+ /**
21
+ * Interface for creating an anoncreds proof proposal.
22
+ */
23
+ interface AnonCredsProposeProofFormat {
24
+ name?: string;
25
+ version?: string;
26
+ attributes?: AnonCredsPresentationPreviewAttribute[];
27
+ predicates?: AnonCredsPresentationPreviewPredicate[];
28
+ nonRevokedInterval?: AnonCredsNonRevokedInterval;
29
+ }
30
+ /**
31
+ * Interface for creating an anoncreds proof request.
32
+ */
33
+ interface AnonCredsRequestProofFormat {
34
+ name: string;
35
+ version: string;
36
+ non_revoked?: AnonCredsNonRevokedInterval;
37
+ requested_attributes?: Record<string, AnonCredsRequestedAttribute>;
38
+ requested_predicates?: Record<string, AnonCredsRequestedPredicate>;
39
+ }
40
+ /**
41
+ * Interface for getting credentials for an indy proof request.
42
+ */
43
+ interface AnonCredsCredentialsForProofRequest {
44
+ attributes: Record<string, AnonCredsRequestedAttributeMatch[]>;
45
+ predicates: Record<string, AnonCredsRequestedPredicateMatch[]>;
46
+ }
47
+ interface AnonCredsGetCredentialsForProofRequestOptions {
48
+ filterByNonRevocationRequirements?: boolean;
49
+ }
50
+ interface AnonCredsDidCommProofFormat extends DidCommProofFormat {
51
+ formatKey: 'anoncreds';
52
+ proofFormats: {
53
+ createProposal: AnonCredsProposeProofFormat;
54
+ acceptProposal: {
55
+ name?: string;
56
+ version?: string;
57
+ };
58
+ createRequest: AnonCredsRequestProofFormat;
59
+ acceptRequest: AnonCredsSelectedCredentials;
60
+ getCredentialsForRequest: {
61
+ input: AnonCredsGetCredentialsForProofRequestOptions;
62
+ output: AnonCredsCredentialsForProofRequest;
63
+ };
64
+ selectCredentialsForRequest: {
65
+ input: AnonCredsGetCredentialsForProofRequestOptions;
66
+ output: AnonCredsSelectedCredentials;
67
+ };
68
+ };
69
+ formatData: {
70
+ proposal: AnonCredsProofRequest;
71
+ request: AnonCredsProofRequest;
72
+ presentation: AnonCredsProof;
73
+ };
74
+ }
75
+ //#endregion
76
+ export { AnonCredsCredentialsForProofRequest, AnonCredsDidCommProofFormat, AnonCredsGetCredentialsForProofRequestOptions, AnonCredsPresentationPreviewAttribute, AnonCredsPresentationPreviewPredicate, AnonCredsProposeProofFormat, AnonCredsRequestProofFormat };
77
+ //# sourceMappingURL=AnonCredsDidCommProofFormat.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnonCredsDidCommProofFormat.d.mts","names":[],"sources":["../../src/formats/AnonCredsDidCommProofFormat.ts"],"sourcesContent":[],"mappings":";;;;;;UAaiB,qCAAA;;;;EAAA,KAAA,CAAA,EAAA,MAAA;EAQA,QAAA,CAAA,EAAA,MAAA;AAUjB;AAGe,UAbE,qCAAA,CAaF;EACA,IAAA,EAAA,MAAA;EACQ,sBAAA,EAAA,MAAA;EAA2B,SAAA,EAZrC,sBAYqC;EAMjC,SAAA,EAAA,MAAA;;;;;AAKQ,UAhBR,2BAAA,CAgBQ;EAAM,IAAA,CAAA,EAAA,MAAA;EAMd,OAAA,CAAA,EAAA,MAAA;EACY,UAAA,CAAA,EApBd,qCAoBc,EAAA;EAAf,UAAA,CAAA,EAnBC,qCAmBD,EAAA;EACe,kBAAA,CAAA,EAnBN,2BAmBM;;;AAG7B;AAIA;AAIoB,UAxBH,2BAAA,CAwBG;EAKD,IAAA,EAAA,MAAA;EACA,OAAA,EAAA,MAAA;EAGN,WAAA,CAAA,EA9BG,2BA8BH;EACC,oBAAA,CAAA,EA9BW,MA8BX,CAAA,MAAA,EA9B0B,2BA8B1B,CAAA;EAGD,oBAAA,CAAA,EAhCY,MAgCZ,CAAA,MAAA,EAhC2B,2BAgC3B,CAAA;;;;;AAjBwC,UATpC,mCAAA,CASoC;EAAkB,UAAA,EARzD,MAQyD,CAAA,MAAA,EAR1C,gCAQ0C,EAAA,CAAA;cAPzD,eAAe;;UAGZ,6CAAA;;;UAIA,2BAAA,SAAoC;;;oBAIjC;;;;;mBAKD;mBACA;;aAGN;cACC;;;aAGD;cACC;;;;cAKA;aACD;kBACK"}
@@ -0,0 +1,93 @@
1
+ import { AnonCredsDidCommProofFormat } from "./AnonCredsDidCommProofFormat.mjs";
2
+ import { AgentContext } from "@credo-ts/core";
3
+ import { DidCommFormatCreateRequestOptions, DidCommProofFormatAcceptProposalOptions, DidCommProofFormatAcceptRequestOptions, DidCommProofFormatAutoRespondPresentationOptions, DidCommProofFormatAutoRespondProposalOptions, DidCommProofFormatAutoRespondRequestOptions, DidCommProofFormatCreateProposalOptions, DidCommProofFormatCreateReturn, DidCommProofFormatGetCredentialsForRequestOptions, DidCommProofFormatGetCredentialsForRequestReturn, DidCommProofFormatProcessOptions, DidCommProofFormatProcessPresentationOptions, DidCommProofFormatSelectCredentialsForRequestOptions, DidCommProofFormatSelectCredentialsForRequestReturn, DidCommProofFormatService } from "@credo-ts/didcomm";
4
+
5
+ //#region src/formats/AnonCredsDidCommProofFormatService.d.ts
6
+ declare class AnonCredsDidCommProofFormatService implements DidCommProofFormatService<AnonCredsDidCommProofFormat> {
7
+ readonly formatKey: "anoncreds";
8
+ createProposal(agentContext: AgentContext, {
9
+ attachmentId,
10
+ proofFormats
11
+ }: DidCommProofFormatCreateProposalOptions<AnonCredsDidCommProofFormat>): Promise<DidCommProofFormatCreateReturn>;
12
+ processProposal(_agentContext: AgentContext, {
13
+ attachment
14
+ }: DidCommProofFormatProcessOptions): Promise<void>;
15
+ acceptProposal(agentContext: AgentContext, {
16
+ proposalAttachment,
17
+ attachmentId
18
+ }: DidCommProofFormatAcceptProposalOptions<AnonCredsDidCommProofFormat>): Promise<DidCommProofFormatCreateReturn>;
19
+ createRequest(agentContext: AgentContext, {
20
+ attachmentId,
21
+ proofFormats
22
+ }: DidCommFormatCreateRequestOptions<AnonCredsDidCommProofFormat>): Promise<DidCommProofFormatCreateReturn>;
23
+ processRequest(_agentContext: AgentContext, {
24
+ attachment
25
+ }: DidCommProofFormatProcessOptions): Promise<void>;
26
+ acceptRequest(agentContext: AgentContext, {
27
+ proofFormats,
28
+ requestAttachment,
29
+ attachmentId
30
+ }: DidCommProofFormatAcceptRequestOptions<AnonCredsDidCommProofFormat>): Promise<DidCommProofFormatCreateReturn>;
31
+ processPresentation(agentContext: AgentContext, {
32
+ requestAttachment,
33
+ attachment
34
+ }: DidCommProofFormatProcessPresentationOptions): Promise<boolean>;
35
+ getCredentialsForRequest(agentContext: AgentContext, {
36
+ requestAttachment,
37
+ proofFormats
38
+ }: DidCommProofFormatGetCredentialsForRequestOptions<AnonCredsDidCommProofFormat>): Promise<DidCommProofFormatGetCredentialsForRequestReturn<AnonCredsDidCommProofFormat>>;
39
+ selectCredentialsForRequest(agentContext: AgentContext, {
40
+ requestAttachment,
41
+ proofFormats
42
+ }: DidCommProofFormatSelectCredentialsForRequestOptions<AnonCredsDidCommProofFormat>): Promise<DidCommProofFormatSelectCredentialsForRequestReturn<AnonCredsDidCommProofFormat>>;
43
+ shouldAutoRespondToProposal(agentContext: AgentContext, {
44
+ proposalAttachment,
45
+ requestAttachment
46
+ }: DidCommProofFormatAutoRespondProposalOptions): Promise<boolean>;
47
+ shouldAutoRespondToRequest(_agentContext: AgentContext, {
48
+ proposalAttachment,
49
+ requestAttachment
50
+ }: DidCommProofFormatAutoRespondRequestOptions): Promise<boolean>;
51
+ shouldAutoRespondToPresentation(_agentContext: AgentContext, _options: DidCommProofFormatAutoRespondPresentationOptions): Promise<boolean>;
52
+ supportsFormat(formatIdentifier: string): boolean;
53
+ private _selectCredentialsForRequest;
54
+ /**
55
+ * Build schemas object needed to create and verify proof objects.
56
+ *
57
+ * Creates object with `{ schemaId: AnonCredsSchema }` mapping
58
+ *
59
+ * @param schemaIds List of schema ids
60
+ * @returns Object containing schemas for specified schema ids
61
+ *
62
+ */
63
+ private getSchemas;
64
+ /**
65
+ * Build credential definitions object needed to create and verify proof objects.
66
+ *
67
+ * Creates object with `{ credentialDefinitionId: AnonCredsCredentialDefinition }` mapping
68
+ *
69
+ * @param credentialDefinitionIds List of credential definition ids
70
+ * @returns Object containing credential definitions for specified credential definition ids
71
+ *
72
+ */
73
+ private getCredentialDefinitions;
74
+ /**
75
+ * Create anoncreds proof from a given proof request and requested credential object.
76
+ *
77
+ * @param proofRequest The proof request to create the proof for
78
+ * @param requestedCredentials The requested credentials object specifying which credentials to use for the proof
79
+ * @returns anoncreds proof object
80
+ */
81
+ private createProof;
82
+ /**
83
+ * Returns an object of type {@link DidCommAttachment} for use in credential exchange messages.
84
+ * It looks up the correct format identifier and encodes the data as a base64 attachment.
85
+ *
86
+ * @param data The data to include in the attach object
87
+ * @param id the attach id from the formats component of the message
88
+ */
89
+ private getFormatData;
90
+ }
91
+ //#endregion
92
+ export { AnonCredsDidCommProofFormatService };
93
+ //# sourceMappingURL=AnonCredsDidCommProofFormatService.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnonCredsDidCommProofFormatService.d.mts","names":[],"sources":["../../src/formats/AnonCredsDidCommProofFormatService.ts"],"sourcesContent":[],"mappings":";;;;;cAoDa,kCAAA,YAA8C,0BAA0B;;EAAxE,cAAA,CAAA,YAAA,EAIK,YAJ8B,EAAA;IAAA,YAAA;IAAA;EAAA,CAAA,EAKZ,uCALY,CAK4B,2BAL5B,CAAA,CAAA,EAM3C,OAN2C,CAMnC,8BANmC,CAAA;EAAqC,eAAA,CAAA,aAAA,EAiClE,YAjCkE,EAAA;IAAA;EAAA,CAAA,EAkCjE,gCAlCiE,CAAA,EAmChF,OAnCgF,CAAA,IAAA,CAAA;EAInE,cAAA,CAAA,YAAA,EA0CA,YA1CA,EAAA;IAAA,kBAAA;IAAA;EAAA,CAAA,EA2CwB,uCA3CxB,CA2CgE,2BA3ChE,CAAA,CAAA,EA4Cb,OA5Ca,CA4CL,8BA5CK,CAAA;EACZ,aAAA,CAAA,YAAA,EAiEY,YAjEZ,EAAA;IAAA,YAAA;IAAA;EAAA,CAAA,EAkE8B,iCAlE9B,CAkEgE,2BAlEhE,CAAA,CAAA,EAmED,OAnEC,CAmEO,8BAnEP,CAAA;EAAc,cAAA,CAAA,aAAA,EAiGD,YAjGC,EAAA;IAAA;EAAA,CAAA,EAkGA,gCAlGA,CAAA,EAmGf,OAnGe,CAAA,IAAA,CAAA;EAAwD,aAAA,CAAA,YAAA,EA8G1D,YA9G0D,EAAA;IAAA,YAAA;IAAA,iBAAA;IAAA;EAAA,CAAA,EAmHrE,sCAnHqE,CAmH9B,2BAnH8B,CAAA,CAAA,EAoHvE,OApHuE,CAoH/D,8BApH+D,CAAA;EAAxC,mBAAA,CAAA,YAAA,EA6IlB,YA7IkB,EAAA;IAAA,iBAAA;IAAA;EAAA,CAAA,EA8IG,4CA9IH,CAAA,EA+I/B,OA/I+B,CAAA,OAAA,CAAA;EACvB,wBAAA,CAAA,YAAA,EAoMK,YApML,EAAA;IAAA,iBAAA;IAAA;EAAA,CAAA,EAqM4B,iDArM5B,CAqM8E,2BArM9E,CAAA,CAAA,EAsMR,OAtMQ,CAsMA,gDAtMA,CAsMiD,2BAtMjD,CAAA,CAAA;EAAR,2BAAA,CAAA,YAAA,EAoNa,YApNb,EAAA;IAAA,iBAAA;IAAA;EAAA,CAAA,EAwNE,oDAxNF,CAwNuD,2BAxNvD,CAAA,CAAA,EAyNA,OAzNA,CAyNQ,mDAzNR,CAyN4D,2BAzN5D,CAAA,CAAA;EA2Bc,2BAAA,CAAA,YAAA,EA4MD,YA5MC,EAAA;IAAA,kBAAA;IAAA;EAAA,CAAA,EA6M4B,4CA7M5B,CAAA,EA8Md,OA9Mc,CAAA,OAAA,CAAA;EACb,0BAAA,CAAA,aAAA,EA2Na,YA3Nb,EAAA;IAAA,kBAAA;IAAA;EAAA,CAAA,EA4NyC,2CA5NzC,CAAA,EA6ND,OA7NC,CAAA,OAAA,CAAA;EAAc,+BAAA,CAAA,aAAA,EAqOD,YArOC,EAAA,QAAA,EAsON,gDAtOM,CAAA,EAuOf,OAvOe,CAAA,OAAA,CAAA;EACf,cAAA,CAAA,gBAAA,EAAA,MAAA,CAAA,EAAA,OAAA;EAWa,QAAA,4BAAA;EACZ;;;;;;;;;EAwBgE,QAAA,UAAA;EAAlC;;;;;;;;;EA+C9B,QAAA,wBAAA;EACA;;;;;;;EA4BmB,QAAA,WAAA;EAAc;;;;;;;EAyDuB,QAAA,aAAA"}
@@ -0,0 +1,250 @@
1
+ import { AnonCredsHolderServiceSymbol } from "../services/AnonCredsHolderService.mjs";
2
+ import { AnonCredsVerifierServiceSymbol } from "../services/AnonCredsVerifierService.mjs";
3
+ import "../services/index.mjs";
4
+ import { fetchCredentialDefinition, fetchSchema } from "../utils/anonCredsObjects.mjs";
5
+ import { areAnonCredsProofRequestsEqual } from "../utils/areRequestsEqual.mjs";
6
+ import { createRequestFromPreview } from "../utils/createRequestFromPreview.mjs";
7
+ import { checkValidCredentialValueEncoding, encodeCredentialValue } from "../utils/credential.mjs";
8
+ import { getCredentialsForAnonCredsProofRequest } from "../utils/getCredentialsForAnonCredsRequest.mjs";
9
+ import { getRevocationRegistriesForProof, getRevocationRegistriesForRequest } from "../utils/getRevocationRegistries.mjs";
10
+ import { assertNoDuplicateGroupsNamesInProofRequest } from "../utils/hasDuplicateGroupNames.mjs";
11
+ import "../utils/index.mjs";
12
+ import { proofRequestUsesUnqualifiedIdentifiers } from "../utils/proofRequest.mjs";
13
+ import { AnonCredsProofRequest } from "../models/AnonCredsProofRequest.mjs";
14
+ import { CredoError, JsonEncoder, JsonTransformer } from "@credo-ts/core";
15
+ import { DidCommAttachment, DidCommAttachmentData, DidCommProofFormatSpec } from "@credo-ts/didcomm";
16
+
17
+ //#region src/formats/AnonCredsDidCommProofFormatService.ts
18
+ const ANONCREDS_PRESENTATION_PROPOSAL = "anoncreds/proof-request@v1.0";
19
+ const ANONCREDS_PRESENTATION_REQUEST = "anoncreds/proof-request@v1.0";
20
+ const ANONCREDS_PRESENTATION = "anoncreds/proof@v1.0";
21
+ var AnonCredsDidCommProofFormatService = class {
22
+ constructor() {
23
+ this.formatKey = "anoncreds";
24
+ }
25
+ async createProposal(agentContext, { attachmentId, proofFormats }) {
26
+ const holderService = agentContext.dependencyManager.resolve(AnonCredsHolderServiceSymbol);
27
+ const format = new DidCommProofFormatSpec({
28
+ format: ANONCREDS_PRESENTATION_PROPOSAL,
29
+ attachmentId
30
+ });
31
+ const anoncredsFormat = proofFormats.anoncreds;
32
+ if (!anoncredsFormat) throw Error("Missing anoncreds format to create proposal attachment format");
33
+ const proofRequest = createRequestFromPreview({
34
+ attributes: anoncredsFormat.attributes ?? [],
35
+ predicates: anoncredsFormat.predicates ?? [],
36
+ name: anoncredsFormat.name ?? "Proof request",
37
+ version: anoncredsFormat.version ?? "1.0",
38
+ nonce: holderService.generateNonce(agentContext),
39
+ nonRevokedInterval: anoncredsFormat.nonRevokedInterval
40
+ });
41
+ return {
42
+ attachment: this.getFormatData(proofRequest, format.attachmentId),
43
+ format
44
+ };
45
+ }
46
+ async processProposal(_agentContext, { attachment }) {
47
+ const proposalJson = attachment.getDataAsJson();
48
+ JsonTransformer.fromJSON(proposalJson, AnonCredsProofRequest);
49
+ assertNoDuplicateGroupsNamesInProofRequest(proposalJson);
50
+ }
51
+ async acceptProposal(agentContext, { proposalAttachment, attachmentId }) {
52
+ const holderService = agentContext.dependencyManager.resolve(AnonCredsHolderServiceSymbol);
53
+ const format = new DidCommProofFormatSpec({
54
+ format: ANONCREDS_PRESENTATION_REQUEST,
55
+ attachmentId
56
+ });
57
+ const request = {
58
+ ...proposalAttachment.getDataAsJson(),
59
+ nonce: holderService.generateNonce(agentContext)
60
+ };
61
+ return {
62
+ attachment: this.getFormatData(request, format.attachmentId),
63
+ format
64
+ };
65
+ }
66
+ async createRequest(agentContext, { attachmentId, proofFormats }) {
67
+ const holderService = agentContext.dependencyManager.resolve(AnonCredsHolderServiceSymbol);
68
+ const format = new DidCommProofFormatSpec({
69
+ format: ANONCREDS_PRESENTATION_REQUEST,
70
+ attachmentId
71
+ });
72
+ const anoncredsFormat = proofFormats.anoncreds;
73
+ if (!anoncredsFormat) throw Error("Missing anoncreds format in create request attachment format");
74
+ const request = {
75
+ name: anoncredsFormat.name,
76
+ version: anoncredsFormat.version,
77
+ nonce: holderService.generateNonce(agentContext),
78
+ requested_attributes: anoncredsFormat.requested_attributes ?? {},
79
+ requested_predicates: anoncredsFormat.requested_predicates ?? {},
80
+ non_revoked: anoncredsFormat.non_revoked
81
+ };
82
+ assertNoDuplicateGroupsNamesInProofRequest(request);
83
+ return {
84
+ attachment: this.getFormatData(request, format.attachmentId),
85
+ format
86
+ };
87
+ }
88
+ async processRequest(_agentContext, { attachment }) {
89
+ const requestJson = attachment.getDataAsJson();
90
+ JsonTransformer.fromJSON(requestJson, AnonCredsProofRequest);
91
+ assertNoDuplicateGroupsNamesInProofRequest(requestJson);
92
+ }
93
+ async acceptRequest(agentContext, { proofFormats, requestAttachment, attachmentId }) {
94
+ const format = new DidCommProofFormatSpec({
95
+ format: ANONCREDS_PRESENTATION,
96
+ attachmentId
97
+ });
98
+ const requestJson = requestAttachment.getDataAsJson();
99
+ const selectedCredentials = proofFormats?.anoncreds ?? await this._selectCredentialsForRequest(agentContext, requestJson, { filterByNonRevocationRequirements: true });
100
+ const proof = await this.createProof(agentContext, requestJson, selectedCredentials);
101
+ return {
102
+ attachment: this.getFormatData(proof, format.attachmentId),
103
+ format
104
+ };
105
+ }
106
+ async processPresentation(agentContext, { requestAttachment, attachment }) {
107
+ const verifierService = agentContext.dependencyManager.resolve(AnonCredsVerifierServiceSymbol);
108
+ const proofRequestJson = requestAttachment.getDataAsJson();
109
+ const proofJson = attachment.getDataAsJson();
110
+ for (const [referent, attribute] of Object.entries(proofJson.requested_proof.revealed_attrs)) if (!checkValidCredentialValueEncoding(attribute.raw, attribute.encoded)) throw new CredoError(`The encoded value for '${referent}' is invalid. Expected '${encodeCredentialValue(attribute.raw)}'. Actual '${attribute.encoded}'`);
111
+ for (const [, attributeGroup] of Object.entries(proofJson.requested_proof.revealed_attr_groups ?? {})) for (const [attributeName, attribute] of Object.entries(attributeGroup.values)) if (!checkValidCredentialValueEncoding(attribute.raw, attribute.encoded)) throw new CredoError(`The encoded value for '${attributeName}' is invalid. Expected '${encodeCredentialValue(attribute.raw)}'. Actual '${attribute.encoded}'`);
112
+ const schemas = await this.getSchemas(agentContext, new Set(proofJson.identifiers.map((i) => i.schema_id)));
113
+ const credentialDefinitions = await this.getCredentialDefinitions(agentContext, new Set(proofJson.identifiers.map((i) => i.cred_def_id)));
114
+ const revocationRegistries = await getRevocationRegistriesForProof(agentContext, proofJson);
115
+ return await verifierService.verifyProof(agentContext, {
116
+ proofRequest: proofRequestJson,
117
+ proof: proofJson,
118
+ schemas,
119
+ credentialDefinitions,
120
+ revocationRegistries
121
+ });
122
+ }
123
+ async getCredentialsForRequest(agentContext, { requestAttachment, proofFormats }) {
124
+ const proofRequestJson = requestAttachment.getDataAsJson();
125
+ const { filterByNonRevocationRequirements = true } = proofFormats?.anoncreds ?? {};
126
+ return await getCredentialsForAnonCredsProofRequest(agentContext, proofRequestJson, { filterByNonRevocationRequirements });
127
+ }
128
+ async selectCredentialsForRequest(agentContext, { requestAttachment, proofFormats }) {
129
+ const proofRequestJson = requestAttachment.getDataAsJson();
130
+ const { filterByNonRevocationRequirements = true } = proofFormats?.anoncreds ?? {};
131
+ return this._selectCredentialsForRequest(agentContext, proofRequestJson, { filterByNonRevocationRequirements });
132
+ }
133
+ async shouldAutoRespondToProposal(agentContext, { proposalAttachment, requestAttachment }) {
134
+ const proposalJson = proposalAttachment.getDataAsJson();
135
+ const requestJson = requestAttachment.getDataAsJson();
136
+ const areRequestsEqual = areAnonCredsProofRequestsEqual(proposalJson, requestJson);
137
+ agentContext.config.logger.debug(`AnonCreds request and proposal are are equal: ${areRequestsEqual}`, {
138
+ proposalJson,
139
+ requestJson
140
+ });
141
+ return areRequestsEqual;
142
+ }
143
+ async shouldAutoRespondToRequest(_agentContext, { proposalAttachment, requestAttachment }) {
144
+ return areAnonCredsProofRequestsEqual(proposalAttachment.getDataAsJson(), requestAttachment.getDataAsJson());
145
+ }
146
+ async shouldAutoRespondToPresentation(_agentContext, _options) {
147
+ return true;
148
+ }
149
+ supportsFormat(formatIdentifier) {
150
+ return [
151
+ ANONCREDS_PRESENTATION_PROPOSAL,
152
+ ANONCREDS_PRESENTATION_REQUEST,
153
+ ANONCREDS_PRESENTATION
154
+ ].includes(formatIdentifier);
155
+ }
156
+ async _selectCredentialsForRequest(agentContext, proofRequest, options) {
157
+ const credentialsForRequest = await getCredentialsForAnonCredsProofRequest(agentContext, proofRequest, options);
158
+ const selectedCredentials = {
159
+ attributes: {},
160
+ predicates: {},
161
+ selfAttestedAttributes: {}
162
+ };
163
+ for (const attributeName of Object.keys(credentialsForRequest.attributes)) {
164
+ const attributeArray = credentialsForRequest.attributes[attributeName];
165
+ if (attributeArray.length === 0) throw new CredoError("Unable to automatically select requested attributes.");
166
+ selectedCredentials.attributes[attributeName] = attributeArray[0];
167
+ }
168
+ for (const attributeName of Object.keys(credentialsForRequest.predicates)) {
169
+ if (credentialsForRequest.predicates[attributeName].length === 0) throw new CredoError("Unable to automatically select requested predicates.");
170
+ selectedCredentials.predicates[attributeName] = credentialsForRequest.predicates[attributeName][0];
171
+ }
172
+ return selectedCredentials;
173
+ }
174
+ /**
175
+ * Build schemas object needed to create and verify proof objects.
176
+ *
177
+ * Creates object with `{ schemaId: AnonCredsSchema }` mapping
178
+ *
179
+ * @param schemaIds List of schema ids
180
+ * @returns Object containing schemas for specified schema ids
181
+ *
182
+ */
183
+ async getSchemas(agentContext, schemaIds) {
184
+ const schemas = {};
185
+ for (const schemaId of schemaIds) {
186
+ const { schema } = await fetchSchema(agentContext, schemaId);
187
+ schemas[schemaId] = schema;
188
+ }
189
+ return schemas;
190
+ }
191
+ /**
192
+ * Build credential definitions object needed to create and verify proof objects.
193
+ *
194
+ * Creates object with `{ credentialDefinitionId: AnonCredsCredentialDefinition }` mapping
195
+ *
196
+ * @param credentialDefinitionIds List of credential definition ids
197
+ * @returns Object containing credential definitions for specified credential definition ids
198
+ *
199
+ */
200
+ async getCredentialDefinitions(agentContext, credentialDefinitionIds) {
201
+ const credentialDefinitions = {};
202
+ for (const credentialDefinitionId of credentialDefinitionIds) {
203
+ const { credentialDefinition } = await fetchCredentialDefinition(agentContext, credentialDefinitionId);
204
+ credentialDefinitions[credentialDefinitionId] = credentialDefinition;
205
+ }
206
+ return credentialDefinitions;
207
+ }
208
+ /**
209
+ * Create anoncreds proof from a given proof request and requested credential object.
210
+ *
211
+ * @param proofRequest The proof request to create the proof for
212
+ * @param requestedCredentials The requested credentials object specifying which credentials to use for the proof
213
+ * @returns anoncreds proof object
214
+ */
215
+ async createProof(agentContext, proofRequest, selectedCredentials) {
216
+ const holderService = agentContext.dependencyManager.resolve(AnonCredsHolderServiceSymbol);
217
+ const credentialObjects = await Promise.all([...Object.values(selectedCredentials.attributes), ...Object.values(selectedCredentials.predicates)].map(async (c) => holderService.getCredential(agentContext, {
218
+ id: c.credentialId,
219
+ useUnqualifiedIdentifiersIfPresent: proofRequestUsesUnqualifiedIdentifiers(proofRequest)
220
+ })));
221
+ const schemas = await this.getSchemas(agentContext, new Set(credentialObjects.map((c) => c.schemaId)));
222
+ const credentialDefinitions = await this.getCredentialDefinitions(agentContext, new Set(credentialObjects.map((c) => c.credentialDefinitionId)));
223
+ const { revocationRegistries, updatedSelectedCredentials } = await getRevocationRegistriesForRequest(agentContext, proofRequest, selectedCredentials);
224
+ return await holderService.createProof(agentContext, {
225
+ proofRequest,
226
+ selectedCredentials: updatedSelectedCredentials,
227
+ schemas,
228
+ credentialDefinitions,
229
+ revocationRegistries
230
+ });
231
+ }
232
+ /**
233
+ * Returns an object of type {@link DidCommAttachment} for use in credential exchange messages.
234
+ * It looks up the correct format identifier and encodes the data as a base64 attachment.
235
+ *
236
+ * @param data The data to include in the attach object
237
+ * @param id the attach id from the formats component of the message
238
+ */
239
+ getFormatData(data, id) {
240
+ return new DidCommAttachment({
241
+ id,
242
+ mimeType: "application/json",
243
+ data: new DidCommAttachmentData({ base64: JsonEncoder.toBase64(data) })
244
+ });
245
+ }
246
+ };
247
+
248
+ //#endregion
249
+ export { AnonCredsDidCommProofFormatService };
250
+ //# sourceMappingURL=AnonCredsDidCommProofFormatService.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnonCredsDidCommProofFormatService.mjs","names":["AnonCredsProofRequestClass","selectedCredentials: AnonCredsSelectedCredentials","schemas: { [key: string]: AnonCredsSchema }","credentialDefinitions: { [key: string]: AnonCredsCredentialDefinition }"],"sources":["../../src/formats/AnonCredsDidCommProofFormatService.ts"],"sourcesContent":["import type { AgentContext } from '@credo-ts/core'\nimport { CredoError, JsonEncoder, JsonTransformer } from '@credo-ts/core'\nimport type {\n DidCommFormatCreateRequestOptions,\n DidCommProofFormatAcceptProposalOptions,\n DidCommProofFormatAcceptRequestOptions,\n DidCommProofFormatAutoRespondPresentationOptions,\n DidCommProofFormatAutoRespondProposalOptions,\n DidCommProofFormatAutoRespondRequestOptions,\n DidCommProofFormatCreateProposalOptions,\n DidCommProofFormatCreateReturn,\n DidCommProofFormatGetCredentialsForRequestOptions,\n DidCommProofFormatGetCredentialsForRequestReturn,\n DidCommProofFormatProcessOptions,\n DidCommProofFormatProcessPresentationOptions,\n DidCommProofFormatSelectCredentialsForRequestOptions,\n DidCommProofFormatSelectCredentialsForRequestReturn,\n DidCommProofFormatService,\n} from '@credo-ts/didcomm'\nimport { DidCommAttachment, DidCommAttachmentData, DidCommProofFormatSpec } from '@credo-ts/didcomm'\nimport type {\n AnonCredsCredentialDefinition,\n AnonCredsProof,\n AnonCredsProofRequest,\n AnonCredsSchema,\n AnonCredsSelectedCredentials,\n} from '../models'\nimport { AnonCredsProofRequest as AnonCredsProofRequestClass } from '../models/AnonCredsProofRequest'\nimport type { AnonCredsHolderService, AnonCredsVerifierService } from '../services'\nimport { AnonCredsHolderServiceSymbol, AnonCredsVerifierServiceSymbol } from '../services'\nimport {\n areAnonCredsProofRequestsEqual,\n assertNoDuplicateGroupsNamesInProofRequest,\n checkValidCredentialValueEncoding,\n createRequestFromPreview,\n fetchCredentialDefinition,\n fetchSchema,\n getRevocationRegistriesForProof,\n getRevocationRegistriesForRequest,\n} from '../utils'\nimport { encodeCredentialValue } from '../utils/credential'\nimport { getCredentialsForAnonCredsProofRequest } from '../utils/getCredentialsForAnonCredsRequest'\nimport { proofRequestUsesUnqualifiedIdentifiers } from '../utils/proofRequest'\nimport type {\n AnonCredsDidCommProofFormat,\n AnonCredsGetCredentialsForProofRequestOptions,\n} from './AnonCredsDidCommProofFormat'\n\nconst ANONCREDS_PRESENTATION_PROPOSAL = 'anoncreds/proof-request@v1.0'\nconst ANONCREDS_PRESENTATION_REQUEST = 'anoncreds/proof-request@v1.0'\nconst ANONCREDS_PRESENTATION = 'anoncreds/proof@v1.0'\n\nexport class AnonCredsDidCommProofFormatService implements DidCommProofFormatService<AnonCredsDidCommProofFormat> {\n public readonly formatKey = 'anoncreds' as const\n\n public async createProposal(\n agentContext: AgentContext,\n { attachmentId, proofFormats }: DidCommProofFormatCreateProposalOptions<AnonCredsDidCommProofFormat>\n ): Promise<DidCommProofFormatCreateReturn> {\n const holderService = agentContext.dependencyManager.resolve<AnonCredsHolderService>(AnonCredsHolderServiceSymbol)\n\n const format = new DidCommProofFormatSpec({\n format: ANONCREDS_PRESENTATION_PROPOSAL,\n attachmentId,\n })\n\n const anoncredsFormat = proofFormats.anoncreds\n if (!anoncredsFormat) {\n throw Error('Missing anoncreds format to create proposal attachment format')\n }\n\n const proofRequest = createRequestFromPreview({\n attributes: anoncredsFormat.attributes ?? [],\n predicates: anoncredsFormat.predicates ?? [],\n name: anoncredsFormat.name ?? 'Proof request',\n version: anoncredsFormat.version ?? '1.0',\n nonce: holderService.generateNonce(agentContext),\n nonRevokedInterval: anoncredsFormat.nonRevokedInterval,\n })\n const attachment = this.getFormatData(proofRequest, format.attachmentId)\n\n return { attachment, format }\n }\n\n public async processProposal(\n _agentContext: AgentContext,\n { attachment }: DidCommProofFormatProcessOptions\n ): Promise<void> {\n const proposalJson = attachment.getDataAsJson<AnonCredsProofRequest>()\n\n // fromJson also validates\n JsonTransformer.fromJSON(proposalJson, AnonCredsProofRequestClass)\n\n // Assert attribute and predicate (group) names do not match\n assertNoDuplicateGroupsNamesInProofRequest(proposalJson)\n }\n\n public async acceptProposal(\n agentContext: AgentContext,\n { proposalAttachment, attachmentId }: DidCommProofFormatAcceptProposalOptions<AnonCredsDidCommProofFormat>\n ): Promise<DidCommProofFormatCreateReturn> {\n const holderService = agentContext.dependencyManager.resolve<AnonCredsHolderService>(AnonCredsHolderServiceSymbol)\n\n const format = new DidCommProofFormatSpec({\n format: ANONCREDS_PRESENTATION_REQUEST,\n attachmentId,\n })\n\n const proposalJson = proposalAttachment.getDataAsJson<AnonCredsProofRequest>()\n\n const request = {\n ...proposalJson,\n // We never want to reuse the nonce from the proposal, as this will allow replay attacks\n nonce: holderService.generateNonce(agentContext),\n }\n\n const attachment = this.getFormatData(request, format.attachmentId)\n\n return { attachment, format }\n }\n\n public async createRequest(\n agentContext: AgentContext,\n { attachmentId, proofFormats }: DidCommFormatCreateRequestOptions<AnonCredsDidCommProofFormat>\n ): Promise<DidCommProofFormatCreateReturn> {\n const holderService = agentContext.dependencyManager.resolve<AnonCredsHolderService>(AnonCredsHolderServiceSymbol)\n const format = new DidCommProofFormatSpec({\n format: ANONCREDS_PRESENTATION_REQUEST,\n attachmentId,\n })\n\n const anoncredsFormat = proofFormats.anoncreds\n if (!anoncredsFormat) {\n throw Error('Missing anoncreds format in create request attachment format')\n }\n\n const request = {\n name: anoncredsFormat.name,\n version: anoncredsFormat.version,\n nonce: holderService.generateNonce(agentContext),\n requested_attributes: anoncredsFormat.requested_attributes ?? {},\n requested_predicates: anoncredsFormat.requested_predicates ?? {},\n non_revoked: anoncredsFormat.non_revoked,\n } satisfies AnonCredsProofRequest\n\n // Assert attribute and predicate (group) names do not match\n assertNoDuplicateGroupsNamesInProofRequest(request)\n\n const attachment = this.getFormatData(request, format.attachmentId)\n\n return { attachment, format }\n }\n\n public async processRequest(\n _agentContext: AgentContext,\n { attachment }: DidCommProofFormatProcessOptions\n ): Promise<void> {\n const requestJson = attachment.getDataAsJson<AnonCredsProofRequest>()\n\n // fromJson also validates\n JsonTransformer.fromJSON(requestJson, AnonCredsProofRequestClass)\n\n // Assert attribute and predicate (group) names do not match\n assertNoDuplicateGroupsNamesInProofRequest(requestJson)\n }\n\n public async acceptRequest(\n agentContext: AgentContext,\n {\n proofFormats,\n requestAttachment,\n attachmentId,\n }: DidCommProofFormatAcceptRequestOptions<AnonCredsDidCommProofFormat>\n ): Promise<DidCommProofFormatCreateReturn> {\n const format = new DidCommProofFormatSpec({\n format: ANONCREDS_PRESENTATION,\n attachmentId,\n })\n const requestJson = requestAttachment.getDataAsJson<AnonCredsProofRequest>()\n\n const anoncredsFormat = proofFormats?.anoncreds\n\n const selectedCredentials =\n anoncredsFormat ??\n (await this._selectCredentialsForRequest(agentContext, requestJson, {\n filterByNonRevocationRequirements: true,\n }))\n\n const proof = await this.createProof(agentContext, requestJson, selectedCredentials)\n const attachment = this.getFormatData(proof, format.attachmentId)\n\n return {\n attachment,\n format,\n }\n }\n\n public async processPresentation(\n agentContext: AgentContext,\n { requestAttachment, attachment }: DidCommProofFormatProcessPresentationOptions\n ): Promise<boolean> {\n const verifierService =\n agentContext.dependencyManager.resolve<AnonCredsVerifierService>(AnonCredsVerifierServiceSymbol)\n\n const proofRequestJson = requestAttachment.getDataAsJson<AnonCredsProofRequest>()\n\n // NOTE: we don't do validation here, as this is handled by the AnonCreds implementation, however\n // this can lead to confusing error messages. We should consider doing validation here as well.\n // Defining a class-transformer/class-validator class seems a bit overkill, and the usage of interfaces\n // for the anoncreds package keeps things simple. Maybe we can try to use something like zod to validate\n const proofJson = attachment.getDataAsJson<AnonCredsProof>()\n\n for (const [referent, attribute] of Object.entries(proofJson.requested_proof.revealed_attrs)) {\n if (!checkValidCredentialValueEncoding(attribute.raw, attribute.encoded)) {\n throw new CredoError(\n `The encoded value for '${referent}' is invalid. ` +\n `Expected '${encodeCredentialValue(attribute.raw)}'. ` +\n `Actual '${attribute.encoded}'`\n )\n }\n }\n\n for (const [, attributeGroup] of Object.entries(proofJson.requested_proof.revealed_attr_groups ?? {})) {\n for (const [attributeName, attribute] of Object.entries(attributeGroup.values)) {\n if (!checkValidCredentialValueEncoding(attribute.raw, attribute.encoded)) {\n throw new CredoError(\n `The encoded value for '${attributeName}' is invalid. ` +\n `Expected '${encodeCredentialValue(attribute.raw)}'. ` +\n `Actual '${attribute.encoded}'`\n )\n }\n }\n }\n\n const schemas = await this.getSchemas(agentContext, new Set(proofJson.identifiers.map((i) => i.schema_id)))\n const credentialDefinitions = await this.getCredentialDefinitions(\n agentContext,\n new Set(proofJson.identifiers.map((i) => i.cred_def_id))\n )\n\n const revocationRegistries = await getRevocationRegistriesForProof(agentContext, proofJson)\n\n const verified = await verifierService.verifyProof(agentContext, {\n proofRequest: proofRequestJson,\n proof: proofJson,\n schemas,\n credentialDefinitions,\n revocationRegistries,\n })\n\n return verified\n }\n\n public async getCredentialsForRequest(\n agentContext: AgentContext,\n { requestAttachment, proofFormats }: DidCommProofFormatGetCredentialsForRequestOptions<AnonCredsDidCommProofFormat>\n ): Promise<DidCommProofFormatGetCredentialsForRequestReturn<AnonCredsDidCommProofFormat>> {\n const proofRequestJson = requestAttachment.getDataAsJson<AnonCredsProofRequest>()\n\n // Set default values\n const { filterByNonRevocationRequirements = true } = proofFormats?.anoncreds ?? {}\n\n const credentialsForRequest = await getCredentialsForAnonCredsProofRequest(agentContext, proofRequestJson, {\n filterByNonRevocationRequirements,\n })\n\n return credentialsForRequest\n }\n\n public async selectCredentialsForRequest(\n agentContext: AgentContext,\n {\n requestAttachment,\n proofFormats,\n }: DidCommProofFormatSelectCredentialsForRequestOptions<AnonCredsDidCommProofFormat>\n ): Promise<DidCommProofFormatSelectCredentialsForRequestReturn<AnonCredsDidCommProofFormat>> {\n const proofRequestJson = requestAttachment.getDataAsJson<AnonCredsProofRequest>()\n\n // Set default values\n const { filterByNonRevocationRequirements = true } = proofFormats?.anoncreds ?? {}\n\n const selectedCredentials = this._selectCredentialsForRequest(agentContext, proofRequestJson, {\n filterByNonRevocationRequirements,\n })\n\n return selectedCredentials\n }\n\n public async shouldAutoRespondToProposal(\n agentContext: AgentContext,\n { proposalAttachment, requestAttachment }: DidCommProofFormatAutoRespondProposalOptions\n ): Promise<boolean> {\n const proposalJson = proposalAttachment.getDataAsJson<AnonCredsProofRequest>()\n const requestJson = requestAttachment.getDataAsJson<AnonCredsProofRequest>()\n\n const areRequestsEqual = areAnonCredsProofRequestsEqual(proposalJson, requestJson)\n agentContext.config.logger.debug(`AnonCreds request and proposal are are equal: ${areRequestsEqual}`, {\n proposalJson,\n requestJson,\n })\n\n return areRequestsEqual\n }\n\n public async shouldAutoRespondToRequest(\n _agentContext: AgentContext,\n { proposalAttachment, requestAttachment }: DidCommProofFormatAutoRespondRequestOptions\n ): Promise<boolean> {\n const proposalJson = proposalAttachment.getDataAsJson<AnonCredsProofRequest>()\n const requestJson = requestAttachment.getDataAsJson<AnonCredsProofRequest>()\n\n return areAnonCredsProofRequestsEqual(proposalJson, requestJson)\n }\n\n public async shouldAutoRespondToPresentation(\n _agentContext: AgentContext,\n _options: DidCommProofFormatAutoRespondPresentationOptions\n ): Promise<boolean> {\n // The presentation is already verified in processPresentation, so we can just return true here.\n // It's only an ack, so it's just that we received the presentation.\n return true\n }\n\n public supportsFormat(formatIdentifier: string): boolean {\n const supportedFormats = [ANONCREDS_PRESENTATION_PROPOSAL, ANONCREDS_PRESENTATION_REQUEST, ANONCREDS_PRESENTATION]\n return supportedFormats.includes(formatIdentifier)\n }\n\n private async _selectCredentialsForRequest(\n agentContext: AgentContext,\n proofRequest: AnonCredsProofRequest,\n options: AnonCredsGetCredentialsForProofRequestOptions\n ): Promise<AnonCredsSelectedCredentials> {\n const credentialsForRequest = await getCredentialsForAnonCredsProofRequest(agentContext, proofRequest, options)\n\n const selectedCredentials: AnonCredsSelectedCredentials = {\n attributes: {},\n predicates: {},\n selfAttestedAttributes: {},\n }\n\n for (const attributeName of Object.keys(credentialsForRequest.attributes)) {\n const attributeArray = credentialsForRequest.attributes[attributeName]\n\n if (attributeArray.length === 0) {\n throw new CredoError('Unable to automatically select requested attributes.')\n }\n\n selectedCredentials.attributes[attributeName] = attributeArray[0]\n }\n\n for (const attributeName of Object.keys(credentialsForRequest.predicates)) {\n if (credentialsForRequest.predicates[attributeName].length === 0) {\n throw new CredoError('Unable to automatically select requested predicates.')\n }\n selectedCredentials.predicates[attributeName] = credentialsForRequest.predicates[attributeName][0]\n }\n\n return selectedCredentials\n }\n\n /**\n * Build schemas object needed to create and verify proof objects.\n *\n * Creates object with `{ schemaId: AnonCredsSchema }` mapping\n *\n * @param schemaIds List of schema ids\n * @returns Object containing schemas for specified schema ids\n *\n */\n private async getSchemas(agentContext: AgentContext, schemaIds: Set<string>) {\n const schemas: { [key: string]: AnonCredsSchema } = {}\n\n for (const schemaId of schemaIds) {\n const { schema } = await fetchSchema(agentContext, schemaId)\n schemas[schemaId] = schema\n }\n\n return schemas\n }\n\n /**\n * Build credential definitions object needed to create and verify proof objects.\n *\n * Creates object with `{ credentialDefinitionId: AnonCredsCredentialDefinition }` mapping\n *\n * @param credentialDefinitionIds List of credential definition ids\n * @returns Object containing credential definitions for specified credential definition ids\n *\n */\n private async getCredentialDefinitions(agentContext: AgentContext, credentialDefinitionIds: Set<string>) {\n const credentialDefinitions: { [key: string]: AnonCredsCredentialDefinition } = {}\n\n for (const credentialDefinitionId of credentialDefinitionIds) {\n const { credentialDefinition } = await fetchCredentialDefinition(agentContext, credentialDefinitionId)\n credentialDefinitions[credentialDefinitionId] = credentialDefinition\n }\n\n return credentialDefinitions\n }\n\n /**\n * Create anoncreds proof from a given proof request and requested credential object.\n *\n * @param proofRequest The proof request to create the proof for\n * @param requestedCredentials The requested credentials object specifying which credentials to use for the proof\n * @returns anoncreds proof object\n */\n private async createProof(\n agentContext: AgentContext,\n proofRequest: AnonCredsProofRequest,\n selectedCredentials: AnonCredsSelectedCredentials\n ): Promise<AnonCredsProof> {\n const holderService = agentContext.dependencyManager.resolve<AnonCredsHolderService>(AnonCredsHolderServiceSymbol)\n\n const credentialObjects = await Promise.all(\n [...Object.values(selectedCredentials.attributes), ...Object.values(selectedCredentials.predicates)].map(\n async (c) =>\n holderService.getCredential(agentContext, {\n id: c.credentialId,\n useUnqualifiedIdentifiersIfPresent: proofRequestUsesUnqualifiedIdentifiers(proofRequest),\n })\n )\n )\n\n const schemas = await this.getSchemas(agentContext, new Set(credentialObjects.map((c) => c.schemaId)))\n const credentialDefinitions = await this.getCredentialDefinitions(\n agentContext,\n new Set(credentialObjects.map((c) => c.credentialDefinitionId))\n )\n\n // selectedCredentials are overridden with specified timestamps of the revocation status list that\n // should be used for the selected credentials.\n const { revocationRegistries, updatedSelectedCredentials } = await getRevocationRegistriesForRequest(\n agentContext,\n proofRequest,\n selectedCredentials\n )\n\n return await holderService.createProof(agentContext, {\n proofRequest,\n selectedCredentials: updatedSelectedCredentials,\n schemas,\n credentialDefinitions,\n revocationRegistries,\n })\n }\n\n /**\n * Returns an object of type {@link DidCommAttachment} for use in credential exchange messages.\n * It looks up the correct format identifier and encodes the data as a base64 attachment.\n *\n * @param data The data to include in the attach object\n * @param id the attach id from the formats component of the message\n */\n private getFormatData(data: unknown, id: string): DidCommAttachment {\n const attachment = new DidCommAttachment({\n id,\n mimeType: 'application/json',\n data: new DidCommAttachmentData({\n base64: JsonEncoder.toBase64(data),\n }),\n })\n\n return attachment\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgDA,MAAM,kCAAkC;AACxC,MAAM,iCAAiC;AACvC,MAAM,yBAAyB;AAE/B,IAAa,qCAAb,MAAkH;;OAChG,YAAY;;CAE5B,MAAa,eACX,cACA,EAAE,cAAc,gBACyB;EACzC,MAAM,gBAAgB,aAAa,kBAAkB,QAAgC,6BAA6B;EAElH,MAAM,SAAS,IAAI,uBAAuB;GACxC,QAAQ;GACR;GACD,CAAC;EAEF,MAAM,kBAAkB,aAAa;AACrC,MAAI,CAAC,gBACH,OAAM,MAAM,gEAAgE;EAG9E,MAAM,eAAe,yBAAyB;GAC5C,YAAY,gBAAgB,cAAc,EAAE;GAC5C,YAAY,gBAAgB,cAAc,EAAE;GAC5C,MAAM,gBAAgB,QAAQ;GAC9B,SAAS,gBAAgB,WAAW;GACpC,OAAO,cAAc,cAAc,aAAa;GAChD,oBAAoB,gBAAgB;GACrC,CAAC;AAGF,SAAO;GAAE,YAFU,KAAK,cAAc,cAAc,OAAO,aAAa;GAEnD;GAAQ;;CAG/B,MAAa,gBACX,eACA,EAAE,cACa;EACf,MAAM,eAAe,WAAW,eAAsC;AAGt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