@credo-ts/core 0.6.0-pr-2392-20251010173905 → 0.6.0-pr-2457-20251016083534

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 (985) hide show
  1. package/build/agent/Agent.d.mts +1 -1
  2. package/build/agent/Agent.d.mts.map +1 -1
  3. package/build/agent/Agent.d.ts +1 -1
  4. package/build/agent/Agent.d.ts.map +1 -1
  5. package/build/agent/Agent.js +2 -2
  6. package/build/agent/Agent.mjs +2 -2
  7. package/build/agent/Agent.mjs.map +1 -1
  8. package/build/agent/AgentConfig.d.mts +1 -1
  9. package/build/agent/AgentConfig.d.mts.map +1 -1
  10. package/build/agent/AgentConfig.d.ts +1 -1
  11. package/build/agent/AgentConfig.d.ts.map +1 -1
  12. package/build/agent/AgentConfig.mjs.map +1 -1
  13. package/build/agent/AgentModules.d.mts +4 -4
  14. package/build/agent/AgentModules.d.mts.map +1 -1
  15. package/build/agent/AgentModules.d.ts +4 -4
  16. package/build/agent/AgentModules.d.ts.map +1 -1
  17. package/build/agent/AgentModules.mjs.map +1 -1
  18. package/build/agent/BaseAgent.d.mts +4 -4
  19. package/build/agent/BaseAgent.d.ts +4 -4
  20. package/build/agent/BaseAgent.mjs.map +1 -1
  21. package/build/agent/EventEmitter.d.mts +1 -1
  22. package/build/agent/EventEmitter.d.mts.map +1 -1
  23. package/build/agent/EventEmitter.d.ts +1 -1
  24. package/build/agent/EventEmitter.d.ts.map +1 -1
  25. package/build/agent/EventEmitter.mjs.map +1 -1
  26. package/build/agent/context/AgentContext.d.mts.map +1 -1
  27. package/build/agent/context/AgentContext.d.ts.map +1 -1
  28. package/build/agent/context/AgentContext.mjs.map +1 -1
  29. package/build/agent/context/DefaultAgentContextProvider.d.mts.map +1 -1
  30. package/build/agent/context/DefaultAgentContextProvider.d.ts.map +1 -1
  31. package/build/agent/context/DefaultAgentContextProvider.js +1 -1
  32. package/build/agent/context/DefaultAgentContextProvider.mjs +1 -1
  33. package/build/agent/context/DefaultAgentContextProvider.mjs.map +1 -1
  34. package/build/crypto/JwsService.d.mts +5 -5
  35. package/build/crypto/JwsService.d.mts.map +1 -1
  36. package/build/crypto/JwsService.d.ts +5 -5
  37. package/build/crypto/JwsService.d.ts.map +1 -1
  38. package/build/crypto/JwsService.js +3 -3
  39. package/build/crypto/JwsService.mjs +3 -3
  40. package/build/crypto/JwsService.mjs.map +1 -1
  41. package/build/crypto/KmsKeyPair.js +1 -5
  42. package/build/crypto/KmsKeyPair.mjs +1 -2
  43. package/build/crypto/KmsKeyPair.mjs.map +1 -1
  44. package/build/crypto/hashes/Hasher.d.mts +4 -2
  45. package/build/crypto/hashes/Hasher.d.mts.map +1 -1
  46. package/build/crypto/hashes/Hasher.d.ts +4 -2
  47. package/build/crypto/hashes/Hasher.d.ts.map +1 -1
  48. package/build/crypto/hashes/Hasher.js +8 -3
  49. package/build/crypto/hashes/Hasher.mjs +8 -3
  50. package/build/crypto/hashes/Hasher.mjs.map +1 -1
  51. package/build/crypto/hashes/IHash.d.mts +3 -1
  52. package/build/crypto/hashes/IHash.d.mts.map +1 -1
  53. package/build/crypto/hashes/IHash.d.ts +3 -1
  54. package/build/crypto/hashes/IHash.d.ts.map +1 -1
  55. package/build/crypto/hashes/Sha1.d.mts +2 -1
  56. package/build/crypto/hashes/Sha1.d.mts.map +1 -1
  57. package/build/crypto/hashes/Sha1.d.ts +2 -1
  58. package/build/crypto/hashes/Sha1.d.ts.map +1 -1
  59. package/build/crypto/hashes/Sha1.js +3 -3
  60. package/build/crypto/hashes/Sha1.mjs +1 -1
  61. package/build/crypto/hashes/Sha1.mjs.map +1 -1
  62. package/build/crypto/hashes/Sha256.d.mts +2 -1
  63. package/build/crypto/hashes/Sha256.d.mts.map +1 -1
  64. package/build/crypto/hashes/Sha256.d.ts +2 -1
  65. package/build/crypto/hashes/Sha256.d.ts.map +1 -1
  66. package/build/crypto/hashes/Sha256.js +3 -3
  67. package/build/crypto/hashes/Sha256.mjs +1 -1
  68. package/build/crypto/hashes/Sha256.mjs.map +1 -1
  69. package/build/crypto/hashes/Sha384.d.mts +10 -0
  70. package/build/crypto/hashes/Sha384.d.mts.map +1 -0
  71. package/build/crypto/hashes/Sha384.d.ts +10 -0
  72. package/build/crypto/hashes/Sha384.d.ts.map +1 -0
  73. package/build/crypto/hashes/Sha384.js +15 -0
  74. package/build/crypto/hashes/Sha384.mjs +14 -0
  75. package/build/crypto/hashes/Sha384.mjs.map +1 -0
  76. package/build/crypto/hashes/Sha512.d.mts +2 -1
  77. package/build/crypto/hashes/Sha512.d.mts.map +1 -1
  78. package/build/crypto/hashes/Sha512.d.ts +2 -1
  79. package/build/crypto/hashes/Sha512.d.ts.map +1 -1
  80. package/build/crypto/hashes/Sha512.js +3 -3
  81. package/build/crypto/hashes/Sha512.mjs +1 -1
  82. package/build/crypto/hashes/Sha512.mjs.map +1 -1
  83. package/build/crypto/hashes/index.js +1 -0
  84. package/build/crypto/hashes/index.mjs +1 -0
  85. package/build/crypto/index.js +1 -0
  86. package/build/crypto/index.mjs +1 -0
  87. package/build/crypto/jose/jwt/Jwt.d.mts.map +1 -1
  88. package/build/crypto/jose/jwt/Jwt.d.ts.map +1 -1
  89. package/build/crypto/jose/jwt/Jwt.js +1 -1
  90. package/build/crypto/jose/jwt/Jwt.mjs +1 -1
  91. package/build/crypto/jose/jwt/Jwt.mjs.map +1 -1
  92. package/build/crypto/webcrypto/CredoSubtle.d.mts.map +1 -1
  93. package/build/crypto/webcrypto/CredoSubtle.d.ts.map +1 -1
  94. package/build/crypto/webcrypto/CredoSubtle.js +1 -1
  95. package/build/crypto/webcrypto/CredoSubtle.mjs +1 -1
  96. package/build/crypto/webcrypto/CredoSubtle.mjs.map +1 -1
  97. package/build/crypto/webcrypto/CredoWalletWebCrypto.d.mts +7 -7
  98. package/build/crypto/webcrypto/CredoWalletWebCrypto.d.mts.map +1 -1
  99. package/build/crypto/webcrypto/CredoWalletWebCrypto.d.ts +7 -7
  100. package/build/crypto/webcrypto/CredoWalletWebCrypto.d.ts.map +1 -1
  101. package/build/crypto/webcrypto/CredoWalletWebCrypto.js +6 -9
  102. package/build/crypto/webcrypto/CredoWalletWebCrypto.mjs +5 -6
  103. package/build/crypto/webcrypto/CredoWalletWebCrypto.mjs.map +1 -1
  104. package/build/crypto/webcrypto/CredoWebCrypto.d.mts.map +1 -1
  105. package/build/crypto/webcrypto/CredoWebCrypto.d.ts.map +1 -1
  106. package/build/crypto/webcrypto/CredoWebCrypto.js +1 -1
  107. package/build/crypto/webcrypto/CredoWebCrypto.mjs +1 -1
  108. package/build/crypto/webcrypto/CredoWebCrypto.mjs.map +1 -1
  109. package/build/crypto/webcrypto/CredoWebCryptoKey.d.mts.map +1 -1
  110. package/build/crypto/webcrypto/CredoWebCryptoKey.d.ts.map +1 -1
  111. package/build/crypto/webcrypto/CredoWebCryptoKey.mjs.map +1 -1
  112. package/build/crypto/webcrypto/providers/CredoEcdsaProvider.js +4 -2
  113. package/build/crypto/webcrypto/providers/CredoEcdsaProvider.mjs +4 -2
  114. package/build/crypto/webcrypto/providers/CredoEcdsaProvider.mjs.map +1 -1
  115. package/build/crypto/webcrypto/providers/CredoEd25519Provider.js +4 -2
  116. package/build/crypto/webcrypto/providers/CredoEd25519Provider.mjs +4 -2
  117. package/build/crypto/webcrypto/providers/CredoEd25519Provider.mjs.map +1 -1
  118. package/build/crypto/webcrypto/providers/CredoSha1Provider.mjs.map +1 -1
  119. package/build/crypto/webcrypto/providers/CredoSha256Provider.mjs.map +1 -1
  120. package/build/crypto/webcrypto/providers/index.js +1 -1
  121. package/build/crypto/webcrypto/providers/index.mjs +1 -1
  122. package/build/crypto/webcrypto/types.d.mts +2 -1
  123. package/build/crypto/webcrypto/types.d.mts.map +1 -1
  124. package/build/crypto/webcrypto/types.d.ts +2 -1
  125. package/build/crypto/webcrypto/types.d.ts.map +1 -1
  126. package/build/crypto/webcrypto/types.mjs.map +1 -1
  127. package/build/crypto/webcrypto/utils/keyAlgorithmConversion.js +4 -4
  128. package/build/crypto/webcrypto/utils/keyAlgorithmConversion.mjs +4 -4
  129. package/build/crypto/webcrypto/utils/keyAlgorithmConversion.mjs.map +1 -1
  130. package/build/error/index.js +2 -2
  131. package/build/error/index.mjs +2 -2
  132. package/build/index.d.mts +161 -157
  133. package/build/index.d.mts.map +1 -1
  134. package/build/index.d.ts +161 -157
  135. package/build/index.d.ts.map +1 -1
  136. package/build/index.js +67 -62
  137. package/build/index.mjs +66 -62
  138. package/build/index.mjs.map +1 -1
  139. package/build/logger/BaseLogger.mjs.map +1 -1
  140. package/build/logger/ConsoleLogger.mjs.map +1 -1
  141. package/build/logger/Logger.mjs.map +1 -1
  142. package/build/modules/cache/CacheModule.mjs.map +1 -1
  143. package/build/modules/cache/CachedStorageService.mjs.map +1 -1
  144. package/build/modules/cache/InMemoryLruCache.d.mts.map +1 -1
  145. package/build/modules/cache/InMemoryLruCache.d.ts.map +1 -1
  146. package/build/modules/cache/InMemoryLruCache.js +1 -1
  147. package/build/modules/cache/InMemoryLruCache.mjs +1 -1
  148. package/build/modules/cache/InMemoryLruCache.mjs.map +1 -1
  149. package/build/modules/cache/singleContextLruCache/SingleContextLruCacheRecord.d.mts.map +1 -1
  150. package/build/modules/cache/singleContextLruCache/SingleContextLruCacheRecord.d.ts.map +1 -1
  151. package/build/modules/cache/singleContextLruCache/SingleContextLruCacheRecord.mjs.map +1 -1
  152. package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.d.mts.map +1 -1
  153. package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.d.ts.map +1 -1
  154. package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.js +1 -1
  155. package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.mjs +1 -1
  156. package/build/modules/cache/singleContextLruCache/SingleContextStorageLruCache.mjs.map +1 -1
  157. package/build/modules/dcql/DcqlModule.d.mts.map +1 -1
  158. package/build/modules/dcql/DcqlModule.d.ts.map +1 -1
  159. package/build/modules/dcql/DcqlModule.mjs.map +1 -1
  160. package/build/modules/dcql/DcqlService.d.mts.map +1 -1
  161. package/build/modules/dcql/DcqlService.d.ts.map +1 -1
  162. package/build/modules/dcql/DcqlService.js +2 -2
  163. package/build/modules/dcql/DcqlService.mjs +2 -2
  164. package/build/modules/dcql/DcqlService.mjs.map +1 -1
  165. package/build/modules/dcql/models/DcqlCredentialsForRequest.d.mts +3 -3
  166. package/build/modules/dcql/models/DcqlCredentialsForRequest.d.ts +3 -3
  167. package/build/modules/dcql/models/index.d.mts +2 -2
  168. package/build/modules/dcql/models/index.d.mts.map +1 -1
  169. package/build/modules/dcql/models/index.d.ts +2 -2
  170. package/build/modules/dcql/models/index.d.ts.map +1 -1
  171. package/build/modules/dcql/utils/DcqlPresentationsToCreate.d.mts +2 -2
  172. package/build/modules/dcql/utils/DcqlPresentationsToCreate.d.ts +2 -2
  173. package/build/modules/dids/DidsApi.d.mts +2 -2
  174. package/build/modules/dids/DidsApi.d.mts.map +1 -1
  175. package/build/modules/dids/DidsApi.d.ts +2 -2
  176. package/build/modules/dids/DidsApi.d.ts.map +1 -1
  177. package/build/modules/dids/DidsApi.js +1 -1
  178. package/build/modules/dids/DidsApi.mjs +1 -1
  179. package/build/modules/dids/DidsApi.mjs.map +1 -1
  180. package/build/modules/dids/DidsModule.d.mts.map +1 -1
  181. package/build/modules/dids/DidsModule.d.ts.map +1 -1
  182. package/build/modules/dids/DidsModule.mjs.map +1 -1
  183. package/build/modules/dids/DidsModuleConfig.js +2 -2
  184. package/build/modules/dids/DidsModuleConfig.mjs +2 -2
  185. package/build/modules/dids/domain/DidDocument.d.mts +1 -1
  186. package/build/modules/dids/domain/DidDocument.d.mts.map +1 -1
  187. package/build/modules/dids/domain/DidDocument.d.ts +1 -1
  188. package/build/modules/dids/domain/DidDocument.d.ts.map +1 -1
  189. package/build/modules/dids/domain/DidDocument.js +6 -6
  190. package/build/modules/dids/domain/DidDocument.mjs +6 -6
  191. package/build/modules/dids/domain/DidDocument.mjs.map +1 -1
  192. package/build/modules/dids/domain/DidDocumentBuilder.d.mts.map +1 -1
  193. package/build/modules/dids/domain/DidDocumentBuilder.d.ts.map +1 -1
  194. package/build/modules/dids/domain/DidDocumentBuilder.mjs.map +1 -1
  195. package/build/modules/dids/domain/index.js +11 -11
  196. package/build/modules/dids/domain/index.mjs +11 -11
  197. package/build/modules/dids/domain/key-type/ed25519.mjs.map +1 -1
  198. package/build/modules/dids/domain/key-type/keyDidJsonWebKey.mjs.map +1 -1
  199. package/build/modules/dids/domain/key-type/keyDidMapping.d.mts +1 -1
  200. package/build/modules/dids/domain/key-type/keyDidMapping.d.mts.map +1 -1
  201. package/build/modules/dids/domain/key-type/keyDidMapping.d.ts +1 -1
  202. package/build/modules/dids/domain/key-type/keyDidMapping.d.ts.map +1 -1
  203. package/build/modules/dids/domain/key-type/keyDidMapping.mjs.map +1 -1
  204. package/build/modules/dids/domain/key-type/secp256k1.js +1 -1
  205. package/build/modules/dids/domain/key-type/secp256k1.mjs +1 -1
  206. package/build/modules/dids/domain/key-type/secp256k1.mjs.map +1 -1
  207. package/build/modules/dids/domain/key-type/x25519.js +1 -1
  208. package/build/modules/dids/domain/key-type/x25519.mjs +1 -1
  209. package/build/modules/dids/domain/key-type/x25519.mjs.map +1 -1
  210. package/build/modules/dids/domain/keyDidDocument.js +1 -1
  211. package/build/modules/dids/domain/keyDidDocument.mjs +1 -1
  212. package/build/modules/dids/domain/keyDidDocument.mjs.map +1 -1
  213. package/build/modules/dids/domain/parse.d.mts.map +1 -1
  214. package/build/modules/dids/domain/parse.d.ts.map +1 -1
  215. package/build/modules/dids/domain/parse.mjs.map +1 -1
  216. package/build/modules/dids/domain/service/DidCommV2Service.d.mts +1 -1
  217. package/build/modules/dids/domain/service/DidCommV2Service.d.mts.map +1 -1
  218. package/build/modules/dids/domain/service/DidCommV2Service.d.ts +1 -1
  219. package/build/modules/dids/domain/service/DidCommV2Service.d.ts.map +1 -1
  220. package/build/modules/dids/domain/service/DidCommV2Service.mjs.map +1 -1
  221. package/build/modules/dids/domain/service/DidDocumentService.mjs.map +1 -1
  222. package/build/modules/dids/domain/verificationMethod/EcdsaSecp256k1VerificationKey2019.d.mts +1 -1
  223. package/build/modules/dids/domain/verificationMethod/EcdsaSecp256k1VerificationKey2019.d.ts +1 -1
  224. package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.d.mts +1 -1
  225. package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.d.mts.map +1 -1
  226. package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.d.ts +1 -1
  227. package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.d.ts.map +1 -1
  228. package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2018.mjs.map +1 -1
  229. package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.d.mts +1 -1
  230. package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.d.mts.map +1 -1
  231. package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.d.ts +1 -1
  232. package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.d.ts.map +1 -1
  233. package/build/modules/dids/domain/verificationMethod/Ed25519VerificationKey2020.mjs.map +1 -1
  234. package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.d.mts +1 -1
  235. package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.d.mts.map +1 -1
  236. package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.d.ts +1 -1
  237. package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.d.ts.map +1 -1
  238. package/build/modules/dids/domain/verificationMethod/JsonWebKey2020.mjs.map +1 -1
  239. package/build/modules/dids/domain/verificationMethod/Multikey.d.mts +1 -1
  240. package/build/modules/dids/domain/verificationMethod/Multikey.d.mts.map +1 -1
  241. package/build/modules/dids/domain/verificationMethod/Multikey.d.ts +1 -1
  242. package/build/modules/dids/domain/verificationMethod/Multikey.d.ts.map +1 -1
  243. package/build/modules/dids/domain/verificationMethod/Multikey.mjs.map +1 -1
  244. package/build/modules/dids/domain/verificationMethod/VerificationMethodTransformer.d.mts.map +1 -1
  245. package/build/modules/dids/domain/verificationMethod/VerificationMethodTransformer.d.ts.map +1 -1
  246. package/build/modules/dids/domain/verificationMethod/VerificationMethodTransformer.mjs.map +1 -1
  247. package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.d.mts +1 -1
  248. package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.d.mts.map +1 -1
  249. package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.d.ts +1 -1
  250. package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.d.ts.map +1 -1
  251. package/build/modules/dids/domain/verificationMethod/X25519KeyAgreementKey2019.mjs.map +1 -1
  252. package/build/modules/dids/domain/verificationMethod/index.js +3 -3
  253. package/build/modules/dids/domain/verificationMethod/index.mjs +3 -3
  254. package/build/modules/dids/findMatchingEd25519Key.d.mts +1 -1
  255. package/build/modules/dids/findMatchingEd25519Key.d.ts +1 -1
  256. package/build/modules/dids/findMatchingEd25519Key.js +1 -1
  257. package/build/modules/dids/findMatchingEd25519Key.mjs +1 -1
  258. package/build/modules/dids/findMatchingEd25519Key.mjs.map +1 -1
  259. package/build/modules/dids/helpers.mjs.map +1 -1
  260. package/build/modules/dids/index.js +15 -15
  261. package/build/modules/dids/index.mjs +15 -15
  262. package/build/modules/dids/methods/index.js +5 -5
  263. package/build/modules/dids/methods/index.mjs +5 -5
  264. package/build/modules/dids/methods/jwk/DidJwk.d.mts +1 -1
  265. package/build/modules/dids/methods/jwk/DidJwk.d.ts +1 -1
  266. package/build/modules/dids/methods/jwk/JwkDidRegistrar.d.mts +2 -2
  267. package/build/modules/dids/methods/jwk/JwkDidRegistrar.d.mts.map +1 -1
  268. package/build/modules/dids/methods/jwk/JwkDidRegistrar.d.ts +2 -2
  269. package/build/modules/dids/methods/jwk/JwkDidRegistrar.d.ts.map +1 -1
  270. package/build/modules/dids/methods/jwk/JwkDidRegistrar.js +1 -1
  271. package/build/modules/dids/methods/jwk/JwkDidRegistrar.mjs +1 -1
  272. package/build/modules/dids/methods/jwk/JwkDidRegistrar.mjs.map +1 -1
  273. package/build/modules/dids/methods/jwk/didJwkDidDocument.js +1 -1
  274. package/build/modules/dids/methods/jwk/didJwkDidDocument.mjs +1 -1
  275. package/build/modules/dids/methods/jwk/didJwkDidDocument.mjs.map +1 -1
  276. package/build/modules/dids/methods/key/DidKey.d.mts +1 -1
  277. package/build/modules/dids/methods/key/DidKey.d.ts +1 -1
  278. package/build/modules/dids/methods/key/KeyDidRegistrar.d.mts +2 -2
  279. package/build/modules/dids/methods/key/KeyDidRegistrar.d.mts.map +1 -1
  280. package/build/modules/dids/methods/key/KeyDidRegistrar.d.ts +2 -2
  281. package/build/modules/dids/methods/key/KeyDidRegistrar.d.ts.map +1 -1
  282. package/build/modules/dids/methods/key/KeyDidRegistrar.js +1 -1
  283. package/build/modules/dids/methods/key/KeyDidRegistrar.mjs +1 -1
  284. package/build/modules/dids/methods/key/KeyDidRegistrar.mjs.map +1 -1
  285. package/build/modules/dids/methods/peer/PeerDidRegistrar.d.mts +2 -2
  286. package/build/modules/dids/methods/peer/PeerDidRegistrar.d.mts.map +1 -1
  287. package/build/modules/dids/methods/peer/PeerDidRegistrar.d.ts +2 -2
  288. package/build/modules/dids/methods/peer/PeerDidRegistrar.d.ts.map +1 -1
  289. package/build/modules/dids/methods/peer/PeerDidRegistrar.mjs.map +1 -1
  290. package/build/modules/dids/methods/peer/PeerDidResolver.d.mts.map +1 -1
  291. package/build/modules/dids/methods/peer/PeerDidResolver.d.ts.map +1 -1
  292. package/build/modules/dids/methods/peer/PeerDidResolver.mjs.map +1 -1
  293. package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.d.mts +1 -1
  294. package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.d.mts.map +1 -1
  295. package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.d.ts +1 -1
  296. package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.d.ts.map +1 -1
  297. package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.js +1 -1
  298. package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.mjs +1 -1
  299. package/build/modules/dids/methods/peer/createPeerDidDocumentFromServices.mjs.map +1 -1
  300. package/build/modules/dids/methods/peer/index.js +1 -1
  301. package/build/modules/dids/methods/peer/index.mjs +1 -1
  302. package/build/modules/dids/methods/peer/peerDidNumAlgo0.mjs.map +1 -1
  303. package/build/modules/dids/methods/peer/peerDidNumAlgo1.js +1 -1
  304. package/build/modules/dids/methods/peer/peerDidNumAlgo1.mjs +1 -1
  305. package/build/modules/dids/methods/peer/peerDidNumAlgo2.js +2 -2
  306. package/build/modules/dids/methods/peer/peerDidNumAlgo2.mjs +2 -2
  307. package/build/modules/dids/methods/peer/peerDidNumAlgo2.mjs.map +1 -1
  308. package/build/modules/dids/methods/peer/peerDidNumAlgo4.js +7 -8
  309. package/build/modules/dids/methods/peer/peerDidNumAlgo4.mjs +4 -4
  310. package/build/modules/dids/methods/peer/peerDidNumAlgo4.mjs.map +1 -1
  311. package/build/modules/dids/methods/web/WebDidResolver.d.mts.map +1 -1
  312. package/build/modules/dids/methods/web/WebDidResolver.d.ts.map +1 -1
  313. package/build/modules/dids/methods/web/WebDidResolver.mjs.map +1 -1
  314. package/build/modules/dids/repository/DidRecord.d.mts.map +1 -1
  315. package/build/modules/dids/repository/DidRecord.d.ts.map +1 -1
  316. package/build/modules/dids/repository/DidRecord.js +1 -1
  317. package/build/modules/dids/repository/DidRecord.mjs +1 -1
  318. package/build/modules/dids/repository/DidRecord.mjs.map +1 -1
  319. package/build/modules/dids/repository/DidRepository.d.mts +3 -3
  320. package/build/modules/dids/repository/DidRepository.d.mts.map +1 -1
  321. package/build/modules/dids/repository/DidRepository.d.ts +3 -3
  322. package/build/modules/dids/repository/DidRepository.d.ts.map +1 -1
  323. package/build/modules/dids/repository/DidRepository.js +1 -1
  324. package/build/modules/dids/repository/DidRepository.mjs +1 -1
  325. package/build/modules/dids/repository/DidRepository.mjs.map +1 -1
  326. package/build/modules/dids/services/DidRegistrarService.d.mts.map +1 -1
  327. package/build/modules/dids/services/DidRegistrarService.d.ts.map +1 -1
  328. package/build/modules/dids/services/DidRegistrarService.mjs.map +1 -1
  329. package/build/modules/dids/services/DidResolverService.d.mts.map +1 -1
  330. package/build/modules/dids/services/DidResolverService.d.ts.map +1 -1
  331. package/build/modules/dids/services/DidResolverService.js +1 -1
  332. package/build/modules/dids/services/DidResolverService.mjs +1 -1
  333. package/build/modules/dids/services/DidResolverService.mjs.map +1 -1
  334. package/build/modules/dif-presentation-exchange/DifPresentationExchangeModule.d.mts.map +1 -1
  335. package/build/modules/dif-presentation-exchange/DifPresentationExchangeModule.d.ts.map +1 -1
  336. package/build/modules/dif-presentation-exchange/DifPresentationExchangeModule.mjs.map +1 -1
  337. package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.d.mts +5 -5
  338. package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.d.mts.map +1 -1
  339. package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.d.ts +5 -5
  340. package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.d.ts.map +1 -1
  341. package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.js +9 -5
  342. package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.mjs +9 -5
  343. package/build/modules/dif-presentation-exchange/DifPresentationExchangeService.mjs.map +1 -1
  344. package/build/modules/dif-presentation-exchange/models/DifPexCredentialsForRequest.d.mts +3 -3
  345. package/build/modules/dif-presentation-exchange/models/DifPexCredentialsForRequest.d.ts +3 -3
  346. package/build/modules/dif-presentation-exchange/models/index.d.mts +4 -4
  347. package/build/modules/dif-presentation-exchange/models/index.d.ts +4 -4
  348. package/build/modules/dif-presentation-exchange/utils/credentialSelection.mjs.map +1 -1
  349. package/build/modules/dif-presentation-exchange/utils/index.js +1 -1
  350. package/build/modules/dif-presentation-exchange/utils/index.mjs +1 -1
  351. package/build/modules/dif-presentation-exchange/utils/presentationSelection.d.mts +5 -5
  352. package/build/modules/dif-presentation-exchange/utils/presentationSelection.d.mts.map +1 -1
  353. package/build/modules/dif-presentation-exchange/utils/presentationSelection.d.ts +5 -5
  354. package/build/modules/dif-presentation-exchange/utils/presentationSelection.d.ts.map +1 -1
  355. package/build/modules/dif-presentation-exchange/utils/presentationSelection.js +1 -1
  356. package/build/modules/dif-presentation-exchange/utils/presentationSelection.mjs +1 -1
  357. package/build/modules/dif-presentation-exchange/utils/presentationSelection.mjs.map +1 -1
  358. package/build/modules/dif-presentation-exchange/utils/presentationsToCreate.mjs.map +1 -1
  359. package/build/modules/dif-presentation-exchange/utils/transform.mjs.map +1 -1
  360. package/build/modules/generic-records/GenericRecordsApi.d.mts +1 -1
  361. package/build/modules/generic-records/GenericRecordsApi.d.mts.map +1 -1
  362. package/build/modules/generic-records/GenericRecordsApi.d.ts +1 -1
  363. package/build/modules/generic-records/GenericRecordsApi.d.ts.map +1 -1
  364. package/build/modules/generic-records/GenericRecordsApi.mjs.map +1 -1
  365. package/build/modules/generic-records/services/GenericRecordService.d.mts.map +1 -1
  366. package/build/modules/generic-records/services/GenericRecordService.d.ts.map +1 -1
  367. package/build/modules/generic-records/services/GenericRecordService.mjs.map +1 -1
  368. package/build/modules/kms/KeyManagementApi.d.mts +7 -7
  369. package/build/modules/kms/KeyManagementApi.d.mts.map +1 -1
  370. package/build/modules/kms/KeyManagementApi.d.ts +7 -7
  371. package/build/modules/kms/KeyManagementApi.d.ts.map +1 -1
  372. package/build/modules/kms/KeyManagementApi.js +7 -7
  373. package/build/modules/kms/KeyManagementApi.mjs +7 -7
  374. package/build/modules/kms/KeyManagementApi.mjs.map +1 -1
  375. package/build/modules/kms/KeyManagementModule.d.mts +2 -2
  376. package/build/modules/kms/KeyManagementModule.d.mts.map +1 -1
  377. package/build/modules/kms/KeyManagementModule.d.ts +2 -2
  378. package/build/modules/kms/KeyManagementModule.d.ts.map +1 -1
  379. package/build/modules/kms/KeyManagementModule.mjs.map +1 -1
  380. package/build/modules/kms/KeyManagementModuleConfig.d.mts +0 -1
  381. package/build/modules/kms/KeyManagementModuleConfig.d.mts.map +1 -1
  382. package/build/modules/kms/KeyManagementModuleConfig.d.ts +0 -1
  383. package/build/modules/kms/KeyManagementModuleConfig.d.ts.map +1 -1
  384. package/build/modules/kms/KeyManagementModuleConfig.js +0 -6
  385. package/build/modules/kms/KeyManagementModuleConfig.mjs +0 -6
  386. package/build/modules/kms/KeyManagementModuleConfig.mjs.map +1 -1
  387. package/build/modules/kms/KeyManagementService.d.mts +6 -6
  388. package/build/modules/kms/KeyManagementService.d.ts +6 -6
  389. package/build/modules/kms/error/KeyManagementKeyNotFoundError.d.mts +1 -1
  390. package/build/modules/kms/error/KeyManagementKeyNotFoundError.d.ts +1 -1
  391. package/build/modules/kms/error/KeyManagementKeyNotFoundError.js +5 -2
  392. package/build/modules/kms/error/KeyManagementKeyNotFoundError.mjs +5 -2
  393. package/build/modules/kms/error/KeyManagementKeyNotFoundError.mjs.map +1 -1
  394. package/build/modules/kms/index.d.mts +25 -25
  395. package/build/modules/kms/index.d.ts +25 -25
  396. package/build/modules/kms/index.js +10 -10
  397. package/build/modules/kms/index.mjs +10 -10
  398. package/build/modules/kms/index.mjs.map +1 -1
  399. package/build/modules/kms/jwk/PublicJwk.d.mts +3 -4
  400. package/build/modules/kms/jwk/PublicJwk.d.mts.map +1 -1
  401. package/build/modules/kms/jwk/PublicJwk.d.ts +3 -4
  402. package/build/modules/kms/jwk/PublicJwk.d.ts.map +1 -1
  403. package/build/modules/kms/jwk/PublicJwk.js +2 -5
  404. package/build/modules/kms/jwk/PublicJwk.mjs +2 -5
  405. package/build/modules/kms/jwk/PublicJwk.mjs.map +1 -1
  406. package/build/modules/kms/jwk/alg/encryption.d.mts +1 -1
  407. package/build/modules/kms/jwk/alg/encryption.d.mts.map +1 -1
  408. package/build/modules/kms/jwk/alg/encryption.d.ts +1 -1
  409. package/build/modules/kms/jwk/alg/encryption.d.ts.map +1 -1
  410. package/build/modules/kms/jwk/alg/encryption.mjs.map +1 -1
  411. package/build/modules/kms/jwk/alg/index.js +1 -1
  412. package/build/modules/kms/jwk/alg/index.mjs +1 -1
  413. package/build/modules/kms/jwk/alg/keyDerivation.d.mts +1 -1
  414. package/build/modules/kms/jwk/alg/keyDerivation.d.mts.map +1 -1
  415. package/build/modules/kms/jwk/alg/keyDerivation.d.ts +1 -1
  416. package/build/modules/kms/jwk/alg/keyDerivation.d.ts.map +1 -1
  417. package/build/modules/kms/jwk/alg/keyDerivation.mjs.map +1 -1
  418. package/build/modules/kms/jwk/alg/signing.d.mts +1 -1
  419. package/build/modules/kms/jwk/alg/signing.d.mts.map +1 -1
  420. package/build/modules/kms/jwk/alg/signing.d.ts +1 -1
  421. package/build/modules/kms/jwk/alg/signing.d.ts.map +1 -1
  422. package/build/modules/kms/jwk/alg/signing.mjs.map +1 -1
  423. package/build/modules/kms/jwk/assertSupported.d.mts +2 -2
  424. package/build/modules/kms/jwk/assertSupported.d.ts +2 -2
  425. package/build/modules/kms/jwk/humanDescription.d.mts.map +1 -1
  426. package/build/modules/kms/jwk/humanDescription.d.ts.map +1 -1
  427. package/build/modules/kms/jwk/humanDescription.mjs.map +1 -1
  428. package/build/modules/kms/jwk/index.js +8 -8
  429. package/build/modules/kms/jwk/index.mjs +8 -8
  430. package/build/modules/kms/jwk/jwkThumbprint.js +2 -2
  431. package/build/modules/kms/jwk/jwkThumbprint.mjs +2 -2
  432. package/build/modules/kms/jwk/jwkThumbprint.mjs.map +1 -1
  433. package/build/modules/kms/jwk/keyOps.d.mts.map +1 -1
  434. package/build/modules/kms/jwk/keyOps.d.ts.map +1 -1
  435. package/build/modules/kms/jwk/keyOps.js +1 -1
  436. package/build/modules/kms/jwk/keyOps.mjs +1 -1
  437. package/build/modules/kms/jwk/keyOps.mjs.map +1 -1
  438. package/build/modules/kms/jwk/knownJwk.d.mts +1 -1
  439. package/build/modules/kms/jwk/knownJwk.d.mts.map +1 -1
  440. package/build/modules/kms/jwk/knownJwk.d.ts +1 -1
  441. package/build/modules/kms/jwk/knownJwk.d.ts.map +1 -1
  442. package/build/modules/kms/jwk/knownJwk.js +1 -1
  443. package/build/modules/kms/jwk/knownJwk.mjs +1 -1
  444. package/build/modules/kms/jwk/knownJwk.mjs.map +1 -1
  445. package/build/modules/kms/jwk/kty/PublicJwk.d.mts +3 -2
  446. package/build/modules/kms/jwk/kty/PublicJwk.d.mts.map +1 -1
  447. package/build/modules/kms/jwk/kty/PublicJwk.d.ts +3 -2
  448. package/build/modules/kms/jwk/kty/PublicJwk.d.ts.map +1 -1
  449. package/build/modules/kms/jwk/kty/ec/P256PublicJwk.d.mts +7 -6
  450. package/build/modules/kms/jwk/kty/ec/P256PublicJwk.d.mts.map +1 -1
  451. package/build/modules/kms/jwk/kty/ec/P256PublicJwk.d.ts +7 -6
  452. package/build/modules/kms/jwk/kty/ec/P256PublicJwk.d.ts.map +1 -1
  453. package/build/modules/kms/jwk/kty/ec/P256PublicJwk.mjs.map +1 -1
  454. package/build/modules/kms/jwk/kty/ec/P384PublicJwk.d.mts +7 -6
  455. package/build/modules/kms/jwk/kty/ec/P384PublicJwk.d.mts.map +1 -1
  456. package/build/modules/kms/jwk/kty/ec/P384PublicJwk.d.ts +7 -6
  457. package/build/modules/kms/jwk/kty/ec/P384PublicJwk.d.ts.map +1 -1
  458. package/build/modules/kms/jwk/kty/ec/P384PublicJwk.mjs.map +1 -1
  459. package/build/modules/kms/jwk/kty/ec/P521PublicJwk.d.mts +7 -6
  460. package/build/modules/kms/jwk/kty/ec/P521PublicJwk.d.mts.map +1 -1
  461. package/build/modules/kms/jwk/kty/ec/P521PublicJwk.d.ts +7 -6
  462. package/build/modules/kms/jwk/kty/ec/P521PublicJwk.d.ts.map +1 -1
  463. package/build/modules/kms/jwk/kty/ec/P521PublicJwk.mjs.map +1 -1
  464. package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.d.mts +7 -6
  465. package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.d.mts.map +1 -1
  466. package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.d.ts +7 -6
  467. package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.d.ts.map +1 -1
  468. package/build/modules/kms/jwk/kty/ec/Secp256k1PublicJwk.mjs.map +1 -1
  469. package/build/modules/kms/jwk/kty/ec/ecPublicKey.mjs.map +1 -1
  470. package/build/modules/kms/jwk/kty/ec/ecSignature.d.mts +3 -2
  471. package/build/modules/kms/jwk/kty/ec/ecSignature.d.mts.map +1 -1
  472. package/build/modules/kms/jwk/kty/ec/ecSignature.d.ts +3 -2
  473. package/build/modules/kms/jwk/kty/ec/ecSignature.d.ts.map +1 -1
  474. package/build/modules/kms/jwk/kty/ec/ecSignature.js +2 -2
  475. package/build/modules/kms/jwk/kty/ec/ecSignature.mjs +2 -2
  476. package/build/modules/kms/jwk/kty/ec/ecSignature.mjs.map +1 -1
  477. package/build/modules/kms/jwk/kty/index.js +1 -1
  478. package/build/modules/kms/jwk/kty/index.mjs +1 -1
  479. package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.d.mts +6 -5
  480. package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.d.mts.map +1 -1
  481. package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.d.ts +6 -5
  482. package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.d.ts.map +1 -1
  483. package/build/modules/kms/jwk/kty/okp/Ed25519PublicJwk.mjs.map +1 -1
  484. package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.d.mts +6 -5
  485. package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.d.mts.map +1 -1
  486. package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.d.ts +6 -5
  487. package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.d.ts.map +1 -1
  488. package/build/modules/kms/jwk/kty/okp/X25519PublicJwk.mjs.map +1 -1
  489. package/build/modules/kms/jwk/kty/okp/okpPublicKey.mjs.map +1 -1
  490. package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.d.mts +8 -7
  491. package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.d.mts.map +1 -1
  492. package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.d.ts +8 -7
  493. package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.d.ts.map +1 -1
  494. package/build/modules/kms/jwk/kty/rsa/RsaPublicJwk.mjs.map +1 -1
  495. package/build/modules/kms/jwk/kty/rsa/rsaPublicKey.mjs.map +1 -1
  496. package/build/modules/kms/options/KmsCreateKeyOptions.d.mts +1 -1
  497. package/build/modules/kms/options/KmsCreateKeyOptions.d.mts.map +1 -1
  498. package/build/modules/kms/options/KmsCreateKeyOptions.d.ts +1 -1
  499. package/build/modules/kms/options/KmsCreateKeyOptions.d.ts.map +1 -1
  500. package/build/modules/kms/options/KmsCreateKeyOptions.mjs.map +1 -1
  501. package/build/modules/kms/options/KmsDecryptOptions.d.mts +169 -168
  502. package/build/modules/kms/options/KmsDecryptOptions.d.mts.map +1 -1
  503. package/build/modules/kms/options/KmsDecryptOptions.d.ts +169 -168
  504. package/build/modules/kms/options/KmsDecryptOptions.d.ts.map +1 -1
  505. package/build/modules/kms/options/KmsDecryptOptions.js +13 -12
  506. package/build/modules/kms/options/KmsDecryptOptions.mjs +13 -12
  507. package/build/modules/kms/options/KmsDecryptOptions.mjs.map +1 -1
  508. package/build/modules/kms/options/KmsEncryptOptions.d.mts +123 -122
  509. package/build/modules/kms/options/KmsEncryptOptions.d.mts.map +1 -1
  510. package/build/modules/kms/options/KmsEncryptOptions.d.ts +123 -122
  511. package/build/modules/kms/options/KmsEncryptOptions.d.ts.map +1 -1
  512. package/build/modules/kms/options/KmsEncryptOptions.js +13 -12
  513. package/build/modules/kms/options/KmsEncryptOptions.mjs +13 -12
  514. package/build/modules/kms/options/KmsEncryptOptions.mjs.map +1 -1
  515. package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.d.mts +49 -48
  516. package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.d.mts.map +1 -1
  517. package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.d.ts +49 -48
  518. package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.d.ts.map +1 -1
  519. package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.js +3 -2
  520. package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.mjs +3 -2
  521. package/build/modules/kms/options/KmsKeyAgreementDecryptOptions.mjs.map +1 -1
  522. package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.d.mts +25 -24
  523. package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.d.mts.map +1 -1
  524. package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.d.ts +25 -24
  525. package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.d.ts.map +1 -1
  526. package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.js +5 -4
  527. package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.mjs +5 -4
  528. package/build/modules/kms/options/KmsKeyAgreementEncryptOptions.mjs.map +1 -1
  529. package/build/modules/kms/options/KmsOperation.d.mts +3 -3
  530. package/build/modules/kms/options/KmsOperation.d.ts +3 -3
  531. package/build/modules/kms/options/KmsOperation.mjs.map +1 -1
  532. package/build/modules/kms/options/KmsSignOptions.d.mts +5 -4
  533. package/build/modules/kms/options/KmsSignOptions.d.mts.map +1 -1
  534. package/build/modules/kms/options/KmsSignOptions.d.ts +5 -4
  535. package/build/modules/kms/options/KmsSignOptions.d.ts.map +1 -1
  536. package/build/modules/kms/options/KmsSignOptions.js +2 -1
  537. package/build/modules/kms/options/KmsSignOptions.mjs +2 -1
  538. package/build/modules/kms/options/KmsSignOptions.mjs.map +1 -1
  539. package/build/modules/kms/options/KmsVerifyOptions.d.mts +7 -6
  540. package/build/modules/kms/options/KmsVerifyOptions.d.mts.map +1 -1
  541. package/build/modules/kms/options/KmsVerifyOptions.d.ts +7 -6
  542. package/build/modules/kms/options/KmsVerifyOptions.d.ts.map +1 -1
  543. package/build/modules/kms/options/KmsVerifyOptions.js +3 -2
  544. package/build/modules/kms/options/KmsVerifyOptions.mjs +3 -2
  545. package/build/modules/kms/options/KmsVerifyOptions.mjs.map +1 -1
  546. package/build/modules/mdoc/Mdoc.d.mts +1 -3
  547. package/build/modules/mdoc/Mdoc.d.mts.map +1 -1
  548. package/build/modules/mdoc/Mdoc.d.ts +1 -3
  549. package/build/modules/mdoc/Mdoc.d.ts.map +1 -1
  550. package/build/modules/mdoc/Mdoc.js +1 -7
  551. package/build/modules/mdoc/Mdoc.mjs +1 -7
  552. package/build/modules/mdoc/Mdoc.mjs.map +1 -1
  553. package/build/modules/mdoc/MdocApi.d.mts +1 -1
  554. package/build/modules/mdoc/MdocApi.d.mts.map +1 -1
  555. package/build/modules/mdoc/MdocApi.d.ts +1 -1
  556. package/build/modules/mdoc/MdocApi.d.ts.map +1 -1
  557. package/build/modules/mdoc/MdocApi.mjs.map +1 -1
  558. package/build/modules/mdoc/MdocContext.js +9 -11
  559. package/build/modules/mdoc/MdocContext.mjs +6 -7
  560. package/build/modules/mdoc/MdocContext.mjs.map +1 -1
  561. package/build/modules/mdoc/MdocDeviceResponse.d.mts +1 -1
  562. package/build/modules/mdoc/MdocDeviceResponse.d.mts.map +1 -1
  563. package/build/modules/mdoc/MdocDeviceResponse.d.ts +1 -1
  564. package/build/modules/mdoc/MdocDeviceResponse.d.ts.map +1 -1
  565. package/build/modules/mdoc/MdocDeviceResponse.mjs.map +1 -1
  566. package/build/modules/mdoc/MdocModule.d.mts.map +1 -1
  567. package/build/modules/mdoc/MdocModule.d.ts.map +1 -1
  568. package/build/modules/mdoc/MdocModule.mjs.map +1 -1
  569. package/build/modules/mdoc/MdocOptions.d.mts +4 -3
  570. package/build/modules/mdoc/MdocOptions.d.mts.map +1 -1
  571. package/build/modules/mdoc/MdocOptions.d.ts +4 -3
  572. package/build/modules/mdoc/MdocOptions.d.ts.map +1 -1
  573. package/build/modules/mdoc/MdocService.d.mts +1 -1
  574. package/build/modules/mdoc/MdocService.d.mts.map +1 -1
  575. package/build/modules/mdoc/MdocService.d.ts +1 -2
  576. package/build/modules/mdoc/MdocService.d.ts.map +1 -1
  577. package/build/modules/mdoc/MdocService.mjs.map +1 -1
  578. package/build/modules/mdoc/index.d.mts +3 -3
  579. package/build/modules/mdoc/index.d.ts +3 -3
  580. package/build/modules/mdoc/repository/MdocRecord.d.mts +1 -1
  581. package/build/modules/mdoc/repository/MdocRecord.d.mts.map +1 -1
  582. package/build/modules/mdoc/repository/MdocRecord.d.ts +1 -1
  583. package/build/modules/mdoc/repository/MdocRecord.d.ts.map +1 -1
  584. package/build/modules/mdoc/repository/MdocRecord.mjs.map +1 -1
  585. package/build/modules/sd-jwt-vc/SdJwtVcApi.d.mts +2 -4
  586. package/build/modules/sd-jwt-vc/SdJwtVcApi.d.mts.map +1 -1
  587. package/build/modules/sd-jwt-vc/SdJwtVcApi.d.ts +2 -4
  588. package/build/modules/sd-jwt-vc/SdJwtVcApi.d.ts.map +1 -1
  589. package/build/modules/sd-jwt-vc/SdJwtVcApi.mjs.map +1 -1
  590. package/build/modules/sd-jwt-vc/SdJwtVcModule.d.mts.map +1 -1
  591. package/build/modules/sd-jwt-vc/SdJwtVcModule.d.ts.map +1 -1
  592. package/build/modules/sd-jwt-vc/SdJwtVcModule.mjs.map +1 -1
  593. package/build/modules/sd-jwt-vc/SdJwtVcOptions.d.mts +5 -1
  594. package/build/modules/sd-jwt-vc/SdJwtVcOptions.d.mts.map +1 -1
  595. package/build/modules/sd-jwt-vc/SdJwtVcOptions.d.ts +5 -1
  596. package/build/modules/sd-jwt-vc/SdJwtVcOptions.d.ts.map +1 -1
  597. package/build/modules/sd-jwt-vc/SdJwtVcService.d.mts +4 -5
  598. package/build/modules/sd-jwt-vc/SdJwtVcService.d.mts.map +1 -1
  599. package/build/modules/sd-jwt-vc/SdJwtVcService.d.ts +4 -5
  600. package/build/modules/sd-jwt-vc/SdJwtVcService.d.ts.map +1 -1
  601. package/build/modules/sd-jwt-vc/SdJwtVcService.js +40 -48
  602. package/build/modules/sd-jwt-vc/SdJwtVcService.mjs +41 -49
  603. package/build/modules/sd-jwt-vc/SdJwtVcService.mjs.map +1 -1
  604. package/build/modules/sd-jwt-vc/decodeSdJwtVc.mjs.map +1 -1
  605. package/build/modules/sd-jwt-vc/disclosureFrame.mjs.map +1 -1
  606. package/build/modules/sd-jwt-vc/index.js +1 -1
  607. package/build/modules/sd-jwt-vc/index.mjs +1 -1
  608. package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.mts +1 -1
  609. package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.mts.map +1 -1
  610. package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.ts +1 -1
  611. package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.ts.map +1 -1
  612. package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.mjs.map +1 -1
  613. package/build/modules/sd-jwt-vc/repository/SdJwtVcRepository.d.mts +1 -1
  614. package/build/modules/sd-jwt-vc/repository/SdJwtVcRepository.d.ts +1 -1
  615. package/build/modules/sd-jwt-vc/utils.js +1 -1
  616. package/build/modules/sd-jwt-vc/utils.mjs +1 -1
  617. package/build/modules/sd-jwt-vc/utils.mjs.map +1 -1
  618. package/build/modules/vc/W3cCredentialService.d.mts +2 -2
  619. package/build/modules/vc/W3cCredentialService.d.mts.map +1 -1
  620. package/build/modules/vc/W3cCredentialService.d.ts +2 -2
  621. package/build/modules/vc/W3cCredentialService.d.ts.map +1 -1
  622. package/build/modules/vc/W3cCredentialService.mjs.map +1 -1
  623. package/build/modules/vc/W3cCredentialServiceOptions.d.mts +2 -2
  624. package/build/modules/vc/W3cCredentialServiceOptions.d.ts +2 -2
  625. package/build/modules/vc/W3cCredentialsApi.d.mts +1 -1
  626. package/build/modules/vc/W3cCredentialsApi.d.mts.map +1 -1
  627. package/build/modules/vc/W3cCredentialsApi.d.ts +1 -1
  628. package/build/modules/vc/W3cCredentialsApi.d.ts.map +1 -1
  629. package/build/modules/vc/W3cCredentialsApi.mjs.map +1 -1
  630. package/build/modules/vc/W3cCredentialsModule.d.mts.map +1 -1
  631. package/build/modules/vc/W3cCredentialsModule.d.ts.map +1 -1
  632. package/build/modules/vc/W3cCredentialsModule.mjs.map +1 -1
  633. package/build/modules/vc/W3cV2CredentialService.d.mts +3 -3
  634. package/build/modules/vc/W3cV2CredentialService.d.ts +3 -3
  635. package/build/modules/vc/W3cV2CredentialService.js +1 -1
  636. package/build/modules/vc/W3cV2CredentialService.mjs +1 -1
  637. package/build/modules/vc/W3cV2CredentialService.mjs.map +1 -1
  638. package/build/modules/vc/W3cV2CredentialServiceOptions.d.mts +3 -3
  639. package/build/modules/vc/W3cV2CredentialServiceOptions.d.mts.map +1 -1
  640. package/build/modules/vc/W3cV2CredentialServiceOptions.d.ts +3 -3
  641. package/build/modules/vc/W3cV2CredentialServiceOptions.d.ts.map +1 -1
  642. package/build/modules/vc/W3cV2CredentialsApi.d.mts +1 -1
  643. package/build/modules/vc/W3cV2CredentialsApi.d.mts.map +1 -1
  644. package/build/modules/vc/W3cV2CredentialsApi.d.ts +1 -1
  645. package/build/modules/vc/W3cV2CredentialsApi.d.ts.map +1 -1
  646. package/build/modules/vc/W3cV2CredentialsApi.mjs.map +1 -1
  647. package/build/modules/vc/W3cV2CredentialsModule.mjs.map +1 -1
  648. package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.d.mts +2 -2
  649. package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.d.mts.map +1 -1
  650. package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.d.ts +2 -2
  651. package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.d.ts.map +1 -1
  652. package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.js +6 -6
  653. package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.mjs +6 -6
  654. package/build/modules/vc/data-integrity/W3cJsonLdCredentialService.mjs.map +1 -1
  655. package/build/modules/vc/data-integrity/deriveProof.d.mts +1 -1
  656. package/build/modules/vc/data-integrity/deriveProof.d.ts +1 -1
  657. package/build/modules/vc/data-integrity/deriveProof.js +1 -1
  658. package/build/modules/vc/data-integrity/deriveProof.mjs +1 -1
  659. package/build/modules/vc/data-integrity/deriveProof.mjs.map +1 -1
  660. package/build/modules/vc/data-integrity/index.js +8 -8
  661. package/build/modules/vc/data-integrity/index.mjs +8 -8
  662. package/build/modules/vc/data-integrity/jsonldUtil.d.mts.map +1 -1
  663. package/build/modules/vc/data-integrity/jsonldUtil.d.ts.map +1 -1
  664. package/build/modules/vc/data-integrity/jsonldUtil.js +1 -1
  665. package/build/modules/vc/data-integrity/jsonldUtil.mjs +1 -1
  666. package/build/modules/vc/data-integrity/jsonldUtil.mjs.map +1 -1
  667. package/build/modules/vc/data-integrity/libraries/contexts/defaultContexts.js +1 -1
  668. package/build/modules/vc/data-integrity/libraries/contexts/defaultContexts.mjs +1 -1
  669. package/build/modules/vc/data-integrity/libraries/contexts/defaultContexts.mjs.map +1 -1
  670. package/build/modules/vc/data-integrity/libraries/documentLoader.d.mts.map +1 -1
  671. package/build/modules/vc/data-integrity/libraries/documentLoader.d.ts.map +1 -1
  672. package/build/modules/vc/data-integrity/libraries/documentLoader.mjs.map +1 -1
  673. package/build/modules/vc/data-integrity/libraries/index.js +1 -1
  674. package/build/modules/vc/data-integrity/libraries/index.mjs +1 -1
  675. package/build/modules/vc/data-integrity/libraries/jsonld-signatures.d.mts.map +1 -1
  676. package/build/modules/vc/data-integrity/libraries/jsonld-signatures.d.ts.map +1 -1
  677. package/build/modules/vc/data-integrity/libraries/jsonld-signatures.mjs.map +1 -1
  678. package/build/modules/vc/data-integrity/libraries/jsonld.mjs.map +1 -1
  679. package/build/modules/vc/data-integrity/libraries/nativeDocumentLoader.mjs.map +1 -1
  680. package/build/modules/vc/data-integrity/libraries/vc.d.mts.map +1 -1
  681. package/build/modules/vc/data-integrity/libraries/vc.d.ts.map +1 -1
  682. package/build/modules/vc/data-integrity/libraries/vc.js +1 -1
  683. package/build/modules/vc/data-integrity/libraries/vc.mjs +1 -1
  684. package/build/modules/vc/data-integrity/libraries/vc.mjs.map +1 -1
  685. package/build/modules/vc/data-integrity/models/IAnonCredsDataIntegrityService.d.mts +2 -2
  686. package/build/modules/vc/data-integrity/models/IAnonCredsDataIntegrityService.d.ts +2 -2
  687. package/build/modules/vc/data-integrity/models/LdKeyPair.d.mts +5 -4
  688. package/build/modules/vc/data-integrity/models/LdKeyPair.d.mts.map +1 -1
  689. package/build/modules/vc/data-integrity/models/LdKeyPair.d.ts +5 -4
  690. package/build/modules/vc/data-integrity/models/LdKeyPair.d.ts.map +1 -1
  691. package/build/modules/vc/data-integrity/models/LdKeyPair.mjs.map +1 -1
  692. package/build/modules/vc/data-integrity/models/ProofTransformer.mjs.map +1 -1
  693. package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.d.mts +2 -2
  694. package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.d.mts.map +1 -1
  695. package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.d.ts +2 -2
  696. package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.d.ts.map +1 -1
  697. package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.js +1 -1
  698. package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.mjs +1 -1
  699. package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiableCredential.mjs.map +1 -1
  700. package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.d.mts +2 -2
  701. package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.d.mts.map +1 -1
  702. package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.d.ts +2 -2
  703. package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.d.ts.map +1 -1
  704. package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.js +1 -1
  705. package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.mjs +1 -1
  706. package/build/modules/vc/data-integrity/models/W3cJsonLdVerifiablePresentation.mjs.map +1 -1
  707. package/build/modules/vc/data-integrity/models/index.js +2 -2
  708. package/build/modules/vc/data-integrity/models/index.mjs +2 -2
  709. package/build/modules/vc/data-integrity/proof-purposes/CredentialIssuancePurpose.d.mts +1 -1
  710. package/build/modules/vc/data-integrity/proof-purposes/CredentialIssuancePurpose.d.ts +1 -1
  711. package/build/modules/vc/data-integrity/proof-purposes/CredentialIssuancePurpose.mjs.map +1 -1
  712. package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.d.mts +3 -2
  713. package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.d.mts.map +1 -1
  714. package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.d.ts +3 -2
  715. package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.d.ts.map +1 -1
  716. package/build/modules/vc/data-integrity/signature-suites/JwsLinkedDataSignature.mjs.map +1 -1
  717. package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2018.d.mts.map +1 -1
  718. package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2018.d.ts.map +1 -1
  719. package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2018.mjs.map +1 -1
  720. package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.d.mts +3 -2
  721. package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.d.mts.map +1 -1
  722. package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.d.ts +3 -2
  723. package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.d.ts.map +1 -1
  724. package/build/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.mjs.map +1 -1
  725. package/build/modules/vc/index.js +14 -14
  726. package/build/modules/vc/index.mjs +14 -14
  727. package/build/modules/vc/jwt-vc/W3cJwtCredentialService.d.mts +2 -2
  728. package/build/modules/vc/jwt-vc/W3cJwtCredentialService.d.mts.map +1 -1
  729. package/build/modules/vc/jwt-vc/W3cJwtCredentialService.d.ts +2 -2
  730. package/build/modules/vc/jwt-vc/W3cJwtCredentialService.d.ts.map +1 -1
  731. package/build/modules/vc/jwt-vc/W3cJwtCredentialService.js +4 -4
  732. package/build/modules/vc/jwt-vc/W3cJwtCredentialService.mjs +4 -4
  733. package/build/modules/vc/jwt-vc/W3cJwtCredentialService.mjs.map +1 -1
  734. package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.d.mts +4 -4
  735. package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.d.mts.map +1 -1
  736. package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.d.ts +4 -4
  737. package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.d.ts.map +1 -1
  738. package/build/modules/vc/jwt-vc/W3cJwtVerifiableCredential.mjs.map +1 -1
  739. package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.mts +1 -1
  740. package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.mts.map +1 -1
  741. package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.ts +1 -1
  742. package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.ts.map +1 -1
  743. package/build/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.mjs.map +1 -1
  744. package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.d.mts +2 -2
  745. package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.d.ts +2 -2
  746. package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.js +4 -4
  747. package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.mjs +4 -4
  748. package/build/modules/vc/jwt-vc/W3cV2JwtCredentialService.mjs.map +1 -1
  749. package/build/modules/vc/jwt-vc/W3cV2JwtVerifiableCredential.d.mts +1 -1
  750. package/build/modules/vc/jwt-vc/W3cV2JwtVerifiableCredential.d.ts +1 -1
  751. package/build/modules/vc/jwt-vc/credentialTransformer.mjs.map +1 -1
  752. package/build/modules/vc/jwt-vc/index.js +1 -1
  753. package/build/modules/vc/jwt-vc/index.mjs +1 -1
  754. package/build/modules/vc/jwt-vc/presentationTransformer.mjs.map +1 -1
  755. package/build/modules/vc/models/credential/W3cCredential.d.mts +3 -3
  756. package/build/modules/vc/models/credential/W3cCredential.d.mts.map +1 -1
  757. package/build/modules/vc/models/credential/W3cCredential.d.ts +3 -3
  758. package/build/modules/vc/models/credential/W3cCredential.d.ts.map +1 -1
  759. package/build/modules/vc/models/credential/W3cCredential.js +1 -1
  760. package/build/modules/vc/models/credential/W3cCredential.mjs +1 -1
  761. package/build/modules/vc/models/credential/W3cCredential.mjs.map +1 -1
  762. package/build/modules/vc/models/credential/W3cCredentialSubject.d.mts.map +1 -1
  763. package/build/modules/vc/models/credential/W3cCredentialSubject.d.ts.map +1 -1
  764. package/build/modules/vc/models/credential/W3cCredentialSubject.mjs.map +1 -1
  765. package/build/modules/vc/models/credential/W3cIssuer.d.mts.map +1 -1
  766. package/build/modules/vc/models/credential/W3cIssuer.d.ts.map +1 -1
  767. package/build/modules/vc/models/credential/W3cIssuer.mjs.map +1 -1
  768. package/build/modules/vc/models/credential/W3cV2Credential.d.mts +1 -1
  769. package/build/modules/vc/models/credential/W3cV2Credential.d.ts +1 -1
  770. package/build/modules/vc/models/credential/W3cV2Credential.js +1 -1
  771. package/build/modules/vc/models/credential/W3cV2Credential.mjs +1 -1
  772. package/build/modules/vc/models/credential/W3cV2Credential.mjs.map +1 -1
  773. package/build/modules/vc/models/credential/W3cV2CredentialSchema.js +2 -2
  774. package/build/modules/vc/models/credential/W3cV2CredentialSchema.mjs +2 -2
  775. package/build/modules/vc/models/credential/W3cV2CredentialSchema.mjs.map +1 -1
  776. package/build/modules/vc/models/credential/W3cV2EnvelopedVerifiableCredential.d.mts +1 -1
  777. package/build/modules/vc/models/credential/W3cV2EnvelopedVerifiableCredential.d.ts +1 -1
  778. package/build/modules/vc/models/credential/W3cV2EnvelopedVerifiableCredential.mjs.map +1 -1
  779. package/build/modules/vc/models/credential/W3cV2Evidence.js +2 -2
  780. package/build/modules/vc/models/credential/W3cV2Evidence.mjs +2 -2
  781. package/build/modules/vc/models/credential/W3cV2Evidence.mjs.map +1 -1
  782. package/build/modules/vc/models/credential/W3cV2Issuer.mjs.map +1 -1
  783. package/build/modules/vc/models/credential/W3cV2LocalizedValue.mjs.map +1 -1
  784. package/build/modules/vc/models/credential/W3cVerifiableCredential.d.mts.map +1 -1
  785. package/build/modules/vc/models/credential/W3cVerifiableCredential.d.ts.map +1 -1
  786. package/build/modules/vc/models/credential/W3cVerifiableCredential.mjs.map +1 -1
  787. package/build/modules/vc/models/credential/index.js +1 -1
  788. package/build/modules/vc/models/credential/index.mjs +1 -1
  789. package/build/modules/vc/models/index.js +1 -1
  790. package/build/modules/vc/models/index.mjs +1 -1
  791. package/build/modules/vc/models/presentation/W3cHolder.d.mts.map +1 -1
  792. package/build/modules/vc/models/presentation/W3cHolder.d.ts.map +1 -1
  793. package/build/modules/vc/models/presentation/W3cHolder.mjs.map +1 -1
  794. package/build/modules/vc/models/presentation/W3cJsonPresentation.d.mts +1 -1
  795. package/build/modules/vc/models/presentation/W3cJsonPresentation.d.ts +1 -1
  796. package/build/modules/vc/models/presentation/W3cPresentation.d.mts +2 -2
  797. package/build/modules/vc/models/presentation/W3cPresentation.d.mts.map +1 -1
  798. package/build/modules/vc/models/presentation/W3cPresentation.d.ts +2 -2
  799. package/build/modules/vc/models/presentation/W3cPresentation.d.ts.map +1 -1
  800. package/build/modules/vc/models/presentation/W3cPresentation.mjs.map +1 -1
  801. package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.d.mts +2 -2
  802. package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.d.ts +2 -2
  803. package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.js +1 -1
  804. package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.mjs +1 -1
  805. package/build/modules/vc/models/presentation/W3cV2EnvelopedVerifiablePresentation.mjs.map +1 -1
  806. package/build/modules/vc/models/presentation/W3cV2Holder.mjs.map +1 -1
  807. package/build/modules/vc/models/presentation/W3cV2JsonPresentation.d.mts +1 -1
  808. package/build/modules/vc/models/presentation/W3cV2JsonPresentation.d.ts +1 -1
  809. package/build/modules/vc/models/presentation/W3cV2Presentation.d.mts +1 -1
  810. package/build/modules/vc/models/presentation/W3cV2Presentation.d.ts +1 -1
  811. package/build/modules/vc/models/presentation/W3cV2Presentation.js +1 -1
  812. package/build/modules/vc/models/presentation/W3cV2Presentation.mjs +1 -1
  813. package/build/modules/vc/models/presentation/W3cV2VerifiablePresentation.d.mts +1 -1
  814. package/build/modules/vc/models/presentation/W3cV2VerifiablePresentation.d.ts +1 -1
  815. package/build/modules/vc/repository/W3cCredentialRecord.d.mts.map +1 -1
  816. package/build/modules/vc/repository/W3cCredentialRecord.d.ts.map +1 -1
  817. package/build/modules/vc/repository/W3cCredentialRecord.mjs.map +1 -1
  818. package/build/modules/vc/repository/W3cV2CredentialRecord.js +1 -1
  819. package/build/modules/vc/repository/W3cV2CredentialRecord.mjs +1 -1
  820. package/build/modules/vc/repository/W3cV2CredentialRecord.mjs.map +1 -1
  821. package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.d.mts +2 -2
  822. package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.d.mts.map +1 -1
  823. package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.d.ts +2 -2
  824. package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.d.ts.map +1 -1
  825. package/build/modules/vc/sd-jwt-vc/W3cV2SdJwt.mjs.map +1 -1
  826. package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.d.mts +1 -1
  827. package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.d.ts +1 -1
  828. package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.js +3 -3
  829. package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.mjs +3 -3
  830. package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtCredentialService.mjs.map +1 -1
  831. package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtVerifiableCredential.mjs.map +1 -1
  832. package/build/modules/vc/sd-jwt-vc/W3cV2SdJwtVerifiablePresentation.mjs.map +1 -1
  833. package/build/modules/vc/v2-jwt-utils.js +2 -2
  834. package/build/modules/vc/v2-jwt-utils.mjs +2 -2
  835. package/build/modules/vc/v2-jwt-utils.mjs.map +1 -1
  836. package/build/modules/vc/validators.mjs.map +1 -1
  837. package/build/modules/x509/X509Api.d.mts +1 -1
  838. package/build/modules/x509/X509Api.d.ts +1 -1
  839. package/build/modules/x509/X509Api.js +1 -1
  840. package/build/modules/x509/X509Api.mjs +1 -1
  841. package/build/modules/x509/X509Certificate.d.mts +5 -5
  842. package/build/modules/x509/X509Certificate.d.mts.map +1 -1
  843. package/build/modules/x509/X509Certificate.d.ts +5 -5
  844. package/build/modules/x509/X509Certificate.d.ts.map +1 -1
  845. package/build/modules/x509/X509Certificate.js +4 -7
  846. package/build/modules/x509/X509Certificate.mjs +3 -6
  847. package/build/modules/x509/X509Certificate.mjs.map +1 -1
  848. package/build/modules/x509/X509Module.d.mts.map +1 -1
  849. package/build/modules/x509/X509Module.d.ts.map +1 -1
  850. package/build/modules/x509/X509Module.js +1 -1
  851. package/build/modules/x509/X509Module.mjs +1 -1
  852. package/build/modules/x509/X509Module.mjs.map +1 -1
  853. package/build/modules/x509/X509ModuleConfig.d.mts +2 -2
  854. package/build/modules/x509/X509ModuleConfig.d.ts +2 -2
  855. package/build/modules/x509/X509Service.d.mts +1 -1
  856. package/build/modules/x509/X509Service.d.mts.map +1 -1
  857. package/build/modules/x509/X509Service.d.ts +1 -1
  858. package/build/modules/x509/X509Service.d.ts.map +1 -1
  859. package/build/modules/x509/X509Service.js +4 -4
  860. package/build/modules/x509/X509Service.mjs +3 -3
  861. package/build/modules/x509/X509Service.mjs.map +1 -1
  862. package/build/modules/x509/extraction.d.mts +1 -1
  863. package/build/modules/x509/extraction.d.ts +1 -1
  864. package/build/modules/x509/index.js +3 -3
  865. package/build/modules/x509/index.mjs +3 -3
  866. package/build/modules/x509/utils/extensions.d.mts.map +1 -1
  867. package/build/modules/x509/utils/extensions.d.ts.map +1 -1
  868. package/build/modules/x509/utils/extensions.js +1 -1
  869. package/build/modules/x509/utils/extensions.mjs +1 -1
  870. package/build/modules/x509/utils/extensions.mjs.map +1 -1
  871. package/build/modules/x509/utils/index.js +1 -1
  872. package/build/modules/x509/utils/index.mjs +1 -1
  873. package/build/modules/x509/utils/nameConversion.d.mts.map +1 -1
  874. package/build/modules/x509/utils/nameConversion.d.ts.map +1 -1
  875. package/build/modules/x509/utils/nameConversion.mjs.map +1 -1
  876. package/build/plugins/DependencyManager.d.mts.map +1 -1
  877. package/build/plugins/DependencyManager.d.ts.map +1 -1
  878. package/build/plugins/DependencyManager.mjs.map +1 -1
  879. package/build/storage/BaseRecord.mjs.map +1 -1
  880. package/build/storage/Metadata.mjs.map +1 -1
  881. package/build/storage/Repository.d.mts.map +1 -1
  882. package/build/storage/Repository.d.ts.map +1 -1
  883. package/build/storage/Repository.js +1 -1
  884. package/build/storage/Repository.mjs +1 -1
  885. package/build/storage/Repository.mjs.map +1 -1
  886. package/build/storage/RepositoryEvents.mjs.map +1 -1
  887. package/build/storage/StorageService.d.mts +1 -1
  888. package/build/storage/StorageService.d.ts +1 -1
  889. package/build/storage/index.js +1 -1
  890. package/build/storage/index.mjs +1 -1
  891. package/build/storage/migration/StorageUpdateService.d.mts.map +1 -1
  892. package/build/storage/migration/StorageUpdateService.d.ts.map +1 -1
  893. package/build/storage/migration/StorageUpdateService.js +1 -1
  894. package/build/storage/migration/StorageUpdateService.mjs +1 -1
  895. package/build/storage/migration/StorageUpdateService.mjs.map +1 -1
  896. package/build/storage/migration/UpdateAssistant.d.mts +1 -1
  897. package/build/storage/migration/UpdateAssistant.d.mts.map +1 -1
  898. package/build/storage/migration/UpdateAssistant.d.ts +1 -1
  899. package/build/storage/migration/UpdateAssistant.d.ts.map +1 -1
  900. package/build/storage/migration/UpdateAssistant.js +1 -1
  901. package/build/storage/migration/UpdateAssistant.mjs +1 -1
  902. package/build/storage/migration/UpdateAssistant.mjs.map +1 -1
  903. package/build/storage/migration/index.js +1 -1
  904. package/build/storage/migration/index.mjs +1 -1
  905. package/build/storage/migration/isUpToDate.d.mts.map +1 -1
  906. package/build/storage/migration/isUpToDate.d.ts.map +1 -1
  907. package/build/storage/migration/isUpToDate.js +1 -1
  908. package/build/storage/migration/isUpToDate.mjs +1 -1
  909. package/build/storage/migration/isUpToDate.mjs.map +1 -1
  910. package/build/storage/migration/updates/0.3.1-0.4/cache.mjs.map +1 -1
  911. package/build/storage/migration/updates/0.4-0.5/w3cCredentialRecord.mjs.map +1 -1
  912. package/build/storage/migration/updates.d.mts +1 -1
  913. package/build/storage/migration/updates.d.mts.map +1 -1
  914. package/build/storage/migration/updates.d.ts +1 -1
  915. package/build/storage/migration/updates.d.ts.map +1 -1
  916. package/build/storage/migration/updates.js +4 -4
  917. package/build/storage/migration/updates.mjs +1 -1
  918. package/build/storage/migration/updates.mjs.map +1 -1
  919. package/build/types.d.mts +12 -1
  920. package/build/types.d.mts.map +1 -1
  921. package/build/types.d.ts +12 -1
  922. package/build/types.d.ts.map +1 -1
  923. package/build/types.mjs.map +1 -1
  924. package/build/utils/HashlinkEncoder.d.mts +1 -1
  925. package/build/utils/HashlinkEncoder.d.mts.map +1 -1
  926. package/build/utils/HashlinkEncoder.d.ts +1 -1
  927. package/build/utils/HashlinkEncoder.d.ts.map +1 -1
  928. package/build/utils/HashlinkEncoder.mjs.map +1 -1
  929. package/build/utils/JsonEncoder.d.mts +3 -2
  930. package/build/utils/JsonEncoder.d.mts.map +1 -1
  931. package/build/utils/JsonEncoder.d.ts +3 -2
  932. package/build/utils/JsonEncoder.d.ts.map +1 -1
  933. package/build/utils/JsonEncoder.js +8 -8
  934. package/build/utils/JsonEncoder.mjs +4 -3
  935. package/build/utils/JsonEncoder.mjs.map +1 -1
  936. package/build/utils/JsonTransformer.mjs.map +1 -1
  937. package/build/utils/MessageValidator.mjs.map +1 -1
  938. package/build/utils/MultiBaseEncoder.d.mts +4 -2
  939. package/build/utils/MultiBaseEncoder.d.mts.map +1 -1
  940. package/build/utils/MultiBaseEncoder.d.ts +4 -2
  941. package/build/utils/MultiBaseEncoder.d.ts.map +1 -1
  942. package/build/utils/MultiBaseEncoder.mjs.map +1 -1
  943. package/build/utils/MultiHashEncoder.d.mts +5 -5
  944. package/build/utils/MultiHashEncoder.d.mts.map +1 -1
  945. package/build/utils/MultiHashEncoder.d.ts +5 -5
  946. package/build/utils/MultiHashEncoder.d.ts.map +1 -1
  947. package/build/utils/MultiHashEncoder.js +5 -7
  948. package/build/utils/MultiHashEncoder.mjs +5 -4
  949. package/build/utils/MultiHashEncoder.mjs.map +1 -1
  950. package/build/utils/TypedArrayEncoder.d.mts +12 -9
  951. package/build/utils/TypedArrayEncoder.d.mts.map +1 -1
  952. package/build/utils/TypedArrayEncoder.d.ts +12 -9
  953. package/build/utils/TypedArrayEncoder.d.ts.map +1 -1
  954. package/build/utils/TypedArrayEncoder.js +22 -17
  955. package/build/utils/TypedArrayEncoder.mjs +7 -1
  956. package/build/utils/TypedArrayEncoder.mjs.map +1 -1
  957. package/build/utils/VarintEncoder.js +1 -4
  958. package/build/utils/VarintEncoder.mjs +1 -2
  959. package/build/utils/VarintEncoder.mjs.map +1 -1
  960. package/build/utils/base58.mjs.map +1 -1
  961. package/build/utils/buffer.d.mts +1 -1
  962. package/build/utils/buffer.d.ts +1 -1
  963. package/build/utils/buffer.mjs +1 -1
  964. package/build/utils/deepEquality.mjs.map +1 -1
  965. package/build/utils/index.js +10 -11
  966. package/build/utils/index.mjs +9 -9
  967. package/build/utils/objectEquality.mjs.map +1 -1
  968. package/build/utils/timestamp.d.mts +10 -2
  969. package/build/utils/timestamp.d.mts.map +1 -1
  970. package/build/utils/timestamp.d.ts +10 -2
  971. package/build/utils/timestamp.d.ts.map +1 -1
  972. package/build/utils/timestamp.js +9 -1
  973. package/build/utils/timestamp.mjs +8 -2
  974. package/build/utils/timestamp.mjs.map +1 -1
  975. package/build/utils/transformers.d.mts.map +1 -1
  976. package/build/utils/transformers.d.ts.map +1 -1
  977. package/build/utils/transformers.mjs.map +1 -1
  978. package/build/utils/validators.d.mts.map +1 -1
  979. package/build/utils/validators.d.ts.map +1 -1
  980. package/build/utils/validators.mjs.map +1 -1
  981. package/build/utils/zod.js +2 -0
  982. package/build/utils/zod.mjs +2 -1
  983. package/build/utils/zod.mjs.map +1 -1
  984. package/package.json +25 -25
  985. package/build/utils/buffer.js +0 -5
@@ -8,8 +8,8 @@ import "../../utils/index.mjs";
8
8
  import { PublicJwk } from "../kms/jwk/PublicJwk.mjs";
9
9
  import { KeyManagementApi } from "../kms/KeyManagementApi.mjs";
10
10
  import "../kms/index.mjs";
11
- import { getPublicJwkFromVerificationMethod } from "../dids/domain/key-type/keyDidMapping.mjs";
12
11
  import { parseDid } from "../dids/domain/parse.mjs";
12
+ import { getPublicJwkFromVerificationMethod } from "../dids/domain/key-type/keyDidMapping.mjs";
13
13
  import { DidResolverService } from "../dids/services/DidResolverService.mjs";
14
14
  import { DidsApi } from "../dids/DidsApi.mjs";
15
15
  import "../dids/index.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","names":["publicJwk: PublicJwk","cnf: CnfPayload"],"sources":["../../../src/modules/sd-jwt-vc/utils.ts"],"sourcesContent":["import type { Signer, Verifier } from '@sd-jwt/types'\nimport type { SdJwtVcHolderBinding } from './SdJwtVcOptions'\n\nimport { AgentContext } from '../../agent'\nimport { CredoError } from '../../error'\nimport { TypedArrayEncoder } from '../../utils'\nimport { DidResolverService, DidsApi, getPublicJwkFromVerificationMethod, parseDid } from '../dids'\nimport { type Jwk, KeyManagementApi, PublicJwk } from '../kms'\n\nexport async function resolveSigningPublicJwkFromDidUrl(agentContext: AgentContext, didUrl: string) {\n const dids = agentContext.dependencyManager.resolve(DidsApi)\n\n const { publicJwk } = await dids.resolveVerificationMethodFromCreatedDidRecord(didUrl)\n return publicJwk\n}\n\nexport async function resolveDidUrl(agentContext: AgentContext, didUrl: string) {\n const didResolver = agentContext.dependencyManager.resolve(DidResolverService)\n const didDocument = await didResolver.resolveDidDocument(agentContext, didUrl)\n\n return {\n verificationMethod: didDocument.dereferenceKey(didUrl, ['assertionMethod']),\n didDocument,\n }\n}\n\nexport async function extractKeyFromHolderBinding(\n agentContext: AgentContext,\n holder: SdJwtVcHolderBinding,\n forSigning = false\n) {\n if (holder.method === 'did') {\n const parsedDid = parseDid(holder.didUrl)\n if (!parsedDid.fragment) {\n throw new CredoError(`didUrl '${holder.didUrl}' does not contain a '#'. Unable to derive key from did document`)\n }\n\n let publicJwk: PublicJwk\n if (forSigning) {\n publicJwk = await resolveSigningPublicJwkFromDidUrl(agentContext, holder.didUrl)\n } else {\n const { verificationMethod } = await resolveDidUrl(agentContext, holder.didUrl)\n publicJwk = getPublicJwkFromVerificationMethod(verificationMethod)\n }\n\n const supportedSignatureAlgorithms = publicJwk.supportedSignatureAlgorithms\n if (supportedSignatureAlgorithms.length === 0) {\n throw new CredoError(`No supported JWA signature algorithms found for key ${publicJwk.jwkTypehumanDescription}`)\n }\n const alg = supportedSignatureAlgorithms[0]\n\n return {\n alg,\n publicJwk,\n cnf: {\n // We need to include the whole didUrl here, otherwise the verifier\n // won't know which did it is associated with\n kid: holder.didUrl,\n },\n }\n }\n if (holder.method === 'jwk') {\n const publicJwk = holder.jwk\n const alg = publicJwk.supportedSignatureAlgorithms[0]\n\n // If there is no key id configured when signing, we assume this credential was issued before we included key ids\n // and the we use the legacy key id.\n if (forSigning && !publicJwk.hasKeyId) {\n publicJwk.keyId = publicJwk.legacyKeyId\n }\n\n return {\n alg,\n publicJwk,\n cnf: {\n jwk: publicJwk.toJson(),\n },\n }\n }\n\n throw new CredoError(\"Unsupported credential holder binding. Only 'did' and 'jwk' are supported at the moment.\")\n}\n\n/**\n * @todo validate the JWT header (alg)\n */\nexport function getSdJwtSigner(agentContext: AgentContext, key: PublicJwk): Signer {\n const kms = agentContext.resolve(KeyManagementApi)\n\n return async (input: string) => {\n const result = await kms.sign({\n keyId: key.keyId,\n data: TypedArrayEncoder.fromString(input),\n algorithm: key.signatureAlgorithm,\n })\n\n return TypedArrayEncoder.toBase64URL(result.signature)\n }\n}\n\n/**\n * @todo validate the JWT header (alg)\n */\nexport function getSdJwtVerifier(agentContext: AgentContext, key: PublicJwk): Verifier {\n const kms = agentContext.resolve(KeyManagementApi)\n\n return async (message: string, signatureBase64Url: string) => {\n const result = await kms.verify({\n signature: TypedArrayEncoder.fromBase64(signatureBase64Url),\n key: {\n publicJwk: key.toJson(),\n },\n data: TypedArrayEncoder.fromString(message),\n algorithm: key.signatureAlgorithm,\n })\n\n return result.verified\n }\n}\n\nexport interface CnfPayload {\n jwk?: Jwk\n kid?: string\n}\n\nexport function parseHolderBindingFromCredential(payload?: Record<string, unknown>): SdJwtVcHolderBinding | null {\n if (!payload) {\n throw new CredoError('Unable to extract payload from SD-JWT VC')\n }\n\n if (!payload.cnf) {\n return null\n }\n const cnf: CnfPayload = payload.cnf\n\n if (cnf.jwk) {\n return {\n method: 'jwk',\n jwk: PublicJwk.fromUnknown(cnf.jwk),\n }\n }\n if (cnf.kid) {\n if (!cnf.kid.startsWith('did:') || !cnf.kid.includes('#')) {\n throw new CredoError('Invalid holder kid for did. Only absolute KIDs for cnf are supported')\n }\n return {\n method: 'did',\n didUrl: cnf.kid,\n }\n }\n\n throw new CredoError(\"Unsupported credential holder binding. Only 'did' and 'jwk' are supported at the moment.\")\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AASA,eAAsB,kCAAkC,cAA4B,QAAgB;C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AM;GACzC,WAAW,IAAI;GAChB,CAAC;AAEF,SAAO,kBAAkB,YAAY,OAAO,UAAU;;;;;;AAO1D,SAAgB,iBAAiB,cAA4B,KAA0B;CACrF,MAAM,MAAM,aAAa,QAAQ,iBAAiB;AAElD,QAAO,OAAO,SAAiB,uBAA+B;AAU5D,UATe,MAAM,IAAI,OAAO;GAC9B,WAAW,kBAAkB,WAAW,mBAAmB;GAC3D,KAAK,EACH,WAAW,IAAI,QAAQ,EACxB;GACD,MAAM,kBAAkB,WAAW,QAAQ;GAC3C,WAAW,IAAI;GAChB,CAAC,EAEY;;;AASlB,SAAgB,iCAAiC,SAAgE;AAC/G,KAAI,CAAC,QACH,OAAM,IAAI,WAAW,2CAA2C;AAGlE,KAAI,CAAC,QAAQ,IACX,QAAO;CAET,MAAMC,MAAkB,QAAQ;AAEhC,KAAI,IAAI,IACN,QAAO;EACL,QAAQ;EACR,KAAK,UAAU,YAAY,IAAI,IAAI;EACpC;AAEH,KAAI,IAAI,KAAK;AACX,MAAI,CAAC,IAAI,IAAI,WAAW,OAAO,IAAI,CAAC,IAAI,IAAI,SAAS,IAAI,CACvD,OAAM,IAAI,WAAW,uEAAuE;AAE9F,SAAO;GACL,QAAQ;GACR,QAAQ,IAAI;GACb;;AAGH,OAAM,IAAI,WAAW,2FAA2F"}
1
+ {"version":3,"file":"utils.mjs","names":["publicJwk: PublicJwk","cnf: CnfPayload"],"sources":["../../../src/modules/sd-jwt-vc/utils.ts"],"sourcesContent":["import type { Signer, Verifier } from '@sd-jwt/types'\nimport { AgentContext } from '../../agent'\nimport { CredoError } from '../../error'\nimport { TypedArrayEncoder } from '../../utils'\nimport { DidResolverService, DidsApi, getPublicJwkFromVerificationMethod, parseDid } from '../dids'\nimport { type Jwk, KeyManagementApi, PublicJwk } from '../kms'\nimport type { SdJwtVcHolderBinding } from './SdJwtVcOptions'\n\nexport async function resolveSigningPublicJwkFromDidUrl(agentContext: AgentContext, didUrl: string) {\n const dids = agentContext.dependencyManager.resolve(DidsApi)\n\n const { publicJwk } = await dids.resolveVerificationMethodFromCreatedDidRecord(didUrl)\n return publicJwk\n}\n\nexport async function resolveDidUrl(agentContext: AgentContext, didUrl: string) {\n const didResolver = agentContext.dependencyManager.resolve(DidResolverService)\n const didDocument = await didResolver.resolveDidDocument(agentContext, didUrl)\n\n return {\n verificationMethod: didDocument.dereferenceKey(didUrl, ['assertionMethod']),\n didDocument,\n }\n}\n\nexport async function extractKeyFromHolderBinding(\n agentContext: AgentContext,\n holder: SdJwtVcHolderBinding,\n forSigning = false\n) {\n if (holder.method === 'did') {\n const parsedDid = parseDid(holder.didUrl)\n if (!parsedDid.fragment) {\n throw new CredoError(`didUrl '${holder.didUrl}' does not contain a '#'. Unable to derive key from did document`)\n }\n\n let publicJwk: PublicJwk\n if (forSigning) {\n publicJwk = await resolveSigningPublicJwkFromDidUrl(agentContext, holder.didUrl)\n } else {\n const { verificationMethod } = await resolveDidUrl(agentContext, holder.didUrl)\n publicJwk = getPublicJwkFromVerificationMethod(verificationMethod)\n }\n\n const supportedSignatureAlgorithms = publicJwk.supportedSignatureAlgorithms\n if (supportedSignatureAlgorithms.length === 0) {\n throw new CredoError(`No supported JWA signature algorithms found for key ${publicJwk.jwkTypehumanDescription}`)\n }\n const alg = supportedSignatureAlgorithms[0]\n\n return {\n alg,\n publicJwk,\n cnf: {\n // We need to include the whole didUrl here, otherwise the verifier\n // won't know which did it is associated with\n kid: holder.didUrl,\n },\n }\n }\n if (holder.method === 'jwk') {\n const publicJwk = holder.jwk\n const alg = publicJwk.supportedSignatureAlgorithms[0]\n\n // If there is no key id configured when signing, we assume this credential was issued before we included key ids\n // and the we use the legacy key id.\n if (forSigning && !publicJwk.hasKeyId) {\n publicJwk.keyId = publicJwk.legacyKeyId\n }\n\n return {\n alg,\n publicJwk,\n cnf: {\n jwk: publicJwk.toJson(),\n },\n }\n }\n\n throw new CredoError(\"Unsupported credential holder binding. Only 'did' and 'jwk' are supported at the moment.\")\n}\n\n/**\n * @todo validate the JWT header (alg)\n */\nexport function getSdJwtSigner(agentContext: AgentContext, key: PublicJwk): Signer {\n const kms = agentContext.resolve(KeyManagementApi)\n\n return async (input: string) => {\n const result = await kms.sign({\n keyId: key.keyId,\n data: TypedArrayEncoder.fromString(input),\n algorithm: key.signatureAlgorithm,\n })\n\n return TypedArrayEncoder.toBase64URL(result.signature)\n }\n}\n\n/**\n * @todo validate the JWT header (alg)\n */\nexport function getSdJwtVerifier(agentContext: AgentContext, key: PublicJwk): Verifier {\n const kms = agentContext.resolve(KeyManagementApi)\n\n return async (message: string, signatureBase64Url: string) => {\n const result = await kms.verify({\n signature: TypedArrayEncoder.fromBase64(signatureBase64Url),\n key: {\n publicJwk: key.toJson(),\n },\n data: TypedArrayEncoder.fromString(message),\n algorithm: key.signatureAlgorithm,\n })\n\n return result.verified\n }\n}\n\nexport interface CnfPayload {\n jwk?: Jwk\n kid?: string\n}\n\nexport function parseHolderBindingFromCredential(payload?: Record<string, unknown>): SdJwtVcHolderBinding | null {\n if (!payload) {\n throw new CredoError('Unable to extract payload from SD-JWT VC')\n }\n\n if (!payload.cnf) {\n return null\n }\n const cnf: CnfPayload = payload.cnf\n\n if (cnf.jwk) {\n return {\n method: 'jwk',\n jwk: PublicJwk.fromUnknown(cnf.jwk),\n }\n }\n if (cnf.kid) {\n if (!cnf.kid.startsWith('did:') || !cnf.kid.includes('#')) {\n throw new CredoError('Invalid holder kid for did. Only absolute KIDs for cnf are supported')\n }\n return {\n method: 'did',\n didUrl: cnf.kid,\n }\n }\n\n throw new CredoError(\"Unsupported credential holder binding. Only 'did' and 'jwk' are supported at the moment.\")\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAQA,eAAsB,kCAAkC,cAA4B,QAAgB;CAGlG,MAAM,EAAE,cAAc,MAFT,aAAa,kBAAkB,QAAQ,QAAQ,CAE3B,8CAA8C,OAAO;AACtF,QAAO;;AAGT,eAAsB,cAAc,cAA4B,QAAgB;CAE9E,MAAM,cAAc,MADA,aAAa,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ElD,QAAO,OAAO,SAAiB,uBAA+B;AAU5D,UATe,MAAM,IAAI,OAAO;GAC9B,WAAW,kBAAkB,WAAW,mBAAmB;GAC3D,KAAK,EACH,WAAW,IAAI,QAAQ,EACxB;GACD,MAAM,kBAAkB,WAAW,QAAQ;GAC3C,WAAW,IAAI;GAChB,CAAC,EAEY;;;AASlB,SAAgB,iCAAiC,SAAgE;AAC/G,KAAI,CAAC,QACH,OAAM,IAAI,WAAW,2CAA2C;AAGlE,KAAI,CAAC,QAAQ,IACX,QAAO;CAET,MAAMC,MAAkB,QAAQ;AAEhC,KAAI,IAAI,IACN,QAAO;EACL,QAAQ;EACR,KAAK,UAAU,YAAY,IAAI,IAAI;EACpC;AAEH,KAAI,IAAI,KAAK;AACX,MAAI,CAAC,IAAI,IAAI,WAAW,OAAO,IAAI,CAAC,IAAI,IAAI,SAAS,IAAI,CACvD,OAAM,IAAI,WAAW,uEAAuE;AAE9F,SAAO;GACL,QAAQ;GACR,QAAQ,IAAI;GACb;;AAGH,OAAM,IAAI,WAAW,2FAA2F"}
@@ -2,10 +2,10 @@ import { Query, QueryOptions } from "../../storage/StorageService.mjs";
2
2
  import { ClaimFormat } from "./models/ClaimFormat.mjs";
3
3
  import { W3cVerifiableCredential } from "./models/credential/W3cVerifiableCredential.mjs";
4
4
  import { W3cPresentation } from "./models/presentation/W3cPresentation.mjs";
5
- import { W3cCreatePresentationOptions, W3cSignCredentialOptions, W3cSignPresentationOptions, W3cStoreCredentialOptions, W3cVerifyCredentialOptions, W3cVerifyPresentationOptions } from "./W3cCredentialServiceOptions.mjs";
6
- import { W3cJwtCredentialService } from "./jwt-vc/W3cJwtCredentialService.mjs";
7
5
  import { W3cVerifiablePresentation } from "./models/presentation/W3cVerifiablePresentation.mjs";
8
6
  import { W3cVerifyCredentialResult, W3cVerifyPresentationResult } from "./models/W3cVerifyResult.mjs";
7
+ import { W3cCreatePresentationOptions, W3cSignCredentialOptions, W3cSignPresentationOptions, W3cStoreCredentialOptions, W3cVerifyCredentialOptions, W3cVerifyPresentationOptions } from "./W3cCredentialServiceOptions.mjs";
8
+ import { W3cJwtCredentialService } from "./jwt-vc/W3cJwtCredentialService.mjs";
9
9
  import { W3cCredentialRecord } from "./repository/W3cCredentialRecord.mjs";
10
10
  import { W3cCredentialRepository } from "./repository/W3cCredentialRepository.mjs";
11
11
  import { W3cJsonLdCredentialService } from "./data-integrity/W3cJsonLdCredentialService.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"W3cCredentialService.d.mts","names":[],"sources":["../../../src/modules/vc/W3cCredentialService.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;cAmCa,oBAAA;;;;uCAMgB,qDACG,qDACH;;;AAT7B;;;;gBAS6B,CAAA,eAagB,WAAA,CAAY,KAb5B,GAaoC,WAAA,CAAY,KAbhD,CAAA,CAAA,YAAA,EAcX,YAdW,EAAA,OAAA,EAehB,wBAfgB,CAeS,MAfT,CAAA,CAAA,EAgBxB,OAhBwB,CAgBhB,uBAhBgB,CAgBQ,MAhBR,CAAA,CAAA;;;;kBAeS,CAAA,YAAA,EAiBpB,YAjBoB,EAAA,OAAA,EAkBzB,0BAlByB,CAAA,EAmBjC,OAnBiC,CAmBzB,yBAnByB,CAAA;;;;;;;;oBAmBjC,CAAA,OAAA,EAmBsC,4BAnBtC,CAAA,EAmBqE,OAnBrE,CAmB6E,eAnB7E,CAAA;;;;;;;kBAuCmC,CAAA,eAFO,WAAA,CAAY,KAEnB,GAF2B,WAAA,CAAY,KAEvC,CAAA,CAAA,YAAA,EADtB,YACsB,EAAA,OAAA,EAA3B,0BAA2B,CAAA,MAAA,CAAA,CAAA,EACnC,OADmC,CAC3B,yBAD2B,CACD,MADC,CAAA,CAAA;;;;;;;oBAsB3B,CAAA,YAAA,EAFK,YAEL,EAAA,OAAA,EADA,4BACA,CAAA,EAAR,OAAQ,CAAA,2BAAA,CAAA;;;;;;;iBA+C+D,CAAA,YAAA,EAzB1D,YAyB0D,EAAA,OAAA,EAxB/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O,WAAA,CAAY,KAEnB,GAF2B,WAAA,CAAY,KAEvC,CAAA,CAAA,YAAA,EADtB,YACsB,EAAA,OAAA,EAA3B,0BAA2B,CAAA,MAAA,CAAA,CAAA,EACnC,OADmC,CAC3B,yBAD2B,CACD,MADC,CAAA,CAAA;;;;;;;oBAsB3B,CAAA,YAAA,EAFK,YAEL,EAAA,OAAA,EADA,4BACA,CAAA,EAAR,OAAQ,CAAA,2BAAA,CAAA;;;;;;;iBA+C+D,CAAA,YAAA,EAzB1D,YAyB0D,EAAA,OAAA,EAxB/D,yBAwB+D,CAAA,EAvBvE,OAuBuE,CAvB/D,mBAuB+D,CAAA;wBAIvB,CAAA,YAAA,EAJD,YAIC,EAAA,EAAA,EAAA,MAAA,CAAA,EAJuB,OAIvB,CAAA,IAAA,CAAA;yBAAuB,CAAA,YAAA,EAAvB,YAAuB,CAAA,EAAR,OAAQ,CAAA,mBAAA,EAAA,CAAA;yBAAR,CAAA,YAAA,EAIf,YAJe,EAAA,EAAA,EAAA,MAAA,CAAA,EAIY,OAJZ,CAIoB,mBAJpB,CAAA;wBAIf,CAAA,YAAA,EAKnC,YALmC,EAAA,KAAA,EAM1C,KAN0C,CAMpC,mBANoC,CAAA,EAAA,YAAA,CAAA,EAOlC,YAPkC,CAAA,EAQhD,OARgD,CAQxC,uBARwC,EAAA,CAAA;6BAAmC,CAAA,YAAA,EActE,YAdsE,EAAA,KAAA,EAe7E,KAf6E,CAevE,mBAfuE,CAAA,CAAA,EAgBnF,OAhBmF,CAgB3E,uBAhB2E,GAAA,SAAA,CAAA"}
@@ -2,10 +2,10 @@ import { Query, QueryOptions } from "../../storage/StorageService.js";
2
2
  import { ClaimFormat } from "./models/ClaimFormat.js";
3
3
  import { W3cVerifiableCredential } from "./models/credential/W3cVerifiableCredential.js";
4
4
  import { W3cPresentation } from "./models/presentation/W3cPresentation.js";
5
- import { W3cCreatePresentationOptions, W3cSignCredentialOptions, W3cSignPresentationOptions, W3cStoreCredentialOptions, W3cVerifyCredentialOptions, W3cVerifyPresentationOptions } from "./W3cCredentialServiceOptions.js";
6
- import { W3cJwtCredentialService } from "./jwt-vc/W3cJwtCredentialService.js";
7
5
  import { W3cVerifiablePresentation } from "./models/presentation/W3cVerifiablePresentation.js";
8
6
  import { W3cVerifyCredentialResult, W3cVerifyPresentationResult } from "./models/W3cVerifyResult.js";
7
+ import { W3cCreatePresentationOptions, W3cSignCredentialOptions, W3cSignPresentationOptions, W3cStoreCredentialOptions, W3cVerifyCredentialOptions, W3cVerifyPresentationOptions } from "./W3cCredentialServiceOptions.js";
8
+ import { W3cJwtCredentialService } from "./jwt-vc/W3cJwtCredentialService.js";
9
9
  import { W3cCredentialRecord } from "./repository/W3cCredentialRecord.js";
10
10
  import { W3cCredentialRepository } from "./repository/W3cCredentialRepository.js";
11
11
  import { W3cJsonLdCredentialService } from "./data-integrity/W3cJsonLdCredentialService.js";
@@ -1 +1 @@
1
- {"version":3,"file":"W3cCredentialService.d.ts","names":[],"sources":["../../../src/modules/vc/W3cCredentialService.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;cAmCa,oBAAA;;;;uCAMgB,qDACG,qDACH;EARhB;;;;;;gBAqBoD,CAAY,eAAhC,WAAA,CAAY,KAAoB,GAAZ,WAAA,CAAY,KAAA,CAAA,CAAA,YAAA,EAC3D,YAD2D,EAAA,OAAA,EAEhE,wBAFgE,CAEvC,MAFuC,CAAA,CAAA,EAGxE,OAHwE,CAGhE,uBAHgE,CAGxC,MAHwC,CAAA,CAAA;;;;kBAGxC,CAAA,YAAA,EAgBnB,YAhBmB,EAAA,OAAA,EAiBxB,0BAjBwB,CAAA,EAkBhC,OAlBgC,CAkBxB,yBAlBwB,CAAA;;;;;;;;oBAqC6C,CAAA,OAAA,EAAvC,4BAAuC,CAAA,EAAR,OAAQ,CAAA,eAAA,CAAA;;;;;;;kBAqB3C,CAAA,eAHQ,WAAA,CAAY,KAGpB,GAH4B,WAAA,CAAY,KAGxC,CAAA,CAAA,YAAA,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AAA,SAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"W3cCredentialService.mjs","names":["W3cCredentialService","expandedTypes: string[]"],"sources":["../../../src/modules/vc/W3cCredentialService.ts"],"sourcesContent":["import type { AgentContext } from '../../agent/context'\nimport type { Query, QueryOptions } from '../../storage/StorageService'\nimport type {\n W3cCreatePresentationOptions,\n W3cJsonLdVerifyCredentialOptions,\n W3cJsonLdVerifyPresentationOptions,\n W3cJwtVerifyCredentialOptions,\n W3cJwtVerifyPresentationOptions,\n W3cSignCredentialOptions,\n W3cSignPresentationOptions,\n W3cStoreCredentialOptions,\n W3cVerifyCredentialOptions,\n W3cVerifyPresentationOptions,\n} from './W3cCredentialServiceOptions'\nimport type {\n W3cVerifiableCredential,\n W3cVerifiablePresentation,\n W3cVerifyCredentialResult,\n W3cVerifyPresentationResult,\n} from './models'\n\nimport { CredoError } from '../../error'\nimport { injectable } from '../../plugins'\n\nimport { CREDENTIALS_CONTEXT_V1_URL } from './constants'\nimport { W3cJsonLdVerifiableCredential } from './data-integrity'\nimport { W3cJsonLdCredentialService } from './data-integrity/W3cJsonLdCredentialService'\nimport { W3cJsonLdVerifiablePresentation } from './data-integrity/models/W3cJsonLdVerifiablePresentation'\nimport { W3cJwtVerifiableCredential, W3cJwtVerifiablePresentation } from './jwt-vc'\nimport { W3cJwtCredentialService } from './jwt-vc/W3cJwtCredentialService'\nimport { ClaimFormat } from './models'\nimport { W3cPresentation } from './models/presentation/W3cPresentation'\nimport { W3cCredentialRecord, W3cCredentialRepository } from './repository'\n\n@injectable()\nexport class W3cCredentialService {\n private w3cCredentialRepository: W3cCredentialRepository\n private w3cJsonLdCredentialService: W3cJsonLdCredentialService\n private w3cJwtCredentialService: W3cJwtCredentialService\n\n public constructor(\n w3cCredentialRepository: W3cCredentialRepository,\n w3cJsonLdCredentialService: W3cJsonLdCredentialService,\n w3cJwtCredentialService: W3cJwtCredentialService\n ) {\n this.w3cCredentialRepository = w3cCredentialRepository\n this.w3cJsonLdCredentialService = w3cJsonLdCredentialService\n this.w3cJwtCredentialService = w3cJwtCredentialService\n }\n\n /**\n * Signs a credential\n *\n * @param credential the credential to be signed\n * @returns the signed credential\n */\n public async signCredential<Format extends ClaimFormat.JwtVc | ClaimFormat.LdpVc>(\n agentContext: AgentContext,\n options: W3cSignCredentialOptions<Format>\n ): Promise<W3cVerifiableCredential<Format>> {\n if (options.format === ClaimFormat.JwtVc) {\n const signed = await this.w3cJwtCredentialService.signCredential(agentContext, options)\n return signed as W3cVerifiableCredential<Format>\n }\n if (options.format === ClaimFormat.LdpVc) {\n const signed = await this.w3cJsonLdCredentialService.signCredential(agentContext, options)\n return signed as W3cVerifiableCredential<Format>\n }\n throw new CredoError(`Unsupported format in options. Format must be either 'jwt_vc' or 'ldp_vc'`)\n }\n\n /**\n * Verifies the signature(s) of a credential\n */\n public async verifyCredential(\n agentContext: AgentContext,\n options: W3cVerifyCredentialOptions\n ): Promise<W3cVerifyCredentialResult> {\n if (options.credential instanceof W3cJsonLdVerifiableCredential) {\n return this.w3cJsonLdCredentialService.verifyCredential(agentContext, options as W3cJsonLdVerifyCredentialOptions)\n }\n if (options.credential instanceof W3cJwtVerifiableCredential || typeof options.credential === 'string') {\n return this.w3cJwtCredentialService.verifyCredential(agentContext, options as W3cJwtVerifyCredentialOptions)\n }\n throw new CredoError(\n 'Unsupported credential type in options. Credential must be either a W3cJsonLdVerifiableCredential or a W3cJwtVerifiableCredential'\n )\n }\n\n /**\n * Utility method that creates a {@link W3cPresentation} from one or more {@link W3cJsonLdVerifiableCredential}s.\n *\n * **NOTE: the presentation that is returned is unsigned.**\n *\n * @returns An instance of {@link W3cPresentation}\n */\n public async createPresentation(options: W3cCreatePresentationOptions): Promise<W3cPresentation> {\n const presentation = new W3cPresentation({\n context: [CREDENTIALS_CONTEXT_V1_URL],\n type: ['VerifiablePresentation'],\n verifiableCredential: options.credentials,\n holder: options.holder,\n id: options.id,\n })\n\n return presentation\n }\n\n /**\n * Signs a presentation including the credentials it includes\n *\n * @param presentation the presentation to be signed\n * @returns the signed presentation\n */\n public async signPresentation<Format extends ClaimFormat.JwtVp | ClaimFormat.LdpVp>(\n agentContext: AgentContext,\n options: W3cSignPresentationOptions<Format>\n ): Promise<W3cVerifiablePresentation<Format>> {\n if (options.format === ClaimFormat.JwtVp) {\n const signed = await this.w3cJwtCredentialService.signPresentation(agentContext, options)\n return signed as W3cVerifiablePresentation<Format>\n }\n if (options.format === ClaimFormat.LdpVp) {\n const signed = await this.w3cJsonLdCredentialService.signPresentation(agentContext, options)\n return signed as W3cVerifiablePresentation<Format>\n }\n throw new CredoError(`Unsupported format in options. Format must be either 'jwt_vp' or 'ldp_vp'`)\n }\n\n /**\n * Verifies a presentation including the credentials it includes\n *\n * @param presentation the presentation to be verified\n * @returns the verification result\n */\n public async verifyPresentation(\n agentContext: AgentContext,\n options: W3cVerifyPresentationOptions\n ): Promise<W3cVerifyPresentationResult> {\n if (options.presentation instanceof W3cJsonLdVerifiablePresentation) {\n return this.w3cJsonLdCredentialService.verifyPresentation(\n agentContext,\n options as W3cJsonLdVerifyPresentationOptions\n )\n }\n if (options.presentation instanceof W3cJwtVerifiablePresentation || typeof options.presentation === 'string') {\n return this.w3cJwtCredentialService.verifyPresentation(agentContext, options as W3cJwtVerifyPresentationOptions)\n }\n throw new CredoError(\n 'Unsupported credential type in options. Presentation must be either a W3cJsonLdVerifiablePresentation or a W3cJwtVerifiablePresentation'\n )\n }\n\n /**\n * Writes a credential to storage\n *\n * @param record the credential to be stored\n * @returns the credential record that was written to storage\n */\n public async storeCredential(\n agentContext: AgentContext,\n options: W3cStoreCredentialOptions\n ): Promise<W3cCredentialRecord> {\n let expandedTypes: string[] = []\n\n // JsonLd credentials need expanded types to be stored.\n if (options.credential instanceof W3cJsonLdVerifiableCredential) {\n expandedTypes = await this.w3cJsonLdCredentialService.getExpandedTypesForCredential(\n agentContext,\n options.credential\n )\n }\n\n // Create an instance of the w3cCredentialRecord\n const w3cCredentialRecord = new W3cCredentialRecord({\n tags: { expandedTypes },\n credential: options.credential,\n })\n\n // Store the w3c credential record\n await this.w3cCredentialRepository.save(agentContext, w3cCredentialRecord)\n\n return w3cCredentialRecord\n }\n\n public async removeCredentialRecord(agentContext: AgentContext, id: string) {\n await this.w3cCredentialRepository.deleteById(agentContext, id)\n }\n\n public async getAllCredentialRecords(agentContext: AgentContext): Promise<W3cCredentialRecord[]> {\n return await this.w3cCredentialRepository.getAll(agentContext)\n }\n\n public async getCredentialRecordById(agentContext: AgentContext, id: string): Promise<W3cCredentialRecord> {\n return await this.w3cCredentialRepository.getById(agentContext, id)\n }\n\n public async findCredentialsByQuery(\n agentContext: AgentContext,\n query: Query<W3cCredentialRecord>,\n queryOptions?: QueryOptions\n ): Promise<W3cVerifiableCredential[]> {\n const result = await this.w3cCredentialRepository.findByQuery(agentContext, query, queryOptions)\n return result.map((record) => record.credential)\n }\n\n public async findCredentialRecordByQuery(\n agentContext: AgentContext,\n query: Query<W3cCredentialRecord>\n ): Promise<W3cVerifiableCredential | undefined> {\n const result = await this.w3cCredentialRepository.findSingleByQuery(agentContext, query)\n return result?.credential\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAmCO,iCAAMA,uBAAqB;CAKhC,AAAO,YACL,yBACA,4BACA,yBACA;AACA,OAAK,0BAA0B;AAC/B,OAAK,6BAA6B;AAClC,OAAK,0BAA0B;;;;;;;;CASjC,MAAa,eACX,cACA,SAC0C;AAC1C,MAAI,QAAQ,WAAW,YAAY,MAEjC,QADe,MAAM,KAAK,wBAAwB,eAAe,cAAc,QAAQ;AAGzF,MAAI,QAAQ,WAAW,YAAY,MAEjC,QADe,MAAM,KAAK,2BAA2B,eAAe,cAAc,QAAQ;AAG5F,QAAM,IAAI,WAAW,4EAA4E;;;;;CAMnG,MAAa,iBACX,cACA,SACoC;AACpC,MAAI,QAAQ,sBAAsB,8BAChC,QAAO,KAAK,2BAA2B,iBAAiB,cAAc,QAA4C;AAEpH,MAAI,QAAQ,s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KAAK,wBAAwB,OAAO,aAAa;;CAGhE,MAAa,wBAAwB,cAA4B,IAA0C;AACzG,SAAO,MAAM,KAAK,wBAAwB,QAAQ,cAAc,GAAG;;CAGrE,MAAa,uBACX,cACA,OACA,cACoC;AAEpC,UADe,MAAM,KAAK,wBAAwB,YAAY,cAAc,OAAO,aAAa,EAClF,KAAK,WAAW,OAAO,WAAW;;CAGlD,MAAa,4BACX,cACA,OAC8C;AAE9C,UADe,MAAM,KAAK,wBAAwB,kBAAkB,cAAc,MAAM,GACzE;;;mCAjLlB,YAAY"}
1
+ {"version":3,"file":"W3cCredentialService.mjs","names":["W3cCredentialService","expandedTypes: string[]"],"sources":["../../../src/modules/vc/W3cCredentialService.ts"],"sourcesContent":["import type { AgentContext } from '../../agent/context'\nimport { CredoError } from '../../error'\nimport { injectable } from '../../plugins'\nimport type { Query, QueryOptions } from '../../storage/StorageService'\nimport { CREDENTIALS_CONTEXT_V1_URL } from './constants'\nimport { W3cJsonLdVerifiableCredential } from './data-integrity'\nimport { W3cJsonLdVerifiablePresentation } from './data-integrity/models/W3cJsonLdVerifiablePresentation'\nimport { W3cJsonLdCredentialService } from './data-integrity/W3cJsonLdCredentialService'\nimport { W3cJwtVerifiableCredential, W3cJwtVerifiablePresentation } from './jwt-vc'\nimport { W3cJwtCredentialService } from './jwt-vc/W3cJwtCredentialService'\nimport type {\n W3cVerifiableCredential,\n W3cVerifiablePresentation,\n W3cVerifyCredentialResult,\n W3cVerifyPresentationResult,\n} from './models'\nimport { ClaimFormat } from './models'\nimport { W3cPresentation } from './models/presentation/W3cPresentation'\nimport { W3cCredentialRecord, W3cCredentialRepository } from './repository'\nimport type {\n W3cCreatePresentationOptions,\n W3cJsonLdVerifyCredentialOptions,\n W3cJsonLdVerifyPresentationOptions,\n W3cJwtVerifyCredentialOptions,\n W3cJwtVerifyPresentationOptions,\n W3cSignCredentialOptions,\n W3cSignPresentationOptions,\n W3cStoreCredentialOptions,\n W3cVerifyCredentialOptions,\n W3cVerifyPresentationOptions,\n} from './W3cCredentialServiceOptions'\n\n@injectable()\nexport class W3cCredentialService {\n private w3cCredentialRepository: W3cCredentialRepository\n private w3cJsonLdCredentialService: W3cJsonLdCredentialService\n private w3cJwtCredentialService: W3cJwtCredentialService\n\n public constructor(\n w3cCredentialRepository: W3cCredentialRepository,\n w3cJsonLdCredentialService: W3cJsonLdCredentialService,\n w3cJwtCredentialService: W3cJwtCredentialService\n ) {\n this.w3cCredentialRepository = w3cCredentialRepository\n this.w3cJsonLdCredentialService = w3cJsonLdCredentialService\n this.w3cJwtCredentialService = w3cJwtCredentialService\n }\n\n /**\n * Signs a credential\n *\n * @param credential the credential to be signed\n * @returns the signed credential\n */\n public async signCredential<Format extends ClaimFormat.JwtVc | ClaimFormat.LdpVc>(\n agentContext: AgentContext,\n options: W3cSignCredentialOptions<Format>\n ): Promise<W3cVerifiableCredential<Format>> {\n if (options.format === ClaimFormat.JwtVc) {\n const signed = await this.w3cJwtCredentialService.signCredential(agentContext, options)\n return signed as W3cVerifiableCredential<Format>\n }\n if (options.format === ClaimFormat.LdpVc) {\n const signed = await this.w3cJsonLdCredentialService.signCredential(agentContext, options)\n return signed as W3cVerifiableCredential<Format>\n }\n throw new CredoError(`Unsupported format in options. Format must be either 'jwt_vc' or 'ldp_vc'`)\n }\n\n /**\n * Verifies the signature(s) of a credential\n */\n public async verifyCredential(\n agentContext: AgentContext,\n options: W3cVerifyCredentialOptions\n ): Promise<W3cVerifyCredentialResult> {\n if (options.credential instanceof W3cJsonLdVerifiableCredential) {\n return this.w3cJsonLdCredentialService.verifyCredential(agentContext, options as W3cJsonLdVerifyCredentialOptions)\n }\n if (options.credential instanceof W3cJwtVerifiableCredential || typeof options.credential === 'string') {\n return this.w3cJwtCredentialService.verifyCredential(agentContext, options as W3cJwtVerifyCredentialOptions)\n }\n throw new CredoError(\n 'Unsupported credential type in options. Credential must be either a W3cJsonLdVerifiableCredential or a W3cJwtVerifiableCredential'\n )\n }\n\n /**\n * Utility method that creates a {@link W3cPresentation} from one or more {@link W3cJsonLdVerifiableCredential}s.\n *\n * **NOTE: the presentation that is returned is unsigned.**\n *\n * @returns An instance of {@link W3cPresentation}\n */\n public async createPresentation(options: W3cCreatePresentationOptions): Promise<W3cPresentation> {\n const presentation = new W3cPresentation({\n context: [CREDENTIALS_CONTEXT_V1_URL],\n type: ['VerifiablePresentation'],\n verifiableCredential: options.credentials,\n holder: options.holder,\n id: options.id,\n })\n\n return presentation\n }\n\n /**\n * Signs a presentation including the credentials it includes\n *\n * @param presentation the presentation to be signed\n * @returns the signed presentation\n */\n public async signPresentation<Format extends ClaimFormat.JwtVp | ClaimFormat.LdpVp>(\n agentContext: AgentContext,\n options: W3cSignPresentationOptions<Format>\n ): Promise<W3cVerifiablePresentation<Format>> {\n if (options.format === ClaimFormat.JwtVp) {\n const signed = await this.w3cJwtCredentialService.signPresentation(agentContext, options)\n return signed as W3cVerifiablePresentation<Format>\n }\n if (options.format === ClaimFormat.LdpVp) {\n const signed = await this.w3cJsonLdCredentialService.signPresentation(agentContext, options)\n return signed as W3cVerifiablePresentation<Format>\n }\n throw new CredoError(`Unsupported format in options. Format must be either 'jwt_vp' or 'ldp_vp'`)\n }\n\n /**\n * Verifies a presentation including the credentials it includes\n *\n * @param presentation the presentation to be verified\n * @returns the verification result\n */\n public async verifyPresentation(\n agentContext: AgentContext,\n options: W3cVerifyPresentationOptions\n ): Promise<W3cVerifyPresentationResult> {\n if (options.presentation instanceof W3cJsonLdVerifiablePresentation) {\n return this.w3cJsonLdCredentialService.verifyPresentation(\n agentContext,\n options as W3cJsonLdVerifyPresentationOptions\n )\n }\n if (options.presentation instanceof W3cJwtVerifiablePresentation || typeof options.presentation === 'string') {\n return this.w3cJwtCredentialService.verifyPresentation(agentContext, options as W3cJwtVerifyPresentationOptions)\n }\n throw new CredoError(\n 'Unsupported credential type in options. Presentation must be either a W3cJsonLdVerifiablePresentation or a W3cJwtVerifiablePresentation'\n )\n }\n\n /**\n * Writes a credential to storage\n *\n * @param record the credential to be stored\n * @returns the credential record that was written to storage\n */\n public async storeCredential(\n agentContext: AgentContext,\n options: W3cStoreCredentialOptions\n ): Promise<W3cCredentialRecord> {\n let expandedTypes: string[] = []\n\n // JsonLd credentials need expanded types to be stored.\n if (options.credential instanceof W3cJsonLdVerifiableCredential) {\n expandedTypes = await this.w3cJsonLdCredentialService.getExpandedTypesForCredential(\n agentContext,\n options.credential\n )\n }\n\n // Create an instance of the w3cCredentialRecord\n const w3cCredentialRecord = new W3cCredentialRecord({\n tags: { expandedTypes },\n credential: options.credential,\n })\n\n // Store the w3c credential record\n await this.w3cCredentialRepository.save(agentContext, w3cCredentialRecord)\n\n return w3cCredentialRecord\n }\n\n public async removeCredentialRecord(agentContext: AgentContext, id: string) {\n await this.w3cCredentialRepository.deleteById(agentContext, id)\n }\n\n public async getAllCredentialRecords(agentContext: AgentContext): Promise<W3cCredentialRecord[]> {\n return await this.w3cCredentialRepository.getAll(agentContext)\n }\n\n public async getCredentialRecordById(agentContext: AgentContext, id: string): Promise<W3cCredentialRecord> {\n return await this.w3cCredentialRepository.getById(agentContext, id)\n }\n\n public async findCredentialsByQuery(\n agentContext: AgentContext,\n query: Query<W3cCredentialRecord>,\n queryOptions?: QueryOptions\n ): Promise<W3cVerifiableCredential[]> {\n const result = await this.w3cCredentialRepository.findByQuery(agentContext, query, queryOptions)\n return result.map((record) => record.credential)\n }\n\n public async findCredentialRecordByQuery(\n agentContext: AgentContext,\n query: Query<W3cCredentialRecord>\n ): Promise<W3cVerifiableCredential | undefined> {\n const result = await this.w3cCredentialRepository.findSingleByQuery(agentContext, query)\n return result?.credential\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAiCO,iCAAMA,uBAAqB;CAKhC,AAAO,YACL,yBACA,4BACA,yBACA;AACA,OAAK,0BAA0B;AAC/B,OAAK,6BAA6B;AAClC,OAAK,0BAA0B;;;;;;;;CASjC,MAAa,eACX,cACA,SAC0C;AAC1C,MAAI,QAAQ,WA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2BAA2B,8BACpD,cACA,QAAQ,WACT;EAIH,MAAM,sBAAsB,IAAI,oBAAoB;GAClD,MAAM,EAAE,eAAe;GACvB,YAAY,QAAQ;GACrB,CAAC;AAGF,QAAM,KAAK,wBAAwB,KAAK,cAAc,oBAAoB;AAE1E,SAAO;;CAGT,MAAa,uBAAuB,cAA4B,IAAY;AAC1E,QAAM,KAAK,wBAAwB,WAAW,cAAc,GAAG;;CAGjE,MAAa,wBAAwB,cAA4D;AAC/F,SAAO,MAAM,KAAK,wBAAwB,OAAO,aAAa;;CAGhE,MAAa,wBAAwB,cAA4B,IAA0C;AACzG,SAAO,MAAM,KAAK,wBAAwB,QAAQ,cAAc,GAAG;;CAGrE,MAAa,uBACX,cACA,OACA,cACoC;AAEpC,UADe,MAAM,KAAK,wBAAwB,YAAY,cAAc,OAAO,aAAa,EAClF,KAAK,WAAW,OAAO,WAAW;;CAGlD,MAAa,4BACX,cACA,OAC8C;AAE9C,UADe,MAAM,KAAK,wBAAwB,kBAAkB,cAAc,MAAM,GACzE;;;mCAjLlB,YAAY"}
@@ -1,6 +1,7 @@
1
1
  import { KnownJwaSignatureAlgorithm } from "../kms/jwk/jwa.mjs";
2
- import { W3cCredential } from "./models/credential/W3cCredential.mjs";
2
+ import { SingleOrArray } from "../../types.mjs";
3
3
  import { ClaimFormat } from "./models/ClaimFormat.mjs";
4
+ import { W3cCredential } from "./models/credential/W3cCredential.mjs";
4
5
  import { W3cJsonLdVerifiableCredential } from "./data-integrity/models/W3cJsonLdVerifiableCredential.mjs";
5
6
  import { W3cJwtVerifiableCredential } from "./jwt-vc/W3cJwtVerifiableCredential.mjs";
6
7
  import { W3cVerifiableCredential } from "./models/credential/W3cVerifiableCredential.mjs";
@@ -8,7 +9,6 @@ import { W3cPresentation } from "./models/presentation/W3cPresentation.mjs";
8
9
  import { W3cJwtVerifiablePresentation } from "./jwt-vc/W3cJwtVerifiablePresentation.mjs";
9
10
  import { W3cJsonLdVerifiablePresentation } from "./data-integrity/models/W3cJsonLdVerifiablePresentation.mjs";
10
11
  import { ProofPurpose } from "./data-integrity/proof-purposes/ProofPurpose.mjs";
11
- import { SingleOrArray } from "../../types.mjs";
12
12
 
13
13
  //#region src/modules/vc/W3cCredentialServiceOptions.d.ts
14
14
  type W3cSignCredentialOptions<Format extends ClaimFormat.JwtVc | ClaimFormat.LdpVc | undefined = undefined> = Format extends ClaimFormat.JwtVc ? W3cJwtSignCredentialOptions : Format extends ClaimFormat.LdpVc ? W3cJsonLdSignCredentialOptions : W3cJwtSignCredentialOptions | W3cJsonLdSignCredentialOptions;
@@ -1,6 +1,7 @@
1
1
  import { KnownJwaSignatureAlgorithm } from "../kms/jwk/jwa.js";
2
- import { W3cCredential } from "./models/credential/W3cCredential.js";
2
+ import { SingleOrArray } from "../../types.js";
3
3
  import { ClaimFormat } from "./models/ClaimFormat.js";
4
+ import { W3cCredential } from "./models/credential/W3cCredential.js";
4
5
  import { W3cJsonLdVerifiableCredential } from "./data-integrity/models/W3cJsonLdVerifiableCredential.js";
5
6
  import { W3cJwtVerifiableCredential } from "./jwt-vc/W3cJwtVerifiableCredential.js";
6
7
  import { W3cVerifiableCredential } from "./models/credential/W3cVerifiableCredential.js";
@@ -8,7 +9,6 @@ import { W3cPresentation } from "./models/presentation/W3cPresentation.js";
8
9
  import { W3cJwtVerifiablePresentation } from "./jwt-vc/W3cJwtVerifiablePresentation.js";
9
10
  import { W3cJsonLdVerifiablePresentation } from "./data-integrity/models/W3cJsonLdVerifiablePresentation.js";
10
11
  import { ProofPurpose } from "./data-integrity/proof-purposes/ProofPurpose.js";
11
- import { SingleOrArray } from "../../types.js";
12
12
 
13
13
  //#region src/modules/vc/W3cCredentialServiceOptions.d.ts
14
14
  type W3cSignCredentialOptions<Format extends ClaimFormat.JwtVc | ClaimFormat.LdpVc | undefined = undefined> = Format extends ClaimFormat.JwtVc ? W3cJwtSignCredentialOptions : Format extends ClaimFormat.LdpVc ? W3cJsonLdSignCredentialOptions : W3cJwtSignCredentialOptions | W3cJsonLdSignCredentialOptions;
@@ -2,9 +2,9 @@ import { Query, QueryOptions } from "../../storage/StorageService.mjs";
2
2
  import { ClaimFormat } from "./models/ClaimFormat.mjs";
3
3
  import { W3cVerifiableCredential } from "./models/credential/W3cVerifiableCredential.mjs";
4
4
  import { W3cPresentation } from "./models/presentation/W3cPresentation.mjs";
5
- import { W3cCreatePresentationOptions, W3cSignCredentialOptions, W3cSignPresentationOptions, W3cStoreCredentialOptions, W3cVerifyCredentialOptions, W3cVerifyPresentationOptions } from "./W3cCredentialServiceOptions.mjs";
6
5
  import { W3cVerifiablePresentation } from "./models/presentation/W3cVerifiablePresentation.mjs";
7
6
  import { W3cVerifyCredentialResult, W3cVerifyPresentationResult } from "./models/W3cVerifyResult.mjs";
7
+ import { W3cCreatePresentationOptions, W3cSignCredentialOptions, W3cSignPresentationOptions, W3cStoreCredentialOptions, W3cVerifyCredentialOptions, W3cVerifyPresentationOptions } from "./W3cCredentialServiceOptions.mjs";
8
8
  import { W3cCredentialRecord } from "./repository/W3cCredentialRecord.mjs";
9
9
  import { W3cCredentialService } from "./W3cCredentialService.mjs";
10
10
  import { AgentContext } from "../../agent/context/AgentContext.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"W3cCredentialsApi.d.mts","names":[],"sources":["../../../src/modules/vc/W3cCredentialsApi.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;cAqBa,iBAAA;;;4BAIsB,oCAAoC;2BAK/B,4BAA4B,QAAQ;EAT/D,sBAAiB,CAAA,EAAA,EAAA,MAAA,CAAA,EAakB,OAblB,CAAA,IAAA,CAAA;EAAA,uBAAA,CAAA,CAAA,EAiBY,OAjBZ,CAiBoB,mBAjBpB,EAAA,CAAA;yBAIK,CAAA,EAAA,EAAA,MAAA,CAAA,EAiBiB,OAjBjB,CAiByB,mBAjBzB,CAAA;8BAAoC,CAAA,KAAA,EAsB5D,KAtB4D,CAsBtD,mBAtBsD,CAAA,EAAA,YAAA,CAAA,EAuBpD,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K/B,CAAA,eAuBK,WAAA,CAAY,KAvBjB,GAuByB,WAAA,CAAY,KAvBrC,CAAA,CAAA,OAAA,EAwB3B,wBAxB2B,CAwBF,MAxBE,CAAA,CAAA,EAwBK,OAxBL,CAwBK,uBAxBL,CAwBK,MAxBL,CAAA,CAAA;kBAAoC,CAAA,OAAA,EA6BnC,0BA7BmC,CAAA,EA6BT,OA7BS,CA6BT,yBAAA,CA7BS;oBAAR,CAAA,OAAA,EAiCzB,4BAjCyB,CAAA,EAiCG,OAjCH,CAiCG,eAAA,CAjCH;kBAIpB,CAAA,eAiCD,WAAA,CAAY,KAjCX,GAiCmB,WAAA,CAAY,KAjC/B,CAAA,CAAA,OAAA,EAkCnC,0BAlCmC,CAkCR,MAlCQ,CAAA,CAAA,EAkCD,OAlCC,CAkCD,yBAlCC,CAkCD,MAlCC,CAAA,CAAA;oBAIE,CAAA,OAAA,EAmCP,4BAnCO,CAAA,EAmCqB,OAnCrB,CAmCqB,2BAAA,CAnCrB"}
@@ -2,9 +2,9 @@ import { Query, QueryOptions } from "../../storage/StorageService.js";
2
2
  import { ClaimFormat } from "./models/ClaimFormat.js";
3
3
  import { W3cVerifiableCredential } from "./models/credential/W3cVerifiableCredential.js";
4
4
  import { W3cPresentation } from "./models/presentation/W3cPresentation.js";
5
- import { W3cCreatePresentationOptions, W3cSignCredentialOptions, W3cSignPresentationOptions, W3cStoreCredentialOptions, W3cVerifyCredentialOptions, W3cVerifyPresentationOptions } from "./W3cCredentialServiceOptions.js";
6
5
  import { W3cVerifiablePresentation } from "./models/presentation/W3cVerifiablePresentation.js";
7
6
  import { W3cVerifyCredentialResult, W3cVerifyPresentationResult } from "./models/W3cVerifyResult.js";
7
+ import { W3cCreatePresentationOptions, W3cSignCredentialOptions, W3cSignPresentationOptions, W3cStoreCredentialOptions, W3cVerifyCredentialOptions, W3cVerifyPresentationOptions } from "./W3cCredentialServiceOptions.js";
8
8
  import { W3cCredentialRecord } from "./repository/W3cCredentialRecord.js";
9
9
  import { W3cCredentialService } from "./W3cCredentialService.js";
10
10
  import { AgentContext } from "../../agent/context/AgentContext.js";
@@ -1 +1 @@
1
- {"version":3,"file":"W3cCredentialsApi.d.ts","names":[],"sources":["../../../src/modules/vc/W3cCredentialsApi.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;cAqBa,iBAAA;;;EAAA,WAAA,CAAA,YAAiB,EAIK,YAJL,EAAA,oBAAA,EAIyC,oBAJzC;EAAA,eAAA,CAAA,OAAA,EASU,yBATV,CAAA,EASsC,OATtC,CAS8C,mBAT9C,CAAA;wBAIK,CAAA,EAAA,EAAA,MAAA,CAAA,EASa,OATb,CAAA,IAAA,CAAA;yBAAoC,CAAA,CAAA,EAa7B,OAb6B,CAarB,mBAbqB,EAAA,CAAA;yBAK/B,CAAA,EAAA,EAAA,MAAA,CAAA,EAYY,OAZZ,CAYoB,mBAZpB,CAAA;8BAAoC,CAAA,KAAA,EAiBjE,KAjBiE,CAiB3D,mBAjB2D,CAAA,EAAA,YAAA,CAAA,EAkBzD,YAlByD,CAAA,EAmBvE,OAnBuE,CAmB/D,uBAnB+D,EAAA,CAAA;gBAAR,CAAA,eAuBvB,WAAA,CAAY,KAvBW,GAuBH,WAAA,CAAY,KAvBT,CAAA,CAAA,OAAA,EAwBvD,wBAxBuD,CAwB9B,MAxB8B,CAAA,CAAA,EAwBvB,OAxBuB,CAwBvB,uBAxBuB,CAwBvB,MAxBuB,CAAA,CAAA;kBAIpB,CAAA,OAAA,EAyBP,0BAzBO,CAAA,EAyBmB,OAzBnB,CAyBmB,yBAAA,CAzBnB;oBAIE,CAAA,OAAA,EAyBP,4BAzBO,CAAA,EAyBqB,OAzBrB,CAyBqB,eAAA,CAzBrB;kBAAR,CAAA,eA6BK,WAAA,CAAY,KA7BjB,GA6ByB,WAAA,CAAY,KA7BrC,CAAA,CAAA,OAAA,EA8B7B,0BA9B6B,CA8BF,MA9BE,CAAA,CAAA,EA8BK,OA9BL,CA8BK,yBA9BL,CA8BK,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BK,yBA9BL,CA8BK,MA9BL,CAAA,CAAA;oBAIkB,CAAA,OAAA,EA+BjB,4BA/BiB,CAAA,EA+BW,OA/BX,CA+BW,2BAAA,CA/BX"}
@@ -1 +1 @@
1
- {"version":3,"file":"W3cCredentialsApi.mjs","names":["W3cCredentialsApi"],"sources":["../../../src/modules/vc/W3cCredentialsApi.ts"],"sourcesContent":["import type { Query, QueryOptions } from '../../storage/StorageService'\nimport type {\n W3cCreatePresentationOptions,\n W3cSignCredentialOptions,\n W3cSignPresentationOptions,\n W3cStoreCredentialOptions,\n W3cVerifyCredentialOptions,\n W3cVerifyPresentationOptions,\n} from './W3cCredentialServiceOptions'\nimport type { ClaimFormat, W3cVerifiableCredential } from './models'\nimport type { W3cCredentialRecord } from './repository'\n\nimport { AgentContext } from '../../agent'\nimport { injectable } from '../../plugins'\n\nimport { W3cCredentialService } from './W3cCredentialService'\n\n/**\n * @public\n */\n@injectable()\nexport class W3cCredentialsApi {\n private agentContext: AgentContext\n private w3cCredentialService: W3cCredentialService\n\n public constructor(agentContext: AgentContext, w3cCredentialService: W3cCredentialService) {\n this.agentContext = agentContext\n this.w3cCredentialService = w3cCredentialService\n }\n\n public async storeCredential(options: W3cStoreCredentialOptions): Promise<W3cCredentialRecord> {\n return this.w3cCredentialService.storeCredential(this.agentContext, options)\n }\n\n public async removeCredentialRecord(id: string) {\n return this.w3cCredentialService.removeCredentialRecord(this.agentContext, id)\n }\n\n public async getAllCredentialRecords(): Promise<W3cCredentialRecord[]> {\n return this.w3cCredentialService.getAllCredentialRecords(this.agentContext)\n }\n\n public async getCredentialRecordById(id: string): Promise<W3cCredentialRecord> {\n return this.w3cCredentialService.getCredentialRecordById(this.agentContext, id)\n }\n\n public async findCredentialRecordsByQuery(\n query: Query<W3cCredentialRecord>,\n queryOptions?: QueryOptions\n ): Promise<W3cVerifiableCredential[]> {\n return this.w3cCredentialService.findCredentialsByQuery(this.agentContext, query, queryOptions)\n }\n\n public async signCredential<Format extends ClaimFormat.JwtVc | ClaimFormat.LdpVc>(\n options: W3cSignCredentialOptions<Format>\n ) {\n return this.w3cCredentialService.signCredential<Format>(this.agentContext, options)\n }\n\n public async verifyCredential(options: W3cVerifyCredentialOptions) {\n return this.w3cCredentialService.verifyCredential(this.agentContext, options)\n }\n\n public async createPresentation(options: W3cCreatePresentationOptions) {\n return this.w3cCredentialService.createPresentation(options)\n }\n\n public async signPresentation<Format extends ClaimFormat.JwtVp | ClaimFormat.LdpVp>(\n options: W3cSignPresentationOptions<Format>\n ) {\n return this.w3cCredentialService.signPresentation<Format>(this.agentContext, options)\n }\n\n public async verifyPresentation(options: W3cVerifyPresentationOptions) {\n return this.w3cCredentialService.verifyPresentation(this.agentContext, options)\n }\n}\n"],"mappings":";;;;;;;;;;;AAqBO,8BAAMA,oBAAkB;CAI7B,AAAO,YAAY,cAA4B,sBAA4C;AACzF,OAAK,eAAe;AACpB,OAAK,uBAAuB;;CAG9B,MAAa,gBAAgB,SAAkE;AAC7F,SAAO,KAAK,qBAAqB,gBAAgB,KAAK,cAAc,QAAQ;;CAG9E,MAAa,uBAAuB,IAAY;AAC9C,SAAO,KAAK,qBAAqB,uBAAuB,KAAK,cAAc,GAAG;;CAGhF,MAAa,0BAA0D;AACrE,SAAO,KAAK,qBAAqB,wBAAwB,KAAK,aAAa;;CAG7E,MAAa,wBAAwB,IAA0C;AAC7E,SAAO,KAAK,qBAAqB,wBAAwB,KAAK,cAAc,GAAG;;CAGjF,MAAa,6BACX,OACA,cACoC;AACpC,SAAO,KAAK,qBAAqB,uBAAuB,KAAK,cAAc,OAAO,aAAa;;CAGjG,MAAa,eACX,SACA;AACA,SAAO,KAAK,qBAAqB,eAAuB,KAAK,cAAc,QAAQ;;CAGrF,MAAa,iBAAiB,SAAqC;AACjE,SAAO,KAAK,qBAAqB,iBAAiB,KAAK,cAAc,QAAQ;;CAG/E,MAAa,mBAAmB,SAAuC;AACrE,SAAO,KAAK,qBAAqB,mBAAmB,QAAQ;;CAG9D,MAAa,iBACX,SACA;AACA,SAAO,KAAK,qBAAqB,iBAAyB,KAAK,cAAc,QAAQ;;CAGvF,MAAa,mBAAmB,SAAuC;AACrE,SAAO,KAAK,qBAAqB,mBAAmB,KAAK,cAAc,QAAQ;;;gCAtDlF,YAAY"}
1
+ {"version":3,"file":"W3cCredentialsApi.mjs","names":["W3cCredentialsApi"],"sources":["../../../src/modules/vc/W3cCredentialsApi.ts"],"sourcesContent":["import { AgentContext } from '../../agent'\nimport { injectable } from '../../plugins'\nimport type { Query, QueryOptions } from '../../storage/StorageService'\nimport type { ClaimFormat, W3cVerifiableCredential } from './models'\nimport type { W3cCredentialRecord } from './repository'\nimport { W3cCredentialService } from './W3cCredentialService'\nimport type {\n W3cCreatePresentationOptions,\n W3cSignCredentialOptions,\n W3cSignPresentationOptions,\n W3cStoreCredentialOptions,\n W3cVerifyCredentialOptions,\n W3cVerifyPresentationOptions,\n} from './W3cCredentialServiceOptions'\n\n/**\n * @public\n */\n@injectable()\nexport class W3cCredentialsApi {\n private agentContext: AgentContext\n private w3cCredentialService: W3cCredentialService\n\n public constructor(agentContext: AgentContext, w3cCredentialService: W3cCredentialService) {\n this.agentContext = agentContext\n this.w3cCredentialService = w3cCredentialService\n }\n\n public async storeCredential(options: W3cStoreCredentialOptions): Promise<W3cCredentialRecord> {\n return this.w3cCredentialService.storeCredential(this.agentContext, options)\n }\n\n public async removeCredentialRecord(id: string) {\n return this.w3cCredentialService.removeCredentialRecord(this.agentContext, id)\n }\n\n public async getAllCredentialRecords(): Promise<W3cCredentialRecord[]> {\n return this.w3cCredentialService.getAllCredentialRecords(this.agentContext)\n }\n\n public async getCredentialRecordById(id: string): Promise<W3cCredentialRecord> {\n return this.w3cCredentialService.getCredentialRecordById(this.agentContext, id)\n }\n\n public async findCredentialRecordsByQuery(\n query: Query<W3cCredentialRecord>,\n queryOptions?: QueryOptions\n ): Promise<W3cVerifiableCredential[]> {\n return this.w3cCredentialService.findCredentialsByQuery(this.agentContext, query, queryOptions)\n }\n\n public async signCredential<Format extends ClaimFormat.JwtVc | ClaimFormat.LdpVc>(\n options: W3cSignCredentialOptions<Format>\n ) {\n return this.w3cCredentialService.signCredential<Format>(this.agentContext, options)\n }\n\n public async verifyCredential(options: W3cVerifyCredentialOptions) {\n return this.w3cCredentialService.verifyCredential(this.agentContext, options)\n }\n\n public async createPresentation(options: W3cCreatePresentationOptions) {\n return this.w3cCredentialService.createPresentation(options)\n }\n\n public async signPresentation<Format extends ClaimFormat.JwtVp | ClaimFormat.LdpVp>(\n options: W3cSignPresentationOptions<Format>\n ) {\n return this.w3cCredentialService.signPresentation<Format>(this.agentContext, options)\n }\n\n public async verifyPresentation(options: W3cVerifyPresentationOptions) {\n return this.w3cCredentialService.verifyPresentation(this.agentContext, options)\n }\n}\n"],"mappings":";;;;;;;;;;;AAmBO,8BAAMA,oBAAkB;CAI7B,AAAO,YAAY,cAA4B,sBAA4C;AACzF,OAAK,eAAe;AACpB,OAAK,uBAAuB;;CAG9B,MAAa,gBAAgB,SAAkE;AAC7F,SAAO,KAAK,qBAAqB,gBAAgB,KAAK,cAAc,QAAQ;;CAG9E,MAAa,uBAAuB,IAAY;AAC9C,SAAO,KAAK,qBAAqB,uBAAuB,KAAK,cAAc,GAAG;;CAGhF,MAAa,0BAA0D;AACrE,SAAO,KAAK,qBAAqB,wBAAwB,KAAK,aAAa;;CAG7E,MAAa,wBAAwB,IAA0C;AAC7E,SAAO,KAAK,qBAAqB,wBAAwB,KAAK,cAAc,GAAG;;CAGjF,MAAa,6BACX,OACA,cACoC;AACpC,SAAO,KAAK,qBAAqB,uBAAuB,KAAK,cAAc,OAAO,aAAa;;CAGjG,MAAa,eACX,SACA;AACA,SAAO,KAAK,qBAAqB,eAAuB,KAAK,cAAc,QAAQ;;CAGrF,MAAa,iBAAiB,SAAqC;AACjE,SAAO,KAAK,qBAAqB,iBAAiB,KAAK,cAAc,QAAQ;;CAG/E,MAAa,mBAAmB,SAAuC;AACrE,SAAO,KAAK,qBAAqB,mBAAmB,QAAQ;;CAG9D,MAAa,iBACX,SACA;AACA,SAAO,KAAK,qBAAqB,iBAAyB,KAAK,cAAc,QAAQ;;CAGvF,MAAa,mBAAmB,SAAuC;AACrE,SAAO,KAAK,qBAAqB,mBAAmB,KAAK,cAAc,QAAQ;;;gCAtDlF,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"W3cCredentialsModule.d.mts","names":[],"sources":["../../../src/modules/vc/W3cCredentialsModule.ts"],"sourcesContent":[],"mappings":";;;;;;;;;cAoBa,oBAAA,YAAgC;EAAhC,SAAA,MAAA,EACa,0BADQ;EAAA,SAAA,GAAA,EAAA,OAEb,iBAFa;aACR,CAAA,MAAA,CAAA,EAGI,iCAHJ;UACL,CAAA,iBAAA,EAMgB,iBANhB,CAAA,EAAA,IAAA"}
1
+ {"version":3,"file":"W3cCredentialsModule.d.mts","names":[],"sources":["../../../src/modules/vc/W3cCredentialsModule.ts"],"sourcesContent":[],"mappings":";;;;;;;;;cAmBa,oBAAA,YAAgC;EAAhC,SAAA,MAAA,EACa,0BADQ;EAAA,SAAA,GAAA,EAAA,OAEb,iBAFa;aACR,CAAA,MAAA,CAAA,EAGI,iCAHJ;UACL,CAAA,iBAAA,EAMgB,iBANhB,CAAA,EAAA,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"W3cCredentialsModule.d.ts","names":[],"sources":["../../../src/modules/vc/W3cCredentialsModule.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAoBA;AAAkC,cAArB,oBAAA,YAAgC,MAAX,CAAA;WACR,MAAA,EAAA,0BAAA;WACL,GAAA,EAAA,OAAA,iBAAA;aAES,CAAA,MAAA,CAAA,EAAA,iCAAA;UAIO,CAAA,iBAAA,EAAA,iBAAA,CAAA,EAAA,IAAA"}
1
+ {"version":3,"file":"W3cCredentialsModule.d.ts","names":[],"sources":["../../../src/modules/vc/W3cCredentialsModule.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAmBA;AAAkC,cAArB,oBAAA,YAAgC,MAAX,CAAA;WACR,MAAA,EAAA,0BAAA;WACL,GAAA,EAAA,OAAA,iBAAA;aAES,CAAA,MAAA,CAAA,EAAA,iCAAA;UAIO,CAAA,iBAAA,EAAA,iBAAA,CAAA,EAAA,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"W3cCredentialsModule.mjs","names":[],"sources":["../../../src/modules/vc/W3cCredentialsModule.ts"],"sourcesContent":["import type { DependencyManager, Module } from '../../plugins'\nimport {\n VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2018,\n VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2020,\n} from '../dids'\nimport type { W3cCredentialsModuleConfigOptions } from './W3cCredentialsModuleConfig'\n\nimport { Ed25519PublicJwk } from '../kms'\nimport { W3cCredentialService } from './W3cCredentialService'\nimport { W3cCredentialsApi } from './W3cCredentialsApi'\nimport { W3cCredentialsModuleConfig } from './W3cCredentialsModuleConfig'\nimport { SignatureSuiteRegistry, SignatureSuiteToken, type SuiteInfo } from './data-integrity/SignatureSuiteRegistry'\nimport { W3cJsonLdCredentialService } from './data-integrity/W3cJsonLdCredentialService'\nimport { Ed25519Signature2018, Ed25519Signature2020 } from './data-integrity/signature-suites'\nimport { W3cJwtCredentialService } from './jwt-vc'\nimport { W3cCredentialRepository } from './repository/W3cCredentialRepository'\n\n/**\n * @public\n */\nexport class W3cCredentialsModule implements Module {\n public readonly config: W3cCredentialsModuleConfig\n public readonly api = W3cCredentialsApi\n\n public constructor(config?: W3cCredentialsModuleConfigOptions) {\n this.config = new W3cCredentialsModuleConfig(config)\n }\n\n public register(dependencyManager: DependencyManager) {\n dependencyManager.registerSingleton(W3cCredentialService)\n dependencyManager.registerSingleton(W3cJwtCredentialService)\n dependencyManager.registerSingleton(W3cJsonLdCredentialService)\n dependencyManager.registerSingleton(W3cCredentialRepository)\n\n dependencyManager.registerSingleton(SignatureSuiteRegistry)\n\n // Register the config\n dependencyManager.registerInstance(W3cCredentialsModuleConfig, this.config)\n\n // Always register ed25519 signature suite\n dependencyManager.registerInstance(SignatureSuiteToken, {\n suiteClass: Ed25519Signature2018,\n proofType: 'Ed25519Signature2018',\n verificationMethodTypes: [\n VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2018,\n VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2020,\n ],\n supportedPublicJwkTypes: [Ed25519PublicJwk],\n } satisfies SuiteInfo)\n dependencyManager.registerInstance(SignatureSuiteToken, {\n suiteClass: Ed25519Signature2020,\n proofType: 'Ed25519Signature2020',\n verificationMethodTypes: [VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2020],\n supportedPublicJwkTypes: [Ed25519PublicJwk],\n } satisfies SuiteInfo)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAoBA,IAAa,uBAAb,MAAoD;CAIlD,AAAO,YAAY,QAA4C;OAF/C,MAAM;AAGpB,OAAK,SAAS,IAAI,2BAA2B,OAAO;;CAGtD,AAAO,SAAS,mBAAsC;AACpD,oBAAkB,kBAAkB,qBAAqB;AACzD,oBAAkB,kBAAkB,wBAAwB;AAC5D,oBAAkB,kBAAkB,2BAA2B;AAC/D,oBAAkB,kBAAkB,wBAAwB;AAE5D,oBAAkB,kBAAkB,uBAAuB;AAG3D,oBAAkB,iBAAiB,4BAA4B,KAAK,OAAO;AAG3E,oBAAkB,iBAAiB,qBAAqB;GACtD,YAAY;GACZ,WAAW;GACX,yBAAyB,CACvB,wDACA,uDACD;GACD,yBAAyB,CAAC,iBAAiB;GAC5C,CAAqB;AACtB,oBAAkB,iBAAiB,qBAAqB;GACtD,YAAY;GACZ,WAAW;GACX,yBAAyB,CAAC,uDAAuD;GACjF,yBAAyB,CAAC,iBAAiB;GAC5C,CAAqB"}
1
+ {"version":3,"file":"W3cCredentialsModule.mjs","names":[],"sources":["../../../src/modules/vc/W3cCredentialsModule.ts"],"sourcesContent":["import type { DependencyManager, Module } from '../../plugins'\nimport {\n VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2018,\n VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2020,\n} from '../dids'\nimport { Ed25519PublicJwk } from '../kms'\nimport { SignatureSuiteRegistry, SignatureSuiteToken, type SuiteInfo } from './data-integrity/SignatureSuiteRegistry'\nimport { Ed25519Signature2018, Ed25519Signature2020 } from './data-integrity/signature-suites'\nimport { W3cJsonLdCredentialService } from './data-integrity/W3cJsonLdCredentialService'\nimport { W3cJwtCredentialService } from './jwt-vc'\nimport { W3cCredentialRepository } from './repository/W3cCredentialRepository'\nimport { W3cCredentialService } from './W3cCredentialService'\nimport { W3cCredentialsApi } from './W3cCredentialsApi'\nimport type { W3cCredentialsModuleConfigOptions } from './W3cCredentialsModuleConfig'\nimport { W3cCredentialsModuleConfig } from './W3cCredentialsModuleConfig'\n\n/**\n * @public\n */\nexport class W3cCredentialsModule implements Module {\n public readonly config: W3cCredentialsModuleConfig\n public readonly api = W3cCredentialsApi\n\n public constructor(config?: W3cCredentialsModuleConfigOptions) {\n this.config = new W3cCredentialsModuleConfig(config)\n }\n\n public register(dependencyManager: DependencyManager) {\n dependencyManager.registerSingleton(W3cCredentialService)\n dependencyManager.registerSingleton(W3cJwtCredentialService)\n dependencyManager.registerSingleton(W3cJsonLdCredentialService)\n dependencyManager.registerSingleton(W3cCredentialRepository)\n\n dependencyManager.registerSingleton(SignatureSuiteRegistry)\n\n // Register the config\n dependencyManager.registerInstance(W3cCredentialsModuleConfig, this.config)\n\n // Always register ed25519 signature suite\n dependencyManager.registerInstance(SignatureSuiteToken, {\n suiteClass: Ed25519Signature2018,\n proofType: 'Ed25519Signature2018',\n verificationMethodTypes: [\n VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2018,\n VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2020,\n ],\n supportedPublicJwkTypes: [Ed25519PublicJwk],\n } satisfies SuiteInfo)\n dependencyManager.registerInstance(SignatureSuiteToken, {\n suiteClass: Ed25519Signature2020,\n proofType: 'Ed25519Signature2020',\n verificationMethodTypes: [VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2020],\n supportedPublicJwkTypes: [Ed25519PublicJwk],\n } satisfies SuiteInfo)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAa,uBAAb,MAAoD;CAIlD,AAAO,YAAY,QAA4C;OAF/C,MAAM;AAGpB,OAAK,SAAS,IAAI,2BAA2B,OAAO;;CAGtD,AAAO,SAAS,mBAAsC;AACpD,oBAAkB,kBAAkB,qBAAqB;AACzD,oBAAkB,kBAAkB,wBAAwB;AAC5D,oBAAkB,kBAAkB,2BAA2B;AAC/D,oBAAkB,kBAAkB,wBAAwB;AAE5D,oBAAkB,kBAAkB,uBAAuB;AAG3D,oBAAkB,iBAAiB,4BAA4B,KAAK,OAAO;AAG3E,oBAAkB,iBAAiB,qBAAqB;GACtD,YAAY;GACZ,WAAW;GACX,yBAAyB,CACvB,wDACA,uDACD;GACD,yBAAyB,CAAC,iBAAiB;GAC5C,CAAqB;AACtB,oBAAkB,iBAAiB,qBAAqB;GACtD,YAAY;GACZ,WAAW;GACX,yBAAyB,CAAC,uDAAuD;GACjF,yBAAyB,CAAC,iBAAiB;GAC5C,CAAqB"}
@@ -1,13 +1,13 @@
1
1
  import { Query, QueryOptions } from "../../storage/StorageService.mjs";
2
2
  import { ClaimFormat } from "./models/ClaimFormat.mjs";
3
- import { W3cV2SdJwtCredentialService } from "./sd-jwt-vc/W3cV2SdJwtCredentialService.mjs";
4
3
  import { W3cV2SignCredentialOptions, W3cV2SignPresentationOptions, W3cV2StoreCredentialOptions, W3cV2VerifyCredentialOptions, W3cV2VerifyPresentationOptions } from "./W3cV2CredentialServiceOptions.mjs";
5
- import { W3cV2JwtCredentialService } from "./jwt-vc/W3cV2JwtCredentialService.mjs";
4
+ import { W3cV2SdJwtCredentialService } from "./sd-jwt-vc/W3cV2SdJwtCredentialService.mjs";
6
5
  import { W3cV2VerifiableCredential } from "./models/credential/W3cV2VerifiableCredential.mjs";
7
6
  import { W3cV2VerifyCredentialResult, W3cV2VerifyPresentationResult } from "./models/W3cV2VerifyResult.mjs";
7
+ import { W3cV2JwtCredentialService } from "./jwt-vc/W3cV2JwtCredentialService.mjs";
8
+ import { W3cV2VerifiablePresentation } from "./models/presentation/W3cV2VerifiablePresentation.mjs";
8
9
  import { W3cV2CredentialRecord } from "./repository/W3cV2CredentialRecord.mjs";
9
10
  import { W3cV2CredentialRepository } from "./repository/W3cV2CredentialRepository.mjs";
10
- import { W3cV2VerifiablePresentation } from "./models/presentation/W3cV2VerifiablePresentation.mjs";
11
11
  import { AgentContext } from "../../agent/context/AgentContext.mjs";
12
12
 
13
13
  //#region src/modules/vc/W3cV2CredentialService.d.ts
@@ -1,13 +1,13 @@
1
1
  import { Query, QueryOptions } from "../../storage/StorageService.js";
2
2
  import { ClaimFormat } from "./models/ClaimFormat.js";
3
- import { W3cV2SdJwtCredentialService } from "./sd-jwt-vc/W3cV2SdJwtCredentialService.js";
4
3
  import { W3cV2SignCredentialOptions, W3cV2SignPresentationOptions, W3cV2StoreCredentialOptions, W3cV2VerifyCredentialOptions, W3cV2VerifyPresentationOptions } from "./W3cV2CredentialServiceOptions.js";
5
- import { W3cV2JwtCredentialService } from "./jwt-vc/W3cV2JwtCredentialService.js";
4
+ import { W3cV2SdJwtCredentialService } from "./sd-jwt-vc/W3cV2SdJwtCredentialService.js";
6
5
  import { W3cV2VerifiableCredential } from "./models/credential/W3cV2VerifiableCredential.js";
7
6
  import { W3cV2VerifyCredentialResult, W3cV2VerifyPresentationResult } from "./models/W3cV2VerifyResult.js";
7
+ import { W3cV2JwtCredentialService } from "./jwt-vc/W3cV2JwtCredentialService.js";
8
+ import { W3cV2VerifiablePresentation } from "./models/presentation/W3cV2VerifiablePresentation.js";
8
9
  import { W3cV2CredentialRecord } from "./repository/W3cV2CredentialRecord.js";
9
10
  import { W3cV2CredentialRepository } from "./repository/W3cV2CredentialRepository.js";
10
- import { W3cV2VerifiablePresentation } from "./models/presentation/W3cV2VerifiablePresentation.js";
11
11
  import { AgentContext } from "../../agent/context/AgentContext.js";
12
12
 
13
13
  //#region src/modules/vc/W3cV2CredentialService.d.ts
@@ -9,10 +9,10 @@ const require_decorate = require('../../_virtual/_@oxc-project_runtime@0.94.0/he
9
9
  const require_ClaimFormat = require('./models/ClaimFormat.js');
10
10
  const require_W3cV2JwtVerifiableCredential = require('./jwt-vc/W3cV2JwtVerifiableCredential.js');
11
11
  const require_W3cV2SdJwtVerifiableCredential = require('./sd-jwt-vc/W3cV2SdJwtVerifiableCredential.js');
12
- const require_W3cV2JwtVerifiablePresentation = require('./jwt-vc/W3cV2JwtVerifiablePresentation.js');
13
12
  const require_W3cV2SdJwtVerifiablePresentation = require('./sd-jwt-vc/W3cV2SdJwtVerifiablePresentation.js');
14
13
  const require_W3cV2SdJwtCredentialService = require('./sd-jwt-vc/W3cV2SdJwtCredentialService.js');
15
14
  require('./sd-jwt-vc/index.js');
15
+ const require_W3cV2JwtVerifiablePresentation = require('./jwt-vc/W3cV2JwtVerifiablePresentation.js');
16
16
  const require_W3cV2JwtCredentialService = require('./jwt-vc/W3cV2JwtCredentialService.js');
17
17
  require('./jwt-vc/index.js');
18
18
  require('./models/index.js');
@@ -8,10 +8,10 @@ import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.94.0/helpers/
8
8
  import { ClaimFormat } from "./models/ClaimFormat.mjs";
9
9
  import { W3cV2JwtVerifiableCredential } from "./jwt-vc/W3cV2JwtVerifiableCredential.mjs";
10
10
  import { W3cV2SdJwtVerifiableCredential } from "./sd-jwt-vc/W3cV2SdJwtVerifiableCredential.mjs";
11
- import { W3cV2JwtVerifiablePresentation } from "./jwt-vc/W3cV2JwtVerifiablePresentation.mjs";
12
11
  import { W3cV2SdJwtVerifiablePresentation } from "./sd-jwt-vc/W3cV2SdJwtVerifiablePresentation.mjs";
13
12
  import { W3cV2SdJwtCredentialService } from "./sd-jwt-vc/W3cV2SdJwtCredentialService.mjs";
14
13
  import "./sd-jwt-vc/index.mjs";
14
+ import { W3cV2JwtVerifiablePresentation } from "./jwt-vc/W3cV2JwtVerifiablePresentation.mjs";
15
15
  import { W3cV2JwtCredentialService } from "./jwt-vc/W3cV2JwtCredentialService.mjs";
16
16
  import "./jwt-vc/index.mjs";
17
17
  import "./models/index.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"W3cV2CredentialService.mjs","names":["W3cV2CredentialService"],"sources":["../../../src/modules/vc/W3cV2CredentialService.ts"],"sourcesContent":["import type { AgentContext } from '../../agent/context'\nimport { CredoError } from '../../error'\nimport { injectable } from '../../plugins'\nimport type { Query, QueryOptions } from '../../storage/StorageService'\nimport type {\n W3cV2JwtVerifyCredentialOptions,\n W3cV2JwtVerifyPresentationOptions,\n W3cV2SdJwtVerifyCredentialOptions,\n W3cV2SdJwtVerifyPresentationOptions,\n W3cV2SignCredentialOptions,\n W3cV2SignPresentationOptions,\n W3cV2StoreCredentialOptions,\n W3cV2VerifyCredentialOptions,\n W3cV2VerifyPresentationOptions,\n} from './W3cV2CredentialServiceOptions'\nimport { W3cV2JwtVerifiableCredential, W3cV2JwtVerifiablePresentation } from './jwt-vc'\nimport { W3cV2JwtCredentialService } from './jwt-vc/W3cV2JwtCredentialService'\nimport type { W3cV2VerifiableCredential, W3cV2VerifyCredentialResult, W3cV2VerifyPresentationResult } from './models'\nimport { ClaimFormat } from './models'\nimport type { W3cV2VerifiablePresentation } from './models/presentation/W3cV2VerifiablePresentation'\nimport { W3cV2CredentialRecord, W3cV2CredentialRepository } from './repository'\nimport {\n W3cV2SdJwtCredentialService,\n W3cV2SdJwtVerifiableCredential,\n W3cV2SdJwtVerifiablePresentation,\n} from './sd-jwt-vc'\n\n@injectable()\nexport class W3cV2CredentialService {\n private w3cV2CredentialRepository: W3cV2CredentialRepository\n private w3cV2SdJwtCredentialService: W3cV2SdJwtCredentialService\n private w3cV2JwtCredentialService: W3cV2JwtCredentialService\n\n public constructor(\n w3cV2CredentialRepository: W3cV2CredentialRepository,\n w3cV2SdJwtCredentialService: W3cV2SdJwtCredentialService,\n w3cV2JwtCredentialService: W3cV2JwtCredentialService\n ) {\n this.w3cV2CredentialRepository = w3cV2CredentialRepository\n this.w3cV2SdJwtCredentialService = w3cV2SdJwtCredentialService\n this.w3cV2JwtCredentialService = w3cV2JwtCredentialService\n }\n\n /**\n * Signs a credential\n *\n * @param credential the credential to be signed\n * @returns the signed credential\n */\n public async signCredential<Format extends ClaimFormat.JwtW3cVc | ClaimFormat.SdJwtW3cVc>(\n agentContext: AgentContext,\n options: W3cV2SignCredentialOptions<Format>\n ): Promise<W3cV2VerifiableCredential<Format>> {\n if (options.format === ClaimFormat.JwtW3cVc) {\n const signed = await this.w3cV2JwtCredentialService.signCredential(agentContext, options)\n return signed as W3cV2VerifiableCredential<Format>\n }\n if (options.format === ClaimFormat.SdJwtW3cVc) {\n const signed = await this.w3cV2SdJwtCredentialService.signCredential(agentContext, options)\n return signed as W3cV2VerifiableCredential<Format>\n }\n throw new CredoError(`Unsupported format in options. Format must be either 'vc+jwt' or 'vc+sd-jwt'`)\n }\n\n /**\n * Verifies the signature(s) of a credential\n */\n public async verifyCredential(\n agentContext: AgentContext,\n options: W3cV2VerifyCredentialOptions\n ): Promise<W3cV2VerifyCredentialResult> {\n if (options.credential instanceof W3cV2JwtVerifiableCredential) {\n return this.w3cV2JwtCredentialService.verifyCredential(agentContext, options as W3cV2JwtVerifyCredentialOptions)\n }\n if (options.credential instanceof W3cV2SdJwtVerifiableCredential) {\n return this.w3cV2SdJwtCredentialService.verifyCredential(\n agentContext,\n options as W3cV2SdJwtVerifyCredentialOptions\n )\n }\n throw new CredoError(\n 'Unsupported credential type in options. Credential must be either a W3cV2JwtVerifiablePresentation or a W3cV2SdJwtVerifiablePresentation'\n )\n }\n\n /**\n * Signs a presentation including the credentials it includes\n *\n * @param presentation the presentation to be signed\n * @returns the signed presentation\n */\n public async signPresentation<Format extends ClaimFormat.JwtW3cVp | ClaimFormat.SdJwtW3cVp>(\n agentContext: AgentContext,\n options: W3cV2SignPresentationOptions<Format>\n ): Promise<W3cV2VerifiablePresentation<Format>> {\n if (options.format === ClaimFormat.JwtW3cVp) {\n const signed = await this.w3cV2JwtCredentialService.signPresentation(agentContext, options)\n return signed as W3cV2VerifiablePresentation<Format>\n }\n if (options.format === ClaimFormat.SdJwtW3cVp) {\n const signed = await this.w3cV2SdJwtCredentialService.signPresentation(agentContext, options)\n return signed as W3cV2VerifiablePresentation<Format>\n }\n throw new CredoError(`Unsupported format in options. Format must be either 'vp+jwt' or 'vp+sd-jwt'`)\n }\n\n /**\n * Verifies a presentation including the credentials it includes\n *\n * @param presentation the presentation to be verified\n * @returns the verification result\n */\n public async verifyPresentation(\n agentContext: AgentContext,\n options: W3cV2VerifyPresentationOptions\n ): Promise<W3cV2VerifyPresentationResult> {\n if (options.presentation instanceof W3cV2JwtVerifiablePresentation) {\n return this.w3cV2JwtCredentialService.verifyPresentation(\n agentContext,\n options as W3cV2JwtVerifyPresentationOptions\n )\n }\n if (options.presentation instanceof W3cV2SdJwtVerifiablePresentation) {\n return this.w3cV2SdJwtCredentialService.verifyPresentation(\n agentContext,\n options as W3cV2SdJwtVerifyPresentationOptions\n )\n }\n throw new CredoError(\n 'Unsupported credential type in options. Presentation must be either a W3cV2JwtVerifiablePresentation or a W3cV2SdJwtVerifiablePresentation'\n )\n }\n\n /**\n * Writes a credential to storage\n *\n * @param record the credential to be stored\n * @returns the credential record that was written to storage\n */\n public async storeCredential(\n agentContext: AgentContext,\n options: W3cV2StoreCredentialOptions\n ): Promise<W3cV2CredentialRecord> {\n // Create an instance of the w3cV2CredentialRecord\n const w3cV2CredentialRecord = new W3cV2CredentialRecord({\n credential: options.credential,\n })\n\n // Store the w3cV2 credential record\n await this.w3cV2CredentialRepository.save(agentContext, w3cV2CredentialRecord)\n\n return w3cV2CredentialRecord\n }\n\n public async removeCredentialRecord(agentContext: AgentContext, id: string) {\n await this.w3cV2CredentialRepository.deleteById(agentContext, id)\n }\n\n public async getAllCredentialRecords(agentContext: AgentContext): Promise<W3cV2CredentialRecord[]> {\n return await this.w3cV2CredentialRepository.getAll(agentContext)\n }\n\n public async getCredentialRecordById(agentContext: AgentContext, id: string): Promise<W3cV2CredentialRecord> {\n return await this.w3cV2CredentialRepository.getById(agentContext, id)\n }\n\n public async findCredentialsByQuery(\n agentContext: AgentContext,\n query: Query<W3cV2CredentialRecord>,\n queryOptions?: QueryOptions\n ): Promise<W3cV2VerifiableCredential[]> {\n const result = await this.w3cV2CredentialRepository.findByQuery(agentContext, query, queryOptions)\n return result.map((record) => record.credential)\n }\n\n public async findCredentialRecordByQuery(\n agentContext: AgentContext,\n query: Query<W3cV2CredentialRecord>\n ): Promise<W3cV2VerifiableCredential | undefined> {\n const result = await this.w3cV2CredentialRepository.findSingleByQuery(agentContext, query)\n return result?.credential\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4BO,mCAAMA,yBAAuB;CAKlC,AAAO,YACL,2BACA,6BACA,2BACA;AACA,OAAK,4BAA4B;AACjC,OAAK,8BAA8B;AACnC,OAAK,4BAA4B;;;;;;;;CASnC,MAAa,eACX,cACA,SAC4C;AAC5C,MAAI,QAAQ,WAAW,YAAY,SAEjC,QADe,MAAM,KAAK,0BAA0B,eAAe,cAAc,QAAQ;AAG3F,MAAI,QAAQ,WAAW,YAAY,WAEjC,QADe,MAAM,KAAK,4BAA4B,eAAe,cAAc,QAAQ;AAG7F,QAAM,IAAI,WAAW,+EAA+E;;;;;CAMtG,MAAa,iBACX,cACA,SACsC;AACtC,MAAI,QAAQ,sBAAsB,6BAChC,QAAO,KAAK,0BAA0B,iBAAiB,cAAc,QAA2C;AAElH,MAAI,QAAQ,sBAAsB,+BAChC,QAAO,KAAK,4BAA4B,iBACtC,cACA,QACD;AAEH,QAAM,IAAI,WACR,2IACD;;;;;;;;CASH,MAAa,iBACX,cACA,SAC8C;AAC9C,MAAI,QAAQ,WAAW,YAAY,SAEjC,QADe,MAAM,KAAK,0BAA0B,iBAAiB,cAAc,QAAQ;AAG7F,MAAI,QAAQ,WAAW,YAAY,WAEjC,QADe,MAAM,KAAK,4BAA4B,iBAAiB,cAAc,QAAQ;AAG/F,QAAM,IAAI,WAAW,+EAA+E;;;;;;;;CAStG,MAAa,mBACX,cACA,SACwC;AACxC,MAAI,QAAQ,wBAAwB,+BAClC,QAAO,KAAK,0BAA0B,mBACpC,cACA,QACD;AAEH,MAAI,QAAQ,wBAAwB,iCAClC,QAAO,KAAK,4BAA4B,mBACtC,cACA,QACD;AAEH,QAAM,IAAI,WACR,6IACD;;;;;;;;CASH,MAAa,gBACX,cACA,SACgC;EAEhC,MAAM,wBAAwB,IAAI,sBAAsB,EACtD,YAAY,QAAQ,YACrB,CAAC;AAGF,QAAM,KAAK,0BAA0B,KAAK,cAAc,sBAAsB;AAE9E,SAAO;;CAGT,MAAa,uBAAuB,cAA4B,IAAY;AAC1E,QAAM,KAAK,0BAA0B,WAAW,cAAc,GAAG;;CAGnE,MAAa,wBAAwB,cAA8D;AACjG,SAAO,MAAM,KAAK,0BAA0B,OAAO,aAAa;;CAGlE,MAAa,wBAAwB,cAA4B,IAA4C;AAC3G,SAAO,MAAM,KAAK,0BAA0B,QAAQ,cAAc,GAAG;;CAGvE,MAAa,uBACX,cACA,OACA,cACsC;AAEtC,UADe,MAAM,KAAK,0BAA0B,YAAY,cAAc,OAAO,aAAa,EACpF,KAAK,WAAW,OAAO,WAAW;;CAGlD,MAAa,4BACX,cACA,OACgD;AAEhD,UADe,MAAM,KAAK,0BAA0B,kBAAkB,cAAc,MAAM,GAC3E;;;qCAzJlB,YAAY"}
1
+ {"version":3,"file":"W3cV2CredentialService.mjs","names":["W3cV2CredentialService"],"sources":["../../../src/modules/vc/W3cV2CredentialService.ts"],"sourcesContent":["import type { AgentContext } from '../../agent/context'\nimport { CredoError } from '../../error'\nimport { injectable } from '../../plugins'\nimport type { Query, QueryOptions } from '../../storage/StorageService'\nimport { W3cV2JwtVerifiableCredential, W3cV2JwtVerifiablePresentation } from './jwt-vc'\nimport { W3cV2JwtCredentialService } from './jwt-vc/W3cV2JwtCredentialService'\nimport type { W3cV2VerifiableCredential, W3cV2VerifyCredentialResult, W3cV2VerifyPresentationResult } from './models'\nimport { ClaimFormat } from './models'\nimport type { W3cV2VerifiablePresentation } from './models/presentation/W3cV2VerifiablePresentation'\nimport { W3cV2CredentialRecord, W3cV2CredentialRepository } from './repository'\nimport {\n W3cV2SdJwtCredentialService,\n W3cV2SdJwtVerifiableCredential,\n W3cV2SdJwtVerifiablePresentation,\n} from './sd-jwt-vc'\nimport type {\n W3cV2JwtVerifyCredentialOptions,\n W3cV2JwtVerifyPresentationOptions,\n W3cV2SdJwtVerifyCredentialOptions,\n W3cV2SdJwtVerifyPresentationOptions,\n W3cV2SignCredentialOptions,\n W3cV2SignPresentationOptions,\n W3cV2StoreCredentialOptions,\n W3cV2VerifyCredentialOptions,\n W3cV2VerifyPresentationOptions,\n} from './W3cV2CredentialServiceOptions'\n\n@injectable()\nexport class W3cV2CredentialService {\n private w3cV2CredentialRepository: W3cV2CredentialRepository\n private w3cV2SdJwtCredentialService: W3cV2SdJwtCredentialService\n private w3cV2JwtCredentialService: W3cV2JwtCredentialService\n\n public constructor(\n w3cV2CredentialRepository: W3cV2CredentialRepository,\n w3cV2SdJwtCredentialService: W3cV2SdJwtCredentialService,\n w3cV2JwtCredentialService: W3cV2JwtCredentialService\n ) {\n this.w3cV2CredentialRepository = w3cV2CredentialRepository\n this.w3cV2SdJwtCredentialService = w3cV2SdJwtCredentialService\n this.w3cV2JwtCredentialService = w3cV2JwtCredentialService\n }\n\n /**\n * Signs a credential\n *\n * @param credential the credential to be signed\n * @returns the signed credential\n */\n public async signCredential<Format extends ClaimFormat.JwtW3cVc | ClaimFormat.SdJwtW3cVc>(\n agentContext: AgentContext,\n options: W3cV2SignCredentialOptions<Format>\n ): Promise<W3cV2VerifiableCredential<Format>> {\n if (options.format === ClaimFormat.JwtW3cVc) {\n const signed = await this.w3cV2JwtCredentialService.signCredential(agentContext, options)\n return signed as W3cV2VerifiableCredential<Format>\n }\n if (options.format === ClaimFormat.SdJwtW3cVc) {\n const signed = await this.w3cV2SdJwtCredentialService.signCredential(agentContext, options)\n return signed as W3cV2VerifiableCredential<Format>\n }\n throw new CredoError(`Unsupported format in options. Format must be either 'vc+jwt' or 'vc+sd-jwt'`)\n }\n\n /**\n * Verifies the signature(s) of a credential\n */\n public async verifyCredential(\n agentContext: AgentContext,\n options: W3cV2VerifyCredentialOptions\n ): Promise<W3cV2VerifyCredentialResult> {\n if (options.credential instanceof W3cV2JwtVerifiableCredential) {\n return this.w3cV2JwtCredentialService.verifyCredential(agentContext, options as W3cV2JwtVerifyCredentialOptions)\n }\n if (options.credential instanceof W3cV2SdJwtVerifiableCredential) {\n return this.w3cV2SdJwtCredentialService.verifyCredential(\n agentContext,\n options as W3cV2SdJwtVerifyCredentialOptions\n )\n }\n throw new CredoError(\n 'Unsupported credential type in options. Credential must be either a W3cV2JwtVerifiablePresentation or a W3cV2SdJwtVerifiablePresentation'\n )\n }\n\n /**\n * Signs a presentation including the credentials it includes\n *\n * @param presentation the presentation to be signed\n * @returns the signed presentation\n */\n public async signPresentation<Format extends ClaimFormat.JwtW3cVp | ClaimFormat.SdJwtW3cVp>(\n agentContext: AgentContext,\n options: W3cV2SignPresentationOptions<Format>\n ): Promise<W3cV2VerifiablePresentation<Format>> {\n if (options.format === ClaimFormat.JwtW3cVp) {\n const signed = await this.w3cV2JwtCredentialService.signPresentation(agentContext, options)\n return signed as W3cV2VerifiablePresentation<Format>\n }\n if (options.format === ClaimFormat.SdJwtW3cVp) {\n const signed = await this.w3cV2SdJwtCredentialService.signPresentation(agentContext, options)\n return signed as W3cV2VerifiablePresentation<Format>\n }\n throw new CredoError(`Unsupported format in options. Format must be either 'vp+jwt' or 'vp+sd-jwt'`)\n }\n\n /**\n * Verifies a presentation including the credentials it includes\n *\n * @param presentation the presentation to be verified\n * @returns the verification result\n */\n public async verifyPresentation(\n agentContext: AgentContext,\n options: W3cV2VerifyPresentationOptions\n ): Promise<W3cV2VerifyPresentationResult> {\n if (options.presentation instanceof W3cV2JwtVerifiablePresentation) {\n return this.w3cV2JwtCredentialService.verifyPresentation(\n agentContext,\n options as W3cV2JwtVerifyPresentationOptions\n )\n }\n if (options.presentation instanceof W3cV2SdJwtVerifiablePresentation) {\n return this.w3cV2SdJwtCredentialService.verifyPresentation(\n agentContext,\n options as W3cV2SdJwtVerifyPresentationOptions\n )\n }\n throw new CredoError(\n 'Unsupported credential type in options. Presentation must be either a W3cV2JwtVerifiablePresentation or a W3cV2SdJwtVerifiablePresentation'\n )\n }\n\n /**\n * Writes a credential to storage\n *\n * @param record the credential to be stored\n * @returns the credential record that was written to storage\n */\n public async storeCredential(\n agentContext: AgentContext,\n options: W3cV2StoreCredentialOptions\n ): Promise<W3cV2CredentialRecord> {\n // Create an instance of the w3cV2CredentialRecord\n const w3cV2CredentialRecord = new W3cV2CredentialRecord({\n credential: options.credential,\n })\n\n // Store the w3cV2 credential record\n await this.w3cV2CredentialRepository.save(agentContext, w3cV2CredentialRecord)\n\n return w3cV2CredentialRecord\n }\n\n public async removeCredentialRecord(agentContext: AgentContext, id: string) {\n await this.w3cV2CredentialRepository.deleteById(agentContext, id)\n }\n\n public async getAllCredentialRecords(agentContext: AgentContext): Promise<W3cV2CredentialRecord[]> {\n return await this.w3cV2CredentialRepository.getAll(agentContext)\n }\n\n public async getCredentialRecordById(agentContext: AgentContext, id: string): Promise<W3cV2CredentialRecord> {\n return await this.w3cV2CredentialRepository.getById(agentContext, id)\n }\n\n public async findCredentialsByQuery(\n agentContext: AgentContext,\n query: Query<W3cV2CredentialRecord>,\n queryOptions?: QueryOptions\n ): Promise<W3cV2VerifiableCredential[]> {\n const result = await this.w3cV2CredentialRepository.findByQuery(agentContext, query, queryOptions)\n return result.map((record) => record.credential)\n }\n\n public async findCredentialRecordByQuery(\n agentContext: AgentContext,\n query: Query<W3cV2CredentialRecord>\n ): Promise<W3cV2VerifiableCredential | undefined> {\n const result = await this.w3cV2CredentialRepository.findSingleByQuery(agentContext, query)\n return result?.credential\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4BO,mCAAMA,yBAAuB;CAKlC,AAAO,YACL,2BACA,6BACA,2BACA;AACA,OAAK,4BAA4B;AACjC,OAAK,8BAA8B;AACnC,OAAK,4BAA4B;;;;;;;;CASnC,MAAa,eACX,cACA,SAC4C;AAC5C,MAAI,QAAQ,WAAW,YAAY,SAEjC,QADe,MAAM,KAAK,0BAA0B,eAAe,cAAc,QAAQ;AAG3F,MAAI,QAAQ,WAAW,YAAY,WAEjC,QADe,MAAM,KAAK,4BAA4B,eAAe,cAAc,QAAQ;AAG7F,QAAM,IAAI,WAAW,+EAA+E;;;;;CAMtG,MAAa,iBACX,cACA,SACsC;AACtC,MAAI,QAAQ,sBAAsB,6BAChC,QAAO,KAAK,0BAA0B,iBAAiB,cAAc,QAA2C;AAElH,MAAI,QAAQ,sBAAsB,+BAChC,QAAO,KAAK,4BAA4B,iBACtC,cACA,QACD;AAEH,QAAM,IAAI,WACR,2IACD;;;;;;;;CASH,MAAa,iBACX,cACA,SAC8C;AAC9C,MAAI,QAAQ,WAAW,YAAY,SAEjC,QADe,MAAM,KAAK,0BAA0B,iBAAiB,cAAc,QAAQ;AAG7F,MAAI,QAAQ,WAAW,YAAY,WAEjC,QADe,MAAM,KAAK,4BAA4B,iBAAiB,cAAc,QAAQ;AAG/F,QAAM,IAAI,WAAW,+EAA+E;;;;;;;;CAStG,MAAa,mBACX,cACA,SACwC;AACxC,MAAI,QAAQ,wBAAwB,+BAClC,QAAO,KAAK,0BAA0B,mBACpC,cACA,QACD;AAEH,MAAI,QAAQ,wBAAwB,iCAClC,QAAO,KAAK,4BAA4B,mBACtC,cACA,QACD;AAEH,QAAM,IAAI,WACR,6IACD;;;;;;;;CASH,MAAa,gBACX,cACA,SACgC;EAEhC,MAAM,wBAAwB,IAAI,sBAAsB,EACtD,YAAY,QAAQ,YACrB,CAAC;AAGF,QAAM,KAAK,0BAA0B,KAAK,cAAc,sBAAsB;AAE9E,SAAO;;CAGT,MAAa,uBAAuB,cAA4B,IAAY;AAC1E,QAAM,KAAK,0BAA0B,WAAW,cAAc,GAAG;;CAGnE,MAAa,wBAAwB,cAA8D;AACjG,SAAO,MAAM,KAAK,0BAA0B,OAAO,aAAa;;CAGlE,MAAa,wBAAwB,cAA4B,IAA4C;AAC3G,SAAO,MAAM,KAAK,0BAA0B,QAAQ,cAAc,GAAG;;CAGvE,MAAa,uBACX,cACA,OACA,cACsC;AAEtC,UADe,MAAM,KAAK,0BAA0B,YAAY,cAAc,OAAO,aAAa,EACpF,KAAK,WAAW,OAAO,WAAW;;CAGlD,MAAa,4BACX,cACA,OACgD;AAEhD,UADe,MAAM,KAAK,0BAA0B,kBAAkB,cAAc,MAAM,GAC3E;;;qCAzJlB,YAAY"}
@@ -1,14 +1,14 @@
1
1
  import { KnownJwaSignatureAlgorithm } from "../kms/jwk/jwa.mjs";
2
- import { ClaimFormat } from "./models/ClaimFormat.mjs";
3
2
  import { HashName } from "../../crypto/hashes/Hasher.mjs";
3
+ import { ClaimFormat } from "./models/ClaimFormat.mjs";
4
+ import { IDisclosureFrame, IPresentationFrame, SdJwtVcHolderBinding } from "../sd-jwt-vc/SdJwtVcOptions.mjs";
4
5
  import { W3cV2Credential } from "./models/credential/W3cV2Credential.mjs";
5
6
  import { W3cV2JwtVerifiableCredential } from "./jwt-vc/W3cV2JwtVerifiableCredential.mjs";
6
7
  import { W3cV2SdJwtVerifiableCredential } from "./sd-jwt-vc/W3cV2SdJwtVerifiableCredential.mjs";
7
8
  import { W3cV2Presentation } from "./models/presentation/W3cV2Presentation.mjs";
8
- import { W3cV2JwtVerifiablePresentation } from "./jwt-vc/W3cV2JwtVerifiablePresentation.mjs";
9
- import { IDisclosureFrame, IPresentationFrame, SdJwtVcHolderBinding } from "../sd-jwt-vc/SdJwtVcOptions.mjs";
10
9
  import { W3cV2SdJwtVerifiablePresentation } from "./sd-jwt-vc/W3cV2SdJwtVerifiablePresentation.mjs";
11
10
  import { W3cV2VerifiableCredential } from "./models/credential/W3cV2VerifiableCredential.mjs";
11
+ import { W3cV2JwtVerifiablePresentation } from "./jwt-vc/W3cV2JwtVerifiablePresentation.mjs";
12
12
 
13
13
  //#region src/modules/vc/W3cV2CredentialServiceOptions.d.ts
14
14
  type W3cV2SignCredentialOptions<Format extends ClaimFormat.JwtW3cVc | ClaimFormat.SdJwtW3cVc | undefined = undefined> = Format extends ClaimFormat.JwtW3cVc ? W3cV2JwtSignCredentialOptions : Format extends ClaimFormat.SdJwtW3cVc ? W3cV2SdJwtSignCredentialOptions : W3cV2JwtSignCredentialOptions | W3cV2SdJwtSignCredentialOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"W3cV2CredentialServiceOptions.d.mts","names":[],"sources":["../../../src/modules/vc/W3cV2CredentialServiceOptions.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAQY,0CACK,WAAA,CAAY,WAAW,WAAA,CAAY,sCAChD,eAAe,WAAA,CAAY,WAC3B,gCACA,eAAe,WAAA,CAAY,aACzB,kCACA,gCAAgC;KAE1B,4CACK,WAAA,CAAY,WAAW,WAAA,CAAY,sCAChD,eAAe,WAAA,CAAY,WAC3B,kCACA,eAAe,WAAA,CAAY,aACzB,oCACA,kCAAkC;KAE5B,4CACK,WAAA,CAAY,WAAW,WAAA,CAAY,sCAChD,eAAe,WAAA,CAAY,WAC3B,kCACA,eAAe,WAAA,CAAY,aACzB,oCACA,kCAAkC;KAE5B,8BAAA,GAAiC,oCAAoC;UAEvE,8BAAA;;;;AA1BV;;QACiB,EA+BP,WA/BmB;;;;YAEzB,EAkCU,eAlCV;;;;;;EAGiE,kBAAA,EAAA,MAAA;AAErE;AAAwC,UAuCvB,6BAAA,SAAsC,8BAvCf,CAAA;QACvB,EAuCP,WAAA,CAAY,QAvCO;;;;KAEzB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AA4C;gBAC7C;;UAGC,2BAAA;cACH;;UAGG,0BAAA;cACH;;;;sBAKQ"}
1
+ {"version":3,"file":"W3cV2CredentialServiceOptions.d.mts","names":[],"sources":["../../../src/modules/vc/W3cV2CredentialServiceOptions.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAOY,0CACK,WAAA,CAAY,WAAW,WAAA,CAAY,sCAChD,eAAe,WAAA,CAAY,WAC3B,gCACA,eAAe,WAAA,CAAY,aACzB,kCACA,gCAAgC;KAE1B,4CACK,WAAA,CAAY,WAAW,WAAA,CAAY,sCAChD,eAAe,WAAA,CAAY,WAC3B,kCACA,eAAe,WAAA,CAAY,aACzB,oCACA,kCAAkC;KAE5B,4CACK,WAAA,CAAY,WAAW,WAAA,CAAY,sCAChD,eAAe,WAAA,CAAY,WAC3B,kCACA,eAAe,WAAA,CAAY,aACzB,oCACA,kCAAkC;KAE5B,8BAAA,GAAiC,oCAAoC;UAEvE,8BAAA;;;;;AA1BV;EAAsC,MAAA,EAgC5B,WAhC4B;;;;YAEnB,EAmCL,eAnCiB;;;;;;oBAIO,EAAA,MAAA;;AAE1B,UAuCK,6BAAA,SAAsC,8BAvCf,CAAA;EAAA,MAAA,EAwC9B,WAAA,CAAY,QAxCkB;;;;KAErB,EA2CZ,0BA3CwB;;;;;QAIzB,CAAA,EA6CK,oBA7CL;;AAAmE,UAgDxD,+BAAA,SAAwC,8BAhDgB,CAAA;EAE7D,MAAA,EA+CF,WAAA,CAAY,UA/CV;EAA4B;;;KAEpC,EAkDG,0BAlDH;;;;;;kBAIE,CAAA,EAqDe,OArDf,CAqDuB,QArDvB,EAAA,OAAA,CAAA;;;AAEN;;QAA6C,CAAA,EAyDlC,oBAzDkC;;;AAAuE;;iBAQ1G,CAAA,EAuDU,gBAvDV;;UA0DA,gCAAA,CArDmB;EAUZ,UAAA,EAAA,OAAA;;AACP,UA8CO,+BAAA,SAAwC,gCA9CnC,CAAA;YAKf,EA0CO,4BA1CP,GAAA,MAAA;;AANgD,UAmDtC,iCAAA,SAA0C,gCAnDJ,CAAA;EAA8B,UAAA,EAoDvE,8BApDuE,GAAA,MAAA;AAerF;UAwCU,gCAAA,CAxCuC;;;;;;QAyB7B,EAqBV,WArBU;;;AACnB;EAMgB,YAAA,EAmBD,iBAnBC;EAAgC;;;EAAwC,SAAA,EAAA,MAAA;EAIxE;;;QAA0C,CAAA,EAAA,MAAA;;AAIjD,UAwBO,+BAAA,SAAwC,gCAxBf,CAAA;EAAA,MAAA,EAyBhC,WAAA,CAAY,QAzBoB;;AAW1B,UAiBC,iCAAA,SAA0C,gCAjB3C,CAAA;EAAiB,MAAA,EAkBvB,WAAA,CAAY,UAlBW;EAahB;;;;;EAIA,gBAAA,CAAA,EAQI,OARJ,CAQY,QARZ,EAAkC,OAAA,CAAA;EAAA;;;;iBAc/B,CAAA,EAAA,gBAAA;;UAGV,kCAAA,CAjBiF;EAiBjF;AAiBV;;cACgB,EAAA,OAAA;;;AAGhB;EAAqD,SAAA,EAAA,MAAA;;;;EAIpC,MAAA,CAAA,EAAA,MAAA;AAIjB;AAA2C,UAZ1B,iCAAA,SAA0C,kCAYhB,CAAA;cAC7B,EAZE,8BAYF,GAAA,MAAA;;AAK0B,UAdvB,mCAAA,SAA4C,kCAcrB,CAAA;gBAbxB;;UAGC,2BAAA;cACH;;UAGG,0BAAA;cACH;;;;sBAKQ"}
@@ -1,14 +1,14 @@
1
1
  import { KnownJwaSignatureAlgorithm } from "../kms/jwk/jwa.js";
2
- import { ClaimFormat } from "./models/ClaimFormat.js";
3
2
  import { HashName } from "../../crypto/hashes/Hasher.js";
3
+ import { ClaimFormat } from "./models/ClaimFormat.js";
4
+ import { IDisclosureFrame, IPresentationFrame, SdJwtVcHolderBinding } from "../sd-jwt-vc/SdJwtVcOptions.js";
4
5
  import { W3cV2Credential } from "./models/credential/W3cV2Credential.js";
5
6
  import { W3cV2JwtVerifiableCredential } from "./jwt-vc/W3cV2JwtVerifiableCredential.js";
6
7
  import { W3cV2SdJwtVerifiableCredential } from "./sd-jwt-vc/W3cV2SdJwtVerifiableCredential.js";
7
8
  import { W3cV2Presentation } from "./models/presentation/W3cV2Presentation.js";
8
- import { W3cV2JwtVerifiablePresentation } from "./jwt-vc/W3cV2JwtVerifiablePresentation.js";
9
- import { IDisclosureFrame, IPresentationFrame, SdJwtVcHolderBinding } from "../sd-jwt-vc/SdJwtVcOptions.js";
10
9
  import { W3cV2SdJwtVerifiablePresentation } from "./sd-jwt-vc/W3cV2SdJwtVerifiablePresentation.js";
11
10
  import { W3cV2VerifiableCredential } from "./models/credential/W3cV2VerifiableCredential.js";
11
+ import { W3cV2JwtVerifiablePresentation } from "./jwt-vc/W3cV2JwtVerifiablePresentation.js";
12
12
 
13
13
  //#region src/modules/vc/W3cV2CredentialServiceOptions.d.ts
14
14
  type W3cV2SignCredentialOptions<Format extends ClaimFormat.JwtW3cVc | ClaimFormat.SdJwtW3cVc | undefined = undefined> = Format extends ClaimFormat.JwtW3cVc ? W3cV2JwtSignCredentialOptions : Format extends ClaimFormat.SdJwtW3cVc ? W3cV2SdJwtSignCredentialOptions : W3cV2JwtSignCredentialOptions | W3cV2SdJwtSignCredentialOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"W3cV2CredentialServiceOptions.d.ts","names":[],"sources":["../../../src/modules/vc/W3cV2CredentialServiceOptions.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAQY,0CACK,WAAA,CAAY,WAAW,WAAA,CAAY,sCAChD,eAAe,WAAA,CAAY,WAC3B,gCACA,eAAe,WAAA,CAAY,aACzB,kCACA,gCAAgC;KAE1B,4CACK,WAAA,CAAY,WAAW,WAAA,CAAY,sCAChD,eAAe,WAAA,CAAY,WAC3B,kCACA,eAAe,WAAA,CAAY,aACzB,oCACA,kCAAkC;KAE5B,4CACK,WAAA,CAAY,WAAW,WAAA,CAAY,sCAChD,eAAe,WAAA,CAAY,WAC3B,kCACA,eAAe,WAAA,CAAY,aACzB,oCACA,kCAAkC;KAE5B,8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EAAA,OAAA;EAAoC;;;EAA0C,SAAA,EAAA,MAAA;EAI9E;AAIjB;;QACc,CAAA,EAAA,MAAA;;AAK0B,UAlBvB,iCAAA,SAA0C,kCAkBnB,CAAA;gBAjBxB;;UAGC,mCAAA,SAA4C;gBAC7C;;UAGC,2BAAA;cACH;;UAGG,0BAAA;cACH;;;;sBAKQ"}
1
+ {"version":3,"file":"W3cV2CredentialServiceOptions.d.ts","names":[],"sources":["../../../src/modules/vc/W3cV2CredentialServiceOptions.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAOY,0CACK,WAAA,CAAY,WAAW,WAAA,CAAY,sCAChD,eAAe,WAAA,CAAY,WAC3B,gCACA,eAAe,WAAA,CAAY,aACzB,kCACA,gCAAgC;KAE1B,4CACK,WAAA,CAAY,WAAW,WAAA,CAAY,sCAChD,eAAe,WAAA,CAAY,WAC3B,kCACA,eAAe,WAAA,CAAY,aACzB,oCACA,kCAAkC;KAE5B,4CACK,WAAA,CAAY,WAAW,WAAA,CAAY,sCAChD,eAAe,WAAA,CAAY,WAC3B,kCACA,eAAe,WAAA,CAAY,aACzB,oCACA,kCAAkC;KAE5B,8BAAA,GAAiC,oCAAoC;UAEvE,8BAAA;;;AA1BV;;;QACwC,EA+B9B,WA/B0C;;;;YAGhD,EAiCU,eAjCV;;;;;;EAIQ,kBAAA,EAAA,MAAA;;AACK,UAsCA,6BAAA,SAAsC,8BAtC1B,CAAA;QAAW,EAuC9B,WAAA,CAAY,QAvC8B;;;;KAGhD,EAyCG,0BAzCH;;;;;EAEqE,MAAA,CAAA,EA6C9D,oBA7C8D;AAEzE;AAAwC,UA8CvB,+BAAA,SAAwC,8BA9CjB,CAAA;QACvB,EA8CP,WAAA,CAAY,UA9CO;;;;KAEzB,EAiDG,0BAjDH;;;;;;EAGqE,gBAAA,CAAA,EAqDpD,OArDoD,CAqD5C,QArD4C,EAAA,OAAA,CAAA;EAE7D;;;;EAAwG,MAAA,CAAA,EAyDzG,oBAzDyG;EAE1G;;;;EAWmB,eAAA,CAAA,EAkDT,gBAlDS;AAU7B;UA2CU,gCAAA,CA3CqC;YACrC,EAAA,OAAY;;AAWX,UAmCM,+BAAA,SAAwC,gCAnC9C,CAAA;YAZ4C,EAgDzC,4BAhDyC,GAAA,MAAA;;AAetC,UAoCA,iCAAA,SAA0C,gCApCV,CAAA;EAAA,UAAA,EAqCnC,8BArCmC,GAAA,MAAA;;UAwCvC,gCAAA,CAlCH;;;;;;EANgF,MAAA,EA8C7E,WA9C6E;EA4B7E;AAIV;;cACc,EAkBE,iBAlBF;;;AAGd;EAAmD,SAAA,EAAA,MAAA;;;;EAIzC,MAAA,CAAA,EAAA,MAAA;;AAMA,UAkBO,+BAAA,SAAwC,gCAlB/C,CAAA;QAKM,EAcN,WAAA,CAAY,QAdN;;AAaC,UAIA,iCAAA,SAA0C,gCAJV,CAAA;EAAA,MAAA,EAKvC,WAAA,CAAY,UAL2B;;;;AAIjD;;kBACsB,CAAA,EAOD,OAPC,CAOO,QAPP,EAAA,OAAA,CAAA;;;;;EADqE,eAAA,CAAA,EAcvE,gBAduE;AAe1F;AAmBD,UAjBU,kCAAA,CAiByC;EAAA;;;EAA0C,YAAA,EAAA,OAAA;EAI5E;;;WAA4C,EAAA,MAAA;EAAkC;AAI/F;AAIA;EAA2C,MAAA,CAAA,EAAA,MAAA;;AAMrB,UAlBL,iCAAA,SAA0C,kCAkBrC,CAAA;EAAkB,YAAA,EAjBxB,8BAiBwB,GAAA,MAAA;;UAdvB,mCAAA,SAA4C;gBAC7C;;UAGC,2BAAA;cACH;;UAGG,0BAAA;cACH;;;;sBAKQ"}
@@ -3,8 +3,8 @@ import { ClaimFormat } from "./models/ClaimFormat.mjs";
3
3
  import { W3cV2SignCredentialOptions, W3cV2SignPresentationOptions, W3cV2StoreCredentialOptions, W3cV2VerifyCredentialOptions, W3cV2VerifyPresentationOptions } from "./W3cV2CredentialServiceOptions.mjs";
4
4
  import { W3cV2VerifiableCredential } from "./models/credential/W3cV2VerifiableCredential.mjs";
5
5
  import { W3cV2VerifyCredentialResult, W3cV2VerifyPresentationResult } from "./models/W3cV2VerifyResult.mjs";
6
- import { W3cV2CredentialRecord } from "./repository/W3cV2CredentialRecord.mjs";
7
6
  import { W3cV2VerifiablePresentation } from "./models/presentation/W3cV2VerifiablePresentation.mjs";
7
+ import { W3cV2CredentialRecord } from "./repository/W3cV2CredentialRecord.mjs";
8
8
  import { W3cV2CredentialService } from "./W3cV2CredentialService.mjs";
9
9
  import { AgentContext } from "../../agent/context/AgentContext.mjs";
10
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"W3cV2CredentialsApi.d.mts","names":[],"sources":["../../../src/modules/vc/W3cV2CredentialsApi.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;cAoBa,mBAAA;;;4BAIsB,sCAAsC;EAJ5D,eAAA,CAAA,OAAmB,EASQ,2BATR,CAAA,EASsC,OATtC,CAS8C,qBAT9C,CAAA;EAAA,sBAAA,CAAA,EAAA,EAAA,MAAA,CAAA,EAagB,OAbhB,CAAA,IAAA,CAAA;yBAIG,CAAA,CAAA,EAaO,OAbP,CAae,qBAbf,EAAA,CAAA;yBAAsC,CAAA,EAAA,EAAA,MAAA,CAAA,EAiBrB,OAjBqB,CAiBb,qBAjBa,CAAA;8BAKjC,CAAA,KAAA,EAiB7B,KAjB6B,CAiBvB,qBAjBuB,CAAA,EAAA,YAAA,CAAA,EAkBrB,YAlBqB,CAAA,EAmBnC,OAnBmC,CAmB3B,yBAnB2B,EAAA,CAAA;gBAAsC,CAAA,eAuBjC,WAAA,CAAY,QAvBqB,GAuBV,WAAA,CAAY,UAvBF,CAAA,CAAA,OAAA,EAwBjE,0BAxBiE,CAwBtC,MAxBsC,CAAA,CAAA,EAwB/B,OAxB+B,CAwB/B,yBAxB+B,CAwB/B,MAxB+B,CAAA,CAAA;kBAAR,CAAA,OAAA,EA6B7B,4BA7B6B,CAAA,EA6BD,OA7BC,CA6BD,2BAAA,CA7BC;kBAItB,CAA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A8BN,MA9BM,CAAA,CAAA,EA8BC,OA9BD,CA8BC,2BA9BD,CA8BC,MA9BD,CAAA,CAAA;oBAIE,CAAA,OAAA,EA+BP,8BA/BO,CAAA,EA+BuB,OA/BvB,CA+BuB,6BAAA,CA/BvB"}
@@ -3,8 +3,8 @@ import { ClaimFormat } from "./models/ClaimFormat.js";
3
3
  import { W3cV2SignCredentialOptions, W3cV2SignPresentationOptions, W3cV2StoreCredentialOptions, W3cV2VerifyCredentialOptions, W3cV2VerifyPresentationOptions } from "./W3cV2CredentialServiceOptions.js";
4
4
  import { W3cV2VerifiableCredential } from "./models/credential/W3cV2VerifiableCredential.js";
5
5
  import { W3cV2VerifyCredentialResult, W3cV2VerifyPresentationResult } from "./models/W3cV2VerifyResult.js";
6
- import { W3cV2CredentialRecord } from "./repository/W3cV2CredentialRecord.js";
7
6
  import { W3cV2VerifiablePresentation } from "./models/presentation/W3cV2VerifiablePresentation.js";
7
+ import { W3cV2CredentialRecord } from "./repository/W3cV2CredentialRecord.js";
8
8
  import { W3cV2CredentialService } from "./W3cV2CredentialService.js";
9
9
  import { AgentContext } from "../../agent/context/AgentContext.js";
10
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"W3cV2CredentialsApi.d.ts","names":[],"sources":["../../../src/modules/vc/W3cV2CredentialsApi.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;cAoBa,mBAAA;;EAAA,QAAA,sBAAmB;EAAA,WAAA,CAAA,YAAA,EAIG,YAJH,EAAA,sBAAA,EAIyC,sBAJzC;iBAIG,CAAA,OAAA,EAKK,2BALL,CAAA,EAKmC,OALnC,CAK2C,qBAL3C,CAAA;wBAAsC,CAAA,EAAA,EAAA,MAAA,CAAA,EASzB,OATyB,CAAA,IAAA,CAAA;yBAKjC,CAAA,CAAA,EAQE,OARF,CAQU,qBARV,EAAA,CAAA;yBAAsC,CAAA,EAAA,EAAA,MAAA,CAAA,EAY1B,OAZ0B,CAYlB,qBAZkB,CAAA;8BAAR,CAA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AAA,CAAA,EAkBnD,YAlBmD,CAAA,EAmBjE,OAnBiE,CAmBzD,yBAnByD,EAAA,CAAA;gBAItB,CAAA,eAmBH,WAAA,CAAY,QAnBT,GAmBoB,WAAA,CAAY,UAnBhC,CAAA,CAAA,OAAA,EAoBnC,0BApBmC,CAoBR,MApBQ,CAAA,CAAA,EAoBD,OApBC,CAoBD,yBApBC,CAoBD,MApBC,CAAA,CAAA;kBAIE,CAAA,OAAA,EAqBT,4BArBS,CAAA,EAqBmB,OArBnB,CAqBmB,2BAAA,CArBnB;kBAAR,CAAA,eAyBK,WAAA,CAAY,QAzBjB,GAyB4B,WAAA,CAAY,UAzBxC,CAAA,CAAA,OAAA,EA0B7B,4BA1B6B,CA0BA,MA1BA,CAAA,CAAA,EA0BO,OA1BP,CA0BO,2BA1BP,CA0BO,MA1BP,CAAA,CAAA;oBAIkB,CAAA,OAAA,EA2BjB,8BA3BiB,CAAA,EA2Ba,OA3Bb,CA2Ba,6BAAA,CA3Bb"}
@@ -1 +1 @@
1
- {"version":3,"file":"W3cV2CredentialsApi.mjs","names":["W3cV2CredentialsApi"],"sources":["../../../src/modules/vc/W3cV2CredentialsApi.ts"],"sourcesContent":["import type { Query, QueryOptions } from '../../storage/StorageService'\nimport type {\n W3cV2SignCredentialOptions,\n W3cV2SignPresentationOptions,\n W3cV2StoreCredentialOptions,\n W3cV2VerifyCredentialOptions,\n W3cV2VerifyPresentationOptions,\n} from './W3cV2CredentialServiceOptions'\nimport type { ClaimFormat, W3cV2VerifiableCredential } from './models'\nimport type { W3cV2CredentialRecord } from './repository'\n\nimport { AgentContext } from '../../agent'\nimport { injectable } from '../../plugins'\n\nimport { W3cV2CredentialService } from './W3cV2CredentialService'\n\n/**\n * @public\n */\n@injectable()\nexport class W3cV2CredentialsApi {\n private agentContext: AgentContext\n private w3cV2CredentialService: W3cV2CredentialService\n\n public constructor(agentContext: AgentContext, w3cV2CredentialService: W3cV2CredentialService) {\n this.agentContext = agentContext\n this.w3cV2CredentialService = w3cV2CredentialService\n }\n\n public async storeCredential(options: W3cV2StoreCredentialOptions): Promise<W3cV2CredentialRecord> {\n return this.w3cV2CredentialService.storeCredential(this.agentContext, options)\n }\n\n public async removeCredentialRecord(id: string) {\n return this.w3cV2CredentialService.removeCredentialRecord(this.agentContext, id)\n }\n\n public async getAllCredentialRecords(): Promise<W3cV2CredentialRecord[]> {\n return this.w3cV2CredentialService.getAllCredentialRecords(this.agentContext)\n }\n\n public async getCredentialRecordById(id: string): Promise<W3cV2CredentialRecord> {\n return this.w3cV2CredentialService.getCredentialRecordById(this.agentContext, id)\n }\n\n public async findCredentialRecordsByQuery(\n query: Query<W3cV2CredentialRecord>,\n queryOptions?: QueryOptions\n ): Promise<W3cV2VerifiableCredential[]> {\n return this.w3cV2CredentialService.findCredentialsByQuery(this.agentContext, query, queryOptions)\n }\n\n public async signCredential<Format extends ClaimFormat.JwtW3cVc | ClaimFormat.SdJwtW3cVc>(\n options: W3cV2SignCredentialOptions<Format>\n ) {\n return this.w3cV2CredentialService.signCredential<Format>(this.agentContext, options)\n }\n\n public async verifyCredential(options: W3cV2VerifyCredentialOptions) {\n return this.w3cV2CredentialService.verifyCredential(this.agentContext, options)\n }\n\n public async signPresentation<Format extends ClaimFormat.JwtW3cVp | ClaimFormat.SdJwtW3cVp>(\n options: W3cV2SignPresentationOptions<Format>\n ) {\n return this.w3cV2CredentialService.signPresentation<Format>(this.agentContext, options)\n }\n\n public async verifyPresentation(options: W3cV2VerifyPresentationOptions) {\n return this.w3cV2CredentialService.verifyPresentation(this.agentContext, options)\n }\n}\n"],"mappings":";;;;;;;;;;;AAoBO,gCAAMA,sBAAoB;CAI/B,AAAO,YAAY,cAA4B,wBAAgD;AAC7F,OAAK,eAAe;AACpB,OAAK,yBAAyB;;CAGhC,MAAa,gBAAgB,SAAsE;AACjG,SAAO,KAAK,uBAAuB,gBAAgB,KAAK,cAAc,QAAQ;;CAGhF,MAAa,uBAAuB,IAAY;AAC9C,SAAO,KAAK,uBAAuB,uBAAuB,KAAK,cAAc,GAAG;;CAGlF,MAAa,0BAA4D;AACvE,SAAO,KAAK,uBAAuB,wBAAwB,KAAK,aAAa;;CAG/E,MAAa,wBAAwB,IAA4C;AAC/E,SAAO,KAAK,uBAAuB,wBAAwB,KAAK,cAAc,GAAG;;CAGnF,MAAa,6BACX,OACA,cACsC;AACtC,SAAO,KAAK,uBAAuB,uBAAuB,KAAK,cAAc,OAAO,aAAa;;CAGnG,MAAa,eACX,SACA;AACA,SAAO,KAAK,uBAAuB,eAAuB,KAAK,cAAc,QAAQ;;CAGvF,MAAa,iBAAiB,SAAuC;AACnE,SAAO,KAAK,uBAAuB,iBAAiB,KAAK,cAAc,QAAQ;;CAGjF,MAAa,iBACX,SACA;AACA,SAAO,KAAK,uBAAuB,iBAAyB,KAAK,cAAc,QAAQ;;CAGzF,MAAa,mBAAmB,SAAyC;AACvE,SAAO,KAAK,uBAAuB,mBAAmB,KAAK,cAAc,QAAQ;;;kCAlDpF,YAAY"}
1
+ {"version":3,"file":"W3cV2CredentialsApi.mjs","names":["W3cV2CredentialsApi"],"sources":["../../../src/modules/vc/W3cV2CredentialsApi.ts"],"sourcesContent":["import { AgentContext } from '../../agent'\nimport { injectable } from '../../plugins'\nimport type { Query, QueryOptions } from '../../storage/StorageService'\nimport type { ClaimFormat, W3cV2VerifiableCredential } from './models'\nimport type { W3cV2CredentialRecord } from './repository'\nimport { W3cV2CredentialService } from './W3cV2CredentialService'\nimport type {\n W3cV2SignCredentialOptions,\n W3cV2SignPresentationOptions,\n W3cV2StoreCredentialOptions,\n W3cV2VerifyCredentialOptions,\n W3cV2VerifyPresentationOptions,\n} from './W3cV2CredentialServiceOptions'\n\n/**\n * @public\n */\n@injectable()\nexport class W3cV2CredentialsApi {\n private agentContext: AgentContext\n private w3cV2CredentialService: W3cV2CredentialService\n\n public constructor(agentContext: AgentContext, w3cV2CredentialService: W3cV2CredentialService) {\n this.agentContext = agentContext\n this.w3cV2CredentialService = w3cV2CredentialService\n }\n\n public async storeCredential(options: W3cV2StoreCredentialOptions): Promise<W3cV2CredentialRecord> {\n return this.w3cV2CredentialService.storeCredential(this.agentContext, options)\n }\n\n public async removeCredentialRecord(id: string) {\n return this.w3cV2CredentialService.removeCredentialRecord(this.agentContext, id)\n }\n\n public async getAllCredentialRecords(): Promise<W3cV2CredentialRecord[]> {\n return this.w3cV2CredentialService.getAllCredentialRecords(this.agentContext)\n }\n\n public async getCredentialRecordById(id: string): Promise<W3cV2CredentialRecord> {\n return this.w3cV2CredentialService.getCredentialRecordById(this.agentContext, id)\n }\n\n public async findCredentialRecordsByQuery(\n query: Query<W3cV2CredentialRecord>,\n queryOptions?: QueryOptions\n ): Promise<W3cV2VerifiableCredential[]> {\n return this.w3cV2CredentialService.findCredentialsByQuery(this.agentContext, query, queryOptions)\n }\n\n public async signCredential<Format extends ClaimFormat.JwtW3cVc | ClaimFormat.SdJwtW3cVc>(\n options: W3cV2SignCredentialOptions<Format>\n ) {\n return this.w3cV2CredentialService.signCredential<Format>(this.agentContext, options)\n }\n\n public async verifyCredential(options: W3cV2VerifyCredentialOptions) {\n return this.w3cV2CredentialService.verifyCredential(this.agentContext, options)\n }\n\n public async signPresentation<Format extends ClaimFormat.JwtW3cVp | ClaimFormat.SdJwtW3cVp>(\n options: W3cV2SignPresentationOptions<Format>\n ) {\n return this.w3cV2CredentialService.signPresentation<Format>(this.agentContext, options)\n }\n\n public async verifyPresentation(options: W3cV2VerifyPresentationOptions) {\n return this.w3cV2CredentialService.verifyPresentation(this.agentContext, options)\n }\n}\n"],"mappings":";;;;;;;;;;;AAkBO,gCAAMA,sBAAoB;CAI/B,AAAO,YAAY,cAA4B,wBAAgD;AAC7F,OAAK,eAAe;AACpB,OAAK,yBAAyB;;CAGhC,MAAa,gBAAgB,SAAsE;AACjG,SAAO,KAAK,uBAAuB,gBAAgB,KAAK,cAAc,QAAQ;;CAGhF,MAAa,uBAAuB,IAAY;AAC9C,SAAO,KAAK,uBAAuB,uBAAuB,KAAK,cAAc,GAAG;;CAGlF,MAAa,0BAA4D;AACvE,SAAO,KAAK,uBAAuB,wBAAwB,KAAK,aAAa;;CAG/E,MAAa,wBAAwB,IAA4C;AAC/E,SAAO,KAAK,uBAAuB,wBAAwB,KAAK,cAAc,GAAG;;CAGnF,MAAa,6BACX,OACA,cACsC;AACtC,SAAO,KAAK,uBAAuB,uBAAuB,KAAK,cAAc,OAAO,aAAa;;CAGnG,MAAa,eACX,SACA;AACA,SAAO,KAAK,uBAAuB,eAAuB,KAAK,cAAc,QAAQ;;CAGvF,MAAa,iBAAiB,SAAuC;AACnE,SAAO,KAAK,uBAAuB,iBAAiB,KAAK,cAAc,QAAQ;;CAGjF,MAAa,iBACX,SACA;AACA,SAAO,KAAK,uBAAuB,iBAAyB,KAAK,cAAc,QAAQ;;CAGzF,MAAa,mBAAmB,SAAyC;AACvE,SAAO,KAAK,uBAAuB,mBAAmB,KAAK,cAAc,QAAQ;;;kCAlDpF,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"W3cV2CredentialsModule.mjs","names":[],"sources":["../../../src/modules/vc/W3cV2CredentialsModule.ts"],"sourcesContent":["import type { DependencyManager, Module } from '../../plugins'\nimport { W3cV2CredentialService } from './W3cV2CredentialService'\nimport { W3cV2CredentialsApi } from './W3cV2CredentialsApi'\nimport { SignatureSuiteRegistry } from './data-integrity/SignatureSuiteRegistry'\nimport { W3cV2JwtCredentialService } from './jwt-vc'\nimport { W3cV2CredentialRepository } from './repository/W3cV2CredentialRepository'\nimport { W3cV2SdJwtCredentialService } from './sd-jwt-vc'\n\n/**\n * @public\n */\nexport class W3cV2CredentialsModule implements Module {\n public readonly api = W3cV2CredentialsApi\n\n public register(dependencyManager: DependencyManager) {\n dependencyManager.registerSingleton(W3cV2CredentialService)\n dependencyManager.registerSingleton(W3cV2JwtCredentialService)\n dependencyManager.registerSingleton(W3cV2SdJwtCredentialService)\n dependencyManager.registerSingleton(W3cV2CredentialRepository)\n dependencyManager.registerSingleton(SignatureSuiteRegistry)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAWA,IAAa,yBAAb,MAAsD;;OACpC,MAAM;;CAEtB,AAAO,SAAS,mBAAsC;AACpD,oBAAkB,kBAAkB,uBAAuB;AAC3D,oBAAkB,kBAAkB,0BAA0B;AAC9D,oBAAkB,kBAAkB,4BAA4B;AAChE,oBAAkB,kBAAkB,0BAA0B;AAC9D,oBAAkB,kBAAkB,uBAAuB"}
1
+ {"version":3,"file":"W3cV2CredentialsModule.mjs","names":[],"sources":["../../../src/modules/vc/W3cV2CredentialsModule.ts"],"sourcesContent":["import type { DependencyManager, Module } from '../../plugins'\nimport { SignatureSuiteRegistry } from './data-integrity/SignatureSuiteRegistry'\nimport { W3cV2JwtCredentialService } from './jwt-vc'\nimport { W3cV2CredentialRepository } from './repository/W3cV2CredentialRepository'\nimport { W3cV2SdJwtCredentialService } from './sd-jwt-vc'\nimport { W3cV2CredentialService } from './W3cV2CredentialService'\nimport { W3cV2CredentialsApi } from './W3cV2CredentialsApi'\n\n/**\n * @public\n */\nexport class W3cV2CredentialsModule implements Module {\n public readonly api = W3cV2CredentialsApi\n\n public register(dependencyManager: DependencyManager) {\n dependencyManager.registerSingleton(W3cV2CredentialService)\n dependencyManager.registerSingleton(W3cV2JwtCredentialService)\n dependencyManager.registerSingleton(W3cV2SdJwtCredentialService)\n dependencyManager.registerSingleton(W3cV2CredentialRepository)\n dependencyManager.registerSingleton(SignatureSuiteRegistry)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAWA,IAAa,yBAAb,MAAsD;;OACpC,MAAM;;CAEtB,AAAO,SAAS,mBAAsC;AACpD,oBAAkB,kBAAkB,uBAAuB;AAC3D,oBAAkB,kBAAkB,0BAA0B;AAC9D,oBAAkB,kBAAkB,4BAA4B;AAChE,oBAAkB,kBAAkB,0BAA0B;AAC9D,oBAAkB,kBAAkB,uBAAuB"}
@@ -1,8 +1,8 @@
1
1
  import { W3cJsonLdVerifiableCredential } from "./models/W3cJsonLdVerifiableCredential.mjs";
2
- import { SignatureSuiteRegistry } from "./SignatureSuiteRegistry.mjs";
3
- import { W3cJsonLdSignCredentialOptions, W3cJsonLdSignPresentationOptions, W3cJsonLdVerifyCredentialOptions, W3cJsonLdVerifyPresentationOptions } from "../W3cCredentialServiceOptions.mjs";
4
2
  import { W3cVerifyCredentialResult, W3cVerifyPresentationResult } from "../models/W3cVerifyResult.mjs";
3
+ import { W3cJsonLdSignCredentialOptions, W3cJsonLdSignPresentationOptions, W3cJsonLdVerifyCredentialOptions, W3cJsonLdVerifyPresentationOptions } from "../W3cCredentialServiceOptions.mjs";
5
4
  import { W3cJsonLdVerifiablePresentation } from "./models/W3cJsonLdVerifiablePresentation.mjs";
5
+ import { SignatureSuiteRegistry } from "./SignatureSuiteRegistry.mjs";
6
6
  import { W3cCredentialsModuleConfig } from "../W3cCredentialsModuleConfig.mjs";
7
7
  import { AgentContext } from "../../../agent/context/AgentContext.mjs";
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"W3cJsonLdCredentialService.d.mts","names":[],"sources":["../../../../src/modules/vc/data-integrity/W3cJsonLdCredentialService.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;AAkCa,cAAA,0BAAA,CAA0B;EAAA,QAAA,sBAAA;UAKX,0BAAA;aACI,CAAA,sBAAA,EADJ,sBACI,EAAA,0BAAA,EAAA,0BAAA;;;;gBAY3B,CAAA,YAAA,EAFa,YAEb,EAAA,OAAA,EADQ,8BACR,CAAA,EAAA,OAAA,CAAQ,6BAAR,CAAA;;;;;;;kBA0HQ,CAAA,YAAA,EArEK,YAqEL,EAAA,OAAA,EApEA,gCAoEA,CAAA,EAnER,OAmEQ,CAnEA,yBAmEA,CAAA;;;;;;;kBA+IwE,CAAA,YAAA,EAjJnE,YAiJmE,EAAA,OAAA,EAhJxE,gCAgJwE,CAAA,EA/IhF,OA+IgF,CA/IxE,+BA+IwE,CAAA;;;;;;;mCA/EnE,uBACL,qCACR,QAAQ;;8CA6E8C,0BAA0B,gCAA6B"}
1
+ {"version":3,"file":"W3cJsonLdCredentialService.d.mts","names":[],"sources":["../../../../src/modules/vc/data-integrity/W3cJsonLdCredentialService.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;AA+Ba,cAAA,0BAAA,CAA0B;EAAA,QAAA,sBAAA;UAKX,0BAAA;aACI,CAAA,sBAAA,EADJ,sBACI,EAAA,0BAAA,EAAA,0BAAA;;;;gBAY3B,CAAA,YAAA,EAFa,YAEb,EAAA,OAAA,EADQ,8BACR,CAAA,EAAA,OAAA,CAAQ,6BAAR,CAAA;;;;;;;kBA0HQ,CAAA,YAAA,EArEK,YAqEL,EAAA,OAAA,EApEA,gCAoEA,CAAA,EAnER,OAmEQ,CAnEA,yBAmEA,CAAA;;;;;;;kBA+IwE,CAAA,YAAA,EAjJnE,YAiJmE,EAAA,OAAA,EAhJxE,gCAgJwE,CAAA,EA/IhF,OA+IgF,CA/IxE,+BA+IwE,CAAA;;;;;;;mCA/EnE,uBACL,qCACR,QAAQ;;8CA6E8C,0BAA0B,gCAA6B"}