@credo-ts/anoncreds 0.4.1-alpha.157

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 (417) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +31 -0
  3. package/build/AnonCredsApi.d.ts +97 -0
  4. package/build/AnonCredsApi.js +582 -0
  5. package/build/AnonCredsApi.js.map +1 -0
  6. package/build/AnonCredsApiOptions.d.ts +24 -0
  7. package/build/AnonCredsApiOptions.js +3 -0
  8. package/build/AnonCredsApiOptions.js.map +1 -0
  9. package/build/AnonCredsModule.d.ts +24 -0
  10. package/build/AnonCredsModule.js +56 -0
  11. package/build/AnonCredsModule.js.map +1 -0
  12. package/build/AnonCredsModuleConfig.d.ts +72 -0
  13. package/build/AnonCredsModuleConfig.js +31 -0
  14. package/build/AnonCredsModuleConfig.js.map +1 -0
  15. package/build/anoncreds-rs/AnonCredsDataIntegrityService.d.ts +27 -0
  16. package/build/anoncreds-rs/AnonCredsDataIntegrityService.js +241 -0
  17. package/build/anoncreds-rs/AnonCredsDataIntegrityService.js.map +1 -0
  18. package/build/anoncreds-rs/AnonCredsRsHolderService.d.ts +37 -0
  19. package/build/anoncreds-rs/AnonCredsRsHolderService.js +590 -0
  20. package/build/anoncreds-rs/AnonCredsRsHolderService.js.map +1 -0
  21. package/build/anoncreds-rs/AnonCredsRsIssuerService.d.ts +12 -0
  22. package/build/anoncreds-rs/AnonCredsRsIssuerService.js +253 -0
  23. package/build/anoncreds-rs/AnonCredsRsIssuerService.js.map +1 -0
  24. package/build/anoncreds-rs/AnonCredsRsVerifierService.d.ts +8 -0
  25. package/build/anoncreds-rs/AnonCredsRsVerifierService.js +157 -0
  26. package/build/anoncreds-rs/AnonCredsRsVerifierService.js.map +1 -0
  27. package/build/anoncreds-rs/index.d.ts +3 -0
  28. package/build/anoncreds-rs/index.js +10 -0
  29. package/build/anoncreds-rs/index.js.map +1 -0
  30. package/build/anoncreds-rs/utils.d.ts +23 -0
  31. package/build/anoncreds-rs/utils.js +71 -0
  32. package/build/anoncreds-rs/utils.js.map +1 -0
  33. package/build/error/AnonCredsError.d.ts +6 -0
  34. package/build/error/AnonCredsError.js +11 -0
  35. package/build/error/AnonCredsError.js.map +1 -0
  36. package/build/error/AnonCredsRsError.d.ts +6 -0
  37. package/build/error/AnonCredsRsError.js +11 -0
  38. package/build/error/AnonCredsRsError.js.map +1 -0
  39. package/build/error/AnonCredsStoreRecordError.d.ts +6 -0
  40. package/build/error/AnonCredsStoreRecordError.js +11 -0
  41. package/build/error/AnonCredsStoreRecordError.js.map +1 -0
  42. package/build/error/index.d.ts +3 -0
  43. package/build/error/index.js +20 -0
  44. package/build/error/index.js.map +1 -0
  45. package/build/formats/AnonCredsCredentialFormat.d.ts +79 -0
  46. package/build/formats/AnonCredsCredentialFormat.js +3 -0
  47. package/build/formats/AnonCredsCredentialFormat.js.map +1 -0
  48. package/build/formats/AnonCredsCredentialFormatService.d.ts +80 -0
  49. package/build/formats/AnonCredsCredentialFormatService.js +422 -0
  50. package/build/formats/AnonCredsCredentialFormatService.js.map +1 -0
  51. package/build/formats/AnonCredsProofFormat.d.ts +70 -0
  52. package/build/formats/AnonCredsProofFormat.js +3 -0
  53. package/build/formats/AnonCredsProofFormat.js.map +1 -0
  54. package/build/formats/AnonCredsProofFormatService.d.ts +58 -0
  55. package/build/formats/AnonCredsProofFormatService.js +360 -0
  56. package/build/formats/AnonCredsProofFormatService.js.map +1 -0
  57. package/build/formats/DataIntegrityCredentialFormatService.d.ts +89 -0
  58. package/build/formats/DataIntegrityCredentialFormatService.js +773 -0
  59. package/build/formats/DataIntegrityCredentialFormatService.js.map +1 -0
  60. package/build/formats/LegacyIndyCredentialFormat.d.ts +32 -0
  61. package/build/formats/LegacyIndyCredentialFormat.js +3 -0
  62. package/build/formats/LegacyIndyCredentialFormat.js.map +1 -0
  63. package/build/formats/LegacyIndyCredentialFormatService.d.ts +80 -0
  64. package/build/formats/LegacyIndyCredentialFormatService.js +388 -0
  65. package/build/formats/LegacyIndyCredentialFormatService.js.map +1 -0
  66. package/build/formats/LegacyIndyProofFormat.d.ts +29 -0
  67. package/build/formats/LegacyIndyProofFormat.js +3 -0
  68. package/build/formats/LegacyIndyProofFormat.js.map +1 -0
  69. package/build/formats/LegacyIndyProofFormatService.d.ts +58 -0
  70. package/build/formats/LegacyIndyProofFormatService.js +374 -0
  71. package/build/formats/LegacyIndyProofFormatService.js.map +1 -0
  72. package/build/formats/index.d.ts +9 -0
  73. package/build/formats/index.js +32 -0
  74. package/build/formats/index.js.map +1 -0
  75. package/build/index.d.ts +17 -0
  76. package/build/index.js +46 -0
  77. package/build/index.js.map +1 -0
  78. package/build/models/AnonCredsCredentialProposal.d.ts +62 -0
  79. package/build/models/AnonCredsCredentialProposal.js +81 -0
  80. package/build/models/AnonCredsCredentialProposal.js.map +1 -0
  81. package/build/models/AnonCredsProofRequest.d.ts +27 -0
  82. package/build/models/AnonCredsProofRequest.js +82 -0
  83. package/build/models/AnonCredsProofRequest.js.map +1 -0
  84. package/build/models/AnonCredsRequestedAttribute.d.ts +16 -0
  85. package/build/models/AnonCredsRequestedAttribute.js +56 -0
  86. package/build/models/AnonCredsRequestedAttribute.js.map +1 -0
  87. package/build/models/AnonCredsRequestedPredicate.d.ts +19 -0
  88. package/build/models/AnonCredsRequestedPredicate.js +61 -0
  89. package/build/models/AnonCredsRequestedPredicate.js.map +1 -0
  90. package/build/models/AnonCredsRestriction.d.ts +55 -0
  91. package/build/models/AnonCredsRestriction.js +160 -0
  92. package/build/models/AnonCredsRestriction.js.map +1 -0
  93. package/build/models/AnonCredsRestrictionWrapper.d.ts +4 -0
  94. package/build/models/AnonCredsRestrictionWrapper.js +25 -0
  95. package/build/models/AnonCredsRestrictionWrapper.js.map +1 -0
  96. package/build/models/AnonCredsRevocationInterval.d.ts +5 -0
  97. package/build/models/AnonCredsRevocationInterval.js +33 -0
  98. package/build/models/AnonCredsRevocationInterval.js.map +1 -0
  99. package/build/models/exchange.d.ts +97 -0
  100. package/build/models/exchange.js +5 -0
  101. package/build/models/exchange.js.map +1 -0
  102. package/build/models/index.d.ts +4 -0
  103. package/build/models/index.js +21 -0
  104. package/build/models/index.js.map +1 -0
  105. package/build/models/internal.d.ts +33 -0
  106. package/build/models/internal.js +3 -0
  107. package/build/models/internal.js.map +1 -0
  108. package/build/models/registry.d.ts +39 -0
  109. package/build/models/registry.js +3 -0
  110. package/build/models/registry.js.map +1 -0
  111. package/build/models/utils.d.ts +22 -0
  112. package/build/models/utils.js +3 -0
  113. package/build/models/utils.js.map +1 -0
  114. package/build/protocols/credentials/v1/V1CredentialProtocol.d.ts +162 -0
  115. package/build/protocols/credentials/v1/V1CredentialProtocol.js +943 -0
  116. package/build/protocols/credentials/v1/V1CredentialProtocol.js.map +1 -0
  117. package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.d.ts +10 -0
  118. package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.js +18 -0
  119. package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.js.map +1 -0
  120. package/build/protocols/credentials/v1/errors/index.d.ts +1 -0
  121. package/build/protocols/credentials/v1/errors/index.js +6 -0
  122. package/build/protocols/credentials/v1/errors/index.js.map +1 -0
  123. package/build/protocols/credentials/v1/handlers/V1CredentialAckHandler.d.ts +9 -0
  124. package/build/protocols/credentials/v1/handlers/V1CredentialAckHandler.js +15 -0
  125. package/build/protocols/credentials/v1/handlers/V1CredentialAckHandler.js.map +1 -0
  126. package/build/protocols/credentials/v1/handlers/V1CredentialProblemReportHandler.d.ts +9 -0
  127. package/build/protocols/credentials/v1/handlers/V1CredentialProblemReportHandler.js +15 -0
  128. package/build/protocols/credentials/v1/handlers/V1CredentialProblemReportHandler.js.map +1 -0
  129. package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.d.ts +10 -0
  130. package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.js +40 -0
  131. package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.js.map +1 -0
  132. package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.d.ts +10 -0
  133. package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.js +33 -0
  134. package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.js.map +1 -0
  135. package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.d.ts +10 -0
  136. package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.js +38 -0
  137. package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.js.map +1 -0
  138. package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.d.ts +10 -0
  139. package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.js +40 -0
  140. package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.js.map +1 -0
  141. package/build/protocols/credentials/v1/handlers/index.d.ts +6 -0
  142. package/build/protocols/credentials/v1/handlers/index.js +23 -0
  143. package/build/protocols/credentials/v1/handlers/index.js.map +1 -0
  144. package/build/protocols/credentials/v1/index.d.ts +2 -0
  145. package/build/protocols/credentials/v1/index.js +19 -0
  146. package/build/protocols/credentials/v1/index.js.map +1 -0
  147. package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.d.ts +16 -0
  148. package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.js +34 -0
  149. package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.js.map +1 -0
  150. package/build/protocols/credentials/v1/messages/V1CredentialPreview.d.ts +26 -0
  151. package/build/protocols/credentials/v1/messages/V1CredentialPreview.js +69 -0
  152. package/build/protocols/credentials/v1/messages/V1CredentialPreview.js.map +1 -0
  153. package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.d.ts +16 -0
  154. package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.js +34 -0
  155. package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.js.map +1 -0
  156. package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.d.ts +19 -0
  157. package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.js +62 -0
  158. package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.js.map +1 -0
  159. package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.d.ts +27 -0
  160. package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.js +75 -0
  161. package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.js.map +1 -0
  162. package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.d.ts +59 -0
  163. package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.js +109 -0
  164. package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.js.map +1 -0
  165. package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.d.ts +19 -0
  166. package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.js +61 -0
  167. package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.js.map +1 -0
  168. package/build/protocols/credentials/v1/messages/index.d.ts +7 -0
  169. package/build/protocols/credentials/v1/messages/index.js +24 -0
  170. package/build/protocols/credentials/v1/messages/index.js.map +1 -0
  171. package/build/protocols/index.d.ts +2 -0
  172. package/build/protocols/index.js +19 -0
  173. package/build/protocols/index.js.map +1 -0
  174. package/build/protocols/proofs/v1/V1ProofProtocol.d.ts +50 -0
  175. package/build/protocols/proofs/v1/V1ProofProtocol.js +860 -0
  176. package/build/protocols/proofs/v1/V1ProofProtocol.js.map +1 -0
  177. package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.d.ts +12 -0
  178. package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.js +19 -0
  179. package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.js.map +1 -0
  180. package/build/protocols/proofs/v1/errors/index.d.ts +1 -0
  181. package/build/protocols/proofs/v1/errors/index.js +18 -0
  182. package/build/protocols/proofs/v1/errors/index.js.map +1 -0
  183. package/build/protocols/proofs/v1/handlers/V1PresentationAckHandler.d.ts +9 -0
  184. package/build/protocols/proofs/v1/handlers/V1PresentationAckHandler.js +15 -0
  185. package/build/protocols/proofs/v1/handlers/V1PresentationAckHandler.js.map +1 -0
  186. package/build/protocols/proofs/v1/handlers/V1PresentationHandler.d.ts +10 -0
  187. package/build/protocols/proofs/v1/handlers/V1PresentationHandler.js +40 -0
  188. package/build/protocols/proofs/v1/handlers/V1PresentationHandler.js.map +1 -0
  189. package/build/protocols/proofs/v1/handlers/V1PresentationProblemReportHandler.d.ts +9 -0
  190. package/build/protocols/proofs/v1/handlers/V1PresentationProblemReportHandler.js +15 -0
  191. package/build/protocols/proofs/v1/handlers/V1PresentationProblemReportHandler.js.map +1 -0
  192. package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.d.ts +11 -0
  193. package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.js +38 -0
  194. package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.js.map +1 -0
  195. package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.d.ts +10 -0
  196. package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.js +35 -0
  197. package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.js.map +1 -0
  198. package/build/protocols/proofs/v1/handlers/index.d.ts +5 -0
  199. package/build/protocols/proofs/v1/handlers/index.js +22 -0
  200. package/build/protocols/proofs/v1/handlers/index.js.map +1 -0
  201. package/build/protocols/proofs/v1/index.d.ts +4 -0
  202. package/build/protocols/proofs/v1/index.js +21 -0
  203. package/build/protocols/proofs/v1/index.js.map +1 -0
  204. package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.d.ts +8 -0
  205. package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.js +27 -0
  206. package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.js.map +1 -0
  207. package/build/protocols/proofs/v1/messages/V1PresentationMessage.d.ts +31 -0
  208. package/build/protocols/proofs/v1/messages/V1PresentationMessage.js +67 -0
  209. package/build/protocols/proofs/v1/messages/V1PresentationMessage.js.map +1 -0
  210. package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.d.ts +16 -0
  211. package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.js +34 -0
  212. package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.js.map +1 -0
  213. package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.d.ts +26 -0
  214. package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.js +53 -0
  215. package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.js.map +1 -0
  216. package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.d.ts +29 -0
  217. package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.js +65 -0
  218. package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.js.map +1 -0
  219. package/build/protocols/proofs/v1/messages/index.d.ts +5 -0
  220. package/build/protocols/proofs/v1/messages/index.js +22 -0
  221. package/build/protocols/proofs/v1/messages/index.js.map +1 -0
  222. package/build/protocols/proofs/v1/models/V1PresentationPreview.d.ts +50 -0
  223. package/build/protocols/proofs/v1/models/V1PresentationPreview.js +130 -0
  224. package/build/protocols/proofs/v1/models/V1PresentationPreview.js.map +1 -0
  225. package/build/protocols/proofs/v1/models/index.d.ts +1 -0
  226. package/build/protocols/proofs/v1/models/index.js +18 -0
  227. package/build/protocols/proofs/v1/models/index.js.map +1 -0
  228. package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.d.ts +20 -0
  229. package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.js +22 -0
  230. package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.js.map +1 -0
  231. package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.d.ts +8 -0
  232. package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.js +35 -0
  233. package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.js.map +1 -0
  234. package/build/repository/AnonCredsCredentialDefinitionRecord.d.ts +38 -0
  235. package/build/repository/AnonCredsCredentialDefinitionRecord.js +29 -0
  236. package/build/repository/AnonCredsCredentialDefinitionRecord.js.map +1 -0
  237. package/build/repository/AnonCredsCredentialDefinitionRepository.d.ts +8 -0
  238. package/build/repository/AnonCredsCredentialDefinitionRepository.js +53 -0
  239. package/build/repository/AnonCredsCredentialDefinitionRepository.js.map +1 -0
  240. package/build/repository/AnonCredsCredentialRecord.d.ts +48 -0
  241. package/build/repository/AnonCredsCredentialRecord.js +37 -0
  242. package/build/repository/AnonCredsCredentialRecord.js.map +1 -0
  243. package/build/repository/AnonCredsCredentialRepository.d.ts +10 -0
  244. package/build/repository/AnonCredsCredentialRepository.js +41 -0
  245. package/build/repository/AnonCredsCredentialRepository.js.map +1 -0
  246. package/build/repository/AnonCredsKeyCorrectnessProofRecord.d.ts +20 -0
  247. package/build/repository/AnonCredsKeyCorrectnessProofRecord.js +22 -0
  248. package/build/repository/AnonCredsKeyCorrectnessProofRecord.js.map +1 -0
  249. package/build/repository/AnonCredsKeyCorrectnessProofRepository.d.ts +8 -0
  250. package/build/repository/AnonCredsKeyCorrectnessProofRepository.js +35 -0
  251. package/build/repository/AnonCredsKeyCorrectnessProofRepository.js.map +1 -0
  252. package/build/repository/AnonCredsLinkSecretRecord.d.ts +23 -0
  253. package/build/repository/AnonCredsLinkSecretRecord.js +22 -0
  254. package/build/repository/AnonCredsLinkSecretRecord.js.map +1 -0
  255. package/build/repository/AnonCredsLinkSecretRepository.d.ts +10 -0
  256. package/build/repository/AnonCredsLinkSecretRepository.js +41 -0
  257. package/build/repository/AnonCredsLinkSecretRepository.js.map +1 -0
  258. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.d.ts +34 -0
  259. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.js +30 -0
  260. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.js.map +1 -0
  261. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.d.ts +10 -0
  262. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.js +38 -0
  263. package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.js.map +1 -0
  264. package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.d.ts +24 -0
  265. package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.js +22 -0
  266. package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.js.map +1 -0
  267. package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.d.ts +9 -0
  268. package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.js +38 -0
  269. package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.js.map +1 -0
  270. package/build/repository/AnonCredsSchemaRecord.d.ts +38 -0
  271. package/build/repository/AnonCredsSchemaRecord.js +29 -0
  272. package/build/repository/AnonCredsSchemaRecord.js.map +1 -0
  273. package/build/repository/AnonCredsSchemaRepository.d.ts +8 -0
  274. package/build/repository/AnonCredsSchemaRepository.js +53 -0
  275. package/build/repository/AnonCredsSchemaRepository.js.map +1 -0
  276. package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.ts +9 -0
  277. package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.js +9 -0
  278. package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.js.map +1 -0
  279. package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.ts +9 -0
  280. package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.js +9 -0
  281. package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.js.map +1 -0
  282. package/build/repository/anonCredsSchemaRecordMetadataTypes.d.ts +9 -0
  283. package/build/repository/anonCredsSchemaRecordMetadataTypes.js +9 -0
  284. package/build/repository/anonCredsSchemaRecordMetadataTypes.js.map +1 -0
  285. package/build/repository/index.d.ts +16 -0
  286. package/build/repository/index.js +33 -0
  287. package/build/repository/index.js.map +1 -0
  288. package/build/services/AnonCredsHolderService.d.ts +18 -0
  289. package/build/services/AnonCredsHolderService.js +5 -0
  290. package/build/services/AnonCredsHolderService.js.map +1 -0
  291. package/build/services/AnonCredsHolderServiceOptions.d.ts +99 -0
  292. package/build/services/AnonCredsHolderServiceOptions.js +3 -0
  293. package/build/services/AnonCredsHolderServiceOptions.js.map +1 -0
  294. package/build/services/AnonCredsIssuerService.d.ts +14 -0
  295. package/build/services/AnonCredsIssuerService.js +5 -0
  296. package/build/services/AnonCredsIssuerService.js.map +1 -0
  297. package/build/services/AnonCredsIssuerServiceOptions.d.ts +61 -0
  298. package/build/services/AnonCredsIssuerServiceOptions.js +3 -0
  299. package/build/services/AnonCredsIssuerServiceOptions.js.map +1 -0
  300. package/build/services/AnonCredsVerifierService.d.ts +7 -0
  301. package/build/services/AnonCredsVerifierService.js +5 -0
  302. package/build/services/AnonCredsVerifierService.js.map +1 -0
  303. package/build/services/AnonCredsVerifierServiceOptions.d.ts +25 -0
  304. package/build/services/AnonCredsVerifierServiceOptions.js +3 -0
  305. package/build/services/AnonCredsVerifierServiceOptions.js.map +1 -0
  306. package/build/services/index.d.ts +8 -0
  307. package/build/services/index.js +27 -0
  308. package/build/services/index.js.map +1 -0
  309. package/build/services/registry/AnonCredsRegistry.d.ts +25 -0
  310. package/build/services/registry/AnonCredsRegistry.js +3 -0
  311. package/build/services/registry/AnonCredsRegistry.js.map +1 -0
  312. package/build/services/registry/AnonCredsRegistryService.d.ts +10 -0
  313. package/build/services/registry/AnonCredsRegistryService.js +33 -0
  314. package/build/services/registry/AnonCredsRegistryService.js.map +1 -0
  315. package/build/services/registry/CredentialDefinitionOptions.d.ts +34 -0
  316. package/build/services/registry/CredentialDefinitionOptions.js +3 -0
  317. package/build/services/registry/CredentialDefinitionOptions.js.map +1 -0
  318. package/build/services/registry/RevocationRegistryDefinitionOptions.d.ts +34 -0
  319. package/build/services/registry/RevocationRegistryDefinitionOptions.js +3 -0
  320. package/build/services/registry/RevocationRegistryDefinitionOptions.js.map +1 -0
  321. package/build/services/registry/RevocationStatusListOptions.d.ts +32 -0
  322. package/build/services/registry/RevocationStatusListOptions.js +3 -0
  323. package/build/services/registry/RevocationStatusListOptions.js.map +1 -0
  324. package/build/services/registry/SchemaOptions.d.ts +34 -0
  325. package/build/services/registry/SchemaOptions.js +3 -0
  326. package/build/services/registry/SchemaOptions.js.map +1 -0
  327. package/build/services/registry/base.d.ts +19 -0
  328. package/build/services/registry/base.js +3 -0
  329. package/build/services/registry/base.js.map +1 -0
  330. package/build/services/registry/index.d.ts +7 -0
  331. package/build/services/registry/index.js +23 -0
  332. package/build/services/registry/index.js.map +1 -0
  333. package/build/services/tails/BasicTailsFileService.d.ts +23 -0
  334. package/build/services/tails/BasicTailsFileService.js +65 -0
  335. package/build/services/tails/BasicTailsFileService.js.map +1 -0
  336. package/build/services/tails/TailsFileService.d.ts +42 -0
  337. package/build/services/tails/TailsFileService.js +3 -0
  338. package/build/services/tails/TailsFileService.js.map +1 -0
  339. package/build/services/tails/index.d.ts +2 -0
  340. package/build/services/tails/index.js +19 -0
  341. package/build/services/tails/index.js.map +1 -0
  342. package/build/updates/0.3.1-0.4/credentialDefinition.d.ts +18 -0
  343. package/build/updates/0.3.1-0.4/credentialDefinition.js +57 -0
  344. package/build/updates/0.3.1-0.4/credentialDefinition.js.map +1 -0
  345. package/build/updates/0.3.1-0.4/credentialExchangeRecord.d.ts +69 -0
  346. package/build/updates/0.3.1-0.4/credentialExchangeRecord.js +122 -0
  347. package/build/updates/0.3.1-0.4/credentialExchangeRecord.js.map +1 -0
  348. package/build/updates/0.3.1-0.4/index.d.ts +2 -0
  349. package/build/updates/0.3.1-0.4/index.js +15 -0
  350. package/build/updates/0.3.1-0.4/index.js.map +1 -0
  351. package/build/updates/0.3.1-0.4/linkSecret.d.ts +6 -0
  352. package/build/updates/0.3.1-0.4/linkSecret.js +36 -0
  353. package/build/updates/0.3.1-0.4/linkSecret.js.map +1 -0
  354. package/build/updates/0.3.1-0.4/schema.d.ts +15 -0
  355. package/build/updates/0.3.1-0.4/schema.js +42 -0
  356. package/build/updates/0.3.1-0.4/schema.js.map +1 -0
  357. package/build/updates/0.4-0.5/anonCredsCredentialRecord.d.ts +5 -0
  358. package/build/updates/0.4-0.5/anonCredsCredentialRecord.js +118 -0
  359. package/build/updates/0.4-0.5/anonCredsCredentialRecord.js.map +1 -0
  360. package/build/updates/0.4-0.5/index.d.ts +2 -0
  361. package/build/updates/0.4-0.5/index.js +9 -0
  362. package/build/updates/0.4-0.5/index.js.map +1 -0
  363. package/build/utils/anonCredsObjects.d.ts +26 -0
  364. package/build/utils/anonCredsObjects.js +82 -0
  365. package/build/utils/anonCredsObjects.js.map +1 -0
  366. package/build/utils/areRequestsEqual.d.ts +6 -0
  367. package/build/utils/areRequestsEqual.js +136 -0
  368. package/build/utils/areRequestsEqual.js.map +1 -0
  369. package/build/utils/composeAutoAccept.d.ts +15 -0
  370. package/build/utils/composeAutoAccept.js +27 -0
  371. package/build/utils/composeAutoAccept.js.map +1 -0
  372. package/build/utils/createRequestFromPreview.d.ts +10 -0
  373. package/build/utils/createRequestFromPreview.js +72 -0
  374. package/build/utils/createRequestFromPreview.js.map +1 -0
  375. package/build/utils/credential.d.ts +68 -0
  376. package/build/utils/credential.js +188 -0
  377. package/build/utils/credential.js.map +1 -0
  378. package/build/utils/credentialPreviewAttributes.d.ts +2 -0
  379. package/build/utils/credentialPreviewAttributes.js +25 -0
  380. package/build/utils/credentialPreviewAttributes.js.map +1 -0
  381. package/build/utils/getRevocationRegistries.d.ts +14 -0
  382. package/build/utils/getRevocationRegistries.js +152 -0
  383. package/build/utils/getRevocationRegistries.js.map +1 -0
  384. package/build/utils/hasDuplicateGroupNames.d.ts +2 -0
  385. package/build/utils/hasDuplicateGroupNames.js +23 -0
  386. package/build/utils/hasDuplicateGroupNames.js.map +1 -0
  387. package/build/utils/index.d.ts +16 -0
  388. package/build/utils/index.js +46 -0
  389. package/build/utils/index.js.map +1 -0
  390. package/build/utils/indyIdentifiers.d.ts +66 -0
  391. package/build/utils/indyIdentifiers.js +296 -0
  392. package/build/utils/indyIdentifiers.js.map +1 -0
  393. package/build/utils/isMap.d.ts +5 -0
  394. package/build/utils/isMap.js +18 -0
  395. package/build/utils/isMap.js.map +1 -0
  396. package/build/utils/linkSecret.d.ts +9 -0
  397. package/build/utils/linkSecret.js +44 -0
  398. package/build/utils/linkSecret.js.map +1 -0
  399. package/build/utils/metadata.d.ts +35 -0
  400. package/build/utils/metadata.js +24 -0
  401. package/build/utils/metadata.js.map +1 -0
  402. package/build/utils/proverDid.d.ts +8 -0
  403. package/build/utils/proverDid.js +16 -0
  404. package/build/utils/proverDid.js.map +1 -0
  405. package/build/utils/revocationInterval.d.ts +7 -0
  406. package/build/utils/revocationInterval.js +15 -0
  407. package/build/utils/revocationInterval.js.map +1 -0
  408. package/build/utils/sortRequestedCredentialsMatches.d.ts +8 -0
  409. package/build/utils/sortRequestedCredentialsMatches.js +33 -0
  410. package/build/utils/sortRequestedCredentialsMatches.js.map +1 -0
  411. package/build/utils/timestamp.d.ts +1 -0
  412. package/build/utils/timestamp.js +7 -0
  413. package/build/utils/timestamp.js.map +1 -0
  414. package/build/utils/w3cAnonCredsUtils.d.ts +35 -0
  415. package/build/utils/w3cAnonCredsUtils.js +124 -0
  416. package/build/utils/w3cAnonCredsUtils.js.map +1 -0
  417. package/package.json +47 -0
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.V1CredentialPreview = void 0;
13
+ const core_1 = require("@credo-ts/core");
14
+ const class_transformer_1 = require("class-transformer");
15
+ const class_validator_1 = require("class-validator");
16
+ /**
17
+ * Credential preview inner message class.
18
+ *
19
+ * This is not a message but an inner object for other messages in this protocol. It is used construct a preview of the data for the credential.
20
+ *
21
+ * @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential/README.md#preview-credential
22
+ */
23
+ class V1CredentialPreview {
24
+ constructor(options) {
25
+ this.type = V1CredentialPreview.type.messageTypeUri;
26
+ if (options) {
27
+ this.attributes = options.attributes.map((a) => new core_1.CredentialPreviewAttribute(a));
28
+ }
29
+ }
30
+ toJSON() {
31
+ return core_1.JsonTransformer.toJSON(this);
32
+ }
33
+ /**
34
+ * Create a credential preview from a record with name and value entries.
35
+ *
36
+ * @example
37
+ * const preview = CredentialPreview.fromRecord({
38
+ * name: "Bob",
39
+ * age: "20"
40
+ * })
41
+ */
42
+ static fromRecord(record) {
43
+ const attributes = Object.entries(record).map(([name, value]) => new core_1.CredentialPreviewAttribute({
44
+ name,
45
+ mimeType: 'text/plain',
46
+ value,
47
+ }));
48
+ return new V1CredentialPreview({
49
+ attributes,
50
+ });
51
+ }
52
+ }
53
+ V1CredentialPreview.type = (0, core_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/credential-preview');
54
+ __decorate([
55
+ (0, class_transformer_1.Expose)({ name: '@type' }),
56
+ (0, core_1.IsValidMessageType)(V1CredentialPreview.type),
57
+ (0, class_transformer_1.Transform)(({ value }) => (0, core_1.replaceLegacyDidSovPrefix)(value), {
58
+ toClassOnly: true,
59
+ }),
60
+ __metadata("design:type", Object)
61
+ ], V1CredentialPreview.prototype, "type", void 0);
62
+ __decorate([
63
+ (0, class_transformer_1.Type)(() => core_1.CredentialPreviewAttribute),
64
+ (0, class_validator_1.ValidateNested)({ each: true }),
65
+ (0, class_validator_1.IsInstance)(core_1.CredentialPreviewAttribute, { each: true }),
66
+ __metadata("design:type", Array)
67
+ ], V1CredentialPreview.prototype, "attributes", void 0);
68
+ exports.V1CredentialPreview = V1CredentialPreview;
69
+ //# sourceMappingURL=V1CredentialPreview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V1CredentialPreview.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1CredentialPreview.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,yCAMuB;AACvB,yDAA2D;AAC3D,qDAA4D;AAE5D;;;;;;GAMG;AACH,MAAa,mBAAmB;IAC9B,YAAmB,OAAiC;QAWpC,SAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC,cAAc,CAAA;QAV5D,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,iCAA0B,CAAC,CAAC,CAAC,CAAC,CAAA;SACnF;IACH,CAAC;IAeM,MAAM;QACX,OAAO,sBAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACrC,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,UAAU,CAAC,MAA8B;QACrD,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAC3C,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAChB,IAAI,iCAA0B,CAAC;YAC7B,IAAI;YACJ,QAAQ,EAAE,YAAY;YACtB,KAAK;SACN,CAAC,CACL,CAAA;QAED,OAAO,IAAI,mBAAmB,CAAC;YAC7B,UAAU;SACX,CAAC,CAAA;IACJ,CAAC;;AAjCsB,wBAAI,GAAG,IAAA,uBAAgB,EAAC,6DAA6D,CAAC,CAAA;AAN7G;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IACzB,IAAA,yBAAkB,EAAC,mBAAmB,CAAC,IAAI,CAAC;IAC5C,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAA,gCAAyB,EAAC,KAAK,CAAC,EAAE;QAC1D,WAAW,EAAE,IAAI;KAClB,CAAC;;iDAC4D;AAG9D;IAAC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iCAA0B,CAAC;IACtC,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,4BAAU,EAAC,iCAA0B,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;uDACP;AAlBlD,kDA+CC"}
@@ -0,0 +1,16 @@
1
+ import type { ProblemReportMessageOptions } from '@credo-ts/core';
2
+ import { ProblemReportMessage } from '@credo-ts/core';
3
+ export type V1CredentialProblemReportMessageOptions = ProblemReportMessageOptions;
4
+ /**
5
+ * @see https://github.com/hyperledger/aries-rfcs/blob/main/features/0035-report-problem/README.md
6
+ */
7
+ export declare class V1CredentialProblemReportMessage extends ProblemReportMessage {
8
+ readonly allowDidSovPrefix = true;
9
+ /**
10
+ * Create new CredentialProblemReportMessage instance.
11
+ * @param options
12
+ */
13
+ constructor(options: V1CredentialProblemReportMessageOptions);
14
+ readonly type: string;
15
+ static readonly type: import("@credo-ts/core/build/utils/messageType").ParsedMessageType;
16
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.V1CredentialProblemReportMessage = void 0;
13
+ const core_1 = require("@credo-ts/core");
14
+ /**
15
+ * @see https://github.com/hyperledger/aries-rfcs/blob/main/features/0035-report-problem/README.md
16
+ */
17
+ class V1CredentialProblemReportMessage extends core_1.ProblemReportMessage {
18
+ /**
19
+ * Create new CredentialProblemReportMessage instance.
20
+ * @param options
21
+ */
22
+ constructor(options) {
23
+ super(options);
24
+ this.allowDidSovPrefix = true;
25
+ this.type = V1CredentialProblemReportMessage.type.messageTypeUri;
26
+ }
27
+ }
28
+ V1CredentialProblemReportMessage.type = (0, core_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/problem-report');
29
+ __decorate([
30
+ (0, core_1.IsValidMessageType)(V1CredentialProblemReportMessage.type),
31
+ __metadata("design:type", Object)
32
+ ], V1CredentialProblemReportMessage.prototype, "type", void 0);
33
+ exports.V1CredentialProblemReportMessage = V1CredentialProblemReportMessage;
34
+ //# sourceMappingURL=V1CredentialProblemReportMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V1CredentialProblemReportMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,yCAA2F;AAI3F;;GAEG;AACH,MAAa,gCAAiC,SAAQ,2BAAoB;IAGxE;;;OAGG;IACH,YAAmB,OAAgD;QACjE,KAAK,CAAC,OAAO,CAAC,CAAA;QAPA,sBAAiB,GAAG,IAAI,CAAA;QAWxB,SAAI,GAAG,gCAAgC,CAAC,IAAI,CAAC,cAAc,CAAA;IAH3E,CAAC;;AAIsB,qCAAI,GAAG,IAAA,uBAAgB,EAAC,yDAAyD,CAAC,CAAA;AAFzG;IAAC,IAAA,yBAAkB,EAAC,gCAAgC,CAAC,IAAI,CAAC;;8DACiB;AAZ7E,4EAcC"}
@@ -0,0 +1,19 @@
1
+ import type { AnonCredsCredential } from '../../../../models';
2
+ import { Attachment, AgentMessage } from '@credo-ts/core';
3
+ export declare const INDY_CREDENTIAL_ATTACHMENT_ID = "libindy-cred-0";
4
+ export interface V1IssueCredentialMessageOptions {
5
+ id?: string;
6
+ comment?: string;
7
+ credentialAttachments: Attachment[];
8
+ attachments?: Attachment[];
9
+ }
10
+ export declare class V1IssueCredentialMessage extends AgentMessage {
11
+ readonly allowDidSovPrefix = true;
12
+ constructor(options: V1IssueCredentialMessageOptions);
13
+ readonly type: string;
14
+ static readonly type: import("@credo-ts/core/build/utils/messageType").ParsedMessageType;
15
+ comment?: string;
16
+ credentialAttachments: Attachment[];
17
+ get indyCredential(): AnonCredsCredential | null;
18
+ getCredentialAttachmentById(id: string): Attachment | undefined;
19
+ }
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.V1IssueCredentialMessage = exports.INDY_CREDENTIAL_ATTACHMENT_ID = void 0;
13
+ const core_1 = require("@credo-ts/core");
14
+ const class_transformer_1 = require("class-transformer");
15
+ const class_validator_1 = require("class-validator");
16
+ exports.INDY_CREDENTIAL_ATTACHMENT_ID = 'libindy-cred-0';
17
+ class V1IssueCredentialMessage extends core_1.AgentMessage {
18
+ constructor(options) {
19
+ var _a;
20
+ super();
21
+ this.allowDidSovPrefix = true;
22
+ this.type = V1IssueCredentialMessage.type.messageTypeUri;
23
+ if (options) {
24
+ this.id = (_a = options.id) !== null && _a !== void 0 ? _a : this.generateId();
25
+ this.comment = options.comment;
26
+ this.credentialAttachments = options.credentialAttachments;
27
+ this.appendedAttachments = options.attachments;
28
+ }
29
+ }
30
+ get indyCredential() {
31
+ var _a;
32
+ const attachment = this.credentialAttachments.find((attachment) => attachment.id === exports.INDY_CREDENTIAL_ATTACHMENT_ID);
33
+ // Extract credential from attachment
34
+ const credentialJson = (_a = attachment === null || attachment === void 0 ? void 0 : attachment.getDataAsJson()) !== null && _a !== void 0 ? _a : null;
35
+ return credentialJson;
36
+ }
37
+ getCredentialAttachmentById(id) {
38
+ return this.credentialAttachments.find((attachment) => attachment.id === id);
39
+ }
40
+ }
41
+ V1IssueCredentialMessage.type = (0, core_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/issue-credential');
42
+ __decorate([
43
+ (0, core_1.IsValidMessageType)(V1IssueCredentialMessage.type),
44
+ __metadata("design:type", Object)
45
+ ], V1IssueCredentialMessage.prototype, "type", void 0);
46
+ __decorate([
47
+ (0, class_validator_1.IsString)(),
48
+ (0, class_validator_1.IsOptional)(),
49
+ __metadata("design:type", String)
50
+ ], V1IssueCredentialMessage.prototype, "comment", void 0);
51
+ __decorate([
52
+ (0, class_transformer_1.Expose)({ name: 'credentials~attach' }),
53
+ (0, class_transformer_1.Type)(() => core_1.Attachment),
54
+ (0, class_validator_1.IsArray)(),
55
+ (0, class_validator_1.ValidateNested)({
56
+ each: true,
57
+ }),
58
+ (0, class_validator_1.IsInstance)(core_1.Attachment, { each: true }),
59
+ __metadata("design:type", Array)
60
+ ], V1IssueCredentialMessage.prototype, "credentialAttachments", void 0);
61
+ exports.V1IssueCredentialMessage = V1IssueCredentialMessage;
62
+ //# sourceMappingURL=V1IssueCredentialMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V1IssueCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1IssueCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,yCAA+F;AAC/F,yDAAgD;AAChD,qDAA2F;AAE9E,QAAA,6BAA6B,GAAG,gBAAgB,CAAA;AAS7D,MAAa,wBAAyB,SAAQ,mBAAY;IAGxD,YAAmB,OAAwC;;QACzD,KAAK,EAAE,CAAA;QAHO,sBAAiB,GAAG,IAAI,CAAA;QAcxB,SAAI,GAAG,wBAAwB,CAAC,IAAI,CAAC,cAAc,CAAA;QATjE,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,EAAE,GAAG,MAAA,OAAO,CAAC,EAAE,mCAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAA;YAC1D,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAA;SAC/C;IACH,CAAC;IAmBD,IAAW,cAAc;;QACvB,MAAM,UAAU,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,qCAA6B,CAAC,CAAA;QAEnH,qCAAqC;QACrC,MAAM,cAAc,GAAG,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,aAAa,EAAuB,mCAAI,IAAI,CAAA;QAE/E,OAAO,cAAc,CAAA;IACvB,CAAC;IAEM,2BAA2B,CAAC,EAAU;QAC3C,OAAO,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;IAC9E,CAAC;;AA1BsB,6BAAI,GAAG,IAAA,uBAAgB,EAAC,2DAA2D,CAAC,CAAA;AAF3G;IAAC,IAAA,yBAAkB,EAAC,wBAAwB,CAAC,IAAI,CAAC;;sDACiB;AAGnE;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACU;AAEvB;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC;IACtC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iBAAU,CAAC;IACtB,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC;QACd,IAAI,EAAE,IAAI;KACX,CAAC;IACD,IAAA,4BAAU,EAAC,iBAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;uEACI;AA7B7C,4DA2CC"}
@@ -0,0 +1,27 @@
1
+ import type { AnonCredsCredentialOffer } from '../../../../models';
2
+ import { Attachment, AgentMessage } from '@credo-ts/core';
3
+ import { V1CredentialPreview } from './V1CredentialPreview';
4
+ export declare const INDY_CREDENTIAL_OFFER_ATTACHMENT_ID = "libindy-cred-offer-0";
5
+ export interface V1OfferCredentialMessageOptions {
6
+ id?: string;
7
+ comment?: string;
8
+ offerAttachments: Attachment[];
9
+ credentialPreview: V1CredentialPreview;
10
+ attachments?: Attachment[];
11
+ }
12
+ /**
13
+ * Message part of Issue Credential Protocol used to continue or initiate credential exchange by issuer.
14
+ *
15
+ * @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential/README.md#offer-credential
16
+ */
17
+ export declare class V1OfferCredentialMessage extends AgentMessage {
18
+ readonly allowDidSovPrefix = true;
19
+ constructor(options: V1OfferCredentialMessageOptions);
20
+ readonly type: string;
21
+ static readonly type: import("@credo-ts/core/build/utils/messageType").ParsedMessageType;
22
+ comment?: string;
23
+ credentialPreview: V1CredentialPreview;
24
+ offerAttachments: Attachment[];
25
+ get indyCredentialOffer(): AnonCredsCredentialOffer | null;
26
+ getOfferAttachmentById(id: string): Attachment | undefined;
27
+ }
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.V1OfferCredentialMessage = exports.INDY_CREDENTIAL_OFFER_ATTACHMENT_ID = void 0;
13
+ const core_1 = require("@credo-ts/core");
14
+ const class_transformer_1 = require("class-transformer");
15
+ const class_validator_1 = require("class-validator");
16
+ const V1CredentialPreview_1 = require("./V1CredentialPreview");
17
+ exports.INDY_CREDENTIAL_OFFER_ATTACHMENT_ID = 'libindy-cred-offer-0';
18
+ /**
19
+ * Message part of Issue Credential Protocol used to continue or initiate credential exchange by issuer.
20
+ *
21
+ * @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential/README.md#offer-credential
22
+ */
23
+ class V1OfferCredentialMessage extends core_1.AgentMessage {
24
+ constructor(options) {
25
+ super();
26
+ this.allowDidSovPrefix = true;
27
+ this.type = V1OfferCredentialMessage.type.messageTypeUri;
28
+ if (options) {
29
+ this.id = options.id || this.generateId();
30
+ this.comment = options.comment;
31
+ this.credentialPreview = options.credentialPreview;
32
+ this.offerAttachments = options.offerAttachments;
33
+ this.appendedAttachments = options.attachments;
34
+ }
35
+ }
36
+ get indyCredentialOffer() {
37
+ var _a;
38
+ const attachment = this.offerAttachments.find((attachment) => attachment.id === exports.INDY_CREDENTIAL_OFFER_ATTACHMENT_ID);
39
+ // Extract credential offer from attachment
40
+ const credentialOfferJson = (_a = attachment === null || attachment === void 0 ? void 0 : attachment.getDataAsJson()) !== null && _a !== void 0 ? _a : null;
41
+ return credentialOfferJson;
42
+ }
43
+ getOfferAttachmentById(id) {
44
+ return this.offerAttachments.find((attachment) => attachment.id === id);
45
+ }
46
+ }
47
+ V1OfferCredentialMessage.type = (0, core_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/offer-credential');
48
+ __decorate([
49
+ (0, core_1.IsValidMessageType)(V1OfferCredentialMessage.type),
50
+ __metadata("design:type", Object)
51
+ ], V1OfferCredentialMessage.prototype, "type", void 0);
52
+ __decorate([
53
+ (0, class_validator_1.IsString)(),
54
+ (0, class_validator_1.IsOptional)(),
55
+ __metadata("design:type", String)
56
+ ], V1OfferCredentialMessage.prototype, "comment", void 0);
57
+ __decorate([
58
+ (0, class_transformer_1.Expose)({ name: 'credential_preview' }),
59
+ (0, class_transformer_1.Type)(() => V1CredentialPreview_1.V1CredentialPreview),
60
+ (0, class_validator_1.ValidateNested)(),
61
+ (0, class_validator_1.IsInstance)(V1CredentialPreview_1.V1CredentialPreview),
62
+ __metadata("design:type", V1CredentialPreview_1.V1CredentialPreview)
63
+ ], V1OfferCredentialMessage.prototype, "credentialPreview", void 0);
64
+ __decorate([
65
+ (0, class_transformer_1.Expose)({ name: 'offers~attach' }),
66
+ (0, class_transformer_1.Type)(() => core_1.Attachment),
67
+ (0, class_validator_1.IsArray)(),
68
+ (0, class_validator_1.ValidateNested)({
69
+ each: true,
70
+ }),
71
+ (0, class_validator_1.IsInstance)(core_1.Attachment, { each: true }),
72
+ __metadata("design:type", Array)
73
+ ], V1OfferCredentialMessage.prototype, "offerAttachments", void 0);
74
+ exports.V1OfferCredentialMessage = V1OfferCredentialMessage;
75
+ //# sourceMappingURL=V1OfferCredentialMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V1OfferCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1OfferCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,yCAA+F;AAC/F,yDAAgD;AAChD,qDAA2F;AAE3F,+DAA2D;AAE9C,QAAA,mCAAmC,GAAG,sBAAsB,CAAA;AAUzE;;;;GAIG;AACH,MAAa,wBAAyB,SAAQ,mBAAY;IAGxD,YAAmB,OAAwC;QACzD,KAAK,EAAE,CAAA;QAHO,sBAAiB,GAAG,IAAI,CAAA;QAexB,SAAI,GAAG,wBAAwB,CAAC,IAAI,CAAC,cAAc,CAAA;QAVjE,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAA;YAClD,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAA;YAChD,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAA;SAC/C;IACH,CAAC;IAyBD,IAAW,mBAAmB;;QAC5B,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,2CAAmC,CAAC,CAAA;QAEpH,2CAA2C;QAC3C,MAAM,mBAAmB,GAAG,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,aAAa,EAA4B,mCAAI,IAAI,CAAA;QAEzF,OAAO,mBAAmB,CAAA;IAC5B,CAAC;IAEM,sBAAsB,CAAC,EAAU;QACtC,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;IACzE,CAAC;;AAhCsB,6BAAI,GAAG,IAAA,uBAAgB,EAAC,2DAA2D,CAAC,CAAA;AAF3G;IAAC,IAAA,yBAAkB,EAAC,wBAAwB,CAAC,IAAI,CAAC;;sDACiB;AAGnE;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACU;AAEvB;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC;IACtC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,yCAAmB,CAAC;IAC/B,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,EAAC,yCAAmB,CAAC;8BACL,yCAAmB;mEAAA;AAE9C;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;IACjC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iBAAU,CAAC;IACtB,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC;QACd,IAAI,EAAE,IAAI;KACX,CAAC;IACD,IAAA,4BAAU,EAAC,iBAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;kEACD;AApCxC,4DAkDC"}
@@ -0,0 +1,59 @@
1
+ import type { Attachment } from '@credo-ts/core';
2
+ import { AgentMessage } from '@credo-ts/core';
3
+ import { V1CredentialPreview } from './V1CredentialPreview';
4
+ export interface V1ProposeCredentialMessageOptions {
5
+ id?: string;
6
+ comment?: string;
7
+ credentialPreview?: V1CredentialPreview;
8
+ schemaIssuerDid?: string;
9
+ schemaId?: string;
10
+ schemaName?: string;
11
+ schemaVersion?: string;
12
+ credentialDefinitionId?: string;
13
+ issuerDid?: string;
14
+ attachments?: Attachment[];
15
+ }
16
+ /**
17
+ * Message part of Issue Credential Protocol used to initiate credential exchange by prover.
18
+ *
19
+ * @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential/README.md#propose-credential
20
+ */
21
+ export declare class V1ProposeCredentialMessage extends AgentMessage {
22
+ readonly allowDidSovPrefix = true;
23
+ constructor(options: V1ProposeCredentialMessageOptions);
24
+ readonly type: string;
25
+ static readonly type: import("@credo-ts/core/build/utils/messageType").ParsedMessageType;
26
+ /**
27
+ * Human readable information about this Credential Proposal,
28
+ * so the proposal can be evaluated by human judgment.
29
+ */
30
+ comment?: string;
31
+ /**
32
+ * Represents the credential data that Prover wants to receive.
33
+ */
34
+ credentialPreview?: V1CredentialPreview;
35
+ /**
36
+ * Filter to request credential based on a particular Schema issuer DID.
37
+ */
38
+ schemaIssuerDid?: string;
39
+ /**
40
+ * Filter to request credential based on a particular Schema.
41
+ */
42
+ schemaId?: string;
43
+ /**
44
+ * Filter to request credential based on a schema name.
45
+ */
46
+ schemaName?: string;
47
+ /**
48
+ * Filter to request credential based on a schema version.
49
+ */
50
+ schemaVersion?: string;
51
+ /**
52
+ * Filter to request credential based on a particular Credential Definition.
53
+ */
54
+ credentialDefinitionId?: string;
55
+ /**
56
+ * Filter to request a credential issued by the owner of a particular DID.
57
+ */
58
+ issuerDid?: string;
59
+ }
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.V1ProposeCredentialMessage = void 0;
13
+ const core_1 = require("@credo-ts/core");
14
+ const class_transformer_1 = require("class-transformer");
15
+ const class_validator_1 = require("class-validator");
16
+ const utils_1 = require("../../../../utils");
17
+ const V1CredentialPreview_1 = require("./V1CredentialPreview");
18
+ /**
19
+ * Message part of Issue Credential Protocol used to initiate credential exchange by prover.
20
+ *
21
+ * @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential/README.md#propose-credential
22
+ */
23
+ class V1ProposeCredentialMessage extends core_1.AgentMessage {
24
+ constructor(options) {
25
+ var _a;
26
+ super();
27
+ this.allowDidSovPrefix = true;
28
+ this.type = V1ProposeCredentialMessage.type.messageTypeUri;
29
+ if (options) {
30
+ this.id = (_a = options.id) !== null && _a !== void 0 ? _a : this.generateId();
31
+ this.comment = options.comment;
32
+ this.credentialPreview = options.credentialPreview;
33
+ this.schemaIssuerDid = options.schemaIssuerDid;
34
+ this.schemaId = options.schemaId;
35
+ this.schemaName = options.schemaName;
36
+ this.schemaVersion = options.schemaVersion;
37
+ this.credentialDefinitionId = options.credentialDefinitionId;
38
+ this.issuerDid = options.issuerDid;
39
+ this.appendedAttachments = options.attachments;
40
+ }
41
+ }
42
+ }
43
+ V1ProposeCredentialMessage.type = (0, core_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/propose-credential');
44
+ __decorate([
45
+ (0, core_1.IsValidMessageType)(V1ProposeCredentialMessage.type),
46
+ __metadata("design:type", Object)
47
+ ], V1ProposeCredentialMessage.prototype, "type", void 0);
48
+ __decorate([
49
+ (0, class_validator_1.IsOptional)(),
50
+ (0, class_validator_1.IsString)(),
51
+ __metadata("design:type", String)
52
+ ], V1ProposeCredentialMessage.prototype, "comment", void 0);
53
+ __decorate([
54
+ (0, class_transformer_1.Expose)({ name: 'credential_proposal' }),
55
+ (0, class_transformer_1.Type)(() => V1CredentialPreview_1.V1CredentialPreview),
56
+ (0, class_validator_1.ValidateNested)(),
57
+ (0, class_validator_1.IsOptional)(),
58
+ (0, class_validator_1.IsInstance)(V1CredentialPreview_1.V1CredentialPreview),
59
+ __metadata("design:type", V1CredentialPreview_1.V1CredentialPreview
60
+ /**
61
+ * Filter to request credential based on a particular Schema issuer DID.
62
+ */
63
+ )
64
+ ], V1ProposeCredentialMessage.prototype, "credentialPreview", void 0);
65
+ __decorate([
66
+ (0, class_transformer_1.Expose)({ name: 'schema_issuer_did' }),
67
+ (0, class_validator_1.IsString)(),
68
+ (0, class_validator_1.IsOptional)(),
69
+ (0, class_validator_1.Matches)(utils_1.unqualifiedIndyDidRegex),
70
+ __metadata("design:type", String)
71
+ ], V1ProposeCredentialMessage.prototype, "schemaIssuerDid", void 0);
72
+ __decorate([
73
+ (0, class_transformer_1.Expose)({ name: 'schema_id' }),
74
+ (0, class_validator_1.IsString)(),
75
+ (0, class_validator_1.IsOptional)(),
76
+ (0, class_validator_1.Matches)(utils_1.unqualifiedSchemaIdRegex),
77
+ __metadata("design:type", String)
78
+ ], V1ProposeCredentialMessage.prototype, "schemaId", void 0);
79
+ __decorate([
80
+ (0, class_transformer_1.Expose)({ name: 'schema_name' }),
81
+ (0, class_validator_1.IsString)(),
82
+ (0, class_validator_1.IsOptional)(),
83
+ __metadata("design:type", String)
84
+ ], V1ProposeCredentialMessage.prototype, "schemaName", void 0);
85
+ __decorate([
86
+ (0, class_transformer_1.Expose)({ name: 'schema_version' }),
87
+ (0, class_validator_1.IsString)(),
88
+ (0, class_validator_1.IsOptional)(),
89
+ (0, class_validator_1.Matches)(utils_1.unqualifiedSchemaVersionRegex, {
90
+ message: 'Version must be X.X or X.X.X',
91
+ }),
92
+ __metadata("design:type", String)
93
+ ], V1ProposeCredentialMessage.prototype, "schemaVersion", void 0);
94
+ __decorate([
95
+ (0, class_transformer_1.Expose)({ name: 'cred_def_id' }),
96
+ (0, class_validator_1.IsString)(),
97
+ (0, class_validator_1.IsOptional)(),
98
+ (0, class_validator_1.Matches)(utils_1.unqualifiedCredentialDefinitionIdRegex),
99
+ __metadata("design:type", String)
100
+ ], V1ProposeCredentialMessage.prototype, "credentialDefinitionId", void 0);
101
+ __decorate([
102
+ (0, class_transformer_1.Expose)({ name: 'issuer_did' }),
103
+ (0, class_validator_1.IsString)(),
104
+ (0, class_validator_1.IsOptional)(),
105
+ (0, class_validator_1.Matches)(utils_1.unqualifiedIndyDidRegex),
106
+ __metadata("design:type", String)
107
+ ], V1ProposeCredentialMessage.prototype, "issuerDid", void 0);
108
+ exports.V1ProposeCredentialMessage = V1ProposeCredentialMessage;
109
+ //# sourceMappingURL=V1ProposeCredentialMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V1ProposeCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1ProposeCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,yCAAmF;AACnF,yDAAgD;AAChD,qDAA2F;AAE3F,6CAK0B;AAE1B,+DAA2D;AAe3D;;;;GAIG;AACH,MAAa,0BAA2B,SAAQ,mBAAY;IAG1D,YAAmB,OAA0C;;QAC3D,KAAK,EAAE,CAAA;QAHO,sBAAiB,GAAG,IAAI,CAAA;QAoBxB,SAAI,GAAG,0BAA0B,CAAC,IAAI,CAAC,cAAc,CAAA;QAfnE,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,EAAE,GAAG,MAAA,OAAO,CAAC,EAAE,mCAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAA;YAClD,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAA;YAC9C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;YAChC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAA;YACpC,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAA;YAC1C,IAAI,CAAC,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAA;YAC5D,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAA;YAClC,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAA;SAC/C;IACH,CAAC;;AAIsB,+BAAI,GAAG,IAAA,uBAAgB,EAAC,6DAA6D,CAAC,CAAA;AAF7G;IAAC,IAAA,yBAAkB,EAAC,0BAA0B,CAAC,IAAI,CAAC;;wDACiB;AAOrE;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;2DACY;AAKvB;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;IACvC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,yCAAmB,CAAC;IAC/B,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,GAAE;IACZ,IAAA,4BAAU,EAAC,yCAAmB,CAAC;8BACL,yCAAmB;IAE9C;;OAEG;;qEAJ2C;AAK9C;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;IACrC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,+BAAuB,CAAC;;mEACF;AAK/B;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IAC7B,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,gCAAwB,CAAC;;4DACV;AAKxB;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC/B,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8DACa;AAK1B;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IAClC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,qCAA6B,EAAE;QACtC,OAAO,EAAE,8BAA8B;KACxC,CAAC;;iEAC2B;AAK7B;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC/B,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,8CAAsC,CAAC;;0EACV;AAKtC;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IAC9B,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,+BAAuB,CAAC;;6DACR;AA/F3B,gEAgGC"}
@@ -0,0 +1,19 @@
1
+ import type { LegacyIndyCredentialRequest } from '../../../../formats';
2
+ import { Attachment, AgentMessage } from '@credo-ts/core';
3
+ export declare const INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID = "libindy-cred-request-0";
4
+ export interface V1RequestCredentialMessageOptions {
5
+ id?: string;
6
+ comment?: string;
7
+ requestAttachments: Attachment[];
8
+ attachments?: Attachment[];
9
+ }
10
+ export declare class V1RequestCredentialMessage extends AgentMessage {
11
+ readonly allowDidSovPrefix = true;
12
+ constructor(options: V1RequestCredentialMessageOptions);
13
+ readonly type: string;
14
+ static readonly type: import("@credo-ts/core/build/utils/messageType").ParsedMessageType;
15
+ comment?: string;
16
+ requestAttachments: Attachment[];
17
+ get indyCredentialRequest(): LegacyIndyCredentialRequest | null;
18
+ getRequestAttachmentById(id: string): Attachment | undefined;
19
+ }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.V1RequestCredentialMessage = exports.INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID = void 0;
13
+ const core_1 = require("@credo-ts/core");
14
+ const class_transformer_1 = require("class-transformer");
15
+ const class_validator_1 = require("class-validator");
16
+ exports.INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID = 'libindy-cred-request-0';
17
+ class V1RequestCredentialMessage extends core_1.AgentMessage {
18
+ constructor(options) {
19
+ super();
20
+ this.allowDidSovPrefix = true;
21
+ this.type = V1RequestCredentialMessage.type.messageTypeUri;
22
+ if (options) {
23
+ this.id = options.id || this.generateId();
24
+ this.comment = options.comment;
25
+ this.requestAttachments = options.requestAttachments;
26
+ this.appendedAttachments = options.attachments;
27
+ }
28
+ }
29
+ get indyCredentialRequest() {
30
+ var _a;
31
+ const attachment = this.requestAttachments.find((attachment) => attachment.id === exports.INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID);
32
+ // Extract proof request from attachment
33
+ const credentialReqJson = (_a = attachment === null || attachment === void 0 ? void 0 : attachment.getDataAsJson()) !== null && _a !== void 0 ? _a : null;
34
+ return credentialReqJson;
35
+ }
36
+ getRequestAttachmentById(id) {
37
+ return this.requestAttachments.find((attachment) => attachment.id === id);
38
+ }
39
+ }
40
+ V1RequestCredentialMessage.type = (0, core_1.parseMessageType)('https://didcomm.org/issue-credential/1.0/request-credential');
41
+ __decorate([
42
+ (0, core_1.IsValidMessageType)(V1RequestCredentialMessage.type),
43
+ __metadata("design:type", Object)
44
+ ], V1RequestCredentialMessage.prototype, "type", void 0);
45
+ __decorate([
46
+ (0, class_validator_1.IsString)(),
47
+ (0, class_validator_1.IsOptional)(),
48
+ __metadata("design:type", String)
49
+ ], V1RequestCredentialMessage.prototype, "comment", void 0);
50
+ __decorate([
51
+ (0, class_transformer_1.Expose)({ name: 'requests~attach' }),
52
+ (0, class_transformer_1.Type)(() => core_1.Attachment),
53
+ (0, class_validator_1.IsArray)(),
54
+ (0, class_validator_1.ValidateNested)({
55
+ each: true,
56
+ }),
57
+ (0, class_validator_1.IsInstance)(core_1.Attachment, { each: true }),
58
+ __metadata("design:type", Array)
59
+ ], V1RequestCredentialMessage.prototype, "requestAttachments", void 0);
60
+ exports.V1RequestCredentialMessage = V1RequestCredentialMessage;
61
+ //# sourceMappingURL=V1RequestCredentialMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V1RequestCredentialMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/V1RequestCredentialMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,yCAA+F;AAC/F,yDAAgD;AAChD,qDAA2F;AAE9E,QAAA,qCAAqC,GAAG,wBAAwB,CAAA;AAS7E,MAAa,0BAA2B,SAAQ,mBAAY;IAG1D,YAAmB,OAA0C;QAC3D,KAAK,EAAE,CAAA;QAHO,sBAAiB,GAAG,IAAI,CAAA;QAcxB,SAAI,GAAG,0BAA0B,CAAC,IAAI,CAAC,cAAc,CAAA;QATnE,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAA;YACpD,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAA;SAC/C;IACH,CAAC;IAmBD,IAAW,qBAAqB;;QAC9B,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAC7C,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,6CAAqC,CACxE,CAAA;QACD,wCAAwC;QACxC,MAAM,iBAAiB,GAAG,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,aAAa,EAA+B,mCAAI,IAAI,CAAA;QAE1F,OAAO,iBAAiB,CAAA;IAC1B,CAAC;IAEM,wBAAwB,CAAC,EAAU;QACxC,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;IAC3E,CAAC;;AA3BsB,+BAAI,GAAG,IAAA,uBAAgB,EAAC,6DAA6D,CAAC,CAAA;AAF7G;IAAC,IAAA,yBAAkB,EAAC,0BAA0B,CAAC,IAAI,CAAC;;wDACiB;AAGrE;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2DACU;AAEvB;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IACnC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iBAAU,CAAC;IACtB,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC;QACd,IAAI,EAAE,IAAI;KACX,CAAC;IACD,IAAA,4BAAU,EAAC,iBAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sEACC;AA7B1C,gEA4CC"}
@@ -0,0 +1,7 @@
1
+ export * from './V1CredentialAckMessage';
2
+ export * from './V1CredentialPreview';
3
+ export * from './V1RequestCredentialMessage';
4
+ export * from './V1IssueCredentialMessage';
5
+ export * from './V1OfferCredentialMessage';
6
+ export * from './V1ProposeCredentialMessage';
7
+ export * from './V1CredentialProblemReportMessage';
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./V1CredentialAckMessage"), exports);
18
+ __exportStar(require("./V1CredentialPreview"), exports);
19
+ __exportStar(require("./V1RequestCredentialMessage"), exports);
20
+ __exportStar(require("./V1IssueCredentialMessage"), exports);
21
+ __exportStar(require("./V1OfferCredentialMessage"), exports);
22
+ __exportStar(require("./V1ProposeCredentialMessage"), exports);
23
+ __exportStar(require("./V1CredentialProblemReportMessage"), exports);
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/protocols/credentials/v1/messages/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAwC;AACxC,wDAAqC;AACrC,+DAA4C;AAC5C,6DAA0C;AAC1C,6DAA0C;AAC1C,+DAA4C;AAC5C,qEAAkD"}
@@ -0,0 +1,2 @@
1
+ export * from './credentials/v1';
2
+ export * from './proofs/v1';