@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
@@ -1 +1 @@
1
- {"version":3,"file":"DcqlService.mjs","names":["DcqlService","allRecords: Array<SdJwtVcRecord | W3cCredentialRecord | W3cV2CredentialRecord | MdocRecord>","credentialRecordsWithFormatDuplicates: typeof credentialRecords","dcqlCredentials: DcqlCredential[]","credentials: DcqlCredentialsForRequest","dcqlPresentation: DcqlPresentation","encodedDcqlPresentation: DcqlEncodedPresentations","getDcqlVcPresentationsToCreate","createdPresentation: VerifiablePresentation","encodedCreatedPresentation: string | Record<string, unknown>","key"],"sources":["../../../src/modules/dcql/DcqlService.ts"],"sourcesContent":["import type { AgentContext } from '../../agent'\nimport type { VerifiablePresentation } from '../dif-presentation-exchange/index'\n\nimport {\n DcqlCredential,\n DcqlCredentialQuery,\n DcqlMdocCredential,\n DcqlPresentationResult,\n DcqlQuery,\n DcqlSdJwtVcCredential,\n DcqlW3cVcCredential,\n} from 'dcql'\nimport { injectable } from 'tsyringe'\nimport { type JsonObject, type JsonValue, isNonEmptyArray, mapNonEmptyArray } from '../../types'\nimport { TypedArrayEncoder, asArray } from '../../utils'\nimport { DidsApi, VerificationMethod, getPublicJwkFromVerificationMethod } from '../dids'\nimport {\n Mdoc,\n MdocApi,\n MdocDeviceResponse,\n type MdocNameSpaces,\n MdocRecord,\n type MdocSessionTranscriptOptions,\n} from '../mdoc'\nimport { SdJwtVcApi, SdJwtVcRecord, SdJwtVcService } from '../sd-jwt-vc'\nimport { buildDisclosureFrameForPayload } from '../sd-jwt-vc/disclosureFrame'\nimport {\n ClaimFormat,\n SignatureSuiteRegistry,\n W3cCredentialRecord,\n W3cCredentialRepository,\n W3cCredentialService,\n W3cJsonLdCredentialService,\n W3cJsonLdVerifiableCredential,\n W3cPresentation,\n W3cV2CredentialRecord,\n W3cV2CredentialRepository,\n W3cV2CredentialService,\n W3cV2EnvelopedVerifiableCredential,\n W3cV2Presentation,\n} from '../vc'\nimport { purposes } from '../vc/data-integrity/libraries/jsonld-signatures'\nimport { W3cV2SdJwtCredentialService, W3cV2SdJwtVerifiableCredential } from '../vc/sd-jwt-vc'\nimport { X509Certificate } from '../x509'\nimport { DcqlError } from './DcqlError'\nimport type {\n DcqlCredentialsForRequest,\n DcqlEncodedPresentations,\n DcqlFailedCredential,\n DcqlPresentation,\n DcqlQueryResult,\n DcqlValidCredential,\n} from './models'\nimport { dcqlGetPresentationsToCreate as getDcqlVcPresentationsToCreate } from './utils'\n\n@injectable()\nexport class DcqlService {\n /**\n * Queries the wallet for credentials that match the given dcql query. This only does an initial query based on the\n * schema of the input descriptors. It does not do any further filtering based on the constraints in the input descriptors.\n */\n private async queryCredentialsForDcqlQuery(\n agentContext: AgentContext,\n dcqlQuery: DcqlQuery\n ): Promise<Array<SdJwtVcRecord | W3cCredentialRecord | W3cV2CredentialRecord | MdocRecord>> {\n const formats = new Set(dcqlQuery.credentials.map((c) => c.format))\n const allRecords: Array<SdJwtVcRecord | W3cCredentialRecord | W3cV2CredentialRecord | MdocRecord> = []\n\n const mdocDoctypes = dcqlQuery.credentials\n .filter((credentialQuery) => credentialQuery.format === 'mso_mdoc')\n .map((c) => c.meta?.doctype_value)\n\n const mdocApi = this.getMdocApi(agentContext)\n if (mdocDoctypes.every((doctype) => doctype !== undefined)) {\n const mdocRecords = await mdocApi.findAllByQuery({\n $or: mdocDoctypes.map((docType) => ({\n docType: docType,\n })),\n })\n allRecords.push(...mdocRecords)\n } else if (formats.has('mso_mdoc')) {\n const mdocRecords = await mdocApi.getAll()\n allRecords.push(...mdocRecords)\n }\n\n const sdJwts = dcqlQuery.credentials.filter(\n (credentialQuery): credentialQuery is DcqlCredentialQuery.SdJwtVc =>\n (credentialQuery.format === 'vc+sd-jwt' && !(credentialQuery.meta && 'type_values' in credentialQuery.meta)) ||\n credentialQuery.format === 'dc+sd-jwt'\n )\n\n const sdJwtVctValues = sdJwts.flatMap((c) => c.meta?.vct_values)\n\n const sdJwtVcApi = this.getSdJwtVcApi(agentContext)\n if (sdJwtVctValues.every((vct) => vct !== undefined)) {\n const sdjwtVcRecords = await sdJwtVcApi.findAllByQuery({\n $or: sdJwtVctValues.map((vct) => ({\n vct: vct as string,\n })),\n })\n allRecords.push(...sdjwtVcRecords)\n } else if (sdJwts.length > 0) {\n const sdJwtVcRecords = await sdJwtVcApi.getAll()\n allRecords.push(...sdJwtVcRecords)\n }\n\n const w3cCredentialRepository = agentContext.dependencyManager.resolve(W3cCredentialRepository)\n if (formats.has('jwt_vc_json')) {\n const w3cRecords = await w3cCredentialRepository.findByQuery(agentContext, {\n claimFormat: ClaimFormat.JwtVc,\n\n // For jwt_vc_json we query the non-exapnded types\n $or: dcqlQuery.credentials\n .flatMap((c) => (c.format === 'jwt_vc_json' ? c.meta.type_values : []))\n .map((typeValues) => ({\n types: typeValues,\n })),\n })\n allRecords.push(...w3cRecords)\n }\n\n if (formats.has('ldp_vc')) {\n const w3cRecords = await w3cCredentialRepository.findByQuery(agentContext, {\n claimFormat: ClaimFormat.LdpVc,\n\n // For LDP_VC we query the expanded types\n $or: dcqlQuery.credentials\n .flatMap((c) => (c.format === 'jwt_vc_json' ? c.meta.type_values : []))\n .map((typeValues) => ({\n expandedTypes: typeValues,\n })),\n })\n allRecords.push(...w3cRecords)\n }\n\n const w3cSdJwts = dcqlQuery.credentials.filter(\n (credentialQuery): credentialQuery is DcqlCredentialQuery.W3cVc & { format: 'vc+sd-jwt' } =>\n credentialQuery.format === 'vc+sd-jwt' && !!credentialQuery.meta && 'type_values' in credentialQuery.meta\n )\n\n if (w3cSdJwts.length > 0) {\n const w3cV2CredentialRepository = agentContext.dependencyManager.resolve(W3cV2CredentialRepository)\n\n const w3cV2Records = await w3cV2CredentialRepository.findByQuery(agentContext, {\n claimFormat: ClaimFormat.SdJwtW3cVc,\n $or: dcqlQuery.credentials\n .flatMap((c) => (c.format === 'vc+sd-jwt' && c.meta && 'type_values' in c.meta ? c.meta.type_values : []))\n .map((typeValues) => ({\n types: typeValues,\n })),\n })\n\n allRecords.push(...w3cV2Records)\n }\n\n return allRecords\n }\n\n public async getDcqlCredentialRepresentation(\n agentContext: AgentContext,\n presentation: VerifiablePresentation,\n queryCredential: DcqlQuery['credentials'][number]\n ): Promise<DcqlCredential> {\n // SD-JWT credential can be used as both dc+sd-jwt and vc+sd-jwt\n // At some point we might want to look at the header value of the sd-jwt (vc+sd-jwt vc dc+sd-jwt)\n if (presentation.claimFormat === ClaimFormat.SdJwtDc) {\n return {\n cryptographic_holder_binding: true,\n credential_format: queryCredential.format === 'dc+sd-jwt' ? 'dc+sd-jwt' : 'vc+sd-jwt',\n vct: presentation.prettyClaims.vct as string,\n claims: presentation.prettyClaims as DcqlSdJwtVcCredential.Claims,\n } satisfies DcqlSdJwtVcCredential\n }\n if (presentation.claimFormat === ClaimFormat.MsoMdoc) {\n if (presentation.documents.length !== 1) {\n throw new DcqlError('MDOC presentations must contain exactly one document')\n }\n return {\n cryptographic_holder_binding: true,\n credential_format: 'mso_mdoc',\n doctype: presentation.documents[0].docType,\n namespaces: presentation.documents[0].issuerSignedNamespaces,\n } satisfies DcqlMdocCredential\n }\n if (presentation.claimFormat === ClaimFormat.JwtVp) {\n const vc = Array.isArray(presentation.verifiableCredential)\n ? presentation.verifiableCredential[0].jsonCredential\n : presentation.verifiableCredential\n\n return {\n cryptographic_holder_binding: true,\n credential_format: 'jwt_vc_json',\n claims: vc.jsonCredential as { [key: string]: JsonValue },\n type: vc.type,\n } satisfies DcqlW3cVcCredential\n }\n if (presentation.claimFormat === ClaimFormat.LdpVp) {\n const vc = Array.isArray(presentation.verifiableCredential)\n ? (presentation.verifiableCredential[0] as W3cJsonLdVerifiableCredential)\n : (presentation.verifiableCredential as W3cJsonLdVerifiableCredential)\n\n const w3cJsonLdCredentialService = agentContext.dependencyManager.resolve(W3cJsonLdCredentialService)\n const expandedTypes = await w3cJsonLdCredentialService.getExpandedTypesForCredential(agentContext, vc)\n\n return {\n cryptographic_holder_binding: true,\n credential_format: 'ldp_vc',\n claims: vc.jsonCredential as DcqlW3cVcCredential.Claims,\n type: expandedTypes,\n } satisfies DcqlW3cVcCredential\n }\n if (presentation.claimFormat === ClaimFormat.SdJwtW3cVp) {\n const vc = Array.isArray(presentation.resolvedPresentation.verifiableCredential)\n ? presentation.resolvedPresentation.verifiableCredential[0].resolvedCredential\n : presentation.resolvedPresentation.verifiableCredential.resolvedCredential\n\n return {\n cryptographic_holder_binding: true,\n credential_format: 'vc+sd-jwt',\n type: asArray(vc.type),\n claims: vc.toJSON() as { [key: string]: JsonValue },\n } satisfies DcqlW3cVcCredential\n }\n\n throw new DcqlError('Unsupported claim format for presentation')\n }\n\n public async getCredentialsForRequest(agentContext: AgentContext, dcqlQuery: DcqlQuery): Promise<DcqlQueryResult> {\n const credentialRecords = await this.queryCredentialsForDcqlQuery(agentContext, dcqlQuery)\n const credentialRecordsWithFormatDuplicates: typeof credentialRecords = []\n\n const dcqlCredentials: DcqlCredential[] = credentialRecords.flatMap((record): DcqlCredential | DcqlCredential[] => {\n if (record.type === 'MdocRecord') {\n credentialRecordsWithFormatDuplicates.push(record)\n const mdoc = Mdoc.fromBase64Url(record.base64Url)\n\n const akiValues = mdoc.issuerSignedCertificateChain\n .map((c) => {\n const akiHex = X509Certificate.fromRawCertificate(c).authorityKeyIdentifier\n return akiHex ? TypedArrayEncoder.toBase64URL(TypedArrayEncoder.fromHex(akiHex)) : undefined\n })\n .filter((aki) => aki !== undefined)\n\n return {\n authority: isNonEmptyArray(akiValues)\n ? {\n type: 'aki',\n values: akiValues,\n }\n : undefined,\n credential_format: 'mso_mdoc',\n doctype: record.getTags().docType,\n namespaces: mdoc.issuerSignedNamespaces,\n cryptographic_holder_binding: true,\n } satisfies DcqlCredential\n }\n\n if (record.type === 'SdJwtVcRecord') {\n const sdJwtVc = this.getSdJwtVcApi(agentContext).fromCompact(record.compactSdJwtVc)\n const claims = sdJwtVc.prettyClaims as DcqlSdJwtVcCredential.Claims\n\n const akiValues = (sdJwtVc.header.x5c as string[] | undefined)\n ?.map((c) => {\n const akiHex = X509Certificate.fromEncodedCertificate(c).authorityKeyIdentifier\n return akiHex ? TypedArrayEncoder.toBase64URL(TypedArrayEncoder.fromHex(akiHex)) : undefined\n })\n .filter((aki) => aki !== undefined)\n\n const authority =\n akiValues && isNonEmptyArray(akiValues)\n ? ({\n type: 'aki',\n values: akiValues,\n } as const)\n : undefined\n\n // To keep correct mapping of input credential index, we add it twice here (for dc+sd-jwt and vc+sd-jwt)\n credentialRecordsWithFormatDuplicates.push(record, record)\n return [\n {\n authority,\n credential_format: 'dc+sd-jwt',\n vct: record.getTags().vct,\n claims,\n cryptographic_holder_binding: true,\n } satisfies DcqlSdJwtVcCredential,\n {\n authority,\n credential_format: 'vc+sd-jwt',\n vct: record.getTags().vct,\n claims,\n cryptographic_holder_binding: true,\n } satisfies DcqlSdJwtVcCredential,\n ] satisfies [DcqlSdJwtVcCredential, DcqlSdJwtVcCredential]\n }\n\n if (record.type === 'W3cCredentialRecord') {\n credentialRecordsWithFormatDuplicates.push(record)\n if (record.credential.claimFormat === ClaimFormat.LdpVc) {\n return {\n credential_format: 'ldp_vc',\n type: record.getTags().expandedTypes ?? [],\n claims: record.credential.jsonCredential as DcqlW3cVcCredential.Claims,\n cryptographic_holder_binding: true,\n } satisfies DcqlW3cVcCredential\n }\n\n return {\n credential_format: 'jwt_vc_json',\n type: record.credential.type,\n claims: record.credential.jsonCredential as DcqlW3cVcCredential.Claims,\n cryptographic_holder_binding: true,\n } satisfies DcqlW3cVcCredential\n }\n\n if (record.type === 'W3cV2CredentialRecord') {\n credentialRecordsWithFormatDuplicates.push(record)\n\n return {\n credential_format: 'vc+sd-jwt',\n type: asArray(record.credential.resolvedCredential.type),\n claims: record.credential.resolvedCredential.toJSON() as DcqlW3cVcCredential.Claims,\n cryptographic_holder_binding: true,\n } satisfies DcqlW3cVcCredential\n }\n\n throw new DcqlError('Unsupported record type')\n })\n\n const queryResult = DcqlQuery.query(DcqlQuery.parse(dcqlQuery), dcqlCredentials)\n\n const matchesWithRecord = Object.fromEntries(\n Object.entries(queryResult.credential_matches).map(([credential_query_id, result]) => {\n const failedCredentials = result.failed_credentials\n ? mapNonEmptyArray(result.failed_credentials, (credential) => {\n const record = credentialRecordsWithFormatDuplicates[credential.input_credential_index]\n const updatedCredential: DcqlFailedCredential = {\n ...credential,\n record,\n claims: credential.claims.success\n ? {\n ...credential.claims,\n success: true,\n valid_claim_sets: mapNonEmptyArray(credential.claims.valid_claim_sets, (claimSet) => ({\n ...claimSet,\n ...(record.type === 'SdJwtVcRecord'\n ? // NOTE: we cast from SdJwtVcPayload (which is Record<string, unknown> to { [key: string]: JsonValue })\n // Otherwise TypeScript explains, but I'm not sure why Record<string, unknown> wouldn't be applicable to { [key: string]: JsonValue }\n {\n output: agentContext.dependencyManager\n .resolve(SdJwtVcService)\n .applyDisclosuresForPayload(record.compactSdJwtVc, claimSet.output as JsonObject)\n .prettyClaims as { [key: string]: JsonValue },\n }\n : record.type === 'W3cV2CredentialRecord' &&\n record.credential instanceof W3cV2SdJwtVerifiableCredential\n ? {\n output: agentContext.dependencyManager\n .resolve(SdJwtVcService)\n .applyDisclosuresForPayload(record.credential.encoded, claimSet.output as JsonObject)\n .prettyClaims as { [key: string]: JsonValue },\n }\n : {}),\n })),\n }\n : credential.claims,\n }\n return updatedCredential\n })\n : undefined\n\n // If not success, valid_credentials will be undefined, so we only have to map failed_credentials\n if (!result.success) {\n return [\n credential_query_id,\n {\n ...result,\n failed_credentials: failedCredentials,\n },\n ]\n }\n\n return [\n credential_query_id,\n {\n ...result,\n failed_credentials: failedCredentials,\n valid_credentials: mapNonEmptyArray(result.valid_credentials, (credential) => {\n const record = credentialRecordsWithFormatDuplicates[credential.input_credential_index]\n const updatedCredential: DcqlValidCredential = {\n ...credential,\n record,\n claims: {\n ...credential.claims,\n valid_claim_sets: mapNonEmptyArray(credential.claims.valid_claim_sets, (claimSet) => ({\n ...claimSet,\n ...(record.type === 'SdJwtVcRecord'\n ? // NOTE: we cast from SdJwtVcPayload (which is Record<string, unknown> to { [key: string]: JsonValue })\n // Otherwise TypeScript explains, but I'm not sure why Record<string, unknown> wouldn't be applicable to { [key: string]: JsonValue }\n {\n output: agentContext.dependencyManager\n .resolve(SdJwtVcService)\n .applyDisclosuresForPayload(record.compactSdJwtVc, claimSet.output as JsonObject)\n .prettyClaims as { [key: string]: JsonValue },\n }\n : record.type === 'W3cV2CredentialRecord' &&\n record.credential instanceof W3cV2SdJwtVerifiableCredential\n ? {\n output: agentContext.dependencyManager\n .resolve(SdJwtVcService)\n .applyDisclosuresForPayload(record.credential.encoded, claimSet.output as JsonObject)\n .prettyClaims as { [key: string]: JsonValue },\n }\n : {}),\n })),\n },\n }\n return updatedCredential\n }),\n },\n ]\n })\n )\n\n return {\n ...queryResult,\n credential_matches: matchesWithRecord,\n }\n }\n\n public async assertValidDcqlPresentation(\n agentContext: AgentContext,\n dcqlPresentation: DcqlPresentation,\n dcqlQuery: DcqlQuery\n ) {\n const internalDcqlPresentation = Object.fromEntries(\n await Promise.all(\n Object.entries(dcqlPresentation).map(async ([credentialId, presentations]) => {\n const queryCredential = dcqlQuery.credentials.find((c) => c.id === credentialId)\n if (!queryCredential) {\n throw new DcqlError(\n `DCQL presentation contains presentation entry for credential id '${credentialId}', but this id is not present in the DCQL query`\n )\n }\n\n return [\n credentialId,\n await Promise.all(\n presentations.map((presentation) =>\n this.getDcqlCredentialRepresentation(agentContext, presentation, queryCredential)\n )\n ),\n ]\n })\n )\n )\n\n const presentationResult = DcqlPresentationResult.fromDcqlPresentation(internalDcqlPresentation, { dcqlQuery })\n\n if (!presentationResult.can_be_satisfied) {\n throw new DcqlError('Presentations do not satisfy the DCQL query.', {\n additionalMessages: Object.entries(presentationResult.credential_matches ?? {})\n .flatMap(([queryId, match]) =>\n match.success\n ? undefined\n : !match.failed_credentials\n ? `Unable to match query credential '${queryId}'. No prsentations provided`\n : match.failed_credentials.map(\n (failedCredential) =>\n `Presentation at index ${failedCredential.input_credential_index} does not match query credential '${queryId}'. ${JSON.stringify(\n {\n ...(failedCredential.claims.success\n ? {}\n : { claims: failedCredential.claims.failed_claim_sets.map((cs) => cs.issues) }),\n ...(failedCredential.trusted_authorities.success\n ? {}\n : {\n trusted_authorities:\n failedCredential.trusted_authorities.failed_trusted_authorities.map(\n (ta) => ta.issues\n ),\n }),\n ...(failedCredential.meta.success ? {} : { meta: failedCredential.meta.issues }),\n },\n null,\n 2\n )}`\n )\n )\n .filter((message) => message !== undefined),\n })\n }\n\n return presentationResult\n }\n\n private dcqlCredentialForRequestForValidCredential(validCredential: DcqlValidCredential) {\n if (validCredential.record.type === 'MdocRecord') {\n return {\n claimFormat: ClaimFormat.MsoMdoc,\n credentialRecord: validCredential.record,\n disclosedPayload: validCredential.claims.valid_claim_sets[0].output as MdocNameSpaces,\n } as const\n }\n if (validCredential.record.type === 'SdJwtVcRecord') {\n return {\n claimFormat: ClaimFormat.SdJwtDc,\n credentialRecord: validCredential.record,\n disclosedPayload: validCredential.claims.valid_claim_sets[0].output as JsonObject,\n } as const\n }\n\n if (validCredential.record.type === 'W3cCredentialRecord') {\n return {\n claimFormat: validCredential.record.credential.claimFormat,\n credentialRecord: validCredential.record,\n disclosedPayload: validCredential.record.credential.jsonCredential as JsonObject,\n } as const\n }\n\n if (validCredential.record.type === 'W3cV2CredentialRecord') {\n return {\n claimFormat: validCredential.record.credential.claimFormat,\n credentialRecord: validCredential.record,\n disclosedPayload: validCredential.claims.valid_claim_sets[0].output as JsonObject,\n } as const\n }\n\n throw new DcqlError('Unsupported record type for DCQL')\n }\n\n /**\n * Selects the credentials to use based on the output from `getCredentialsForRequest`\n * Use this method if you don't want to manually select the credentials yourself.\n */\n public selectCredentialsForRequest(dcqlQueryResult: DcqlQueryResult): DcqlCredentialsForRequest {\n if (!dcqlQueryResult.can_be_satisfied) {\n throw new DcqlError(\n 'Cannot select the credentials for the dcql query presentation if the request cannot be satisfied'\n )\n }\n\n const credentials: DcqlCredentialsForRequest = {}\n\n if (dcqlQueryResult.credential_sets) {\n for (const credentialSet of dcqlQueryResult.credential_sets) {\n // undefined defaults to true\n if (credentialSet.required === false) continue\n const firstFullFillableOption = credentialSet.options.find((option) =>\n option.every((credential_id) => dcqlQueryResult.credential_matches[credential_id].success)\n )\n\n if (!firstFullFillableOption) {\n throw new DcqlError('Invalid dcql query result. No option is fullfillable')\n }\n\n for (const credentialQueryId of firstFullFillableOption) {\n const credentialMatch = dcqlQueryResult.credential_matches[credentialQueryId]\n\n if (!credentialMatch.success) {\n throw new DcqlError('Invalid dcql query result. Cannot auto-select credentials')\n }\n\n const credential = credentialMatch.valid_credentials[0]\n credentials[credentialQueryId] = [this.dcqlCredentialForRequestForValidCredential(credential)]\n }\n }\n } else {\n for (const credentialQuery of dcqlQueryResult.credentials) {\n const credentialMatch = dcqlQueryResult.credential_matches[credentialQuery.id]\n if (!credentialMatch.success) {\n throw new DcqlError('Invalid dcql query result. Cannot auto-select credentials')\n }\n\n const credential = credentialMatch.valid_credentials[0]\n credentials[credentialQuery.id] = [this.dcqlCredentialForRequestForValidCredential(credential)]\n }\n }\n\n return credentials\n }\n\n public validateDcqlQuery(dcqlQuery: DcqlQuery | DcqlQuery.Input | unknown): DcqlQuery {\n const parsed = DcqlQuery.parse(dcqlQuery as DcqlQuery)\n DcqlQuery.validate(parsed)\n return parsed\n }\n\n public async createPresentation(\n agentContext: AgentContext,\n options: {\n credentialQueryToCredential: DcqlCredentialsForRequest\n challenge: string\n domain?: string\n mdocSessionTranscript?: MdocSessionTranscriptOptions\n }\n ): Promise<{\n dcqlPresentation: DcqlPresentation\n encodedDcqlPresentation: DcqlEncodedPresentations\n }> {\n const { domain, challenge, mdocSessionTranscript } = options\n\n const dcqlPresentation: DcqlPresentation = {}\n const encodedDcqlPresentation: DcqlEncodedPresentations = {}\n\n const vcPresentationsToCreate = getDcqlVcPresentationsToCreate(options.credentialQueryToCredential)\n for (const [credentialQueryId, presentationsToCreate] of Object.entries(vcPresentationsToCreate)) {\n for (const presentationToCreate of presentationsToCreate) {\n let createdPresentation: VerifiablePresentation\n let encodedCreatedPresentation: string | Record<string, unknown>\n\n if (presentationToCreate.claimFormat === ClaimFormat.MsoMdoc) {\n const mdocRecord = presentationToCreate.credentialRecord\n if (!mdocSessionTranscript) {\n throw new DcqlError('Missing mdoc session transcript options for creating MDOC presentation.')\n }\n\n const deviceResponse = await MdocDeviceResponse.createDeviceResponse(agentContext, {\n mdocs: [Mdoc.fromBase64Url(mdocRecord.base64Url)],\n documentRequests: [\n {\n docType: mdocRecord.getTags().docType,\n nameSpaces: Object.fromEntries(\n Object.entries(presentationToCreate.disclosedPayload).map(([key, value]) => {\n // FIXME: we need the DCQL query here to get the intent_to_retain from query (currently hardcoded to false)\n return [key, Object.fromEntries(Object.entries(value).map(([key]) => [key, false]))]\n })\n ),\n },\n ],\n sessionTranscriptOptions: mdocSessionTranscript,\n })\n const deviceResponseBase64Url = TypedArrayEncoder.toBase64URL(deviceResponse)\n\n encodedCreatedPresentation = deviceResponseBase64Url\n createdPresentation = MdocDeviceResponse.fromBase64Url(deviceResponseBase64Url)\n } else if (presentationToCreate.claimFormat === ClaimFormat.SdJwtDc) {\n const presentationFrame = buildDisclosureFrameForPayload(presentationToCreate.disclosedPayload)\n\n if (!domain) {\n throw new DcqlError('Missing domain property for creating SdJwtVc presentation.')\n }\n\n const sdJwtVcApi = this.getSdJwtVcApi(agentContext)\n const presentation = await sdJwtVcApi.present({\n compactSdJwtVc: presentationToCreate.credentialRecord.compactSdJwtVc,\n presentationFrame,\n verifierMetadata: {\n audience: domain,\n nonce: challenge,\n issuedAt: Math.floor(Date.now() / 1000),\n },\n additionalPayload: presentationToCreate.additionalPayload,\n })\n\n encodedCreatedPresentation = presentation\n createdPresentation = sdJwtVcApi.fromCompact(presentation)\n } else if (presentationToCreate.claimFormat === ClaimFormat.JwtVp) {\n if (!presentationToCreate.subjectIds) {\n throw new DcqlError('Cannot create presentation for credentials without subject id')\n }\n\n // Determine a suitable verification method for the presentation\n const verificationMethod = await this.getVerificationMethodForSubjectId(\n agentContext,\n presentationToCreate.subjectIds[0]\n )\n\n const w3cCredentialService = agentContext.resolve(W3cCredentialService)\n const w3cPresentation = new W3cPresentation({\n verifiableCredential: [presentationToCreate.credentialRecord.credential],\n holder: verificationMethod.controller,\n })\n\n const publicJwk = getPublicJwkFromVerificationMethod(verificationMethod)\n\n const signedPresentation = await w3cCredentialService.signPresentation<ClaimFormat.JwtVp>(agentContext, {\n format: ClaimFormat.JwtVp,\n alg: publicJwk.signatureAlgorithm,\n verificationMethod: verificationMethod.id,\n presentation: w3cPresentation,\n challenge,\n domain,\n })\n\n encodedCreatedPresentation = signedPresentation.encoded\n createdPresentation = signedPresentation\n } else if (presentationToCreate.claimFormat === ClaimFormat.LdpVp) {\n if (!presentationToCreate.subjectIds) {\n throw new DcqlError('Cannot create presentation for credentials without subject id')\n }\n // Determine a suitable verification method for the presentation\n const verificationMethod = await this.getVerificationMethodForSubjectId(\n agentContext,\n presentationToCreate.subjectIds[0]\n )\n\n const w3cCredentialService = agentContext.resolve(W3cCredentialService)\n const w3cPresentation = new W3cPresentation({\n verifiableCredential: [presentationToCreate.credentialRecord.credential],\n holder: verificationMethod.controller,\n })\n\n const signedPresentation = await w3cCredentialService.signPresentation(agentContext, {\n format: ClaimFormat.LdpVp,\n // TODO: we should move the check for which proof to use for a presentation to earlier\n // as then we know when determining which VPs to submit already if the proof types are supported\n // by the verifier, and we can then just add this to the vpToCreate interface\n proofType: this.getProofTypeForLdpVc(agentContext, verificationMethod),\n proofPurpose: new purposes.AuthenticationProofPurpose({ challenge, domain }),\n verificationMethod: verificationMethod.id,\n presentation: w3cPresentation,\n challenge,\n domain,\n })\n\n encodedCreatedPresentation = signedPresentation.encoded\n createdPresentation = signedPresentation\n } else if (presentationToCreate.claimFormat === ClaimFormat.JwtW3cVp) {\n if (!presentationToCreate.subjectIds) {\n throw new DcqlError('Cannot create presentation for credentials without subject id')\n }\n\n const w3cV2CredentialService = agentContext.resolve(W3cV2CredentialService)\n const w3cV2Presentation = new W3cV2Presentation({\n holder: presentationToCreate.credentialRecord.credential.resolvedCredential.credentialSubjectIds[0],\n verifiableCredential: [\n W3cV2EnvelopedVerifiableCredential.fromVerifiableCredential(\n presentationToCreate.credentialRecord.credential\n ),\n ],\n })\n\n const signedPresentation = await w3cV2CredentialService.signPresentation<ClaimFormat.JwtW3cVp>(agentContext, {\n format: ClaimFormat.JwtW3cVp,\n presentation: w3cV2Presentation,\n challenge,\n domain,\n })\n\n encodedCreatedPresentation = signedPresentation.encoded\n createdPresentation = signedPresentation\n } else if (presentationToCreate.claimFormat === ClaimFormat.SdJwtW3cVp) {\n if (!presentationToCreate.subjectIds) {\n throw new DcqlError('Cannot create presentation for credentials without subject id')\n }\n\n const presentationFrame = buildDisclosureFrameForPayload(presentationToCreate.disclosedPayload)\n if (!domain) {\n throw new DcqlError('Missing domain property for creating SdJwtVc presentation.')\n }\n\n const w3cV2SdJwtCredentialService = agentContext.resolve(W3cV2SdJwtCredentialService)\n const sdJwtVc = await w3cV2SdJwtCredentialService.present(agentContext, {\n credential: presentationToCreate.credentialRecord.credential.encoded,\n presentationFrame,\n })\n\n const w3cV2CredentialService = agentContext.resolve(W3cV2CredentialService)\n const w3cV2Presentation = new W3cV2Presentation({\n holder: presentationToCreate.credentialRecord.credential.resolvedCredential.credentialSchemaIds[0],\n verifiableCredential: [W3cV2EnvelopedVerifiableCredential.fromVerifiableCredential(sdJwtVc)],\n })\n\n const signedPresentation = await w3cV2CredentialService.signPresentation<ClaimFormat.SdJwtW3cVp>(\n agentContext,\n {\n format: ClaimFormat.SdJwtW3cVp,\n presentation: w3cV2Presentation,\n challenge,\n domain,\n }\n )\n\n encodedCreatedPresentation = signedPresentation.encoded\n createdPresentation = signedPresentation\n } else {\n throw new DcqlError('Unsupported presentation format.')\n }\n\n if (!dcqlPresentation[credentialQueryId]) {\n dcqlPresentation[credentialQueryId] = [createdPresentation]\n } else {\n dcqlPresentation[credentialQueryId].push(createdPresentation)\n }\n\n if (!encodedDcqlPresentation[credentialQueryId]) {\n encodedDcqlPresentation[credentialQueryId] = [encodedCreatedPresentation]\n } else {\n encodedDcqlPresentation[credentialQueryId].push(encodedCreatedPresentation)\n }\n }\n }\n\n return {\n dcqlPresentation,\n encodedDcqlPresentation,\n }\n }\n\n private getSdJwtVcApi(agentContext: AgentContext) {\n return agentContext.dependencyManager.resolve(SdJwtVcApi)\n }\n\n private getMdocApi(agentContext: AgentContext) {\n return agentContext.dependencyManager.resolve(MdocApi)\n }\n\n private async getVerificationMethodForSubjectId(agentContext: AgentContext, subjectId: string) {\n const didsApi = agentContext.dependencyManager.resolve(DidsApi)\n\n if (!subjectId.startsWith('did:')) {\n throw new DcqlError(`Only dids are supported as credentialSubject id. ${subjectId} is not a valid did`)\n }\n\n const didDocument = await didsApi.resolveDidDocument(subjectId)\n\n if (!didDocument.authentication || didDocument.authentication.length === 0) {\n throw new DcqlError(`No authentication verificationMethods found for did ${subjectId} in did document`)\n }\n\n // the signature suite to use for the presentation is dependant on the credentials we share.\n // 1. Get the verification method for this given proof purpose in this DID document\n let [verificationMethod] = didDocument.authentication\n if (typeof verificationMethod === 'string') {\n verificationMethod = didDocument.dereferenceKey(verificationMethod, ['authentication'])\n }\n\n return verificationMethod\n }\n\n // FIXME: We need to take into account OpenID4VP metadata (probably providing supported/allowed algs to the DCQL create presentation method)\n private getProofTypeForLdpVc(agentContext: AgentContext, verificationMethod: VerificationMethod) {\n // For each of the supported algs, find the key types, then find the proof types\n const signatureSuiteRegistry = agentContext.dependencyManager.resolve(SignatureSuiteRegistry)\n\n const publicJwk = getPublicJwkFromVerificationMethod(verificationMethod)\n const supportedSignatureSuites = signatureSuiteRegistry.getAllByPublicJwkType(publicJwk)\n if (supportedSignatureSuites.length === 0) {\n throw new DcqlError(\n `Couldn't find a supported signature suite for the given jwk ${publicJwk.jwkTypehumanDescription}`\n )\n }\n\n return supportedSignatureSuites[0].proofType\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDO,wBAAMA,cAAY;;;;;CAKvB,MAAc,6BACZ,cACA,WAC0F;EAC1F,MAAM,UAAU,IAAI,IAAI,UAAU,YAAY,KAAK,MAAM,EAAE,OAAO,CAAC;EACnE,MAAMC,aAA8F,EAAE;EAEtG,MAAM,eAAe,UAAU,YAC5B,QAAQ,oBAAoB,gBAAgB,WAAW,WAAW,CAClE,KAAK,MAAM,EAAE,MAAM,cAAc;EAEpC,MAAM,UAAU,KAAK,WAAW,aAAa;AAC7C,MAAI,aAAa,OAAO,YAAY,YAAY,OAAU,EAAE;GAC1D,MAAM,cAAc,MAAM,QAAQ,eAAe,EAC/C,KAAK,aAAa,KAAK,aAAa,EACzB,SACV,EAAE,EACJ,CAAC;AACF,cAAW,KAAK,GAAG,YAAY;aACtB,QAAQ,IAAI,WAAW,EAAE;GAClC,MAAM,cAAc,MAAM,QAAQ,QAAQ;AAC1C,cAAW,KAAK,GAAG,YAAY;;EAGjC,MAAM,SAAS,UAAU,YAAY,QAClC,oBACE,gBAAgB,WAAW,eAAe,EAAE,gBAAgB,QAAQ,iBAAiB,gBAAgB,SACtG,gBAAgB,WAA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AA4B;AAChD,SAAO,aAAa,kBAAkB,QAAQ,WAAW;;CAG3D,AAAQ,WAAW,cAA4B;AAC7C,SAAO,aAAa,kBAAkB,QAAQ,QAAQ;;CAGxD,MAAc,kCAAkC,cAA4B,WAAmB;EAC7F,MAAM,UAAU,aAAa,kBAAkB,QAAQ,QAAQ;AAE/D,MAAI,CAAC,UAAU,WAAW,OAAO,CAC/B,OAAM,IAAI,UAAU,oDAAoD,UAAU,qBAAqB;EAGzG,MAAM,cAAc,MAAM,QAAQ,mBAAmB,UAAU;AAE/D,MAAI,CAAC,YAAY,kBAAkB,YAAY,eAAe,WAAW,EACvE,OAAM,IAAI,UAAU,uDAAuD,UAAU,kBAAkB;EAKzG,IAAI,CAAC,sBAAsB,YAAY;AACvC,MAAI,OAAO,uBAAuB,SAChC,sBAAqB,YAAY,eAAe,oBAAoB,CAAC,iBAAiB,CAAC;AAGzF,SAAO;;CAIT,AAAQ,qBAAqB,cAA4B,oBAAwC;EAE/F,MAAM,yBAAyB,aAAa,kBAAkB,QAAQ,uBAAuB;EAE7F,MAAM,YAAY,mCAAmC,mBAAmB;EACxE,MAAM,2BAA2B,uBAAuB,sBAAsB,UAAU;AACxF,MAAI,yBAAyB,WAAW,EACtC,OAAM,IAAI,UACR,+DAA+D,UAAU,0BAC1E;AAGH,SAAO,yBAAyB,GAAG;;;0BArxBtC,YAAY"}
1
+ {"version":3,"file":"DcqlService.mjs","names":["DcqlService","allRecords: Array<SdJwtVcRecord | W3cCredentialRecord | W3cV2CredentialRecord | MdocRecord>","credentialRecordsWithFormatDuplicates: typeof credentialRecords","dcqlCredentials: DcqlCredential[]","credentials: DcqlCredentialsForRequest","dcqlPresentation: DcqlPresentation","encodedDcqlPresentation: DcqlEncodedPresentations","getDcqlVcPresentationsToCreate","createdPresentation: VerifiablePresentation","encodedCreatedPresentation: string | Record<string, unknown>","key"],"sources":["../../../src/modules/dcql/DcqlService.ts"],"sourcesContent":["import {\n DcqlCredential,\n DcqlCredentialQuery,\n DcqlMdocCredential,\n DcqlPresentationResult,\n DcqlQuery,\n DcqlSdJwtVcCredential,\n DcqlW3cVcCredential,\n} from 'dcql'\nimport { injectable } from 'tsyringe'\nimport type { AgentContext } from '../../agent'\nimport { isNonEmptyArray, type JsonObject, type JsonValue, mapNonEmptyArray } from '../../types'\nimport { asArray, TypedArrayEncoder } from '../../utils'\nimport { DidsApi, getPublicJwkFromVerificationMethod, VerificationMethod } from '../dids'\nimport type { VerifiablePresentation } from '../dif-presentation-exchange/index'\nimport {\n Mdoc,\n MdocApi,\n MdocDeviceResponse,\n type MdocNameSpaces,\n MdocRecord,\n type MdocSessionTranscriptOptions,\n} from '../mdoc'\nimport { SdJwtVcApi, SdJwtVcRecord, SdJwtVcService } from '../sd-jwt-vc'\nimport { buildDisclosureFrameForPayload } from '../sd-jwt-vc/disclosureFrame'\nimport {\n ClaimFormat,\n SignatureSuiteRegistry,\n W3cCredentialRecord,\n W3cCredentialRepository,\n W3cCredentialService,\n W3cJsonLdCredentialService,\n W3cJsonLdVerifiableCredential,\n W3cPresentation,\n W3cV2CredentialRecord,\n W3cV2CredentialRepository,\n W3cV2CredentialService,\n W3cV2EnvelopedVerifiableCredential,\n W3cV2Presentation,\n} from '../vc'\nimport { purposes } from '../vc/data-integrity/libraries/jsonld-signatures'\nimport { W3cV2SdJwtCredentialService, W3cV2SdJwtVerifiableCredential } from '../vc/sd-jwt-vc'\nimport { X509Certificate } from '../x509'\nimport { DcqlError } from './DcqlError'\nimport type {\n DcqlCredentialsForRequest,\n DcqlEncodedPresentations,\n DcqlFailedCredential,\n DcqlPresentation,\n DcqlQueryResult,\n DcqlValidCredential,\n} from './models'\nimport { dcqlGetPresentationsToCreate as getDcqlVcPresentationsToCreate } from './utils'\n\n@injectable()\nexport class DcqlService {\n /**\n * Queries the wallet for credentials that match the given dcql query. This only does an initial query based on the\n * schema of the input descriptors. It does not do any further filtering based on the constraints in the input descriptors.\n */\n private async queryCredentialsForDcqlQuery(\n agentContext: AgentContext,\n dcqlQuery: DcqlQuery\n ): Promise<Array<SdJwtVcRecord | W3cCredentialRecord | W3cV2CredentialRecord | MdocRecord>> {\n const formats = new Set(dcqlQuery.credentials.map((c) => c.format))\n const allRecords: Array<SdJwtVcRecord | W3cCredentialRecord | W3cV2CredentialRecord | MdocRecord> = []\n\n const mdocDoctypes = dcqlQuery.credentials\n .filter((credentialQuery) => credentialQuery.format === 'mso_mdoc')\n .map((c) => c.meta?.doctype_value)\n\n const mdocApi = this.getMdocApi(agentContext)\n if (mdocDoctypes.every((doctype) => doctype !== undefined)) {\n const mdocRecords = await mdocApi.findAllByQuery({\n $or: mdocDoctypes.map((docType) => ({\n docType: docType,\n })),\n })\n allRecords.push(...mdocRecords)\n } else if (formats.has('mso_mdoc')) {\n const mdocRecords = await mdocApi.getAll()\n allRecords.push(...mdocRecords)\n }\n\n const sdJwts = dcqlQuery.credentials.filter(\n (credentialQuery): credentialQuery is DcqlCredentialQuery.SdJwtVc =>\n (credentialQuery.format === 'vc+sd-jwt' && !(credentialQuery.meta && 'type_values' in credentialQuery.meta)) ||\n credentialQuery.format === 'dc+sd-jwt'\n )\n\n const sdJwtVctValues = sdJwts.flatMap((c) => c.meta?.vct_values)\n\n const sdJwtVcApi = this.getSdJwtVcApi(agentContext)\n if (sdJwtVctValues.every((vct) => vct !== undefined)) {\n const sdjwtVcRecords = await sdJwtVcApi.findAllByQuery({\n $or: sdJwtVctValues.map((vct) => ({\n vct: vct as string,\n })),\n })\n allRecords.push(...sdjwtVcRecords)\n } else if (sdJwts.length > 0) {\n const sdJwtVcRecords = await sdJwtVcApi.getAll()\n allRecords.push(...sdJwtVcRecords)\n }\n\n const w3cCredentialRepository = agentContext.dependencyManager.resolve(W3cCredentialRepository)\n if (formats.has('jwt_vc_json')) {\n const w3cRecords = await w3cCredentialRepository.findByQuery(agentContext, {\n claimFormat: ClaimFormat.JwtVc,\n\n // For jwt_vc_json we query the non-exapnded types\n $or: dcqlQuery.credentials\n .flatMap((c) => (c.format === 'jwt_vc_json' ? c.meta.type_values : []))\n .map((typeValues) => ({\n types: typeValues,\n })),\n })\n allRecords.push(...w3cRecords)\n }\n\n if (formats.has('ldp_vc')) {\n const w3cRecords = await w3cCredentialRepository.findByQuery(agentContext, {\n claimFormat: ClaimFormat.LdpVc,\n\n // For LDP_VC we query the expanded types\n $or: dcqlQuery.credentials\n .flatMap((c) => (c.format === 'jwt_vc_json' ? c.meta.type_values : []))\n .map((typeValues) => ({\n expandedTypes: typeValues,\n })),\n })\n allRecords.push(...w3cRecords)\n }\n\n const w3cSdJwts = dcqlQuery.credentials.filter(\n (credentialQuery): credentialQuery is DcqlCredentialQuery.W3cVc & { format: 'vc+sd-jwt' } =>\n credentialQuery.format === 'vc+sd-jwt' && !!credentialQuery.meta && 'type_values' in credentialQuery.meta\n )\n\n if (w3cSdJwts.length > 0) {\n const w3cV2CredentialRepository = agentContext.dependencyManager.resolve(W3cV2CredentialRepository)\n\n const w3cV2Records = await w3cV2CredentialRepository.findByQuery(agentContext, {\n claimFormat: ClaimFormat.SdJwtW3cVc,\n $or: dcqlQuery.credentials\n .flatMap((c) => (c.format === 'vc+sd-jwt' && c.meta && 'type_values' in c.meta ? c.meta.type_values : []))\n .map((typeValues) => ({\n types: typeValues,\n })),\n })\n\n allRecords.push(...w3cV2Records)\n }\n\n return allRecords\n }\n\n public async getDcqlCredentialRepresentation(\n agentContext: AgentContext,\n presentation: VerifiablePresentation,\n queryCredential: DcqlQuery['credentials'][number]\n ): Promise<DcqlCredential> {\n // SD-JWT credential can be used as both dc+sd-jwt and vc+sd-jwt\n // At some point we might want to look at the header value of the sd-jwt (vc+sd-jwt vc dc+sd-jwt)\n if (presentation.claimFormat === ClaimFormat.SdJwtDc) {\n return {\n cryptographic_holder_binding: true,\n credential_format: queryCredential.format === 'dc+sd-jwt' ? 'dc+sd-jwt' : 'vc+sd-jwt',\n vct: presentation.prettyClaims.vct as string,\n claims: presentation.prettyClaims as DcqlSdJwtVcCredential.Claims,\n } satisfies DcqlSdJwtVcCredential\n }\n if (presentation.claimFormat === ClaimFormat.MsoMdoc) {\n if (presentation.documents.length !== 1) {\n throw new DcqlError('MDOC presentations must contain exactly one document')\n }\n return {\n cryptographic_holder_binding: true,\n credential_format: 'mso_mdoc',\n doctype: presentation.documents[0].docType,\n namespaces: presentation.documents[0].issuerSignedNamespaces,\n } satisfies DcqlMdocCredential\n }\n if (presentation.claimFormat === ClaimFormat.JwtVp) {\n const vc = Array.isArray(presentation.verifiableCredential)\n ? presentation.verifiableCredential[0].jsonCredential\n : presentation.verifiableCredential\n\n return {\n cryptographic_holder_binding: true,\n credential_format: 'jwt_vc_json',\n claims: vc.jsonCredential as { [key: string]: JsonValue },\n type: vc.type,\n } satisfies DcqlW3cVcCredential\n }\n if (presentation.claimFormat === ClaimFormat.LdpVp) {\n const vc = Array.isArray(presentation.verifiableCredential)\n ? (presentation.verifiableCredential[0] as W3cJsonLdVerifiableCredential)\n : (presentation.verifiableCredential as W3cJsonLdVerifiableCredential)\n\n const w3cJsonLdCredentialService = agentContext.dependencyManager.resolve(W3cJsonLdCredentialService)\n const expandedTypes = await w3cJsonLdCredentialService.getExpandedTypesForCredential(agentContext, vc)\n\n return {\n cryptographic_holder_binding: true,\n credential_format: 'ldp_vc',\n claims: vc.jsonCredential as DcqlW3cVcCredential.Claims,\n type: expandedTypes,\n } satisfies DcqlW3cVcCredential\n }\n if (presentation.claimFormat === ClaimFormat.SdJwtW3cVp) {\n const vc = Array.isArray(presentation.resolvedPresentation.verifiableCredential)\n ? presentation.resolvedPresentation.verifiableCredential[0].resolvedCredential\n : presentation.resolvedPresentation.verifiableCredential.resolvedCredential\n\n return {\n cryptographic_holder_binding: true,\n credential_format: 'vc+sd-jwt',\n type: asArray(vc.type),\n claims: vc.toJSON() as { [key: string]: JsonValue },\n } satisfies DcqlW3cVcCredential\n }\n\n throw new DcqlError('Unsupported claim format for presentation')\n }\n\n public async getCredentialsForRequest(agentContext: AgentContext, dcqlQuery: DcqlQuery): Promise<DcqlQueryResult> {\n const credentialRecords = await this.queryCredentialsForDcqlQuery(agentContext, dcqlQuery)\n const credentialRecordsWithFormatDuplicates: typeof credentialRecords = []\n\n const dcqlCredentials: DcqlCredential[] = credentialRecords.flatMap((record): DcqlCredential | DcqlCredential[] => {\n if (record.type === 'MdocRecord') {\n credentialRecordsWithFormatDuplicates.push(record)\n const mdoc = Mdoc.fromBase64Url(record.base64Url)\n\n const akiValues = mdoc.issuerSignedCertificateChain\n .map((c) => {\n const akiHex = X509Certificate.fromRawCertificate(c).authorityKeyIdentifier\n return akiHex ? TypedArrayEncoder.toBase64URL(TypedArrayEncoder.fromHex(akiHex)) : undefined\n })\n .filter((aki) => aki !== undefined)\n\n return {\n authority: isNonEmptyArray(akiValues)\n ? {\n type: 'aki',\n values: akiValues,\n }\n : undefined,\n credential_format: 'mso_mdoc',\n doctype: record.getTags().docType,\n namespaces: mdoc.issuerSignedNamespaces,\n cryptographic_holder_binding: true,\n } satisfies DcqlCredential\n }\n\n if (record.type === 'SdJwtVcRecord') {\n const sdJwtVc = this.getSdJwtVcApi(agentContext).fromCompact(record.compactSdJwtVc)\n const claims = sdJwtVc.prettyClaims as DcqlSdJwtVcCredential.Claims\n\n const akiValues = (sdJwtVc.header.x5c as string[] | undefined)\n ?.map((c) => {\n const akiHex = X509Certificate.fromEncodedCertificate(c).authorityKeyIdentifier\n return akiHex ? TypedArrayEncoder.toBase64URL(TypedArrayEncoder.fromHex(akiHex)) : undefined\n })\n .filter((aki) => aki !== undefined)\n\n const authority =\n akiValues && isNonEmptyArray(akiValues)\n ? ({\n type: 'aki',\n values: akiValues,\n } as const)\n : undefined\n\n // To keep correct mapping of input credential index, we add it twice here (for dc+sd-jwt and vc+sd-jwt)\n credentialRecordsWithFormatDuplicates.push(record, record)\n return [\n {\n authority,\n credential_format: 'dc+sd-jwt',\n vct: record.getTags().vct,\n claims,\n cryptographic_holder_binding: true,\n } satisfies DcqlSdJwtVcCredential,\n {\n authority,\n credential_format: 'vc+sd-jwt',\n vct: record.getTags().vct,\n claims,\n cryptographic_holder_binding: true,\n } satisfies DcqlSdJwtVcCredential,\n ] satisfies [DcqlSdJwtVcCredential, DcqlSdJwtVcCredential]\n }\n\n if (record.type === 'W3cCredentialRecord') {\n credentialRecordsWithFormatDuplicates.push(record)\n if (record.credential.claimFormat === ClaimFormat.LdpVc) {\n return {\n credential_format: 'ldp_vc',\n type: record.getTags().expandedTypes ?? [],\n claims: record.credential.jsonCredential as DcqlW3cVcCredential.Claims,\n cryptographic_holder_binding: true,\n } satisfies DcqlW3cVcCredential\n }\n\n return {\n credential_format: 'jwt_vc_json',\n type: record.credential.type,\n claims: record.credential.jsonCredential as DcqlW3cVcCredential.Claims,\n cryptographic_holder_binding: true,\n } satisfies DcqlW3cVcCredential\n }\n\n if (record.type === 'W3cV2CredentialRecord') {\n credentialRecordsWithFormatDuplicates.push(record)\n\n return {\n credential_format: 'vc+sd-jwt',\n type: asArray(record.credential.resolvedCredential.type),\n claims: record.credential.resolvedCredential.toJSON() as DcqlW3cVcCredential.Claims,\n cryptographic_holder_binding: true,\n } satisfies DcqlW3cVcCredential\n }\n\n throw new DcqlError('Unsupported record type')\n })\n\n const queryResult = DcqlQuery.query(DcqlQuery.parse(dcqlQuery), dcqlCredentials)\n\n const matchesWithRecord = Object.fromEntries(\n Object.entries(queryResult.credential_matches).map(([credential_query_id, result]) => {\n const failedCredentials = result.failed_credentials\n ? mapNonEmptyArray(result.failed_credentials, (credential) => {\n const record = credentialRecordsWithFormatDuplicates[credential.input_credential_index]\n const updatedCredential: DcqlFailedCredential = {\n ...credential,\n record,\n claims: credential.claims.success\n ? {\n ...credential.claims,\n success: true,\n valid_claim_sets: mapNonEmptyArray(credential.claims.valid_claim_sets, (claimSet) => ({\n ...claimSet,\n ...(record.type === 'SdJwtVcRecord'\n ? // NOTE: we cast from SdJwtVcPayload (which is Record<string, unknown> to { [key: string]: JsonValue })\n // Otherwise TypeScript explains, but I'm not sure why Record<string, unknown> wouldn't be applicable to { [key: string]: JsonValue }\n {\n output: agentContext.dependencyManager\n .resolve(SdJwtVcService)\n .applyDisclosuresForPayload(record.compactSdJwtVc, claimSet.output as JsonObject)\n .prettyClaims as { [key: string]: JsonValue },\n }\n : record.type === 'W3cV2CredentialRecord' &&\n record.credential instanceof W3cV2SdJwtVerifiableCredential\n ? {\n output: agentContext.dependencyManager\n .resolve(SdJwtVcService)\n .applyDisclosuresForPayload(record.credential.encoded, claimSet.output as JsonObject)\n .prettyClaims as { [key: string]: JsonValue },\n }\n : {}),\n })),\n }\n : credential.claims,\n }\n return updatedCredential\n })\n : undefined\n\n // If not success, valid_credentials will be undefined, so we only have to map failed_credentials\n if (!result.success) {\n return [\n credential_query_id,\n {\n ...result,\n failed_credentials: failedCredentials,\n },\n ]\n }\n\n return [\n credential_query_id,\n {\n ...result,\n failed_credentials: failedCredentials,\n valid_credentials: mapNonEmptyArray(result.valid_credentials, (credential) => {\n const record = credentialRecordsWithFormatDuplicates[credential.input_credential_index]\n const updatedCredential: DcqlValidCredential = {\n ...credential,\n record,\n claims: {\n ...credential.claims,\n valid_claim_sets: mapNonEmptyArray(credential.claims.valid_claim_sets, (claimSet) => ({\n ...claimSet,\n ...(record.type === 'SdJwtVcRecord'\n ? // NOTE: we cast from SdJwtVcPayload (which is Record<string, unknown> to { [key: string]: JsonValue })\n // Otherwise TypeScript explains, but I'm not sure why Record<string, unknown> wouldn't be applicable to { [key: string]: JsonValue }\n {\n output: agentContext.dependencyManager\n .resolve(SdJwtVcService)\n .applyDisclosuresForPayload(record.compactSdJwtVc, claimSet.output as JsonObject)\n .prettyClaims as { [key: string]: JsonValue },\n }\n : record.type === 'W3cV2CredentialRecord' &&\n record.credential instanceof W3cV2SdJwtVerifiableCredential\n ? {\n output: agentContext.dependencyManager\n .resolve(SdJwtVcService)\n .applyDisclosuresForPayload(record.credential.encoded, claimSet.output as JsonObject)\n .prettyClaims as { [key: string]: JsonValue },\n }\n : {}),\n })),\n },\n }\n return updatedCredential\n }),\n },\n ]\n })\n )\n\n return {\n ...queryResult,\n credential_matches: matchesWithRecord,\n }\n }\n\n public async assertValidDcqlPresentation(\n agentContext: AgentContext,\n dcqlPresentation: DcqlPresentation,\n dcqlQuery: DcqlQuery\n ) {\n const internalDcqlPresentation = Object.fromEntries(\n await Promise.all(\n Object.entries(dcqlPresentation).map(async ([credentialId, presentations]) => {\n const queryCredential = dcqlQuery.credentials.find((c) => c.id === credentialId)\n if (!queryCredential) {\n throw new DcqlError(\n `DCQL presentation contains presentation entry for credential id '${credentialId}', but this id is not present in the DCQL query`\n )\n }\n\n return [\n credentialId,\n await Promise.all(\n presentations.map((presentation) =>\n this.getDcqlCredentialRepresentation(agentContext, presentation, queryCredential)\n )\n ),\n ]\n })\n )\n )\n\n const presentationResult = DcqlPresentationResult.fromDcqlPresentation(internalDcqlPresentation, { dcqlQuery })\n\n if (!presentationResult.can_be_satisfied) {\n throw new DcqlError('Presentations do not satisfy the DCQL query.', {\n additionalMessages: Object.entries(presentationResult.credential_matches ?? {})\n .flatMap(([queryId, match]) =>\n match.success\n ? undefined\n : !match.failed_credentials\n ? `Unable to match query credential '${queryId}'. No prsentations provided`\n : match.failed_credentials.map(\n (failedCredential) =>\n `Presentation at index ${failedCredential.input_credential_index} does not match query credential '${queryId}'. ${JSON.stringify(\n {\n ...(failedCredential.claims.success\n ? {}\n : { claims: failedCredential.claims.failed_claim_sets.map((cs) => cs.issues) }),\n ...(failedCredential.trusted_authorities.success\n ? {}\n : {\n trusted_authorities:\n failedCredential.trusted_authorities.failed_trusted_authorities.map(\n (ta) => ta.issues\n ),\n }),\n ...(failedCredential.meta.success ? {} : { meta: failedCredential.meta.issues }),\n },\n null,\n 2\n )}`\n )\n )\n .filter((message) => message !== undefined),\n })\n }\n\n return presentationResult\n }\n\n private dcqlCredentialForRequestForValidCredential(validCredential: DcqlValidCredential) {\n if (validCredential.record.type === 'MdocRecord') {\n return {\n claimFormat: ClaimFormat.MsoMdoc,\n credentialRecord: validCredential.record,\n disclosedPayload: validCredential.claims.valid_claim_sets[0].output as MdocNameSpaces,\n } as const\n }\n if (validCredential.record.type === 'SdJwtVcRecord') {\n return {\n claimFormat: ClaimFormat.SdJwtDc,\n credentialRecord: validCredential.record,\n disclosedPayload: validCredential.claims.valid_claim_sets[0].output as JsonObject,\n } as const\n }\n\n if (validCredential.record.type === 'W3cCredentialRecord') {\n return {\n claimFormat: validCredential.record.credential.claimFormat,\n credentialRecord: validCredential.record,\n disclosedPayload: validCredential.record.credential.jsonCredential as JsonObject,\n } as const\n }\n\n if (validCredential.record.type === 'W3cV2CredentialRecord') {\n return {\n claimFormat: validCredential.record.credential.claimFormat,\n credentialRecord: validCredential.record,\n disclosedPayload: validCredential.claims.valid_claim_sets[0].output as JsonObject,\n } as const\n }\n\n throw new DcqlError('Unsupported record type for DCQL')\n }\n\n /**\n * Selects the credentials to use based on the output from `getCredentialsForRequest`\n * Use this method if you don't want to manually select the credentials yourself.\n */\n public selectCredentialsForRequest(dcqlQueryResult: DcqlQueryResult): DcqlCredentialsForRequest {\n if (!dcqlQueryResult.can_be_satisfied) {\n throw new DcqlError(\n 'Cannot select the credentials for the dcql query presentation if the request cannot be satisfied'\n )\n }\n\n const credentials: DcqlCredentialsForRequest = {}\n\n if (dcqlQueryResult.credential_sets) {\n for (const credentialSet of dcqlQueryResult.credential_sets) {\n // undefined defaults to true\n if (credentialSet.required === false) continue\n const firstFullFillableOption = credentialSet.options.find((option) =>\n option.every((credential_id) => dcqlQueryResult.credential_matches[credential_id].success)\n )\n\n if (!firstFullFillableOption) {\n throw new DcqlError('Invalid dcql query result. No option is fullfillable')\n }\n\n for (const credentialQueryId of firstFullFillableOption) {\n const credentialMatch = dcqlQueryResult.credential_matches[credentialQueryId]\n\n if (!credentialMatch.success) {\n throw new DcqlError('Invalid dcql query result. Cannot auto-select credentials')\n }\n\n const credential = credentialMatch.valid_credentials[0]\n credentials[credentialQueryId] = [this.dcqlCredentialForRequestForValidCredential(credential)]\n }\n }\n } else {\n for (const credentialQuery of dcqlQueryResult.credentials) {\n const credentialMatch = dcqlQueryResult.credential_matches[credentialQuery.id]\n if (!credentialMatch.success) {\n throw new DcqlError('Invalid dcql query result. Cannot auto-select credentials')\n }\n\n const credential = credentialMatch.valid_credentials[0]\n credentials[credentialQuery.id] = [this.dcqlCredentialForRequestForValidCredential(credential)]\n }\n }\n\n return credentials\n }\n\n public validateDcqlQuery(dcqlQuery: DcqlQuery | DcqlQuery.Input | unknown): DcqlQuery {\n const parsed = DcqlQuery.parse(dcqlQuery as DcqlQuery)\n DcqlQuery.validate(parsed)\n return parsed\n }\n\n public async createPresentation(\n agentContext: AgentContext,\n options: {\n credentialQueryToCredential: DcqlCredentialsForRequest\n challenge: string\n domain?: string\n mdocSessionTranscript?: MdocSessionTranscriptOptions\n }\n ): Promise<{\n dcqlPresentation: DcqlPresentation\n encodedDcqlPresentation: DcqlEncodedPresentations\n }> {\n const { domain, challenge, mdocSessionTranscript } = options\n\n const dcqlPresentation: DcqlPresentation = {}\n const encodedDcqlPresentation: DcqlEncodedPresentations = {}\n\n const vcPresentationsToCreate = getDcqlVcPresentationsToCreate(options.credentialQueryToCredential)\n for (const [credentialQueryId, presentationsToCreate] of Object.entries(vcPresentationsToCreate)) {\n for (const presentationToCreate of presentationsToCreate) {\n let createdPresentation: VerifiablePresentation\n let encodedCreatedPresentation: string | Record<string, unknown>\n\n if (presentationToCreate.claimFormat === ClaimFormat.MsoMdoc) {\n const mdocRecord = presentationToCreate.credentialRecord\n if (!mdocSessionTranscript) {\n throw new DcqlError('Missing mdoc session transcript options for creating MDOC presentation.')\n }\n\n const deviceResponse = await MdocDeviceResponse.createDeviceResponse(agentContext, {\n mdocs: [Mdoc.fromBase64Url(mdocRecord.base64Url)],\n documentRequests: [\n {\n docType: mdocRecord.getTags().docType,\n nameSpaces: Object.fromEntries(\n Object.entries(presentationToCreate.disclosedPayload).map(([key, value]) => {\n // FIXME: we need the DCQL query here to get the intent_to_retain from query (currently hardcoded to false)\n return [key, Object.fromEntries(Object.entries(value).map(([key]) => [key, false]))]\n })\n ),\n },\n ],\n sessionTranscriptOptions: mdocSessionTranscript,\n })\n const deviceResponseBase64Url = TypedArrayEncoder.toBase64URL(deviceResponse)\n\n encodedCreatedPresentation = deviceResponseBase64Url\n createdPresentation = MdocDeviceResponse.fromBase64Url(deviceResponseBase64Url)\n } else if (presentationToCreate.claimFormat === ClaimFormat.SdJwtDc) {\n const presentationFrame = buildDisclosureFrameForPayload(presentationToCreate.disclosedPayload)\n\n if (!domain) {\n throw new DcqlError('Missing domain property for creating SdJwtVc presentation.')\n }\n\n const sdJwtVcApi = this.getSdJwtVcApi(agentContext)\n const presentation = await sdJwtVcApi.present({\n compactSdJwtVc: presentationToCreate.credentialRecord.compactSdJwtVc,\n presentationFrame,\n verifierMetadata: {\n audience: domain,\n nonce: challenge,\n issuedAt: Math.floor(Date.now() / 1000),\n },\n additionalPayload: presentationToCreate.additionalPayload,\n })\n\n encodedCreatedPresentation = presentation\n createdPresentation = sdJwtVcApi.fromCompact(presentation)\n } else if (presentationToCreate.claimFormat === ClaimFormat.JwtVp) {\n if (!presentationToCreate.subjectIds) {\n throw new DcqlError('Cannot create presentation for credentials without subject id')\n }\n\n // Determine a suitable verification method for the presentation\n const verificationMethod = await this.getVerificationMethodForSubjectId(\n agentContext,\n presentationToCreate.subjectIds[0]\n )\n\n const w3cCredentialService = agentContext.resolve(W3cCredentialService)\n const w3cPresentation = new W3cPresentation({\n verifiableCredential: [presentationToCreate.credentialRecord.credential],\n holder: verificationMethod.controller,\n })\n\n const publicJwk = getPublicJwkFromVerificationMethod(verificationMethod)\n\n const signedPresentation = await w3cCredentialService.signPresentation<ClaimFormat.JwtVp>(agentContext, {\n format: ClaimFormat.JwtVp,\n alg: publicJwk.signatureAlgorithm,\n verificationMethod: verificationMethod.id,\n presentation: w3cPresentation,\n challenge,\n domain,\n })\n\n encodedCreatedPresentation = signedPresentation.encoded\n createdPresentation = signedPresentation\n } else if (presentationToCreate.claimFormat === ClaimFormat.LdpVp) {\n if (!presentationToCreate.subjectIds) {\n throw new DcqlError('Cannot create presentation for credentials without subject id')\n }\n // Determine a suitable verification method for the presentation\n const verificationMethod = await this.getVerificationMethodForSubjectId(\n agentContext,\n presentationToCreate.subjectIds[0]\n )\n\n const w3cCredentialService = agentContext.resolve(W3cCredentialService)\n const w3cPresentation = new W3cPresentation({\n verifiableCredential: [presentationToCreate.credentialRecord.credential],\n holder: verificationMethod.controller,\n })\n\n const signedPresentation = await w3cCredentialService.signPresentation(agentContext, {\n format: ClaimFormat.LdpVp,\n // TODO: we should move the check for which proof to use for a presentation to earlier\n // as then we know when determining which VPs to submit already if the proof types are supported\n // by the verifier, and we can then just add this to the vpToCreate interface\n proofType: this.getProofTypeForLdpVc(agentContext, verificationMethod),\n proofPurpose: new purposes.AuthenticationProofPurpose({ challenge, domain }),\n verificationMethod: verificationMethod.id,\n presentation: w3cPresentation,\n challenge,\n domain,\n })\n\n encodedCreatedPresentation = signedPresentation.encoded\n createdPresentation = signedPresentation\n } else if (presentationToCreate.claimFormat === ClaimFormat.JwtW3cVp) {\n if (!presentationToCreate.subjectIds) {\n throw new DcqlError('Cannot create presentation for credentials without subject id')\n }\n\n const w3cV2CredentialService = agentContext.resolve(W3cV2CredentialService)\n const w3cV2Presentation = new W3cV2Presentation({\n holder: presentationToCreate.credentialRecord.credential.resolvedCredential.credentialSubjectIds[0],\n verifiableCredential: [\n W3cV2EnvelopedVerifiableCredential.fromVerifiableCredential(\n presentationToCreate.credentialRecord.credential\n ),\n ],\n })\n\n const signedPresentation = await w3cV2CredentialService.signPresentation<ClaimFormat.JwtW3cVp>(agentContext, {\n format: ClaimFormat.JwtW3cVp,\n presentation: w3cV2Presentation,\n challenge,\n domain,\n })\n\n encodedCreatedPresentation = signedPresentation.encoded\n createdPresentation = signedPresentation\n } else if (presentationToCreate.claimFormat === ClaimFormat.SdJwtW3cVp) {\n if (!presentationToCreate.subjectIds) {\n throw new DcqlError('Cannot create presentation for credentials without subject id')\n }\n\n const presentationFrame = buildDisclosureFrameForPayload(presentationToCreate.disclosedPayload)\n if (!domain) {\n throw new DcqlError('Missing domain property for creating SdJwtVc presentation.')\n }\n\n const w3cV2SdJwtCredentialService = agentContext.resolve(W3cV2SdJwtCredentialService)\n const sdJwtVc = await w3cV2SdJwtCredentialService.present(agentContext, {\n credential: presentationToCreate.credentialRecord.credential.encoded,\n presentationFrame,\n })\n\n const w3cV2CredentialService = agentContext.resolve(W3cV2CredentialService)\n const w3cV2Presentation = new W3cV2Presentation({\n holder: presentationToCreate.credentialRecord.credential.resolvedCredential.credentialSchemaIds[0],\n verifiableCredential: [W3cV2EnvelopedVerifiableCredential.fromVerifiableCredential(sdJwtVc)],\n })\n\n const signedPresentation = await w3cV2CredentialService.signPresentation<ClaimFormat.SdJwtW3cVp>(\n agentContext,\n {\n format: ClaimFormat.SdJwtW3cVp,\n presentation: w3cV2Presentation,\n challenge,\n domain,\n }\n )\n\n encodedCreatedPresentation = signedPresentation.encoded\n createdPresentation = signedPresentation\n } else {\n throw new DcqlError('Unsupported presentation format.')\n }\n\n if (!dcqlPresentation[credentialQueryId]) {\n dcqlPresentation[credentialQueryId] = [createdPresentation]\n } else {\n dcqlPresentation[credentialQueryId].push(createdPresentation)\n }\n\n if (!encodedDcqlPresentation[credentialQueryId]) {\n encodedDcqlPresentation[credentialQueryId] = [encodedCreatedPresentation]\n } else {\n encodedDcqlPresentation[credentialQueryId].push(encodedCreatedPresentation)\n }\n }\n }\n\n return {\n dcqlPresentation,\n encodedDcqlPresentation,\n }\n }\n\n private getSdJwtVcApi(agentContext: AgentContext) {\n return agentContext.dependencyManager.resolve(SdJwtVcApi)\n }\n\n private getMdocApi(agentContext: AgentContext) {\n return agentContext.dependencyManager.resolve(MdocApi)\n }\n\n private async getVerificationMethodForSubjectId(agentContext: AgentContext, subjectId: string) {\n const didsApi = agentContext.dependencyManager.resolve(DidsApi)\n\n if (!subjectId.startsWith('did:')) {\n throw new DcqlError(`Only dids are supported as credentialSubject id. ${subjectId} is not a valid did`)\n }\n\n const didDocument = await didsApi.resolveDidDocument(subjectId)\n\n if (!didDocument.authentication || didDocument.authentication.length === 0) {\n throw new DcqlError(`No authentication verificationMethods found for did ${subjectId} in did document`)\n }\n\n // the signature suite to use for the presentation is dependant on the credentials we share.\n // 1. Get the verification method for this given proof purpose in this DID document\n let [verificationMethod] = didDocument.authentication\n if (typeof verificationMethod === 'string') {\n verificationMethod = didDocument.dereferenceKey(verificationMethod, ['authentication'])\n }\n\n return verificationMethod\n }\n\n // FIXME: We need to take into account OpenID4VP metadata (probably providing supported/allowed algs to the DCQL create presentation method)\n private getProofTypeForLdpVc(agentContext: AgentContext, verificationMethod: VerificationMethod) {\n // For each of the supported algs, find the key types, then find the proof types\n const signatureSuiteRegistry = agentContext.dependencyManager.resolve(SignatureSuiteRegistry)\n\n const publicJwk = getPublicJwkFromVerificationMethod(verificationMethod)\n const supportedSignatureSuites = signatureSuiteRegistry.getAllByPublicJwkType(publicJwk)\n if (supportedSignatureSuites.length === 0) {\n throw new DcqlError(\n `Couldn't find a supported signature suite for the given jwk ${publicJwk.jwkTypehumanDescription}`\n )\n }\n\n return supportedSignatureSuites[0].proofType\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDO,wBAAMA,cAAY;;;;;CAKvB,MAAc,6BACZ,cACA,WAC0F;EAC1F,MAAM,UAAU,IAAI,IAAI,UAAU,YAAY,KAAK,MAAM,EAAE,OAAO,CAAC;EACnE,MAAMC,aAA8F,EAAE;EAEtG,MAAM,eAAe,UAAU,YAC5B,QAAQ,oBAAoB,gBAAgB,WAAW,WAAW,CAClE,KAAK,MAAM,EAAE,MAAM,cAAc;EAEpC,MAAM,UAAU,KAAK,WAAW,aAAa;AAC7C,MAAI,aAAa,OAAO,YAAY,YAAY,OAAU,EAAE;GAC1D,MAAM,cAAc,MAAM,QAAQ,eAAe,EAC/C,KAAK,aAAa,KAAK,aAAa,EACzB,SAC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MdocNameSpaces } from "../../mdoc/MdocOptions.mjs";
3
3
  import { SdJwtVcRecord } from "../../sd-jwt-vc/repository/SdJwtVcRecord.mjs";
4
+ import { MdocNameSpaces } from "../../mdoc/MdocOptions.mjs";
5
+ import { MdocRecord } from "../../mdoc/repository/MdocRecord.mjs";
4
6
  import { W3cCredentialRecord } from "../../vc/repository/W3cCredentialRecord.mjs";
5
7
  import { W3cV2CredentialRecord } from "../../vc/repository/W3cV2CredentialRecord.mjs";
6
- import { MdocRecord } from "../../mdoc/repository/MdocRecord.mjs";
7
- import { JsonObject, NonEmptyArray } from "../../../types.mjs";
8
8
 
9
9
  //#region src/modules/dcql/models/DcqlCredentialsForRequest.d.ts
10
10
  /**
@@ -1,10 +1,10 @@
1
+ import { JsonObject, NonEmptyArray } from "../../../types.js";
1
2
  import { ClaimFormat } from "../../vc/models/ClaimFormat.js";
2
- import { MdocNameSpaces } from "../../mdoc/MdocOptions.js";
3
3
  import { SdJwtVcRecord } from "../../sd-jwt-vc/repository/SdJwtVcRecord.js";
4
+ import { MdocNameSpaces } from "../../mdoc/MdocOptions.js";
5
+ import { MdocRecord } from "../../mdoc/repository/MdocRecord.js";
4
6
  import { W3cCredentialRecord } from "../../vc/repository/W3cCredentialRecord.js";
5
7
  import { W3cV2CredentialRecord } from "../../vc/repository/W3cV2CredentialRecord.js";
6
- import { MdocRecord } from "../../mdoc/repository/MdocRecord.js";
7
- import { JsonObject, NonEmptyArray } from "../../../types.js";
8
8
 
9
9
  //#region src/modules/dcql/models/DcqlCredentialsForRequest.d.ts
10
10
  /**
@@ -1,8 +1,8 @@
1
1
  import { SdJwtVcRecord } from "../../sd-jwt-vc/repository/SdJwtVcRecord.mjs";
2
- import { W3cCredentialRecord } from "../../vc/repository/W3cCredentialRecord.mjs";
3
- import { W3cV2CredentialRecord } from "../../vc/repository/W3cV2CredentialRecord.mjs";
4
2
  import { MdocRecord } from "../../mdoc/repository/MdocRecord.mjs";
5
3
  import { VerifiablePresentation } from "../../dif-presentation-exchange/models/index.mjs";
4
+ import { W3cCredentialRecord } from "../../vc/repository/W3cCredentialRecord.mjs";
5
+ import { W3cV2CredentialRecord } from "../../vc/repository/W3cV2CredentialRecord.mjs";
6
6
  import { DcqlCredentialsForRequest } from "./DcqlCredentialsForRequest.mjs";
7
7
  import { DcqlCredential, DcqlMdocCredential, DcqlPresentationResult, DcqlQuery, DcqlQueryResult, DcqlSdJwtVcCredential, DcqlW3cVcCredential } from "dcql";
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/modules/dcql/models/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;KAeY,WAAA,GAAY,SAAA,CAAW,QAAQ,SAAA,CAAW;KAC1C,gBAAA,GAAiB,cAAA,CAAgB;KACjC,oBAAA,GAAqB,kBAAA,CAAoB;KACzC,uBAAA,GAAwB,qBAAA,CAAuB;KAC/C,qBAAA,GAAsB,mBAAA,CAAqB;AAJ3C,KAMA,oBAAA,GAAuB,WANd,CAOnB,eAPmB,CAAA,oBAAA,CAAA,CAAA,MAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,CAAA,MAAA,CAAA,GAAA;EAAA,MAAA,EASX,UATW,GASE,aATF,GASkB,mBATlB,GASwC,qBATxC;;AAAsB,KAY/B,mBAAA,GAAsB,WAZoB,CAapD,eAboD,CAAA,oBAAA,CAAA,CAAA,MAAA,CAAA,CAAA,mBAAA,CAAA,CAAA,CAAA,MAAA,CAAA,GAAA;EAAM,MAAA,EAelD,UAfkD,GAerC,aAfqC,GAerB,mBAfqB,GAeC,qBAfD;AAC5D,CAAA;AACY,KAgBA,mBAAA,GAhBkB,CAiBzB,IAjB4B,CAiBvB,eAjBuB,CAAA,oBAAyB,CAAA,CAAA,MAAA,CAAA,EAAA,SAAA,CAAA,GAAA;EAC9C,OAAA,EAAA,IAAA;EACA,iBAAA,EAAA,CAiBc,mBAjBQ,EAAA,GAiBgB,mBAjBU,EAAA,CAAA;EAEhD,kBAAA,C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1
  import { SdJwtVcRecord } from "../../sd-jwt-vc/repository/SdJwtVcRecord.js";
2
- import { W3cCredentialRecord } from "../../vc/repository/W3cCredentialRecord.js";
3
- import { W3cV2CredentialRecord } from "../../vc/repository/W3cV2CredentialRecord.js";
4
2
  import { MdocRecord } from "../../mdoc/repository/MdocRecord.js";
5
3
  import { VerifiablePresentation } from "../../dif-presentation-exchange/models/index.js";
4
+ import { W3cCredentialRecord } from "../../vc/repository/W3cCredentialRecord.js";
5
+ import { W3cV2CredentialRecord } from "../../vc/repository/W3cV2CredentialRecord.js";
6
6
  import { DcqlCredentialsForRequest } from "./DcqlCredentialsForRequest.js";
7
7
  import { DcqlCredential, DcqlMdocCredential, DcqlPresentationResult, DcqlQuery, DcqlQueryResult, DcqlSdJwtVcCredential, DcqlW3cVcCredential } from "dcql";
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/modules/dcql/models/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;KAeY,WAAA,GAAY,SAAA,CAAW,QAAQ,SAAA,CAAW;KAC1C,gBAAA,GAAiB,cAAA,CAAgB;KACjC,oBAAA,GAAqB,kBAAA,CAAoB;AAFzC,KAGA,uBAAA,GAAwB,qBAAA,CAAuB,KAHtC,CAAA,OAAA,CAAA;AAAA,KAIT,qBAAA,GAAsB,mBAAA,CAAqB,KAJlC,CAAA,OAAA,CAAA;AAAG,KAMZ,oBAAA,GAAuB,WANA,CAOjC,eAPiC,CAAA,oBAAA,CAAA,CAAA,MAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,CAAA,MAAA,CAAA,GAAA;QAAQ,EASjC,UAT4C,GAS/B,aAT+B,GASf,mBATe,GASO,qBATP;CAAM;AAChD,KAWA,mBAAA,GAAsB,WAXL,CAY3B,eAZgD,CAAA,oBAAA,CAAA,CAAA,MAAA,CAAA,CAAA,mBAAA,CAAA,CAAA,CAAA,MAAA,CAAA,GAAA;EACtC,MAAA,EAaF,UAbE,GAaW,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,OAAA,CAAA;AAC7B,KAqBU,wBAAA,GAA2B,MArBrC,CAAA,MAAA,EAAA,CAuBC,6BAxB+B,KAwBG,6BArB3B,EAAA;AAA6B,KAuB3B,gBAAA,GAAmB,MAvBQ,CAAA,MAAA,EAAA,CAuBQ,sBAvBR,EAAA,GAuBmC,sBAvBnC,EAAA,CAAA,CAAA;AAAsB,KAyBjD,wBAAA,GAAyB,sBAAA,CAAwB,KAzBA"}
@@ -1,9 +1,9 @@
1
+ import { JsonObject } from "../../../types.mjs";
1
2
  import { ClaimFormat } from "../../vc/models/ClaimFormat.mjs";
2
3
  import { SdJwtVcRecord } from "../../sd-jwt-vc/repository/SdJwtVcRecord.mjs";
4
+ import { MdocRecord } from "../../mdoc/repository/MdocRecord.mjs";
3
5
  import { W3cCredentialRecord } from "../../vc/repository/W3cCredentialRecord.mjs";
4
6
  import { W3cV2CredentialRecord } from "../../vc/repository/W3cV2CredentialRecord.mjs";
5
- import { MdocRecord } from "../../mdoc/repository/MdocRecord.mjs";
6
- import { JsonObject } from "../../../types.mjs";
7
7
  import { DcqlCredentialsForRequest } from "../models/DcqlCredentialsForRequest.mjs";
8
8
  import { DcqlMdocCredential, DcqlSdJwtVcCredential, DcqlW3cVcCredential } from "dcql";
9
9
 
@@ -1,9 +1,9 @@
1
+ import { JsonObject } from "../../../types.js";
1
2
  import { ClaimFormat } from "../../vc/models/ClaimFormat.js";
2
3
  import { SdJwtVcRecord } from "../../sd-jwt-vc/repository/SdJwtVcRecord.js";
4
+ import { MdocRecord } from "../../mdoc/repository/MdocRecord.js";
3
5
  import { W3cCredentialRecord } from "../../vc/repository/W3cCredentialRecord.js";
4
6
  import { W3cV2CredentialRecord } from "../../vc/repository/W3cV2CredentialRecord.js";
5
- import { MdocRecord } from "../../mdoc/repository/MdocRecord.js";
6
- import { JsonObject } from "../../../types.js";
7
7
  import { DcqlCredentialsForRequest } from "../models/DcqlCredentialsForRequest.js";
8
8
  import { DcqlMdocCredential, DcqlSdJwtVcCredential, DcqlW3cVcCredential } from "dcql";
9
9
 
@@ -1,3 +1,5 @@
1
+ import { PublicJwk, SupportedPublicJwk } from "../kms/jwk/PublicJwk.mjs";
2
+ import { KeyManagementApi } from "../kms/KeyManagementApi.mjs";
1
3
  import { VerificationMethod } from "./domain/verificationMethod/VerificationMethod.mjs";
2
4
  import { DidDocument, DidPurpose } from "./domain/DidDocument.mjs";
3
5
  import { DidDocumentKey, ImportDidOptions } from "./DidsApiOptions.mjs";
@@ -8,8 +10,6 @@ import { DidRepository } from "./repository/DidRepository.mjs";
8
10
  import { DidResolverService } from "./services/DidResolverService.mjs";
9
11
  import { DidRegistrarService } from "./services/DidRegistrarService.mjs";
10
12
  import { AgentContext } from "../../agent/context/AgentContext.mjs";
11
- import { PublicJwk, SupportedPublicJwk } from "../kms/jwk/PublicJwk.mjs";
12
- import { KeyManagementApi } from "../kms/KeyManagementApi.mjs";
13
13
 
14
14
  //#region src/modules/dids/DidsApi.d.ts
15
15
  declare class DidsApi {
@@ -1 +1 @@
1
- {"version":3,"file":"DidsApi.d.mts","names":[],"sources":["../../../src/modules/dids/DidsApi.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;cAwBa,OAAA;UACI;;;;;kCAQO,yCACC,oCACN,6BACD,sBACN,kCACQ;;AAfpB;;;;SAWyB,CAAA,MAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAkBkB,oBAlBlB,CAAA,EAkBsC,OAlBtC,CAkBsC,mBAAA,CAlBtC;;;;;;QAkBsC,CAAA,sBASzB,gBATyB,GASN,gBATM,CAAA,CAAA,OAAA,EAUlD,aAVkD,CAAA,EAW1D,OAX0D,CAWlD,eAXkD,CAAA;;;;;;QAW1D,CAAA,sBASiC,gBATjC,GASoD,gBATpD,CAAA,CAAA,OAAA,EAUQ,aAVR,CAAA,EAWA,OAXA,CAWQ,eAXR,CAAA;;;;;;YAoByC,CAAA,0BAAA,oBAAA,GAAuB,oBAAvB,CAAA,CAAA,OAAA,EACjC,iBADiC,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SAiBG,EAAA,CAAA;;;;;;;;;;;;;;;;;;;KAAhB,mBAAgB;kDA4CtB;UA5CsB,cAAA;;;kFAuE5D,MAAM,qCAAkC;wBAAnC"}
@@ -1,3 +1,5 @@
1
+ import { PublicJwk, SupportedPublicJwk } from "../kms/jwk/PublicJwk.js";
2
+ import { KeyManagementApi } from "../kms/KeyManagementApi.js";
1
3
  import { VerificationMethod } from "./domain/verificationMethod/VerificationMethod.js";
2
4
  import { DidDocument, DidPurpose } from "./domain/DidDocument.js";
3
5
  import { DidDocumentKey, ImportDidOptions } from "./DidsApiOptions.js";
@@ -8,8 +10,6 @@ import { DidRepository } from "./repository/DidRepository.js";
8
10
  import { DidResolverService } from "./services/DidResolverService.js";
9
11
  import { DidRegistrarService } from "./services/DidRegistrarService.js";
10
12
  import { AgentContext } from "../../agent/context/AgentContext.js";
11
- import { PublicJwk, SupportedPublicJwk } from "../kms/jwk/PublicJwk.js";
12
- import { KeyManagementApi } from "../kms/KeyManagementApi.js";
13
13
 
14
14
  //#region src/modules/dids/DidsApi.d.ts
15
15
  declare class DidsApi {
@@ -1 +1 @@
1
- {"version":3,"file":"DidsApi.d.ts","names":[],"sources":["../../../src/modules/dids/DidsApi.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;cAwBa,OAAA;UACI;;;;;EADJ,WAAO,CAAA,kBAAA,EASI,kBATJ,EAAA,mBAAA,EAUK,mBAVL,EAAA,aAAA,EAWD,aAXC,EAAA,YAAA,EAYF,YAZE,EAAA,MAAA,EAaR,gBAbQ,EAAA,cAAA,EAcA,gBAdA;EAAA;;;;;SAYF,CAAA,MAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAgByB,oBAhBzB,CAAA,EAgB6C,OAhB7C,CAgB6C,mBAAA,CAhB7C;;;;;;QAyBoB,CAAA,sBAAA,gBAAA,GAAmB,gBAAnB,CAAA,CAAA,OAAA,EACzB,aADyB,CAAA,EAEjC,OAFiC,CAEzB,eAFyB,CAAA;;;;;;QAWmB,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CAAA,CAAA,OAAA,EAAA,iBAAA,CAAA,EACR,OADQ,CACA,mBADA,CAAA;;;;;;oBAqBqB,CAAA,MAAA,EAAA,MAAA,CAAA,EAXQ,OAWR,CApBtB,WAAA,CAoBsB;;;;;;;;gBAiBgD,CAAA;IAAA,MAAA;IAAA;IAAA,EAAA;IAAA,MAAA,CAAA,EAAA,MAAA;;MAjBH,OA6DnB,CA7DmB,SA6DnB,EAAA,CAAA;;;;;;;;;;;;;;;;;;;KA5CM,mBAAgB;kDA4CtB;UA5CsB,cAAA;;;kFAuE5D,MAAM,qCAAkC;wBAAnC"}
@@ -1,10 +1,10 @@
1
1
 
2
2
 
3
3
  const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.js');
4
+ const require_AgentContext = require('../../agent/context/AgentContext.js');
4
5
  const require_CredoError = require('../../error/CredoError.js');
5
6
  const require_RecordNotFoundError = require('../../error/RecordNotFoundError.js');
6
7
  require('../../error/index.js');
7
- const require_AgentContext = require('../../agent/context/AgentContext.js');
8
8
  require('../../plugins/index.js');
9
9
  const require_decorateMetadata = require('../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
10
10
  const require_decorate = require('../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
@@ -1,9 +1,9 @@
1
1
 
2
2
 
3
+ import { AgentContext } from "../../agent/context/AgentContext.mjs";
3
4
  import { CredoError } from "../../error/CredoError.mjs";
4
5
  import { RecordNotFoundError } from "../../error/RecordNotFoundError.mjs";
5
6
  import "../../error/index.mjs";
6
- import { AgentContext } from "../../agent/context/AgentContext.mjs";
7
7
  import { injectable } from "../../plugins/index.mjs";
8
8
  import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
9
9
  import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"DidsApi.mjs","names":["DidsApi"],"sources":["../../../src/modules/dids/DidsApi.ts"],"sourcesContent":["import type { ImportDidOptions } from './DidsApiOptions'\nimport type {\n DidCreateOptions,\n DidCreateResult,\n DidDeactivateOptions,\n DidDeactivateResult,\n DidResolutionOptions,\n DidUpdateOptions,\n DidUpdateResult,\n} from './types'\n\nimport { AgentContext } from '../../agent'\nimport { CredoError, RecordNotFoundError } from '../../error'\nimport { injectable } from '../../plugins'\n\nimport { parseDid } from '@sphereon/ssi-types'\nimport { KeyManagementApi } from '../kms'\nimport { DidsModuleConfig } from './DidsModuleConfig'\nimport { type DidPurpose, getPublicJwkFromVerificationMethod } from './domain'\nimport { getAlternativeDidsForPeerDid, isValidPeerDid } from './methods'\nimport { DidRecord, DidRepository } from './repository'\nimport { DidRegistrarService, DidResolverService } from './services'\n\n@injectable()\nexport class DidsApi {\n public config: DidsModuleConfig\n\n private didResolverService: DidResolverService\n private didRegistrarService: DidRegistrarService\n private didRepository: DidRepository\n private agentContext: AgentContext\n\n public constructor(\n didResolverService: DidResolverService,\n didRegistrarService: DidRegistrarService,\n didRepository: DidRepository,\n agentContext: AgentContext,\n config: DidsModuleConfig,\n _keyManagement: KeyManagementApi\n ) {\n this.didResolverService = didResolverService\n this.didRegistrarService = didRegistrarService\n this.didRepository = didRepository\n this.agentContext = agentContext\n this.config = config\n }\n\n /**\n * Resolve a did to a did document.\n *\n * Follows the interface as defined in https://w3c-ccg.github.io/did-resolution/\n */\n public resolve(didUrl: string, options?: DidResolutionOptions) {\n return this.didResolverService.resolve(this.agentContext, didUrl, options)\n }\n\n /**\n * Create, register and store a did and did document.\n *\n * Follows the interface as defined in https://identity.foundation/did-registration\n */\n public create<CreateOptions extends DidCreateOptions = DidCreateOptions>(\n options: CreateOptions\n ): Promise<DidCreateResult> {\n return this.didRegistrarService.create<CreateOptions>(this.agentContext, options)\n }\n\n /**\n * Update an existing did document.\n *\n * Follows the interface as defined in https://identity.foundation/did-registration\n */\n public update<UpdateOptions extends DidUpdateOptions = DidUpdateOptions>(\n options: UpdateOptions\n ): Promise<DidUpdateResult> {\n return this.didRegistrarService.update(this.agentContext, options)\n }\n\n /**\n * Deactivate an existing did.\n *\n * Follows the interface as defined in https://identity.foundation/did-registration\n */\n public deactivate<DeactivateOptions extends DidDeactivateOptions = DidDeactivateOptions>(\n options: DeactivateOptions\n ): Promise<DidDeactivateResult> {\n return this.didRegistrarService.deactivate(this.agentContext, options)\n }\n\n /**\n * Resolve a did to a did document. This won't return the associated metadata as defined\n * in the did resolution specification, and will throw an error if the did document could not\n * be resolved.\n */\n public resolveDidDocument(didUrl: string) {\n return this.didResolverService.resolveDidDocument(this.agentContext, didUrl)\n }\n\n /**\n * Get a list of all dids created by the agent. This will return a list of {@link DidRecord} objects.\n * Each document will have an id property with the value of the did. Optionally, it will contain a did document,\n * but this is only for documents that can't be resolved from the did itself or remotely.\n *\n * You can call `${@link DidsModule.resolve} to resolve the did document based on the did itself.\n */\n public getCreatedDids({ method, did }: { method?: string; did?: string } = {}) {\n return this.didRepository.getCreatedDids(this.agentContext, { method, did })\n }\n\n /**\n * Import an existing did that was created outside of the DidsApi. This will create a `DidRecord` for the did\n * and will allow the did to be used in other parts of the agent. If you need to create a new did document,\n * you can use the {@link DidsApi.create} method to create and register the did.\n *\n * If no `didDocument` is provided, the did document will be resolved using the did resolver. You can optionally provide a list\n * of private key buffer with the respective private key bytes. These keys will be stored in the wallet, and allows you to use the\n * did for other operations. Providing keys that already exist in the wallet is allowed, and those keys will be skipped from being\n * added to the wallet.\n *\n * By default, this method will throw an error if the did already exists in the wallet. You can override this behavior by setting\n * the `overwrite` option to `true`. This will update the did document in the record, and allows you to update the did over time.\n */\n public async import({ did, didDocument, keys = [], overwrite }: ImportDidOptions) {\n if (didDocument && didDocument.id !== did) {\n throw new CredoError(`Did document id ${didDocument.id} does not match did ${did}`)\n }\n\n const existingDidRecord = await this.didRepository.findCreatedDid(this.agentContext, did)\n if (existingDidRecord && !overwrite) {\n throw new CredoError(\n `A created did ${did} already exists. If you want to override the existing did, set the 'overwrite' option to update the did.`\n )\n }\n\n if (!didDocument) {\n didDocument = await this.resolveDidDocument(did)\n }\n\n for (const key of keys) {\n // Make sure the keys exists in the did document\n didDocument.dereferenceKey(key.didDocumentRelativeKeyId)\n }\n\n // Update existing did record\n if (existingDidRecord) {\n existingDidRecord.didDocument = didDocument\n existingDidRecord.keys = keys\n existingDidRecord.setTags({\n alternativeDids: isValidPeerDid(didDocument.id) ? getAlternativeDidsForPeerDid(did) : undefined,\n })\n\n await this.didRepository.update(this.agentContext, existingDidRecord)\n return\n }\n\n // Create new did record\n await this.didRepository.storeCreatedDid(this.agentContext, {\n did,\n didDocument,\n keys,\n tags: {\n alternativeDids: isValidPeerDid(didDocument.id) ? getAlternativeDidsForPeerDid(did) : undefined,\n },\n })\n }\n\n public async resolveCreatedDidDocumentWithKeys(did: string) {\n const [didRecord] = await this.didRepository.getCreatedDids(this.agentContext, { did })\n\n if (!didRecord) {\n throw new RecordNotFoundError(`Created did '${did}' not found`, { recordType: DidRecord.type })\n }\n\n if (didRecord.didDocument) {\n return {\n keys: didRecord.keys,\n didDocument: didRecord.didDocument,\n }\n }\n\n // TODO: we should somehow store the did document on the record if the did method allows it\n // E.g. for did:key we don't want to store it, but if we still have a did:indy record we do want to store it\n // If the did document is not stored on the did record, we resolve it\n const didDocument = await this.didResolverService.resolveDidDocument(this.agentContext, didRecord.did)\n\n return {\n keys: didRecord.keys,\n didDocument,\n }\n }\n\n public async resolveVerificationMethodFromCreatedDidRecord(\n didUrl: string,\n allowedPurposes?: Array<DidPurpose | 'verificationMethod'>\n ) {\n const parsedDid = parseDid(didUrl)\n const { didDocument, keys } = await this.resolveCreatedDidDocumentWithKeys(parsedDid.did)\n\n const verificationMethod = didDocument.dereferenceKey(didUrl, allowedPurposes)\n const publicJwk = getPublicJwkFromVerificationMethod(verificationMethod)\n publicJwk.keyId =\n keys?.find(({ didDocumentRelativeKeyId }) => verificationMethod.id.endsWith(didDocumentRelativeKeyId))\n ?.kmsKeyId ?? publicJwk.legacyKeyId\n\n return {\n verificationMethod,\n publicJwk,\n }\n }\n\n public get supportedResolverMethods() {\n return this.didResolverService.supportedMethods\n }\n\n public get supportedRegistrarMethods() {\n return this.didRegistrarService.supportedMethods\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBO,oBAAMA,UAAQ;CAQnB,AAAO,YACL,oBACA,qBACA,eACA,cACA,QACA,gBACA;AACA,OAAK,qBAAqB;AAC1B,OAAK,sBAAsB;AAC3B,OAAK,gBAAgB;AACrB,OAAK,eAAe;AACpB,OAAK,SAAS;;;;;;;CAQhB,AAAO,QAAQ,QAAgB,SAAgC;AAC7D,SAAO,KAAK,mBAAmB,QAAQ,KAAK,cAAc,QAAQ,QAAQ;;;;;;;CAQ5E,AAAO,OACL,SAC0B;AAC1B,SAAO,KAAK,oBAAoB,OAAsB,KAAK,cAAc,QAAQ;;;;;;;CAQnF,AAAO,OACL,SAC0B;AAC1B,SAAO,KAAK,oBAAoB,OAAO,KAAK,cAAc,QAAQ;;;;;;;CAQpE,AAAO,WACL,SAC8B;AAC9B,SAAO,KAAK,oBAAoB,WAAW,KAAK,cAAc,QAAQ;;;;;;;CAQxE,AAAO,mBAAmB,QAAgB;AACxC,SAAO,KAAK,mBAAmB,mBAAmB,KAAK,cAAc,OAAO;;;;;;;;;CAU9E,AAAO,eAAe,EAAE,QAAQ,QAA2C,EAAE,EAAE;AAC7E,SAAO,KAAK,cAAc,eAAe,KAAK,cAAc;GAAE;GAAQ;GAAK,CAAC;;;;;;;;;;;;;;;CAgB9E,MAAa,OAAO,EAAE,KAAK,aAAa,OAAO,EAAE,EAAE,aAA+B;AAChF,MAAI,eAAe,YAAY,OAAO,IACpC,OAAM,IAAI,WAAW,mBAAmB,YAAY,GAAG,sBAAsB,MAAM;EAGrF,MAAM,oBAAoB,MAAM,KAAK,cAAc,eAAe,KAAK,cAAc,IAAI;AACzF,MAAI,qBAAqB,CAAC,UACxB,OAAM,IAAI,WACR,iBAAiB,IAAI,0GACtB;AAG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AAmB;;CAGjC,IAAW,4BAA4B;AACrC,SAAO,KAAK,oBAAoB;;;sBAhMnC,YAAY"}
1
+ {"version":3,"file":"DidsApi.mjs","names":["DidsApi"],"sources":["../../../src/modules/dids/DidsApi.ts"],"sourcesContent":["import { parseDid } from '@sphereon/ssi-types'\nimport { AgentContext } from '../../agent'\nimport { CredoError, RecordNotFoundError } from '../../error'\nimport { injectable } from '../../plugins'\nimport { KeyManagementApi } from '../kms'\nimport type { ImportDidOptions } from './DidsApiOptions'\nimport { DidsModuleConfig } from './DidsModuleConfig'\nimport { type DidPurpose, getPublicJwkFromVerificationMethod } from './domain'\nimport { getAlternativeDidsForPeerDid, isValidPeerDid } from './methods'\nimport { DidRecord, DidRepository } from './repository'\nimport { DidRegistrarService, DidResolverService } from './services'\nimport type {\n DidCreateOptions,\n DidCreateResult,\n DidDeactivateOptions,\n DidDeactivateResult,\n DidResolutionOptions,\n DidUpdateOptions,\n DidUpdateResult,\n} from './types'\n\n@injectable()\nexport class DidsApi {\n public config: DidsModuleConfig\n\n private didResolverService: DidResolverService\n private didRegistrarService: DidRegistrarService\n private didRepository: DidRepository\n private agentContext: AgentContext\n\n public constructor(\n didResolverService: DidResolverService,\n didRegistrarService: DidRegistrarService,\n didRepository: DidRepository,\n agentContext: AgentContext,\n config: DidsModuleConfig,\n _keyManagement: KeyManagementApi\n ) {\n this.didResolverService = didResolverService\n this.didRegistrarService = didRegistrarService\n this.didRepository = didRepository\n this.agentContext = agentContext\n this.config = config\n }\n\n /**\n * Resolve a did to a did document.\n *\n * Follows the interface as defined in https://w3c-ccg.github.io/did-resolution/\n */\n public resolve(didUrl: string, options?: DidResolutionOptions) {\n return this.didResolverService.resolve(this.agentContext, didUrl, options)\n }\n\n /**\n * Create, register and store a did and did document.\n *\n * Follows the interface as defined in https://identity.foundation/did-registration\n */\n public create<CreateOptions extends DidCreateOptions = DidCreateOptions>(\n options: CreateOptions\n ): Promise<DidCreateResult> {\n return this.didRegistrarService.create<CreateOptions>(this.agentContext, options)\n }\n\n /**\n * Update an existing did document.\n *\n * Follows the interface as defined in https://identity.foundation/did-registration\n */\n public update<UpdateOptions extends DidUpdateOptions = DidUpdateOptions>(\n options: UpdateOptions\n ): Promise<DidUpdateResult> {\n return this.didRegistrarService.update(this.agentContext, options)\n }\n\n /**\n * Deactivate an existing did.\n *\n * Follows the interface as defined in https://identity.foundation/did-registration\n */\n public deactivate<DeactivateOptions extends DidDeactivateOptions = DidDeactivateOptions>(\n options: DeactivateOptions\n ): Promise<DidDeactivateResult> {\n return this.didRegistrarService.deactivate(this.agentContext, options)\n }\n\n /**\n * Resolve a did to a did document. This won't return the associated metadata as defined\n * in the did resolution specification, and will throw an error if the did document could not\n * be resolved.\n */\n public resolveDidDocument(didUrl: string) {\n return this.didResolverService.resolveDidDocument(this.agentContext, didUrl)\n }\n\n /**\n * Get a list of all dids created by the agent. This will return a list of {@link DidRecord} objects.\n * Each document will have an id property with the value of the did. Optionally, it will contain a did document,\n * but this is only for documents that can't be resolved from the did itself or remotely.\n *\n * You can call `${@link DidsModule.resolve} to resolve the did document based on the did itself.\n */\n public getCreatedDids({ method, did }: { method?: string; did?: string } = {}) {\n return this.didRepository.getCreatedDids(this.agentContext, { method, did })\n }\n\n /**\n * Import an existing did that was created outside of the DidsApi. This will create a `DidRecord` for the did\n * and will allow the did to be used in other parts of the agent. If you need to create a new did document,\n * you can use the {@link DidsApi.create} method to create and register the did.\n *\n * If no `didDocument` is provided, the did document will be resolved using the did resolver. You can optionally provide a list\n * of private key buffer with the respective private key bytes. These keys will be stored in the wallet, and allows you to use the\n * did for other operations. Providing keys that already exist in the wallet is allowed, and those keys will be skipped from being\n * added to the wallet.\n *\n * By default, this method will throw an error if the did already exists in the wallet. You can override this behavior by setting\n * the `overwrite` option to `true`. This will update the did document in the record, and allows you to update the did over time.\n */\n public async import({ did, didDocument, keys = [], overwrite }: ImportDidOptions) {\n if (didDocument && didDocument.id !== did) {\n throw new CredoError(`Did document id ${didDocument.id} does not match did ${did}`)\n }\n\n const existingDidRecord = await this.didRepository.findCreatedDid(this.agentContext, did)\n if (existingDidRecord && !overwrite) {\n throw new CredoError(\n `A created did ${did} already exists. If you want to override the existing did, set the 'overwrite' option to update the did.`\n )\n }\n\n if (!didDocument) {\n didDocument = await this.resolveDidDocument(did)\n }\n\n for (const key of keys) {\n // Make sure the keys exists in the did document\n didDocument.dereferenceKey(key.didDocumentRelativeKeyId)\n }\n\n // Update existing did record\n if (existingDidRecord) {\n existingDidRecord.didDocument = didDocument\n existingDidRecord.keys = keys\n existingDidRecord.setTags({\n alternativeDids: isValidPeerDid(didDocument.id) ? getAlternativeDidsForPeerDid(did) : undefined,\n })\n\n await this.didRepository.update(this.agentContext, existingDidRecord)\n return\n }\n\n // Create new did record\n await this.didRepository.storeCreatedDid(this.agentContext, {\n did,\n didDocument,\n keys,\n tags: {\n alternativeDids: isValidPeerDid(didDocument.id) ? getAlternativeDidsForPeerDid(did) : undefined,\n },\n })\n }\n\n public async resolveCreatedDidDocumentWithKeys(did: string) {\n const [didRecord] = await this.didRepository.getCreatedDids(this.agentContext, { did })\n\n if (!didRecord) {\n throw new RecordNotFoundError(`Created did '${did}' not found`, { recordType: DidRecord.type })\n }\n\n if (didRecord.didDocument) {\n return {\n keys: didRecord.keys,\n didDocument: didRecord.didDocument,\n }\n }\n\n // TODO: we should somehow store the did document on the record if the did method allows it\n // E.g. for did:key we don't want to store it, but if we still have a did:indy record we do want to store it\n // If the did document is not stored on the did record, we resolve it\n const didDocument = await this.didResolverService.resolveDidDocument(this.agentContext, didRecord.did)\n\n return {\n keys: didRecord.keys,\n didDocument,\n }\n }\n\n public async resolveVerificationMethodFromCreatedDidRecord(\n didUrl: string,\n allowedPurposes?: Array<DidPurpose | 'verificationMethod'>\n ) {\n const parsedDid = parseDid(didUrl)\n const { didDocument, keys } = await this.resolveCreatedDidDocumentWithKeys(parsedDid.did)\n\n const verificationMethod = didDocument.dereferenceKey(didUrl, allowedPurposes)\n const publicJwk = getPublicJwkFromVerificationMethod(verificationMethod)\n publicJwk.keyId =\n keys?.find(({ didDocumentRelativeKeyId }) => verificationMethod.id.endsWith(didDocumentRelativeKeyId))\n ?.kmsKeyId ?? publicJwk.legacyKeyId\n\n return {\n verificationMethod,\n publicJwk,\n }\n }\n\n public get supportedResolverMethods() {\n return this.didResolverService.supportedMethods\n }\n\n public get supportedRegistrarMethods() {\n return this.didRegistrarService.supportedMethods\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,oBAAMA,UAAQ;CAQnB,AAAO,YACL,oBACA,qBACA,eACA,cACA,QACA,gBACA;AACA,OAAK,qBAAqB;AAC1B,OAAK,sBAAsB;AAC3B,OAAK,gBAAgB;AACrB,OAAK,eAAe;AACpB,OAAK,SAAS;;;;;;;CAQhB,AAAO,QAAQ,QAAgB,SAAgC;AAC7D,SAAO,KAAK,mBAAmB,QAAQ,KAAK,cAAc,QAAQ,QAAQ;;;;;;;CAQ5E,AAAO,OACL,SAC0B;AAC1B,SAAO,KAAK,oBAAoB,OAAsB,KAAK,cAAc,QAAQ;;;;;;;CAQnF,AAAO,OACL,SAC0B;AAC1B,SAAO,KAAK,oBAAoB,OAAO,KAAK,cAAc,QAAQ;;;;;;;CAQpE,AAAO,WACL,SAC8B;AAC9B,SAAO,KAAK,oBAAoB,WAAW,KAAK,cAAc,QAAQ;;;;;;;CAQxE,AAAO,mBAAmB,QAAgB;AACxC,SAAO,KAAK,mBAAmB,mBAAmB,KAAK,cAAc,OAAO;;;;;;;;;CAU9E,AAAO,eAAe,EAAE,QAAQ,QAA2C,EAAE,EAAE;AAC7E,SAAO,KAAK,cAAc,eAAe,KAAK,cAAc;GAAE;GAAQ;GAAK,CAAC;;;;;;;;;;;;;;;CAgB9E,MAAa,OAAO,EAAE,KAAK,aAAa,OAAO,EAAE,EAAE,aAA+B;AAChF,MAAI,eAAe,YAAY,OAAO,IACpC,OAAM,IAAI,WAAW,mBAAmB,YAAY,GAAG,sBAAsB,MAAM;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,EAAE,+BAA+B,mBAAmB,GAAG,SAAS,yBAAyB,CAAC,EAClG,YAAY,UAAU;AAE5B,SAAO;GACL;GACA;GACD;;CAGH,IAAW,2BAA2B;AACpC,SAAO,KAAK,mBAAmB;;CAGjC,IAAW,4BAA4B;AACrC,SAAO,KAAK,oBAAoB;;;sBAhMnC,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"DidsModule.d.mts","names":[],"sources":["../../../src/modules/dids/DidsModule.ts"],"sourcesContent":[],"mappings":";;;;;;cAQa,UAAA,YAAsB;mBACT;uBAEI;uBAIT;EAPR;;;UAGiB,CAAA,iBAAA,EASO,iBATP,CAAA,EAAA,IAAA"}
1
+ {"version":3,"file":"DidsModule.d.mts","names":[],"sources":["../../../src/modules/dids/DidsModule.ts"],"sourcesContent":[],"mappings":";;;;;;cAOa,UAAA,YAAsB;mBACT;uBAEI;uBAIT;EAPR;;;UAGiB,CAAA,iBAAA,EASO,iBATP,CAAA,EAAA,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DidsModule.d.ts","names":[],"sources":["../../../src/modules/dids/DidsModule.ts"],"sourcesContent":[],"mappings":";;;;;;cAQa,UAAA,YAAsB;mBACT;EADb,WAAA,CAAA,MAAW,CAAA,EAGM,uBAHN;EAAA,SAAA,GAAA,EAAA,OAOH,OAPG;;;;UAYa,CAAA,iBAAA,EAAA,iBAAA,CAAA,EAAA,IAAA"}
1
+ {"version":3,"file":"DidsModule.d.ts","names":[],"sources":["../../../src/modules/dids/DidsModule.ts"],"sourcesContent":[],"mappings":";;;;;;cAOa,UAAA,YAAsB;mBACT;EADb,WAAA,CAAA,MAAW,CAAA,EAGM,uBAHN;EAAA,SAAA,GAAA,EAAA,OAOH,OAPG;;;;UAYa,CAAA,iBAAA,EAAA,iBAAA,CAAA,EAAA,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DidsModule.mjs","names":[],"sources":["../../../src/modules/dids/DidsModule.ts"],"sourcesContent":["import type { DependencyManager, Module } from '../../plugins'\nimport type { DidsModuleConfigOptions } from './DidsModuleConfig'\n\nimport { DidsApi } from './DidsApi'\nimport { DidsModuleConfig } from './DidsModuleConfig'\nimport { DidRepository } from './repository'\nimport { DidRegistrarService, DidResolverService } from './services'\n\nexport class DidsModule implements Module {\n public readonly config: DidsModuleConfig\n\n public constructor(config?: DidsModuleConfigOptions) {\n this.config = new DidsModuleConfig(config)\n }\n\n public readonly api = DidsApi\n\n /**\n * Registers the dependencies of the dids module module on the dependency manager.\n */\n public register(dependencyManager: DependencyManager) {\n // Config\n dependencyManager.registerInstance(DidsModuleConfig, this.config)\n\n // Services\n dependencyManager.registerSingleton(DidResolverService)\n dependencyManager.registerSingleton(DidRegistrarService)\n dependencyManager.registerSingleton(DidRepository)\n }\n}\n"],"mappings":";;;;;;;;;;;AAQA,IAAa,aAAb,MAA0C;CAGxC,AAAO,YAAY,QAAkC;OAIrC,MAAM;AAHpB,OAAK,SAAS,IAAI,iBAAiB,OAAO;;;;;CAQ5C,AAAO,SAAS,mBAAsC;AAEpD,oBAAkB,iBAAiB,kBAAkB,KAAK,OAAO;AAGjE,oBAAkB,kBAAkB,mBAAmB;AACvD,oBAAkB,kBAAkB,oBAAoB;AACxD,oBAAkB,kBAAkB,cAAc"}
1
+ {"version":3,"file":"DidsModule.mjs","names":[],"sources":["../../../src/modules/dids/DidsModule.ts"],"sourcesContent":["import type { DependencyManager, Module } from '../../plugins'\nimport { DidsApi } from './DidsApi'\nimport type { DidsModuleConfigOptions } from './DidsModuleConfig'\nimport { DidsModuleConfig } from './DidsModuleConfig'\nimport { DidRepository } from './repository'\nimport { DidRegistrarService, DidResolverService } from './services'\n\nexport class DidsModule implements Module {\n public readonly config: DidsModuleConfig\n\n public constructor(config?: DidsModuleConfigOptions) {\n this.config = new DidsModuleConfig(config)\n }\n\n public readonly api = DidsApi\n\n /**\n * Registers the dependencies of the dids module module on the dependency manager.\n */\n public register(dependencyManager: DependencyManager) {\n // Config\n dependencyManager.registerInstance(DidsModuleConfig, this.config)\n\n // Services\n dependencyManager.registerSingleton(DidResolverService)\n dependencyManager.registerSingleton(DidRegistrarService)\n dependencyManager.registerSingleton(DidRepository)\n }\n}\n"],"mappings":";;;;;;;;;;;AAOA,IAAa,aAAb,MAA0C;CAGxC,AAAO,YAAY,QAAkC;OAIrC,MAAM;AAHpB,OAAK,SAAS,IAAI,iBAAiB,OAAO;;;;;CAQ5C,AAAO,SAAS,mBAAsC;AAEpD,oBAAkB,iBAAiB,kBAAkB,KAAK,OAAO;AAGjE,oBAAkB,kBAAkB,mBAAmB;AACvD,oBAAkB,kBAAkB,oBAAoB;AACxD,oBAAkB,kBAAkB,cAAc"}
@@ -1,12 +1,12 @@
1
1
 
2
2
 
3
+ const require_JwkDidRegistrar = require('./methods/jwk/JwkDidRegistrar.js');
4
+ const require_JwkDidResolver = require('./methods/jwk/JwkDidResolver.js');
3
5
  const require_KeyDidRegistrar = require('./methods/key/KeyDidRegistrar.js');
4
6
  const require_KeyDidResolver = require('./methods/key/KeyDidResolver.js');
5
7
  const require_PeerDidRegistrar = require('./methods/peer/PeerDidRegistrar.js');
6
8
  const require_PeerDidResolver = require('./methods/peer/PeerDidResolver.js');
7
9
  const require_WebDidResolver = require('./methods/web/WebDidResolver.js');
8
- const require_JwkDidRegistrar = require('./methods/jwk/JwkDidRegistrar.js');
9
- const require_JwkDidResolver = require('./methods/jwk/JwkDidResolver.js');
10
10
  require('./methods/index.js');
11
11
 
12
12
  //#region src/modules/dids/DidsModuleConfig.ts
@@ -1,12 +1,12 @@
1
1
 
2
2
 
3
+ import { JwkDidRegistrar } from "./methods/jwk/JwkDidRegistrar.mjs";
4
+ import { JwkDidResolver } from "./methods/jwk/JwkDidResolver.mjs";
3
5
  import { KeyDidRegistrar } from "./methods/key/KeyDidRegistrar.mjs";
4
6
  import { KeyDidResolver } from "./methods/key/KeyDidResolver.mjs";
5
7
  import { PeerDidRegistrar } from "./methods/peer/PeerDidRegistrar.mjs";
6
8
  import { PeerDidResolver } from "./methods/peer/PeerDidResolver.mjs";
7
9
  import { WebDidResolver } from "./methods/web/WebDidResolver.mjs";
8
- import { JwkDidRegistrar } from "./methods/jwk/JwkDidRegistrar.mjs";
9
- import { JwkDidResolver } from "./methods/jwk/JwkDidResolver.mjs";
10
10
  import "./methods/index.mjs";
11
11
 
12
12
  //#region src/modules/dids/DidsModuleConfig.ts
@@ -1,10 +1,10 @@
1
1
  import { Ed25519PublicJwk } from "../../kms/jwk/kty/okp/Ed25519PublicJwk.mjs";
2
2
  import { X25519PublicJwk } from "../../kms/jwk/kty/okp/X25519PublicJwk.mjs";
3
+ import { PublicJwk } from "../../kms/jwk/PublicJwk.mjs";
3
4
  import { DidDocumentService } from "./service/DidDocumentService.mjs";
4
5
  import { DidCommV1Service } from "./service/DidCommV1Service.mjs";
5
6
  import { IndyAgentService } from "./service/IndyAgentService.mjs";
6
7
  import { VerificationMethod } from "./verificationMethod/VerificationMethod.mjs";
7
- import { PublicJwk } from "../../kms/jwk/PublicJwk.mjs";
8
8
 
9
9
  //#region src/modules/dids/domain/DidDocument.d.ts
10
10
  type DidPurpose = 'authentication' | 'keyAgreement' | 'assertionMethod' | 'capabilityInvocation' | 'capabilityDelegation';
@@ -1 +1 @@
1
- {"version":3,"file":"DidDocument.d.mts","names":[],"sources":["../../../../src/modules/dids/domain/DidDocument.ts"],"sourcesContent":[],"mappings":";;;;;;;;;KAgBY,UAAA;KAOP,sBAAA,GAAyB;UAEpB,kBAAA;;;;;EATE,kBAAU,CAAA,EAcC,kBAdD,EAAA;EAOjB,OAAA,CAAA,EAQO,kBARe,EAAA;EAEjB,cAAA,CAAA,EAOS,KAPS,CAAA,MAAA,GAOM,kBAPN,CAAA;EAAA,eAAA,CAAA,EAQR,KARQ,CAAA,MAAA,GAQO,kBARP,CAAA;cAKL,CAAA,EAIN,KAJM,CAAA,MAAA,GAIS,kBAJT,CAAA;sBACX,CAAA,EAIa,KAJb,CAAA,MAAA,GAI4B,kBAJ5B,CAAA;sBACsB,CAA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,kBAAA,EAehB,kBAfgB;MAgBlC,KAhBqD,CAAA;IAA7B,kBAAA,EAiBN,kBAjBM;IAa1B,SAAA,EAKW,SALX,CAKqB,kBALrB,SAAA,IAAA,GAKuD,gBALvD,GAK0E,gBAL1E,GAK6F,eAL7F,CAAA;;QAIoB,CAAA,CAAA,EAqFT,MArFS,CAAA,MAAA,EAAA,GAAA,CAAA;SACC,QAAA,CAAA,WAAA,EAAA,OAAA,CAAA,EAwFoB,WAxFpB;;;;;;;;AAwFoB,iBAWvB,+BAAA,CAXuB,OAAA,EAAA,MAAA,EAAA,WAAA,EAa9B,WAb8B,CAAA,EAc1C,OAd0C,CAclC,kBAdkC,GAAA,IAAA,CAAA"}
@@ -1,10 +1,10 @@
1
1
  import { Ed25519PublicJwk } from "../../kms/jwk/kty/okp/Ed25519PublicJwk.js";
2
2
  import { X25519PublicJwk } from "../../kms/jwk/kty/okp/X25519PublicJwk.js";
3
+ import { PublicJwk } from "../../kms/jwk/PublicJwk.js";
3
4
  import { DidDocumentService } from "./service/DidDocumentService.js";
4
5
  import { DidCommV1Service } from "./service/DidCommV1Service.js";
5
6
  import { IndyAgentService } from "./service/IndyAgentService.js";
6
7
  import { VerificationMethod } from "./verificationMethod/VerificationMethod.js";
7
- import { PublicJwk } from "../../kms/jwk/PublicJwk.js";
8
8
 
9
9
  //#region src/modules/dids/domain/DidDocument.d.ts
10
10
  type DidPurpose = 'authentication' | 'keyAgreement' | 'assertionMethod' | 'capabilityInvocation' | 'capabilityDelegation';
@@ -1 +1 @@
1
- {"version":3,"file":"DidDocument.d.ts","names":[],"sources":["../../../../src/modules/dids/domain/DidDocument.ts"],"sourcesContent":[],"mappings":";;;;;;;;;KAgBY,UAAA;KAOP,sBAAA,GAAyB;UAEpB,kBAAA;;;EATE,WAAA,CAAA,EAAU,MAAA,EAAA;EAOjB,UAAA,CAAA,EAAA,MAAA,GAAA,MAAsB,EAAA;EAEjB,kBAAA,CAAA,EAKa,kBALK,EAAA;EAAA,OAA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