@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,2 @@
1
+ import type { CredentialPreviewAttributeOptions } from '@credo-ts/core';
2
+ export declare function areCredentialPreviewAttributesEqual(firstAttributes: CredentialPreviewAttributeOptions[], secondAttributes: CredentialPreviewAttributeOptions[]): boolean;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.areCredentialPreviewAttributesEqual = void 0;
4
+ function areCredentialPreviewAttributesEqual(firstAttributes, secondAttributes) {
5
+ if (firstAttributes.length !== secondAttributes.length)
6
+ return false;
7
+ const secondAttributeMap = secondAttributes.reduce((attributeMap, attribute) => (Object.assign(Object.assign({}, attributeMap), { [attribute.name]: attribute })), {});
8
+ // check if no duplicate keys exist
9
+ if (new Set(firstAttributes.map((attribute) => attribute.name)).size !== firstAttributes.length)
10
+ return false;
11
+ if (new Set(secondAttributes.map((attribute) => attribute.name)).size !== secondAttributes.length)
12
+ return false;
13
+ for (const firstAttribute of firstAttributes) {
14
+ const secondAttribute = secondAttributeMap[firstAttribute.name];
15
+ if (!secondAttribute)
16
+ return false;
17
+ if (firstAttribute.value !== secondAttribute.value)
18
+ return false;
19
+ if (firstAttribute.mimeType !== secondAttribute.mimeType)
20
+ return false;
21
+ }
22
+ return true;
23
+ }
24
+ exports.areCredentialPreviewAttributesEqual = areCredentialPreviewAttributesEqual;
25
+ //# sourceMappingURL=credentialPreviewAttributes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentialPreviewAttributes.js","sourceRoot":"","sources":["../../src/utils/credentialPreviewAttributes.ts"],"names":[],"mappings":";;;AAEA,SAAgB,mCAAmC,CACjD,eAAoD,EACpD,gBAAqD;IAErD,IAAI,eAAe,CAAC,MAAM,KAAK,gBAAgB,CAAC,MAAM;QAAE,OAAO,KAAK,CAAA;IAEpE,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,MAAM,CAChD,CAAC,YAAY,EAAE,SAAS,EAAE,EAAE,CAAC,iCAAM,YAAY,KAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,SAAS,IAAG,EAC/E,EAAE,CACH,CAAA;IAED,mCAAmC;IACnC,IAAI,IAAI,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,eAAe,CAAC,MAAM;QAAE,OAAO,KAAK,CAAA;IAC7G,IAAI,IAAI,GAAG,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,gBAAgB,CAAC,MAAM;QAAE,OAAO,KAAK,CAAA;IAE/G,KAAK,MAAM,cAAc,IAAI,eAAe,EAAE;QAC5C,MAAM,eAAe,GAAG,kBAAkB,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;QAE/D,IAAI,CAAC,eAAe;YAAE,OAAO,KAAK,CAAA;QAClC,IAAI,cAAc,CAAC,KAAK,KAAK,eAAe,CAAC,KAAK;YAAE,OAAO,KAAK,CAAA;QAChE,IAAI,cAAc,CAAC,QAAQ,KAAK,eAAe,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAA;KACvE;IAED,OAAO,IAAI,CAAA;AACb,CAAC;AAxBD,kFAwBC"}
@@ -0,0 +1,14 @@
1
+ import type { AnonCredsProof, AnonCredsProofRequest, AnonCredsSelectedCredentials } from '../models';
2
+ import type { AgentContext } from '@credo-ts/core';
3
+ export declare function getRevocationRegistriesForRequest(agentContext: AgentContext, proofRequest: AnonCredsProofRequest, selectedCredentials: AnonCredsSelectedCredentials): Promise<{
4
+ revocationRegistries: import("../models/utils").AnonCredsRevocationRegistries;
5
+ updatedSelectedCredentials: AnonCredsSelectedCredentials;
6
+ }>;
7
+ export declare function getRevocationRegistriesForProof(agentContext: AgentContext, proof: AnonCredsProof): Promise<{
8
+ [revocationRegistryDefinitionId: string]: {
9
+ definition: import("../models").AnonCredsRevocationRegistryDefinition;
10
+ revocationStatusLists: {
11
+ [timestamp: number]: import("../models").AnonCredsRevocationStatusList;
12
+ };
13
+ };
14
+ }>;
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRevocationRegistriesForProof = exports.getRevocationRegistriesForRequest = void 0;
4
+ const core_1 = require("@credo-ts/core");
5
+ const AnonCredsModuleConfig_1 = require("../AnonCredsModuleConfig");
6
+ const services_1 = require("../services");
7
+ const revocationInterval_1 = require("./revocationInterval");
8
+ async function getRevocationRegistriesForRequest(agentContext, proofRequest, selectedCredentials) {
9
+ var _a, _b;
10
+ const revocationRegistries = {};
11
+ // NOTE: we don't want to mutate this object, when modifying we need to always deeply clone objects firsts.
12
+ let updatedSelectedCredentials = selectedCredentials;
13
+ try {
14
+ agentContext.config.logger.debug(`Retrieving revocation registries for proof request`, {
15
+ proofRequest,
16
+ selectedCredentials,
17
+ });
18
+ const referentCredentials = [];
19
+ // Retrieve information for referents and push to single array
20
+ for (const [referent, selectedCredential] of Object.entries(selectedCredentials.attributes)) {
21
+ referentCredentials.push({
22
+ type: 'attributes',
23
+ referent,
24
+ selectedCredential,
25
+ nonRevoked: (_a = proofRequest.requested_attributes[referent].non_revoked) !== null && _a !== void 0 ? _a : proofRequest.non_revoked,
26
+ });
27
+ }
28
+ for (const [referent, selectedCredential] of Object.entries(selectedCredentials.predicates)) {
29
+ referentCredentials.push({
30
+ type: 'predicates',
31
+ referent,
32
+ selectedCredential,
33
+ nonRevoked: (_b = proofRequest.requested_predicates[referent].non_revoked) !== null && _b !== void 0 ? _b : proofRequest.non_revoked,
34
+ });
35
+ }
36
+ const revocationRegistryPromises = [];
37
+ for (const { referent, selectedCredential, nonRevoked, type } of referentCredentials) {
38
+ if (!selectedCredential.credentialInfo) {
39
+ throw new core_1.CredoError(`Credential for referent '${referent} does not have credential info for revocation state creation`);
40
+ }
41
+ // Prefer referent-specific revocation interval over global revocation interval
42
+ const credentialRevocationId = selectedCredential.credentialInfo.credentialRevocationId;
43
+ const revocationRegistryId = selectedCredential.credentialInfo.revocationRegistryId;
44
+ const timestamp = selectedCredential.timestamp;
45
+ // If revocation interval is present and the credential is revocable then create revocation state
46
+ if (nonRevoked && credentialRevocationId && revocationRegistryId) {
47
+ agentContext.config.logger.trace(`Presentation is requesting proof of non revocation for referent '${referent}', creating revocation state for credential`, {
48
+ nonRevoked,
49
+ credentialRevocationId,
50
+ revocationRegistryId,
51
+ timestamp,
52
+ });
53
+ // Make sure the revocation interval follows best practices from Aries RFC 0441
54
+ (0, revocationInterval_1.assertBestPracticeRevocationInterval)(nonRevoked);
55
+ const registry = agentContext.dependencyManager
56
+ .resolve(services_1.AnonCredsRegistryService)
57
+ .getRegistryForIdentifier(agentContext, revocationRegistryId);
58
+ const getRevocationRegistry = async () => {
59
+ // Fetch revocation registry definition if not in revocation registries list yet
60
+ if (!revocationRegistries[revocationRegistryId]) {
61
+ const { revocationRegistryDefinition, resolutionMetadata } = await registry.getRevocationRegistryDefinition(agentContext, revocationRegistryId);
62
+ if (!revocationRegistryDefinition) {
63
+ throw new core_1.CredoError(`Could not retrieve revocation registry definition for revocation registry ${revocationRegistryId}: ${resolutionMetadata.message}`);
64
+ }
65
+ const tailsFileService = agentContext.dependencyManager.resolve(AnonCredsModuleConfig_1.AnonCredsModuleConfig).tailsFileService;
66
+ const { tailsFilePath } = await tailsFileService.getTailsFile(agentContext, {
67
+ revocationRegistryDefinition,
68
+ });
69
+ // const tails = await this.indyUtilitiesService.downloadTails(tailsHash, tailsLocation)
70
+ revocationRegistries[revocationRegistryId] = {
71
+ definition: revocationRegistryDefinition,
72
+ tailsFilePath,
73
+ revocationStatusLists: {},
74
+ };
75
+ }
76
+ // In most cases we will have a timestamp, but if it's not defined, we use the nonRevoked.to value
77
+ const timestampToFetch = timestamp !== null && timestamp !== void 0 ? timestamp : nonRevoked.to;
78
+ // Fetch revocation status list if we don't already have a revocation status list for the given timestamp
79
+ if (!revocationRegistries[revocationRegistryId].revocationStatusLists[timestampToFetch]) {
80
+ const { revocationStatusList, resolutionMetadata: statusListResolutionMetadata } = await registry.getRevocationStatusList(agentContext, revocationRegistryId, timestampToFetch);
81
+ if (!revocationStatusList) {
82
+ throw new core_1.CredoError(`Could not retrieve revocation status list for revocation registry ${revocationRegistryId}: ${statusListResolutionMetadata.message}`);
83
+ }
84
+ revocationRegistries[revocationRegistryId].revocationStatusLists[revocationStatusList.timestamp] =
85
+ revocationStatusList;
86
+ // If we don't have a timestamp on the selected credential, we set it to the timestamp of the revocation status list
87
+ // this way we know which revocation status list to use when creating the proof.
88
+ if (!timestamp) {
89
+ updatedSelectedCredentials = Object.assign(Object.assign({}, updatedSelectedCredentials), { [type]: Object.assign(Object.assign({}, updatedSelectedCredentials[type]), { [referent]: Object.assign(Object.assign({}, updatedSelectedCredentials[type][referent]), { timestamp: revocationStatusList.timestamp }) }) });
90
+ }
91
+ }
92
+ };
93
+ revocationRegistryPromises.push(getRevocationRegistry());
94
+ }
95
+ }
96
+ // await all revocation registry statuses asynchronously
97
+ await Promise.all(revocationRegistryPromises);
98
+ agentContext.config.logger.debug(`Retrieved revocation registries for proof request`, {
99
+ revocationRegistries,
100
+ });
101
+ return { revocationRegistries, updatedSelectedCredentials };
102
+ }
103
+ catch (error) {
104
+ agentContext.config.logger.error(`Error retrieving revocation registry for proof request`, {
105
+ error,
106
+ proofRequest,
107
+ selectedCredentials,
108
+ });
109
+ throw error;
110
+ }
111
+ }
112
+ exports.getRevocationRegistriesForRequest = getRevocationRegistriesForRequest;
113
+ async function getRevocationRegistriesForProof(agentContext, proof) {
114
+ const revocationRegistries = {};
115
+ const revocationRegistryPromises = [];
116
+ for (const identifier of proof.identifiers) {
117
+ const revocationRegistryId = identifier.rev_reg_id;
118
+ const timestamp = identifier.timestamp;
119
+ // Skip if no revocation registry id is present
120
+ if (!revocationRegistryId || !timestamp)
121
+ continue;
122
+ const registry = agentContext.dependencyManager
123
+ .resolve(services_1.AnonCredsRegistryService)
124
+ .getRegistryForIdentifier(agentContext, revocationRegistryId);
125
+ const getRevocationRegistry = async () => {
126
+ // Fetch revocation registry definition if not already fetched
127
+ if (!revocationRegistries[revocationRegistryId]) {
128
+ const { revocationRegistryDefinition, resolutionMetadata } = await registry.getRevocationRegistryDefinition(agentContext, revocationRegistryId);
129
+ if (!revocationRegistryDefinition) {
130
+ throw new core_1.CredoError(`Could not retrieve revocation registry definition for revocation registry ${revocationRegistryId}: ${resolutionMetadata.message}`);
131
+ }
132
+ revocationRegistries[revocationRegistryId] = {
133
+ definition: revocationRegistryDefinition,
134
+ revocationStatusLists: {},
135
+ };
136
+ }
137
+ // Fetch revocation status list by timestamp if not already fetched
138
+ if (!revocationRegistries[revocationRegistryId].revocationStatusLists[timestamp]) {
139
+ const { revocationStatusList, resolutionMetadata: statusListResolutionMetadata } = await registry.getRevocationStatusList(agentContext, revocationRegistryId, timestamp);
140
+ if (!revocationStatusList) {
141
+ throw new core_1.CredoError(`Could not retrieve revocation status list for revocation registry ${revocationRegistryId}: ${statusListResolutionMetadata.message}`);
142
+ }
143
+ revocationRegistries[revocationRegistryId].revocationStatusLists[timestamp] = revocationStatusList;
144
+ }
145
+ };
146
+ revocationRegistryPromises.push(getRevocationRegistry());
147
+ }
148
+ await Promise.all(revocationRegistryPromises);
149
+ return revocationRegistries;
150
+ }
151
+ exports.getRevocationRegistriesForProof = getRevocationRegistriesForProof;
152
+ //# sourceMappingURL=getRevocationRegistries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRevocationRegistries.js","sourceRoot":"","sources":["../../src/utils/getRevocationRegistries.ts"],"names":[],"mappings":";;;AAIA,yCAA2C;AAE3C,oEAAgE;AAChE,0CAAsD;AAEtD,6DAA2E;AAEpE,KAAK,UAAU,iCAAiC,CACrD,YAA0B,EAC1B,YAAmC,EACnC,mBAAiD;;IAEjD,MAAM,oBAAoB,GAA+C,EAAE,CAAA;IAE3E,2GAA2G;IAC3G,IAAI,0BAA0B,GAAG,mBAAmB,CAAA;IAEpD,IAAI;QACF,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,oDAAoD,EAAE;YACrF,YAAY;YACZ,mBAAmB;SACpB,CAAC,CAAA;QAEF,MAAM,mBAAmB,GAAG,EAAE,CAAA;QAE9B,8DAA8D;QAC9D,KAAK,MAAM,CAAC,QAAQ,EAAE,kBAAkB,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,UAAU,CAAC,EAAE;YAC3F,mBAAmB,CAAC,IAAI,CAAC;gBACvB,IAAI,EAAE,YAAqB;gBAC3B,QAAQ;gBACR,kBAAkB;gBAClB,UAAU,EAAE,MAAA,YAAY,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC,WAAW,mCAAI,YAAY,CAAC,WAAW;aAChG,CAAC,CAAA;S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C,0BAA0B,CAAC,CAAA;IAC7C,OAAO,oBAAoB,CAAA;AAC7B,CAAC;AApDD,0EAoDC"}
@@ -0,0 +1,2 @@
1
+ import type { AnonCredsProofRequest } from '../models';
2
+ export declare function assertNoDuplicateGroupsNamesInProofRequest(proofRequest: AnonCredsProofRequest): void;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assertNoDuplicateGroupsNamesInProofRequest = void 0;
4
+ const core_1 = require("@credo-ts/core");
5
+ function attributeNamesToArray(proofRequest) {
6
+ // Attributes can contain either a `name` string value or an `names` string array. We reduce it to a single array
7
+ // containing all attribute names from the requested attributes.
8
+ return Object.values(proofRequest.requested_attributes).reduce((names, a) => [...names, ...(a.name ? [a.name] : a.names ? a.names : [])], []);
9
+ }
10
+ function predicateNamesToArray(proofRequest) {
11
+ return Array.from(new Set(Object.values(proofRequest.requested_predicates).map((a) => a.name)));
12
+ }
13
+ // TODO: This is still not ideal. The requested groups can specify different credentials using restrictions.
14
+ function assertNoDuplicateGroupsNamesInProofRequest(proofRequest) {
15
+ const attributes = attributeNamesToArray(proofRequest);
16
+ const predicates = predicateNamesToArray(proofRequest);
17
+ const duplicates = predicates.filter((item) => attributes.indexOf(item) !== -1);
18
+ if (duplicates.length > 0) {
19
+ throw new core_1.CredoError(`The proof request contains duplicate predicates and attributes: ${duplicates.toString()}`);
20
+ }
21
+ }
22
+ exports.assertNoDuplicateGroupsNamesInProofRequest = assertNoDuplicateGroupsNamesInProofRequest;
23
+ //# sourceMappingURL=hasDuplicateGroupNames.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hasDuplicateGroupNames.js","sourceRoot":"","sources":["../../src/utils/hasDuplicateGroupNames.ts"],"names":[],"mappings":";;;AAEA,yCAA2C;AAE3C,SAAS,qBAAqB,CAAC,YAAmC;IAChE,iHAAiH;IACjH,gEAAgE;IAChE,OAAO,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAC5D,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EACzE,EAAE,CACH,CAAA;AACH,CAAC;AAED,SAAS,qBAAqB,CAAC,YAAmC;IAChE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjG,CAAC;AAED,4GAA4G;AAC5G,SAAgB,0CAA0C,CAAC,YAAmC;IAC5F,MAAM,UAAU,GAAG,qBAAqB,CAAC,YAAY,CAAC,CAAA;IACtD,MAAM,UAAU,GAAG,qBAAqB,CAAC,YAAY,CAAC,CAAA;IAEtD,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAC/E,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;QACzB,MAAM,IAAI,iBAAU,CAAC,mEAAmE,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;KACjH;AACH,CAAC;AARD,gGAQC"}
@@ -0,0 +1,16 @@
1
+ export { createRequestFromPreview } from './createRequestFromPreview';
2
+ export { sortRequestedCredentialsMatches } from './sortRequestedCredentialsMatches';
3
+ export { assertNoDuplicateGroupsNamesInProofRequest } from './hasDuplicateGroupNames';
4
+ export { areAnonCredsProofRequestsEqual } from './areRequestsEqual';
5
+ export { assertBestPracticeRevocationInterval } from './revocationInterval';
6
+ export { getRevocationRegistriesForRequest, getRevocationRegistriesForProof } from './getRevocationRegistries';
7
+ export { checkValidCredentialValueEncoding, AnonCredsCredentialValue } from './credential';
8
+ export { IsMap } from './isMap';
9
+ export { composeCredentialAutoAccept, composeProofAutoAccept } from './composeAutoAccept';
10
+ export { areCredentialPreviewAttributesEqual } from './credentialPreviewAttributes';
11
+ export { dateToTimestamp } from './timestamp';
12
+ export { storeLinkSecret } from './linkSecret';
13
+ export { unqualifiedCredentialDefinitionIdRegex, unqualifiedIndyDidRegex, unqualifiedSchemaIdRegex, unqualifiedSchemaVersionRegex, } from './indyIdentifiers';
14
+ export { fetchCredentialDefinition, fetchRevocationRegistryDefinition, fetchSchema, fetchRevocationStatusList, } from './anonCredsObjects';
15
+ export { AnonCredsCredentialMetadataKey, AnonCredsCredentialRequestMetadataKey, W3cAnonCredsCredentialMetadataKey, AnonCredsCredentialMetadata, AnonCredsCredentialRequestMetadata, W3cAnonCredsCredentialMetadata, } from './metadata';
16
+ export { getW3cRecordAnonCredsTags } from './w3cAnonCredsUtils';
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getW3cRecordAnonCredsTags = exports.W3cAnonCredsCredentialMetadataKey = exports.AnonCredsCredentialRequestMetadataKey = exports.AnonCredsCredentialMetadataKey = exports.fetchRevocationStatusList = exports.fetchSchema = exports.fetchRevocationRegistryDefinition = exports.fetchCredentialDefinition = exports.unqualifiedSchemaVersionRegex = exports.unqualifiedSchemaIdRegex = exports.unqualifiedIndyDidRegex = exports.unqualifiedCredentialDefinitionIdRegex = exports.storeLinkSecret = exports.dateToTimestamp = exports.areCredentialPreviewAttributesEqual = exports.composeProofAutoAccept = exports.composeCredentialAutoAccept = exports.IsMap = exports.checkValidCredentialValueEncoding = exports.getRevocationRegistriesForProof = exports.getRevocationRegistriesForRequest = exports.assertBestPracticeRevocationInterval = exports.areAnonCredsProofRequestsEqual = exports.assertNoDuplicateGroupsNamesInProofRequest = exports.sortRequestedCredentialsMatches = exports.createRequestFromPreview = void 0;
4
+ var createRequestFromPreview_1 = require("./createRequestFromPreview");
5
+ Object.defineProperty(exports, "createRequestFromPreview", { enumerable: true, get: function () { return createRequestFromPreview_1.createRequestFromPreview; } });
6
+ var sortRequestedCredentialsMatches_1 = require("./sortRequestedCredentialsMatches");
7
+ Object.defineProperty(exports, "sortRequestedCredentialsMatches", { enumerable: true, get: function () { return sortRequestedCredentialsMatches_1.sortRequestedCredentialsMatches; } });
8
+ var hasDuplicateGroupNames_1 = require("./hasDuplicateGroupNames");
9
+ Object.defineProperty(exports, "assertNoDuplicateGroupsNamesInProofRequest", { enumerable: true, get: function () { return hasDuplicateGroupNames_1.assertNoDuplicateGroupsNamesInProofRequest; } });
10
+ var areRequestsEqual_1 = require("./areRequestsEqual");
11
+ Object.defineProperty(exports, "areAnonCredsProofRequestsEqual", { enumerable: true, get: function () { return areRequestsEqual_1.areAnonCredsProofRequestsEqual; } });
12
+ var revocationInterval_1 = require("./revocationInterval");
13
+ Object.defineProperty(exports, "assertBestPracticeRevocationInterval", { enumerable: true, get: function () { return revocationInterval_1.assertBestPracticeRevocationInterval; } });
14
+ var getRevocationRegistries_1 = require("./getRevocationRegistries");
15
+ Object.defineProperty(exports, "getRevocationRegistriesForRequest", { enumerable: true, get: function () { return getRevocationRegistries_1.getRevocationRegistriesForRequest; } });
16
+ Object.defineProperty(exports, "getRevocationRegistriesForProof", { enumerable: true, get: function () { return getRevocationRegistries_1.getRevocationRegistriesForProof; } });
17
+ var credential_1 = require("./credential");
18
+ Object.defineProperty(exports, "checkValidCredentialValueEncoding", { enumerable: true, get: function () { return credential_1.checkValidCredentialValueEncoding; } });
19
+ var isMap_1 = require("./isMap");
20
+ Object.defineProperty(exports, "IsMap", { enumerable: true, get: function () { return isMap_1.IsMap; } });
21
+ var composeAutoAccept_1 = require("./composeAutoAccept");
22
+ Object.defineProperty(exports, "composeCredentialAutoAccept", { enumerable: true, get: function () { return composeAutoAccept_1.composeCredentialAutoAccept; } });
23
+ Object.defineProperty(exports, "composeProofAutoAccept", { enumerable: true, get: function () { return composeAutoAccept_1.composeProofAutoAccept; } });
24
+ var credentialPreviewAttributes_1 = require("./credentialPreviewAttributes");
25
+ Object.defineProperty(exports, "areCredentialPreviewAttributesEqual", { enumerable: true, get: function () { return credentialPreviewAttributes_1.areCredentialPreviewAttributesEqual; } });
26
+ var timestamp_1 = require("./timestamp");
27
+ Object.defineProperty(exports, "dateToTimestamp", { enumerable: true, get: function () { return timestamp_1.dateToTimestamp; } });
28
+ var linkSecret_1 = require("./linkSecret");
29
+ Object.defineProperty(exports, "storeLinkSecret", { enumerable: true, get: function () { return linkSecret_1.storeLinkSecret; } });
30
+ var indyIdentifiers_1 = require("./indyIdentifiers");
31
+ Object.defineProperty(exports, "unqualifiedCredentialDefinitionIdRegex", { enumerable: true, get: function () { return indyIdentifiers_1.unqualifiedCredentialDefinitionIdRegex; } });
32
+ Object.defineProperty(exports, "unqualifiedIndyDidRegex", { enumerable: true, get: function () { return indyIdentifiers_1.unqualifiedIndyDidRegex; } });
33
+ Object.defineProperty(exports, "unqualifiedSchemaIdRegex", { enumerable: true, get: function () { return indyIdentifiers_1.unqualifiedSchemaIdRegex; } });
34
+ Object.defineProperty(exports, "unqualifiedSchemaVersionRegex", { enumerable: true, get: function () { return indyIdentifiers_1.unqualifiedSchemaVersionRegex; } });
35
+ var anonCredsObjects_1 = require("./anonCredsObjects");
36
+ Object.defineProperty(exports, "fetchCredentialDefinition", { enumerable: true, get: function () { return anonCredsObjects_1.fetchCredentialDefinition; } });
37
+ Object.defineProperty(exports, "fetchRevocationRegistryDefinition", { enumerable: true, get: function () { return anonCredsObjects_1.fetchRevocationRegistryDefinition; } });
38
+ Object.defineProperty(exports, "fetchSchema", { enumerable: true, get: function () { return anonCredsObjects_1.fetchSchema; } });
39
+ Object.defineProperty(exports, "fetchRevocationStatusList", { enumerable: true, get: function () { return anonCredsObjects_1.fetchRevocationStatusList; } });
40
+ var metadata_1 = require("./metadata");
41
+ Object.defineProperty(exports, "AnonCredsCredentialMetadataKey", { enumerable: true, get: function () { return metadata_1.AnonCredsCredentialMetadataKey; } });
42
+ Object.defineProperty(exports, "AnonCredsCredentialRequestMetadataKey", { enumerable: true, get: function () { return metadata_1.AnonCredsCredentialRequestMetadataKey; } });
43
+ Object.defineProperty(exports, "W3cAnonCredsCredentialMetadataKey", { enumerable: true, get: function () { return metadata_1.W3cAnonCredsCredentialMetadataKey; } });
44
+ var w3cAnonCredsUtils_1 = require("./w3cAnonCredsUtils");
45
+ Object.defineProperty(exports, "getW3cRecordAnonCredsTags", { enumerable: true, get: function () { return w3cAnonCredsUtils_1.getW3cRecordAnonCredsTags; } });
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,uEAAqE;AAA5D,oIAAA,wBAAwB,OAAA;AACjC,qFAAmF;AAA1E,kJAAA,+BAA+B,OAAA;AACxC,mEAAqF;AAA5E,oJAAA,0CAA0C,OAAA;AACnD,uDAAmE;AAA1D,kIAAA,8BAA8B,OAAA;AACvC,2DAA2E;AAAlE,0IAAA,oCAAoC,OAAA;AAC7C,qEAA8G;AAArG,4IAAA,iCAAiC,OAAA;AAAE,0IAAA,+BAA+B,OAAA;AAC3E,2CAA0F;AAAjF,+HAAA,iCAAiC,OAAA;AAC1C,iCAA+B;AAAtB,8FAAA,KAAK,OAAA;AACd,yDAAyF;AAAhF,gIAAA,2BAA2B,OAAA;AAAE,2HAAA,sBAAsB,OAAA;AAC5D,6EAAmF;AAA1E,kJAAA,mCAAmC,OAAA;AAC5C,yCAA6C;AAApC,4GAAA,eAAe,OAAA;AACxB,2CAA8C;AAArC,6GAAA,eAAe,OAAA;AACxB,qDAK0B;AAJxB,yIAAA,sCAAsC,OAAA;AACtC,0HAAA,uBAAuB,OAAA;AACvB,2HAAA,wBAAwB,OAAA;AACxB,gIAAA,6BAA6B,OAAA;AAG/B,uDAK2B;AAJzB,6HAAA,yBAAyB,OAAA;AACzB,qIAAA,iCAAiC,OAAA;AACjC,+GAAA,WAAW,OAAA;AACX,6HAAA,yBAAyB,OAAA;AAE3B,uCAOmB;AANjB,0HAAA,8BAA8B,OAAA;AAC9B,iIAAA,qCAAqC,OAAA;AACrC,6HAAA,iCAAiC,OAAA;AAKnC,yDAA+D;AAAtD,8HAAA,yBAAyB,OAAA"}
@@ -0,0 +1,66 @@
1
+ import type { AnonCredsCredentialDefinition, AnonCredsRevocationRegistryDefinition, AnonCredsSchema } from '../models';
2
+ export declare const unqualifiedSchemaIdRegex: RegExp;
3
+ export declare const didIndySchemaIdRegex: RegExp;
4
+ export declare const unqualifiedSchemaVersionRegex: RegExp;
5
+ export declare const unqualifiedIndyDidRegex: RegExp;
6
+ export declare const unqualifiedCredentialDefinitionIdRegex: RegExp;
7
+ export declare const didIndyCredentialDefinitionIdRegex: RegExp;
8
+ export declare const unqualifiedRevocationRegistryIdRegex: RegExp;
9
+ export declare const didIndyRevocationRegistryIdRegex: RegExp;
10
+ export declare const didIndyRegex: RegExp;
11
+ export declare function getUnqualifiedSchemaId(unqualifiedDid: string, name: string, version: string): string;
12
+ export declare function getUnqualifiedCredentialDefinitionId(unqualifiedDid: string, schemaSeqNo: string | number, tag: string): string;
13
+ export declare function getUnqualifiedRevocationRegistryDefinitionId(unqualifiedDid: string, schemaSeqNo: string | number, credentialDefinitionTag: string, revocationRegistryTag: string): string;
14
+ export declare function isUnqualifiedIndyDid(did: string): boolean;
15
+ export declare function isUnqualifiedCredentialDefinitionId(credentialDefinitionId: string): boolean;
16
+ export declare function isUnqualifiedRevocationRegistryId(revocationRegistryId: string): boolean;
17
+ export declare function isUnqualifiedSchemaId(schemaId: string): boolean;
18
+ export declare function isDidIndySchemaId(schemaId: string): boolean;
19
+ export declare function isDidIndyCredentialDefinitionId(credentialDefinitionId: string): boolean;
20
+ export declare function isDidIndyRevocationRegistryId(revocationRegistryId: string): boolean;
21
+ export declare function parseIndyDid(did: string): {
22
+ namespace: string;
23
+ namespaceIdentifier: string;
24
+ };
25
+ interface ParsedIndySchemaId {
26
+ did: string;
27
+ namespaceIdentifier: string;
28
+ schemaName: string;
29
+ schemaVersion: string;
30
+ namespace?: string;
31
+ }
32
+ export declare function parseIndySchemaId(schemaId: string): ParsedIndySchemaId;
33
+ interface ParsedIndyCredentialDefinitionId {
34
+ did: string;
35
+ namespaceIdentifier: string;
36
+ schemaSeqNo: string;
37
+ tag: string;
38
+ namespace?: string;
39
+ }
40
+ export declare function parseIndyCredentialDefinitionId(credentialDefinitionId: string): ParsedIndyCredentialDefinitionId;
41
+ interface ParsedIndyRevocationRegistryId {
42
+ did: string;
43
+ namespaceIdentifier: string;
44
+ schemaSeqNo: string;
45
+ credentialDefinitionTag: string;
46
+ revocationRegistryTag: string;
47
+ namespace?: string;
48
+ }
49
+ export declare function parseIndyRevocationRegistryId(revocationRegistryId: string): ParsedIndyRevocationRegistryId;
50
+ export declare function getIndyNamespaceFromIndyDid(identifier: string): string;
51
+ export declare function getUnQualifiedDidIndyDid(identifier: string): string;
52
+ export declare function isIndyDid(identifier: string): boolean;
53
+ export declare function getQualifiedDidIndyDid(identifier: string, namespace: string): string;
54
+ export declare function isUnqualifiedDidIndySchema(schema: AnonCredsSchema): boolean;
55
+ export declare function getUnqualifiedDidIndySchema(schema: AnonCredsSchema): AnonCredsSchema;
56
+ export declare function isQualifiedDidIndySchema(schema: AnonCredsSchema): boolean;
57
+ export declare function getQualifiedDidIndySchema(schema: AnonCredsSchema, namespace: string): AnonCredsSchema;
58
+ export declare function isUnqualifiedDidIndyCredentialDefinition(anonCredsCredentialDefinition: AnonCredsCredentialDefinition): boolean;
59
+ export declare function getUnqualifiedDidIndyCredentialDefinition(anonCredsCredentialDefinition: AnonCredsCredentialDefinition): AnonCredsCredentialDefinition;
60
+ export declare function isQualifiedDidIndyCredentialDefinition(anonCredsCredentialDefinition: AnonCredsCredentialDefinition): boolean;
61
+ export declare function getQualifiedDidIndyCredentialDefinition(anonCredsCredentialDefinition: AnonCredsCredentialDefinition, namespace: string): AnonCredsCredentialDefinition;
62
+ export declare function isUnqualifiedDidIndyRevocationRegistryDefinition(revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition): boolean;
63
+ export declare function getUnqualifiedDidIndyRevocationRegistryDefinition(revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition): AnonCredsRevocationRegistryDefinition;
64
+ export declare function isQualifiedRevocationRegistryDefinition(revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition): boolean;
65
+ export declare function getQualifiedDidIndyRevocationRegistryDefinition(revocationRegistryDefinition: AnonCredsRevocationRegistryDefinition, namespace: string): AnonCredsRevocationRegistryDefinition;
66
+ export {};