@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,3 +1,4 @@
1
+ import { AnyUint8Array } from "../../../../../types.js";
1
2
  import { DocumentLoader, JsonLdDoc, Proof, VerificationMethod } from "../../jsonldUtil.js";
2
3
  import { JwsLinkedDataSignature, JwsLinkedDataSignatureOptions } from "../JwsLinkedDataSignature.js";
3
4
 
@@ -87,7 +88,7 @@ declare class Ed25519Signature2020 extends JwsLinkedDataSignature {
87
88
  * @returns The proof containing the signature value.
88
89
  */
89
90
  sign(options: {
90
- verifyData: Uint8Array;
91
+ verifyData: AnyUint8Array;
91
92
  proof: Proof;
92
93
  }): Promise<Proof>;
93
94
  /**
@@ -99,7 +100,7 @@ declare class Ed25519Signature2020 extends JwsLinkedDataSignature {
99
100
  * @returns Resolves with the verification result.
100
101
  */
101
102
  verifySignature(options: {
102
- verifyData: Uint8Array;
103
+ verifyData: AnyUint8Array;
103
104
  verificationMethod: VerificationMethod;
104
105
  proof: Proof;
105
106
  }): Promise<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"Ed25519Signature2020.d.ts","names":[],"sources":["../../../../../../src/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.ts"],"sourcesContent":[],"mappings":";;;;KAYK,2BAAA,GAA8B,KACjC;AADG,cAKQ,oBAAA,SAA6B,sBAAA,CALV;EAAA,OAAA,WAAA,EAAA,MAAA;SAC9B,OAAA,EAAA,GAAA;;;AAIF;;;;;;;;;;;;;;;;;;;;;;;;;uBA+B8B;qCAcoB,YAAS;;WA2BJ;qBAAwB;MAAgB;;;;;;;;;;;;;cAsC9C;;;;;;;;;;;;;;;;;;;;;WA0BtC;cACG;;qBAGO;MAClB;;;;;;;;;;;gBAqBwC;WAAmB;MAAO,QAAA;;;;;;;;;;gBAqBrD;wBACQ;WACb;MACR"}
1
+ {"version":3,"file":"Ed25519Signature2020.d.ts","names":[],"sources":["../../../../../../src/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.ts"],"sourcesContent":[],"mappings":";;;;;KAYK,2BAAA,GAA8B,KACjC;AADG,cAKQ,oBAAA,SAA6B,sBAAA,CALV;EAAA,OAAA,WAAA,EAAA,MAAA;SAC9B,OAAA,EAAA,GAAA;;;AAIF;;;;;;;;;;;;;;;;;;;;;;;;;uBA+B8B;qCAcoB,YAAS;;WA2BJ;qBAAwB;MAAgB;;;;;;;;;;;;;cAsC9C;;;;;;;;;;;;;;;;;;;;;WA0BtC;cACG;;qBAGO;MAClB;;;;;;;;;;;gBAqBwC;WAAsB;MAAO,QAAA;;;;;;;;;;gBAqBxD;wBACQ;WACb;MACR"}
@@ -1 +1 @@
1
- {"version":3,"file":"Ed25519Signature2020.mjs","names":["jsonld"],"sources":["../../../../../../src/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.ts"],"sourcesContent":["import { MultiBaseEncoder, TypedArrayEncoder } from '../../../../../utils'\nimport { CREDENTIALS_CONTEXT_V1_URL, SECURITY_CONTEXT_URL } from '../../../constants'\nimport type { DocumentLoader, JsonLdDoc, Proof, VerificationMethod } from '../../jsonldUtil'\nimport { _includesContext } from '../../jsonldUtil'\nimport jsonld from '../../libraries/jsonld'\nimport type { JwsLinkedDataSignatureOptions } from '../JwsLinkedDataSignature'\nimport { JwsLinkedDataSignature } from '../JwsLinkedDataSignature'\n\nimport { Ed25519PublicJwk, PublicJwk } from '../../../../kms'\nimport { ED25519_SUITE_CONTEXT_URL_2020 } from './constants'\nimport { ed25519Signature2020Context } from './context2020'\n\ntype Ed25519Signature2020Options = Pick<\n JwsLinkedDataSignatureOptions,\n 'key' | 'proof' | 'date' | 'useNativeCanonize' | 'LDKeyClass'\n>\n\nexport class Ed25519Signature2020 extends JwsLinkedDataSignature {\n public static CONTEXT_URL = ED25519_SUITE_CONTEXT_URL_2020\n public static CONTEXT = ed25519Signature2020Context.get(ED25519_SUITE_CONTEXT_URL_2020)\n\n /**\n * @param {object} options - Options hashmap.\n *\n * Either a `key` OR at least one of `signer`/`verifier` is required.\n *\n * @param {object} [options.key] - An optional key object (containing an\n * `id` property, and either `signer` or `verifier`, depending on the\n * intended operation. Useful for when the application is managing keys\n * itself (when using a KMS, you never have access to the private key,\n * and so should use the `signer` param instead).\n * @param {Function} [options.signer] - Signer function that returns an\n * object with an async sign() method. This is useful when interfacing\n * with a KMS (since you don't get access to the private key and its\n * `signer()`, the KMS client gives you only the signer function to use).\n * @param {Function} [options.verifier] - Verifier function that returns\n * an object with an async `verify()` method. Useful when working with a\n * KMS-provided verifier function.\n *\n * Advanced optional parameters and overrides.\n *\n * @param {object} [options.proof] - A JSON-LD document with options to use\n * for the `proof` node. Any other custom fields can be provided here\n * using a context different from security-v2).\n * @param {string|Date} [options.date] - Signing date to use if not passed.\n * @param {boolean} [options.useNativeCanonize] - Whether to use a native\n * canonize algorithm.\n */\n public constructor(options: Ed25519Signature2020Options) {\n super({\n type: 'Ed25519Signature2020',\n algorithm: 'EdDSA',\n LDKeyClass: options.LDKeyClass,\n contextUrl: ED25519_SUITE_CONTEXT_URL_2020,\n key: options.key,\n proof: options.proof,\n date: options.date,\n useNativeCanonize: options.useNativeCanonize,\n })\n this.requiredKeyType = 'Ed25519VerificationKey2020'\n }\n\n public async assertVerificationMethod(document: JsonLdDoc) {\n if (!_includesCompatibleContext({ document: document })) {\n // For DID Documents, since keys do not have their own contexts,\n // the suite context is usually provided by the documentLoader logic\n throw new TypeError(\n `The '@context' of the verification method (key) MUST contain the context url \"${this.contextUrl}\".`\n )\n }\n\n if (!_isEd2020Key(document)) {\n const verificationMethodType = jsonld.getValues(document, 'type')[0]\n throw new Error(\n `Unsupported verification method type '${verificationMethodType}'. Verification method type MUST be 'Ed25519VerificationKey2020'.`\n )\n }\n if (_isEd2020Key(document) && !_includesEd2020Context(document)) {\n throw new Error(\n `For verification method type 'Ed25519VerificationKey2020' the '@context' MUST contain the context url \"${ED25519_SUITE_CONTEXT_URL_2020}\".`\n )\n }\n\n // ensure verification method has not been revoked\n if (document.revoked !== undefined) {\n throw new Error('The verification method has been revoked.')\n }\n }\n\n public async getVerificationMethod(options: { proof: Proof; documentLoader?: DocumentLoader }) {\n let verificationMethod = await super.getVerificationMethod({\n proof: options.proof,\n documentLoader: options.documentLoader,\n })\n\n // convert Ed25519VerificationKey2020 to Ed25519VerificationKey2018\n if (_isEd2020Key(verificationMethod) && _includesEd2020Context(verificationMethod)) {\n // -- convert multibase to base58 --\n const publicJwk = PublicJwk.fromFingerprint(verificationMethod.publicKeyMultibase)\n if (!publicJwk.is(Ed25519PublicJwk)) {\n throw new Error('Expected multibase key to be of type Ed25519.')\n }\n\n // -- update type\n verificationMethod.type = 'Ed25519VerificationKey2018'\n\n verificationMethod = {\n ...verificationMethod,\n publicKeyMultibase: undefined,\n publicKeyBase58: TypedArrayEncoder.toBase58(publicJwk.publicKey.publicKey),\n }\n }\n\n return verificationMethod\n }\n\n /**\n * Ensures the document to be signed contains the required signature suite\n * specific `@context`, by either adding it (if `addSuiteContext` is true),\n * or throwing an error if it's missing.\n *\n * @override\n *\n * @param {object} options - Options hashmap.\n * @param {object} options.document - JSON-LD document to be signed.\n * @param {boolean} options.addSuiteContext - Add suite context?\n */\n public ensureSuiteContext(options: { document: JsonLdDoc; addSuiteContext: boolean }) {\n if (_includesCompatibleContext({ document: options.document })) {\n return\n }\n\n super.ensureSuiteContext({ document: options.document, addSuiteContext: options.addSuiteContext })\n }\n\n /**\n * Checks whether a given proof exists in the document.\n *\n * @override\n *\n * @param {object} options - Options hashmap.\n * @param {object} options.proof - A proof.\n * @param {object} options.document - A JSON-LD document.\n * @param {object} options.purpose - A jsonld-signatures ProofPurpose\n * instance (e.g. AssertionProofPurpose, AuthenticationProofPurpose, etc).\n * @param {Function} options.documentLoader - A secure document loader (it is\n * recommended to use one that provides static known documents, instead of\n * fetching from the web) for returning contexts, controller documents,\n * keys, and other relevant URLs needed for the proof.\n *\n * @returns {Promise<boolean>} Whether a match for the proof was found.\n */\n public async matchProof(options: {\n proof: Proof\n document: VerificationMethod\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n purpose: any\n documentLoader?: DocumentLoader\n }) {\n if (!_includesCompatibleContext({ document: options.document })) {\n return false\n }\n return super.matchProof({\n proof: options.proof,\n document: options.document,\n purpose: options.purpose,\n documentLoader: options.documentLoader,\n })\n }\n\n /**\n * @param options - Options hashmap.\n * @param options.verifyData - The data to sign.\n * @param options.proof - A JSON-LD document with options to use\n * for the `proof` node. Any other custom fields can be provided here\n * using a context different from `security-v2`.\n *\n * @returns The proof containing the signature value.\n */\n public async sign(options: { verifyData: Uint8Array; proof: Proof }) {\n if (!(this.signer && typeof this.signer.sign === 'function')) {\n throw new Error('A signer API has not been specified.')\n }\n const signature = await this.signer.sign({ data: options.verifyData })\n const encodedSignature = MultiBaseEncoder.encode(signature, 'base58btc')\n\n // create detached content signature\n options.proof.proofValue = encodedSignature\n return options.proof\n }\n\n /**\n * @param options - Options hashmap.\n * @param options.verifyData - The data to verify.\n * @param options.verificationMethod - A verification method.\n * @param options.proof - The proof to be verified.\n *\n * @returns Resolves with the verification result.\n */\n public async verifySignature(options: {\n verifyData: Uint8Array\n verificationMethod: VerificationMethod\n proof: Proof\n }) {\n if (!(options.proof.proofValue && typeof options.proof.proofValue === 'string')) {\n throw new TypeError('The proof does not include a valid \"proofValue\" property.')\n }\n const signature = MultiBaseEncoder.decode(options.proof.proofValue).data\n\n let { verifier } = this\n if (!verifier) {\n const key = await this.LDKeyClass.from(options.verificationMethod)\n verifier = key.verifier()\n }\n return verifier.verify({ data: options.verifyData, signature })\n }\n}\n\nfunction _includesCompatibleContext(options: { document: JsonLdDoc }) {\n // Handle the unfortunate Ed25519Signature2018 / credentials/v1 collision\n const hasEd2020 = _includesContext({\n document: options.document,\n contextUrl: ED25519_SUITE_CONTEXT_URL_2020,\n })\n const hasCred = _includesContext({ document: options.document, contextUrl: CREDENTIALS_CONTEXT_V1_URL })\n const hasSecV2 = _includesContext({ document: options.document, contextUrl: SECURITY_CONTEXT_URL })\n\n // Either one by itself is fine, for this suite\n return hasEd2020 || hasCred || hasSecV2\n}\n\nfunction _isEd2020Key(verificationMethod: JsonLdDoc) {\n // @ts-ignore - .hasValue is not part of the public API\n return jsonld.hasValue(verificationMethod, 'type', 'Ed25519VerificationKey2020')\n}\n\nfunction _includesEd2020Context(document: JsonLdDoc) {\n return _includesContext({ document, contextUrl: ED25519_SUITE_CONTEXT_URL_2020 })\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,IAAa,uBAAb,cAA0C,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B/D,AAAO,YAAY,SAAsC;AACvD,QAAM;GACJ,MAAM;GACN,WAAW;GACX,YAAY,QAAQ;GACpB,YAAY;GACZ,KAAK,QAAQ;GACb,OAAO,QAAQ;GACf,MAAM,QAAQ;GACd,mBAAmB,QAAQ;GAC5B,CAAC;AACF,OAAK,kBAAkB;;CAGzB,MAAa,yBAAyB,UAAqB;AACzD,MAAI,CAAC,2BAA2B,EAAY,UAAU,CAAC,CAGrD,OAAM,IAAI,UACR,iFAAiF,KAAK,WAAW,IAClG;AAGH,MAAI,CAAC,aAAa,SAAS,EAAE;GAC3B,MA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AM,KAAK,OAAO,KAAK,EAAE,MAAM,QAAQ,YAAY,CAAC;EACtE,MAAM,mBAAmB,iBAAiB,OAAO,WAAW,YAAY;AAGxE,UAAQ,MAAM,aAAa;AAC3B,SAAO,QAAQ;;;;;;;;;;CAWjB,MAAa,gBAAgB,SAI1B;AACD,MAAI,EAAE,QAAQ,MAAM,cAAc,OAAO,QAAQ,MAAM,eAAe,UACpE,OAAM,IAAI,UAAU,8DAA4D;EAElF,MAAM,YAAY,iBAAiB,OAAO,QAAQ,MAAM,WAAW,CAAC;EAEpE,IAAI,EAAE,aAAa;AACnB,MAAI,CAAC,SAEH,aADY,MAAM,KAAK,WAAW,KAAK,QAAQ,mBAAmB,EACnD,UAAU;AAE3B,SAAO,SAAS,OAAO;GAAE,MAAM,QAAQ;GAAY;GAAW,CAAC;;;qBApMnD,cAAc;qBACd,UAAU,4BAA4B,IAAI,+BAA+B;AAuMzF,SAAS,2BAA2B,SAAkC;CAEpE,MAAM,YAAY,iBAAiB;EACjC,UAAU,QAAQ;EAClB,YAAY;EACb,CAAC;CACF,MAAM,UAAU,iBAAiB;EAAE,UAAU,QAAQ;EAAU,YAAY;EAA4B,CAAC;CACxG,MAAM,WAAW,iBAAiB;EAAE,UAAU,QAAQ;EAAU,YAAY;EAAsB,CAAC;AAGnG,QAAO,aAAa,WAAW;;AAGjC,SAAS,aAAa,oBAA+B;AAEnD,QAAOA,eAAO,SAAS,oBAAoB,QAAQ,6BAA6B;;AAGlF,SAAS,uBAAuB,UAAqB;AACnD,QAAO,iBAAiB;EAAE;EAAU,YAAY;EAAgC,CAAC"}
1
+ {"version":3,"file":"Ed25519Signature2020.mjs","names":["jsonld"],"sources":["../../../../../../src/modules/vc/data-integrity/signature-suites/ed25519/Ed25519Signature2020.ts"],"sourcesContent":["import type { AnyUint8Array } from '../../../../../types'\nimport { MultiBaseEncoder, TypedArrayEncoder } from '../../../../../utils'\nimport { Ed25519PublicJwk, PublicJwk } from '../../../../kms'\nimport { CREDENTIALS_CONTEXT_V1_URL, SECURITY_CONTEXT_URL } from '../../../constants'\nimport type { DocumentLoader, JsonLdDoc, Proof, VerificationMethod } from '../../jsonldUtil'\nimport { _includesContext } from '../../jsonldUtil'\nimport jsonld from '../../libraries/jsonld'\nimport type { JwsLinkedDataSignatureOptions } from '../JwsLinkedDataSignature'\nimport { JwsLinkedDataSignature } from '../JwsLinkedDataSignature'\nimport { ED25519_SUITE_CONTEXT_URL_2020 } from './constants'\nimport { ed25519Signature2020Context } from './context2020'\n\ntype Ed25519Signature2020Options = Pick<\n JwsLinkedDataSignatureOptions,\n 'key' | 'proof' | 'date' | 'useNativeCanonize' | 'LDKeyClass'\n>\n\nexport class Ed25519Signature2020 extends JwsLinkedDataSignature {\n public static CONTEXT_URL = ED25519_SUITE_CONTEXT_URL_2020\n public static CONTEXT = ed25519Signature2020Context.get(ED25519_SUITE_CONTEXT_URL_2020)\n\n /**\n * @param {object} options - Options hashmap.\n *\n * Either a `key` OR at least one of `signer`/`verifier` is required.\n *\n * @param {object} [options.key] - An optional key object (containing an\n * `id` property, and either `signer` or `verifier`, depending on the\n * intended operation. Useful for when the application is managing keys\n * itself (when using a KMS, you never have access to the private key,\n * and so should use the `signer` param instead).\n * @param {Function} [options.signer] - Signer function that returns an\n * object with an async sign() method. This is useful when interfacing\n * with a KMS (since you don't get access to the private key and its\n * `signer()`, the KMS client gives you only the signer function to use).\n * @param {Function} [options.verifier] - Verifier function that returns\n * an object with an async `verify()` method. Useful when working with a\n * KMS-provided verifier function.\n *\n * Advanced optional parameters and overrides.\n *\n * @param {object} [options.proof] - A JSON-LD document with options to use\n * for the `proof` node. Any other custom fields can be provided here\n * using a context different from security-v2).\n * @param {string|Date} [options.date] - Signing date to use if not passed.\n * @param {boolean} [options.useNativeCanonize] - Whether to use a native\n * canonize algorithm.\n */\n public constructor(options: Ed25519Signature2020Options) {\n super({\n type: 'Ed25519Signature2020',\n algorithm: 'EdDSA',\n LDKeyClass: options.LDKeyClass,\n contextUrl: ED25519_SUITE_CONTEXT_URL_2020,\n key: options.key,\n proof: options.proof,\n date: options.date,\n useNativeCanonize: options.useNativeCanonize,\n })\n this.requiredKeyType = 'Ed25519VerificationKey2020'\n }\n\n public async assertVerificationMethod(document: JsonLdDoc) {\n if (!_includesCompatibleContext({ document: document })) {\n // For DID Documents, since keys do not have their own contexts,\n // the suite context is usually provided by the documentLoader logic\n throw new TypeError(\n `The '@context' of the verification method (key) MUST contain the context url \"${this.contextUrl}\".`\n )\n }\n\n if (!_isEd2020Key(document)) {\n const verificationMethodType = jsonld.getValues(document, 'type')[0]\n throw new Error(\n `Unsupported verification method type '${verificationMethodType}'. Verification method type MUST be 'Ed25519VerificationKey2020'.`\n )\n }\n if (_isEd2020Key(document) && !_includesEd2020Context(document)) {\n throw new Error(\n `For verification method type 'Ed25519VerificationKey2020' the '@context' MUST contain the context url \"${ED25519_SUITE_CONTEXT_URL_2020}\".`\n )\n }\n\n // ensure verification method has not been revoked\n if (document.revoked !== undefined) {\n throw new Error('The verification method has been revoked.')\n }\n }\n\n public async getVerificationMethod(options: { proof: Proof; documentLoader?: DocumentLoader }) {\n let verificationMethod = await super.getVerificationMethod({\n proof: options.proof,\n documentLoader: options.documentLoader,\n })\n\n // convert Ed25519VerificationKey2020 to Ed25519VerificationKey2018\n if (_isEd2020Key(verificationMethod) && _includesEd2020Context(verificationMethod)) {\n // -- convert multibase to base58 --\n const publicJwk = PublicJwk.fromFingerprint(verificationMethod.publicKeyMultibase)\n if (!publicJwk.is(Ed25519PublicJwk)) {\n throw new Error('Expected multibase key to be of type Ed25519.')\n }\n\n // -- update type\n verificationMethod.type = 'Ed25519VerificationKey2018'\n\n verificationMethod = {\n ...verificationMethod,\n publicKeyMultibase: undefined,\n publicKeyBase58: TypedArrayEncoder.toBase58(publicJwk.publicKey.publicKey),\n }\n }\n\n return verificationMethod\n }\n\n /**\n * Ensures the document to be signed contains the required signature suite\n * specific `@context`, by either adding it (if `addSuiteContext` is true),\n * or throwing an error if it's missing.\n *\n * @override\n *\n * @param {object} options - Options hashmap.\n * @param {object} options.document - JSON-LD document to be signed.\n * @param {boolean} options.addSuiteContext - Add suite context?\n */\n public ensureSuiteContext(options: { document: JsonLdDoc; addSuiteContext: boolean }) {\n if (_includesCompatibleContext({ document: options.document })) {\n return\n }\n\n super.ensureSuiteContext({ document: options.document, addSuiteContext: options.addSuiteContext })\n }\n\n /**\n * Checks whether a given proof exists in the document.\n *\n * @override\n *\n * @param {object} options - Options hashmap.\n * @param {object} options.proof - A proof.\n * @param {object} options.document - A JSON-LD document.\n * @param {object} options.purpose - A jsonld-signatures ProofPurpose\n * instance (e.g. AssertionProofPurpose, AuthenticationProofPurpose, etc).\n * @param {Function} options.documentLoader - A secure document loader (it is\n * recommended to use one that provides static known documents, instead of\n * fetching from the web) for returning contexts, controller documents,\n * keys, and other relevant URLs needed for the proof.\n *\n * @returns {Promise<boolean>} Whether a match for the proof was found.\n */\n public async matchProof(options: {\n proof: Proof\n document: VerificationMethod\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n purpose: any\n documentLoader?: DocumentLoader\n }) {\n if (!_includesCompatibleContext({ document: options.document })) {\n return false\n }\n return super.matchProof({\n proof: options.proof,\n document: options.document,\n purpose: options.purpose,\n documentLoader: options.documentLoader,\n })\n }\n\n /**\n * @param options - Options hashmap.\n * @param options.verifyData - The data to sign.\n * @param options.proof - A JSON-LD document with options to use\n * for the `proof` node. Any other custom fields can be provided here\n * using a context different from `security-v2`.\n *\n * @returns The proof containing the signature value.\n */\n public async sign(options: { verifyData: AnyUint8Array; proof: Proof }) {\n if (!(this.signer && typeof this.signer.sign === 'function')) {\n throw new Error('A signer API has not been specified.')\n }\n const signature = await this.signer.sign({ data: options.verifyData })\n const encodedSignature = MultiBaseEncoder.encode(signature, 'base58btc')\n\n // create detached content signature\n options.proof.proofValue = encodedSignature\n return options.proof\n }\n\n /**\n * @param options - Options hashmap.\n * @param options.verifyData - The data to verify.\n * @param options.verificationMethod - A verification method.\n * @param options.proof - The proof to be verified.\n *\n * @returns Resolves with the verification result.\n */\n public async verifySignature(options: {\n verifyData: AnyUint8Array\n verificationMethod: VerificationMethod\n proof: Proof\n }) {\n if (!(options.proof.proofValue && typeof options.proof.proofValue === 'string')) {\n throw new TypeError('The proof does not include a valid \"proofValue\" property.')\n }\n const signature = MultiBaseEncoder.decode(options.proof.proofValue).data\n\n let { verifier } = this\n if (!verifier) {\n const key = await this.LDKeyClass.from(options.verificationMethod)\n verifier = key.verifier()\n }\n return verifier.verify({ data: options.verifyData, signature })\n }\n}\n\nfunction _includesCompatibleContext(options: { document: JsonLdDoc }) {\n // Handle the unfortunate Ed25519Signature2018 / credentials/v1 collision\n const hasEd2020 = _includesContext({\n document: options.document,\n contextUrl: ED25519_SUITE_CONTEXT_URL_2020,\n })\n const hasCred = _includesContext({ document: options.document, contextUrl: CREDENTIALS_CONTEXT_V1_URL })\n const hasSecV2 = _includesContext({ document: options.document, contextUrl: SECURITY_CONTEXT_URL })\n\n // Either one by itself is fine, for this suite\n return hasEd2020 || hasCred || hasSecV2\n}\n\nfunction _isEd2020Key(verificationMethod: JsonLdDoc) {\n // @ts-expect-error - .hasValue is not part of the public API\n return jsonld.hasValue(verificationMethod, 'type', 'Ed25519VerificationKey2020')\n}\n\nfunction _includesEd2020Context(document: JsonLdDoc) {\n return _includesContext({ document, contextUrl: ED25519_SUITE_CONTEXT_URL_2020 })\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,IAAa,uBAAb,cAA0C,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B/D,AAAO,YAAY,SAAsC;AACvD,QAAM;GACJ,MAAM;GACN,WAAW;GACX,YAAY,QAAQ;GACpB,YAAY;GACZ,KAAK,QAAQ;GACb,OAAO,QAAQ;GACf,MAAM,QAAQ;GACd,mBAAmB,QAAQ;GAC5B,CAAC;AACF,OAAK,kBAAkB;;CAGzB,MAAa,yBAAyB,UAAqB;AACzD,MAAI,CAAC,2BAA2B,EAAY,UAAU,C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AI,EAAE,KAAK,UAAU,OAAO,KAAK,OAAO,SAAS,YAC/C,OAAM,IAAI,MAAM,uCAAuC;EAEzD,MAAM,YAAY,MAAM,KAAK,OAAO,KAAK,EAAE,MAAM,QAAQ,YAAY,CAAC;EACtE,MAAM,mBAAmB,iBAAiB,OAAO,WAAW,YAAY;AAGxE,UAAQ,MAAM,aAAa;AAC3B,SAAO,QAAQ;;;;;;;;;;CAWjB,MAAa,gBAAgB,SAI1B;AACD,MAAI,EAAE,QAAQ,MAAM,cAAc,OAAO,QAAQ,MAAM,eAAe,UACpE,OAAM,IAAI,UAAU,8DAA4D;EAElF,MAAM,YAAY,iBAAiB,OAAO,QAAQ,MAAM,WAAW,CAAC;EAEpE,IAAI,EAAE,aAAa;AACnB,MAAI,CAAC,SAEH,aADY,MAAM,KAAK,WAAW,KAAK,QAAQ,mBAAmB,EACnD,UAAU;AAE3B,SAAO,SAAS,OAAO;GAAE,MAAM,QAAQ;GAAY;GAAW,CAAC;;;qBApMnD,cAAc;qBACd,UAAU,4BAA4B,IAAI,+BAA+B;AAuMzF,SAAS,2BAA2B,SAAkC;CAEpE,MAAM,YAAY,iBAAiB;EACjC,UAAU,QAAQ;EAClB,YAAY;EACb,CAAC;CACF,MAAM,UAAU,iBAAiB;EAAE,UAAU,QAAQ;EAAU,YAAY;EAA4B,CAAC;CACxG,MAAM,WAAW,iBAAiB;EAAE,UAAU,QAAQ;EAAU,YAAY;EAAsB,CAAC;AAGnG,QAAO,aAAa,WAAW;;AAGjC,SAAS,aAAa,oBAA+B;AAEnD,QAAOA,eAAO,SAAS,oBAAoB,QAAQ,6BAA6B;;AAGlF,SAAS,uBAAuB,UAAqB;AACnD,QAAO,iBAAiB;EAAE;EAAU,YAAY;EAAgC,CAAC"}
@@ -7,11 +7,6 @@ const require_W3cCredentialStatus = require('./models/credential/W3cCredentialSt
7
7
  const require_W3cCredentialSubject = require('./models/credential/W3cCredentialSubject.js');
8
8
  const require_W3cIssuer = require('./models/credential/W3cIssuer.js');
9
9
  const require_W3cCredential = require('./models/credential/W3cCredential.js');
10
- const require_DataIntegrityProof = require('./data-integrity/models/DataIntegrityProof.js');
11
- const require_W3cJsonLdVerifiableCredential = require('./data-integrity/models/W3cJsonLdVerifiableCredential.js');
12
- const require_util = require('./util.js');
13
- const require_W3cJwtVerifiableCredential = require('./jwt-vc/W3cJwtVerifiableCredential.js');
14
- const require_W3cVerifiableCredential = require('./models/credential/W3cVerifiableCredential.js');
15
10
  const require_W3cV2CredentialSchema = require('./models/credential/W3cV2CredentialSchema.js');
16
11
  const require_W3cV2CredentialStatus = require('./models/credential/W3cV2CredentialStatus.js');
17
12
  const require_W3cV2CredentialSubject = require('./models/credential/W3cV2CredentialSubject.js');
@@ -25,27 +20,32 @@ const require_W3cV2JwtVerifiableCredential = require('./jwt-vc/W3cV2JwtVerifiabl
25
20
  const require_W3cV2SdJwt = require('./sd-jwt-vc/W3cV2SdJwt.js');
26
21
  const require_W3cV2SdJwtVerifiableCredential = require('./sd-jwt-vc/W3cV2SdJwtVerifiableCredential.js');
27
22
  const require_W3cV2EnvelopedVerifiableCredential = require('./models/credential/W3cV2EnvelopedVerifiableCredential.js');
28
- const require_SignatureSuiteRegistry = require('./data-integrity/SignatureSuiteRegistry.js');
29
- const require_JwsLinkedDataSignature = require('./data-integrity/signature-suites/JwsLinkedDataSignature.js');
30
- const require_Ed25519Signature2018 = require('./data-integrity/signature-suites/ed25519/Ed25519Signature2018.js');
31
- const require_Ed25519Signature2020 = require('./data-integrity/signature-suites/ed25519/Ed25519Signature2020.js');
23
+ const require_DataIntegrityProof = require('./data-integrity/models/DataIntegrityProof.js');
24
+ const require_W3cJsonLdVerifiableCredential = require('./data-integrity/models/W3cJsonLdVerifiableCredential.js');
25
+ const require_deriveProof = require('./data-integrity/deriveProof.js');
32
26
  const require_index = require('./data-integrity/libraries/index.js');
27
+ const require_IAnonCredsDataIntegrityService = require('./data-integrity/models/IAnonCredsDataIntegrityService.js');
28
+ const require_LdKeyPair = require('./data-integrity/models/LdKeyPair.js');
29
+ const require_util = require('./util.js');
30
+ const require_W3cJwtVerifiableCredential = require('./jwt-vc/W3cJwtVerifiableCredential.js');
31
+ const require_W3cVerifiableCredential = require('./models/credential/W3cVerifiableCredential.js');
33
32
  const require_W3cPresentation = require('./models/presentation/W3cPresentation.js');
34
33
  const require_W3cJsonLdVerifiablePresentation = require('./data-integrity/models/W3cJsonLdVerifiablePresentation.js');
35
- const require_LdKeyPair = require('./data-integrity/models/LdKeyPair.js');
36
- const require_IAnonCredsDataIntegrityService = require('./data-integrity/models/IAnonCredsDataIntegrityService.js');
37
34
  const require_CredentialIssuancePurpose = require('./data-integrity/proof-purposes/CredentialIssuancePurpose.js');
38
- const require_deriveProof = require('./data-integrity/deriveProof.js');
35
+ const require_SignatureSuiteRegistry = require('./data-integrity/SignatureSuiteRegistry.js');
36
+ const require_JwsLinkedDataSignature = require('./data-integrity/signature-suites/JwsLinkedDataSignature.js');
37
+ const require_Ed25519Signature2018 = require('./data-integrity/signature-suites/ed25519/Ed25519Signature2018.js');
38
+ const require_Ed25519Signature2020 = require('./data-integrity/signature-suites/ed25519/Ed25519Signature2020.js');
39
39
  const require_W3cCredentialsModuleConfig = require('./W3cCredentialsModuleConfig.js');
40
40
  const require_W3cJsonLdCredentialService = require('./data-integrity/W3cJsonLdCredentialService.js');
41
41
  require('./data-integrity/index.js');
42
42
  const require_W3cJwtVerifiablePresentation = require('./jwt-vc/W3cJwtVerifiablePresentation.js');
43
43
  const require_W3cJwtCredentialService = require('./jwt-vc/W3cJwtCredentialService.js');
44
44
  const require_W3cV2Presentation = require('./models/presentation/W3cV2Presentation.js');
45
- const require_W3cV2JwtVerifiablePresentation = require('./jwt-vc/W3cV2JwtVerifiablePresentation.js');
46
45
  const require_W3cV2SdJwtVerifiablePresentation = require('./sd-jwt-vc/W3cV2SdJwtVerifiablePresentation.js');
47
46
  const require_W3cV2SdJwtCredentialService = require('./sd-jwt-vc/W3cV2SdJwtCredentialService.js');
48
47
  require('./sd-jwt-vc/index.js');
48
+ const require_W3cV2JwtVerifiablePresentation = require('./jwt-vc/W3cV2JwtVerifiablePresentation.js');
49
49
  const require_W3cV2JwtCredentialService = require('./jwt-vc/W3cV2JwtCredentialService.js');
50
50
  require('./jwt-vc/index.js');
51
51
  const require_W3cV2VerifiableCredential = require('./models/credential/W3cV2VerifiableCredential.js');
@@ -60,6 +60,6 @@ const require_W3cCredentialService = require('./W3cCredentialService.js');
60
60
  const require_W3cCredentialsApi = require('./W3cCredentialsApi.js');
61
61
  const require_W3cCredentialsModule = require('./W3cCredentialsModule.js');
62
62
  const require_W3cV2CredentialService = require('./W3cV2CredentialService.js');
63
- const require_W3cV2CredentialsApi = require('./W3cV2CredentialsApi.js');
64
63
  require('./W3cV2CredentialServiceOptions.js');
64
+ const require_W3cV2CredentialsApi = require('./W3cV2CredentialsApi.js');
65
65
  const require_W3cV2CredentialsModule = require('./W3cV2CredentialsModule.js');
@@ -7,11 +7,6 @@ import { W3cCredentialStatus } from "./models/credential/W3cCredentialStatus.mjs
7
7
  import { IsW3cCredentialSubject, W3cCredentialSubject, W3cCredentialSubjectTransformer } from "./models/credential/W3cCredentialSubject.mjs";
8
8
  import { IsW3cIssuer, W3cIssuer, W3cIssuerTransformer } from "./models/credential/W3cIssuer.mjs";
9
9
  import { W3cCredential } from "./models/credential/W3cCredential.mjs";
10
- import { DataIntegrityProof } from "./data-integrity/models/DataIntegrityProof.mjs";
11
- import { W3cJsonLdVerifiableCredential } from "./data-integrity/models/W3cJsonLdVerifiableCredential.mjs";
12
- import { w3cDate } from "./util.mjs";
13
- import { W3cJwtVerifiableCredential } from "./jwt-vc/W3cJwtVerifiableCredential.mjs";
14
- import { W3cVerifiableCredentialTransformer } from "./models/credential/W3cVerifiableCredential.mjs";
15
10
  import { W3cV2CredentialSchema } from "./models/credential/W3cV2CredentialSchema.mjs";
16
11
  import { W3cV2CredentialStatus } from "./models/credential/W3cV2CredentialStatus.mjs";
17
12
  import { W3cV2CredentialSubject } from "./models/credential/W3cV2CredentialSubject.mjs";
@@ -25,27 +20,32 @@ import { W3cV2JwtVerifiableCredential } from "./jwt-vc/W3cV2JwtVerifiableCredent
25
20
  import { decodeSdJwt, sdJwtVcHasher } from "./sd-jwt-vc/W3cV2SdJwt.mjs";
26
21
  import { W3cV2SdJwtVerifiableCredential } from "./sd-jwt-vc/W3cV2SdJwtVerifiableCredential.mjs";
27
22
  import { IsEnvelopedVerifiableCredentialType, W3cV2EnvelopedVerifiableCredential, W3cV2EnvelopedVerifiableCredentialTransformer } from "./models/credential/W3cV2EnvelopedVerifiableCredential.mjs";
28
- import { SignatureSuiteRegistry, SignatureSuiteToken } from "./data-integrity/SignatureSuiteRegistry.mjs";
29
- import { JwsLinkedDataSignature } from "./data-integrity/signature-suites/JwsLinkedDataSignature.mjs";
30
- import { Ed25519Signature2018 } from "./data-integrity/signature-suites/ed25519/Ed25519Signature2018.mjs";
31
- import { Ed25519Signature2020 } from "./data-integrity/signature-suites/ed25519/Ed25519Signature2020.mjs";
23
+ import { DataIntegrityProof } from "./data-integrity/models/DataIntegrityProof.mjs";
24
+ import { W3cJsonLdVerifiableCredential } from "./data-integrity/models/W3cJsonLdVerifiableCredential.mjs";
25
+ import { deriveProof } from "./data-integrity/deriveProof.mjs";
32
26
  import { vcLibraries } from "./data-integrity/libraries/index.mjs";
27
+ import { ANONCREDS_DATA_INTEGRITY_CRYPTOSUITE, AnonCredsDataIntegrityServiceSymbol } from "./data-integrity/models/IAnonCredsDataIntegrityService.mjs";
28
+ import { LdKeyPair } from "./data-integrity/models/LdKeyPair.mjs";
29
+ import { w3cDate } from "./util.mjs";
30
+ import { W3cJwtVerifiableCredential } from "./jwt-vc/W3cJwtVerifiableCredential.mjs";
31
+ import { W3cVerifiableCredentialTransformer } from "./models/credential/W3cVerifiableCredential.mjs";
33
32
  import { W3cPresentation } from "./models/presentation/W3cPresentation.mjs";
34
33
  import { W3cJsonLdVerifiablePresentation } from "./data-integrity/models/W3cJsonLdVerifiablePresentation.mjs";
35
- import { LdKeyPair } from "./data-integrity/models/LdKeyPair.mjs";
36
- import { ANONCREDS_DATA_INTEGRITY_CRYPTOSUITE, AnonCredsDataIntegrityServiceSymbol } from "./data-integrity/models/IAnonCredsDataIntegrityService.mjs";
37
34
  import { CredentialIssuancePurpose } from "./data-integrity/proof-purposes/CredentialIssuancePurpose.mjs";
38
- import { deriveProof } from "./data-integrity/deriveProof.mjs";
35
+ import { SignatureSuiteRegistry, SignatureSuiteToken } from "./data-integrity/SignatureSuiteRegistry.mjs";
36
+ import { JwsLinkedDataSignature } from "./data-integrity/signature-suites/JwsLinkedDataSignature.mjs";
37
+ import { Ed25519Signature2018 } from "./data-integrity/signature-suites/ed25519/Ed25519Signature2018.mjs";
38
+ import { Ed25519Signature2020 } from "./data-integrity/signature-suites/ed25519/Ed25519Signature2020.mjs";
39
39
  import { W3cCredentialsModuleConfig } from "./W3cCredentialsModuleConfig.mjs";
40
40
  import { W3cJsonLdCredentialService } from "./data-integrity/W3cJsonLdCredentialService.mjs";
41
41
  import "./data-integrity/index.mjs";
42
42
  import { W3cJwtVerifiablePresentation } from "./jwt-vc/W3cJwtVerifiablePresentation.mjs";
43
43
  import { W3cJwtCredentialService } from "./jwt-vc/W3cJwtCredentialService.mjs";
44
44
  import { W3cV2Presentation } from "./models/presentation/W3cV2Presentation.mjs";
45
- import { W3cV2JwtVerifiablePresentation } from "./jwt-vc/W3cV2JwtVerifiablePresentation.mjs";
46
45
  import { W3cV2SdJwtVerifiablePresentation } from "./sd-jwt-vc/W3cV2SdJwtVerifiablePresentation.mjs";
47
46
  import { W3cV2SdJwtCredentialService } from "./sd-jwt-vc/W3cV2SdJwtCredentialService.mjs";
48
47
  import "./sd-jwt-vc/index.mjs";
48
+ import { W3cV2JwtVerifiablePresentation } from "./jwt-vc/W3cV2JwtVerifiablePresentation.mjs";
49
49
  import { W3cV2JwtCredentialService } from "./jwt-vc/W3cV2JwtCredentialService.mjs";
50
50
  import "./jwt-vc/index.mjs";
51
51
  import { W3cV2VerifiableCredentialTransformer } from "./models/credential/W3cV2VerifiableCredential.mjs";
@@ -60,6 +60,6 @@ import { W3cCredentialService } from "./W3cCredentialService.mjs";
60
60
  import { W3cCredentialsApi } from "./W3cCredentialsApi.mjs";
61
61
  import { W3cCredentialsModule } from "./W3cCredentialsModule.mjs";
62
62
  import { W3cV2CredentialService } from "./W3cV2CredentialService.mjs";
63
- import { W3cV2CredentialsApi } from "./W3cV2CredentialsApi.mjs";
64
63
  import "./W3cV2CredentialServiceOptions.mjs";
64
+ import { W3cV2CredentialsApi } from "./W3cV2CredentialsApi.mjs";
65
65
  import { W3cV2CredentialsModule } from "./W3cV2CredentialsModule.mjs";
@@ -1,9 +1,9 @@
1
1
  import { W3cJwtVerifiableCredential } from "./W3cJwtVerifiableCredential.mjs";
2
+ import { W3cVerifyCredentialResult, W3cVerifyPresentationResult } from "../models/W3cVerifyResult.mjs";
2
3
  import { W3cJwtVerifiablePresentation } from "./W3cJwtVerifiablePresentation.mjs";
3
4
  import { W3cJwtSignCredentialOptions, W3cJwtSignPresentationOptions, W3cJwtVerifyCredentialOptions, W3cJwtVerifyPresentationOptions } from "../W3cCredentialServiceOptions.mjs";
4
- import { W3cVerifyCredentialResult, W3cVerifyPresentationResult } from "../models/W3cVerifyResult.mjs";
5
- import { AgentContext } from "../../../agent/context/AgentContext.mjs";
6
5
  import { JwsService } from "../../../crypto/JwsService.mjs";
6
+ import { AgentContext } from "../../../agent/context/AgentContext.mjs";
7
7
 
8
8
  //#region src/modules/vc/jwt-vc/W3cJwtCredentialService.d.ts
9
9
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"W3cJwtCredentialService.d.mts","names":[],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtCredentialService.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;AAiCa,cAAA,uBAAA,CAAuB;EAAA,QAAA,UAAA;aAGH,CAAA,UAAA,EAAA,UAAA;;;;gBAU5B,CAAA,YAAA,EAFa,YAEb,EAAA,OAAA,EADQ,2BACR,CAAA,EAAA,OAAA,CAAQ,0BAAR,CAAA;;;;;;;kBAiLQ,CAAA,YAAA,EAzIK,YAyIL,EAAA,OAAA,EAxIA,6BAwIA,CAAA,EAvIR,OAuIQ,CAvIA,yBAuIA,CAAA;;;;;;;iCAFK,uBACL,gCACR,QAAQ;;;;;;;mCAsCK,uBACL,kCACR,QAAQ"}
1
+ {"version":3,"file":"W3cJwtCredentialService.d.mts","names":[],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtCredentialService.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;AA+Ba,cAAA,uBAAA,CAAuB;EAAA,QAAA,UAAA;aAGH,CAAA,UAAA,EAAA,UAAA;;;;gBAU5B,CAAA,YAAA,EAFa,YAEb,EAAA,OAAA,EADQ,2BACR,CAAA,EAAA,OAAA,CAAQ,0BAAR,CAAA;;;;;;;kBAiLQ,CAAA,YAAA,EAzIK,YAyIL,EAAA,OAAA,EAxIA,6BAwIA,CAAA,EAvIR,OAuIQ,CAvIA,yBAuIA,CAAA;;;;;;;iCAFK,uBACL,gCACR,QAAQ;;;;;;;mCAsCK,uBACL,kCACR,QAAQ"}
@@ -1,9 +1,9 @@
1
1
  import { W3cJwtVerifiableCredential } from "./W3cJwtVerifiableCredential.js";
2
+ import { W3cVerifyCredentialResult, W3cVerifyPresentationResult } from "../models/W3cVerifyResult.js";
2
3
  import { W3cJwtVerifiablePresentation } from "./W3cJwtVerifiablePresentation.js";
3
4
  import { W3cJwtSignCredentialOptions, W3cJwtSignPresentationOptions, W3cJwtVerifyCredentialOptions, W3cJwtVerifyPresentationOptions } from "../W3cCredentialServiceOptions.js";
4
- import { W3cVerifyCredentialResult, W3cVerifyPresentationResult } from "../models/W3cVerifyResult.js";
5
- import { AgentContext } from "../../../agent/context/AgentContext.js";
6
5
  import { JwsService } from "../../../crypto/JwsService.js";
6
+ import { AgentContext } from "../../../agent/context/AgentContext.js";
7
7
 
8
8
  //#region src/modules/vc/jwt-vc/W3cJwtCredentialService.d.ts
9
9
 
@@ -1 +1 @@
1
- {"version":3,"file":"W3cJwtCredentialService.d.ts","names":[],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtCredentialService.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;AAgCA;;AAIiC,cAHpB,uBAAA,CAGoB;UAQf,UAAA;aACL,CAAA,UAAA,EAToB,UASpB;;;;gBA0CA,CAAA,YAAA,EA3CK,YA2CL,EAAA,OAAA,EA1CA,2BA0CA,CAAA,EAzCR,OAyCQ,CAzCA,0BAyCA,CAAA;;;;;;;kBA8KK,CAAA,YAAA,EA/KA,YA+KA,EAAA,OAAA,EA9KL,6BA8KK,CAAA,EA7Kb,OA6Ka,CA7KL,yBA6KK,CAAA;;;;;;;iCAxCA,uBACL,gCACR,QAAQ;;;;;;;mCAsCK,uBACL,kCACR,QAAQ"}
1
+ {"version":3,"file":"W3cJwtCredentialService.d.ts","names":[],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtCredentialService.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;AA8BA;;AAIiC,cAHpB,uBAAA,CAGoB;UAQf,UAAA;aACL,CAAA,UAAA,EAToB,UASpB;;;;gBA0CA,CAAA,YAAA,EA3CK,YA2CL,EAAA,OAAA,EA1CA,2BA0CA,CAAA,EAzCR,OAyCQ,CAzCA,0BAyCA,CAAA;;;;;;;kBA8KK,CAAA,YAAA,EA/KA,YA+KA,EAAA,OAAA,EA9KL,6BA8KK,CAAA,EA7Kb,OA6Ka,CA7KL,yBA6KK,CAAA;;;;;;;iCAxCA,uBACL,gCACR,QAAQ;;;;;;;mCAsCK,uBACL,kCACR,QAAQ"}
@@ -6,15 +6,15 @@ require('../../../error/index.js');
6
6
  require('../../../plugins/index.js');
7
7
  const require_decorateMetadata = require('../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
8
8
  const require_decorate = require('../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
9
- const require_MessageValidator = require('../../../utils/MessageValidator.js');
10
9
  const require_array = require('../../../utils/array.js');
11
10
  const require_did = require('../../../utils/did.js');
11
+ const require_MessageValidator = require('../../../utils/MessageValidator.js');
12
12
  require('../../../utils/index.js');
13
13
  const require_PublicJwk = require('../../kms/jwk/PublicJwk.js');
14
14
  require('../../kms/index.js');
15
15
  const require_JwsService = require('../../../crypto/JwsService.js');
16
- const require_keyDidMapping = require('../../dids/domain/key-type/keyDidMapping.js');
17
16
  const require_parse = require('../../dids/domain/parse.js');
17
+ const require_keyDidMapping = require('../../dids/domain/key-type/keyDidMapping.js');
18
18
  const require_DidResolverService = require('../../dids/services/DidResolverService.js');
19
19
  const require_DidsApi = require('../../dids/DidsApi.js');
20
20
  require('../../dids/index.js');
@@ -83,7 +83,7 @@ let W3cJwtCredentialService = class W3cJwtCredentialService$1 {
83
83
  purpose: ["assertionMethod"]
84
84
  });
85
85
  const issuerPublicKey = require_keyDidMapping.getPublicJwkFromVerificationMethod(issuerVerificationMethod);
86
- let signatureResult = void 0;
86
+ let signatureResult;
87
87
  try {
88
88
  signatureResult = await this.jwsService.verifyJws(agentContext, {
89
89
  jws: credential.jwt.serializedJwt,
@@ -182,7 +182,7 @@ let W3cJwtCredentialService = class W3cJwtCredentialService$1 {
182
182
  purpose: ["authentication"]
183
183
  });
184
184
  const proverPublicKey = require_keyDidMapping.getPublicJwkFromVerificationMethod(proverVerificationMethod);
185
- let signatureResult = void 0;
185
+ let signatureResult;
186
186
  try {
187
187
  signatureResult = await this.jwsService.verifyJws(agentContext, {
188
188
  jws: presentation.jwt.serializedJwt,
@@ -5,15 +5,15 @@ import "../../../error/index.mjs";
5
5
  import { injectable } from "../../../plugins/index.mjs";
6
6
  import { __decorateMetadata } from "../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
7
7
  import { __decorate } from "../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
8
- import { MessageValidator } from "../../../utils/MessageValidator.mjs";
9
8
  import { asArray } from "../../../utils/array.mjs";
10
9
  import { isDid } from "../../../utils/did.mjs";
10
+ import { MessageValidator } from "../../../utils/MessageValidator.mjs";
11
11
  import "../../../utils/index.mjs";
12
12
  import { PublicJwk } from "../../kms/jwk/PublicJwk.mjs";
13
13
  import "../../kms/index.mjs";
14
14
  import { JwsService } from "../../../crypto/JwsService.mjs";
15
- import { getPublicJwkFromVerificationMethod, getSupportedVerificationMethodTypesForPublicJwk } from "../../dids/domain/key-type/keyDidMapping.mjs";
16
15
  import { parseDid } from "../../dids/domain/parse.mjs";
16
+ import { getPublicJwkFromVerificationMethod, getSupportedVerificationMethodTypesForPublicJwk } from "../../dids/domain/key-type/keyDidMapping.mjs";
17
17
  import { DidResolverService } from "../../dids/services/DidResolverService.mjs";
18
18
  import { DidsApi } from "../../dids/DidsApi.mjs";
19
19
  import "../../dids/index.mjs";
@@ -80,7 +80,7 @@ let W3cJwtCredentialService = class W3cJwtCredentialService$1 {
80
80
  purpose: ["assertionMethod"]
81
81
  });
82
82
  const issuerPublicKey = getPublicJwkFromVerificationMethod(issuerVerificationMethod);
83
- let signatureResult = void 0;
83
+ let signatureResult;
84
84
  try {
85
85
  signatureResult = await this.jwsService.verifyJws(agentContext, {
86
86
  jws: credential.jwt.serializedJwt,
@@ -179,7 +179,7 @@ let W3cJwtCredentialService = class W3cJwtCredentialService$1 {
179
179
  purpose: ["authentication"]
180
180
  });
181
181
  const proverPublicKey = getPublicJwkFromVerificationMethod(proverVerificationMethod);
182
- let signatureResult = void 0;
182
+ let signatureResult;
183
183
  try {
184
184
  signatureResult = await this.jwsService.verifyJws(agentContext, {
185
185
  jws: presentation.jwt.serializedJwt,
@@ -1 +1 @@
1
- {"version":3,"file":"W3cJwtCredentialService.mjs","names":["W3cJwtCredentialService","validationResults: W3cVerifyCredentialResult","credential: W3cJwtVerifiableCredential","signatureResult: VerifyJwsResult | undefined","validationResults: W3cVerifyPresentationResult","presentation: W3cJwtVerifiablePresentation","credentialSubjectAuthentication: SingleValidationResult","verificationMethod: VerificationMethod"],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtCredentialService.ts"],"sourcesContent":["import type { AgentContext } from '../../../agent/context'\nimport type { VerifyJwsResult } from '../../../crypto/JwsService'\nimport type { DidPurpose, VerificationMethod } from '../../dids'\nimport type {\n W3cJwtSignCredentialOptions,\n W3cJwtSignPresentationOptions,\n W3cJwtVerifyCredentialOptions,\n W3cJwtVerifyPresentationOptions,\n} from '../W3cCredentialServiceOptions'\nimport type { SingleValidationResult, W3cVerifyCredentialResult, W3cVerifyPresentationResult } from '../models'\n\nimport { JwsService } from '../../../crypto/JwsService'\nimport { CredoError } from '../../../error'\nimport { injectable } from '../../../plugins'\nimport { MessageValidator, asArray, isDid } from '../../../utils'\nimport { DidResolverService, DidsApi, parseDid } from '../../dids'\nimport { W3cJsonLdVerifiableCredential } from '../data-integrity'\n\nimport {\n getPublicJwkFromVerificationMethod,\n getSupportedVerificationMethodTypesForPublicJwk,\n} from '../../dids/domain/key-type/keyDidMapping'\nimport { type KnownJwaSignatureAlgorithm, PublicJwk } from '../../kms'\nimport { W3cJwtVerifiableCredential } from './W3cJwtVerifiableCredential'\nimport { W3cJwtVerifiablePresentation } from './W3cJwtVerifiablePresentation'\nimport { getJwtPayloadFromCredential } from './credentialTransformer'\nimport { getJwtPayloadFromPresentation } from './presentationTransformer'\n\n/**\n * Supports signing and verification of credentials according to the [Verifiable Credential Data Model](https://www.w3.org/TR/vc-data-model)\n * using [Json Web Tokens](https://www.w3.org/TR/vc-data-model/#json-web-token).\n */\n@injectable()\nexport class W3cJwtCredentialService {\n private jwsService: JwsService\n\n public constructor(jwsService: JwsService) {\n this.jwsService = jwsService\n }\n\n /**\n * Signs a credential\n */\n public async signCredential(\n agentContext: AgentContext,\n options: W3cJwtSignCredentialOptions\n ): Promise<W3cJwtVerifiableCredential> {\n // Validate the instance\n MessageValidator.validateSync(options.credential)\n\n // Get the JWT payload for the JWT based on the JWT Encoding rules form the VC-DATA-MODEL\n // https://www.w3.org/TR/vc-data-model/#jwt-encoding\n const jwtPayload = getJwtPayloadFromCredential(options.credential)\n\n if (!isDid(options.verificationMethod)) {\n throw new CredoError('Only did identifiers are supported as verification method')\n }\n\n const publicJwk = await this.resolveVerificationMethod(agentContext, options.verificationMethod, [\n 'assertionMethod',\n ])\n\n const jwt = await this.jwsService.createJwsCompact(agentContext, {\n payload: jwtPayload,\n keyId: publicJwk.keyId,\n protectedHeaderOptions: {\n typ: 'JWT',\n alg: options.alg,\n kid: options.verificationMethod,\n },\n })\n\n // TODO: this re-parses and validates the credential in the JWT, which is not necessary.\n // We should somehow create an instance of W3cJwtVerifiableCredential directly from the JWT\n const jwtVc = W3cJwtVerifiableCredential.fromSerializedJwt(jwt)\n\n return jwtVc\n }\n\n /**\n * Verifies the signature(s) of a credential\n *\n * @param credential the credential to be verified\n * @returns the verification result\n */\n public async verifyCredential(\n agentContext: AgentContext,\n options: W3cJwtVerifyCredentialOptions\n ): Promise<W3cVerifyCredentialResult> {\n // NOTE: this is mostly from the JSON-LD service that adds this option. Once we support\n // the same granular validation results, we can remove this and the user could just check\n // which of the validations failed. Supporting for consistency with the JSON-LD service for now.\n const verifyCredentialStatus = options.verifyCredentialStatus ?? true\n\n const validationResults: W3cVerifyCredentialResult = {\n isValid: false,\n validations: {},\n }\n\n try {\n let credential: W3cJwtVerifiableCredential\n try {\n // If instance is provided as input, we want to validate the credential (otherwise it's done in the fromSerializedJwt method below)\n if (options.credential instanceof W3cJwtVerifiableCredential) {\n MessageValidator.validateSync(options.credential.credential)\n }\n\n credential =\n options.credential instanceof W3cJwtVerifiableCredential\n ? options.credential\n : W3cJwtVerifiableCredential.fromSerializedJwt(options.credential)\n\n // Verify the JWT payload (verifies whether it's not expired, etc...)\n credential.jwt.payload.validate()\n\n validationResults.validations.dataModel = {\n isValid: true,\n }\n } catch (error) {\n validationResults.validations.dataModel = {\n isValid: false,\n error,\n }\n\n return validationResults\n }\n\n const issuerVerificationMethod = await this.getVerificationMethodForJwtCredential(agentContext, {\n credential,\n purpose: ['assertionMethod'],\n })\n const issuerPublicKey = getPublicJwkFromVerificationMethod(issuerVerificationMethod)\n\n let signatureResult: VerifyJwsResult | undefined = undefined\n try {\n // Verify the JWS signature\n signatureResult = await this.jwsService.verifyJws(agentContext, {\n jws: credential.jwt.serializedJwt,\n // We have pre-fetched the key based on the issuer/signer of the credential\n jwsSigner: {\n method: 'did',\n jwk: issuerPublicKey,\n didUrl: issuerVerificationMethod.id,\n },\n })\n\n if (!signatureResult.isValid) {\n validationResults.validations.signature = {\n isValid: false,\n error: new CredoError('Invalid JWS signature'),\n }\n } else {\n validationResults.validations.signature = {\n isValid: true,\n }\n }\n } catch (error) {\n validationResults.validations.signature = {\n isValid: false,\n error,\n }\n }\n\n // Validate whether the credential is signed with the 'issuer' id\n // NOTE: this uses the verificationMethod.controller. We may want to use the verificationMethod.id?\n if (credential.issuerId !== issuerVerificationMethod.controller) {\n validationResults.validations.issuerIsSigner = {\n isValid: false,\n error: new CredoError(\n `Credential is signed using verification method ${issuerVerificationMethod.id}, while the issuer of the credential is '${credential.issuerId}'`\n ),\n }\n } else {\n validationResults.validations.issuerIsSigner = {\n isValid: true,\n }\n }\n\n // Validate whether the `issuer` of the credential is also the signer\n const issuerIsSigner = signatureResult?.jwsSigners.some(\n (jwsSigner) => jwsSigner.jwk.fingerprint === issuerPublicKey.fingerprint\n )\n if (!issuerIsSigner) {\n validationResults.validations.issuerIsSigner = {\n isValid: false,\n error: new CredoError('Credential is not signed by the issuer of the credential'),\n }\n } else {\n validationResults.validations.issuerIsSigner = {\n isValid: true,\n }\n }\n\n // Validate credentialStatus\n if (verifyCredentialStatus && !credential.credentialStatus) {\n validationResults.validations.credentialStatus = {\n isValid: true,\n }\n } else if (verifyCredentialStatus && credential.credentialStatus) {\n validationResults.validations.credentialStatus = {\n isValid: false,\n error: new CredoError('Verifying credential status is not supported for JWT VCs'),\n }\n }\n\n validationResults.isValid = Object.values(validationResults.validations).every((v) => v.isValid)\n\n return validationResults\n } catch (error) {\n validationResults.error = error\n return validationResults\n }\n }\n\n /**\n * Signs a presentation including the credentials it includes\n *\n * @param presentation the presentation to be signed\n * @returns the signed presentation\n */\n public async signPresentation(\n agentContext: AgentContext,\n options: W3cJwtSignPresentationOptions\n ): Promise<W3cJwtVerifiablePresentation> {\n // Validate the instance\n MessageValidator.validateSync(options.presentation)\n\n // Get the JWT payload for the JWT based on the JWT Encoding rules form the VC-DATA-MODEL\n // https://www.w3.org/TR/vc-data-model/#jwt-encoding\n const jwtPayload = getJwtPayloadFromPresentation(options.presentation)\n\n // Set the nonce so it's included in the signature\n jwtPayload.additionalClaims.nonce = options.challenge\n jwtPayload.aud = options.domain\n\n const publicJwk = await this.resolveVerificationMethod(agentContext, options.verificationMethod, ['authentication'])\n\n const jwt = await this.jwsService.createJwsCompact(agentContext, {\n payload: jwtPayload,\n keyId: publicJwk.keyId,\n protectedHeaderOptions: {\n typ: 'JWT',\n alg: options.alg,\n kid: options.verificationMethod,\n },\n })\n\n // TODO: this re-parses and validates the presentation in the JWT, which is not necessary.\n // We should somehow create an instance of W3cJwtVerifiablePresentation directly from the JWT\n const jwtVp = W3cJwtVerifiablePresentation.fromSerializedJwt(jwt)\n\n return jwtVp\n }\n\n /**\n * Verifies a presentation including the credentials it includes\n *\n * @param presentation the presentation to be verified\n * @returns the verification result\n */\n public async verifyPresentation(\n agentContext: AgentContext,\n options: W3cJwtVerifyPresentationOptions\n ): Promise<W3cVerifyPresentationResult> {\n const validationResults: W3cVerifyPresentationResult = {\n isValid: false,\n validations: {},\n }\n\n try {\n let presentation: W3cJwtVerifiablePresentation\n try {\n // If instance is provided as input, we want to validate the presentation\n if (options.presentation instanceof W3cJwtVerifiablePresentation) {\n MessageValidator.validateSync(options.presentation.presentation)\n }\n\n presentation =\n options.presentation instanceof W3cJwtVerifiablePresentation\n ? options.presentation\n : W3cJwtVerifiablePresentation.fromSerializedJwt(options.presentation)\n\n // Verify the JWT payload (verifies whether it's not expired, etc...)\n presentation.jwt.payload.validate()\n\n // Make sure challenge matches nonce\n if (options.challenge !== presentation.jwt.payload.additionalClaims.nonce) {\n throw new CredoError(`JWT payload 'nonce' does not match challenge '${options.challenge}'`)\n }\n\n const audArray = asArray(presentation.jwt.payload.aud)\n if (options.domain && !audArray.includes(options.domain)) {\n throw new CredoError(`JWT payload 'aud' does not include domain '${options.domain}'`)\n }\n\n validationResults.validations.dataModel = {\n isValid: true,\n }\n } catch (error) {\n validationResults.validations.dataModel = {\n isValid: false,\n error,\n }\n\n return validationResults\n }\n\n const proverVerificationMethod = await this.getVerificationMethodForJwtCredential(agentContext, {\n credential: presentation,\n purpose: ['authentication'],\n })\n const proverPublicKey = getPublicJwkFromVerificationMethod(proverVerificationMethod)\n\n let signatureResult: VerifyJwsResult | undefined = undefined\n try {\n // Verify the JWS signature\n signatureResult = await this.jwsService.verifyJws(agentContext, {\n jws: presentation.jwt.serializedJwt,\n allowedJwsSignerMethods: ['did'],\n jwsSigner: {\n method: 'did',\n didUrl: proverVerificationMethod.id,\n jwk: proverPublicKey,\n },\n trustedCertificates: [],\n })\n\n if (!signatureResult.isValid) {\n validationResults.validations.presentationSignature = {\n isValid: false,\n error: new CredoError('Invalid JWS signature on presentation'),\n }\n } else {\n validationResults.validations.presentationSignature = {\n isValid: true,\n }\n }\n } catch (error) {\n validationResults.validations.presentationSignature = {\n isValid: false,\n error,\n }\n }\n\n // Validate whether the presentation is signed with the 'holder' id\n // NOTE: this uses the verificationMethod.controller. We may want to use the verificationMethod.id?\n if (presentation.holderId && proverVerificationMethod.controller !== presentation.holderId) {\n validationResults.validations.holderIsSigner = {\n isValid: false,\n error: new CredoError(\n `Presentation is signed using verification method ${proverVerificationMethod.id}, while the holder of the presentation is '${presentation.holderId}'`\n ),\n }\n } else {\n // If no holderId is present, this validation passes by default as there can't be\n // a mismatch between the 'holder' property and the signer of the presentation.\n validationResults.validations.holderIsSigner = {\n isValid: true,\n }\n }\n\n // To keep things simple, we only support JWT VCs in JWT VPs for now\n const credentials = asArray(presentation.presentation.verifiableCredential)\n\n // Verify all credentials in parallel, and await the result\n validationResults.validations.credentials = await Promise.all(\n credentials.map(async (credential) => {\n if (credential instanceof W3cJsonLdVerifiableCredential) {\n return {\n isValid: false,\n error: new CredoError(\n 'Credential is of format ldp_vc. presentations in jwt_vp format can only contain credentials in jwt_vc format'\n ),\n validations: {},\n }\n }\n\n const credentialResult = await this.verifyCredential(agentContext, {\n credential,\n verifyCredentialStatus: options.verifyCredentialStatus,\n })\n\n let credentialSubjectAuthentication: SingleValidationResult\n\n // Check whether any of the credentialSubjectIds for each credential is the same as the controller of the verificationMethod\n // This authenticates the presentation creator controls one of the credentialSubject ids.\n // NOTE: this doesn't take into account the case where the credentialSubject is no the holder. In the\n // future we can add support for other flows, but for now this is the most common use case.\n // TODO: should this be handled on a higher level? I don't really see it being handled in the jsonld lib\n // or in the did-jwt-vc lib (it seems they don't even verify the credentials itself), but we probably need some\n // more experience on the use cases before we loosen the restrictions (as it means we need to handle it on a higher layer).\n const credentialSubjectIds = credential.credentialSubjectIds\n const presentationAuthenticatesCredentialSubject = credentialSubjectIds.some(\n (subjectId) => proverVerificationMethod.controller === subjectId\n )\n\n if (credentialSubjectIds.length > 0 && !presentationAuthenticatesCredentialSubject) {\n credentialSubjectAuthentication = {\n isValid: false,\n error: new CredoError(\n 'Credential has one or more credentialSubject ids, but presentation does not authenticate credential subject'\n ),\n }\n } else {\n credentialSubjectAuthentication = {\n isValid: true,\n }\n }\n\n return {\n ...credentialResult,\n isValid: credentialResult.isValid && credentialSubjectAuthentication.isValid,\n validations: {\n ...credentialResult.validations,\n credentialSubjectAuthentication,\n },\n }\n })\n )\n\n // Deeply nested check whether all validations have passed\n validationResults.isValid = Object.values(validationResults.validations).every((v) =>\n Array.isArray(v) ? v.every((vv) => vv.isValid) : v.isValid\n )\n\n return validationResults\n } catch (error) {\n validationResults.error = error\n return validationResults\n }\n }\n\n private async resolveVerificationMethod(\n agentContext: AgentContext,\n verificationMethod: string,\n allowsPurposes?: DidPurpose[]\n ): Promise<PublicJwk> {\n const dids = agentContext.resolve(DidsApi)\n\n const parsedDid = parseDid(verificationMethod)\n const { didDocument, keys } = await dids.resolveCreatedDidDocumentWithKeys(parsedDid.did)\n const verificationMethodObject = didDocument.dereferenceKey(verificationMethod, allowsPurposes)\n const publicJwk = getPublicJwkFromVerificationMethod(verificationMethodObject)\n\n publicJwk.keyId =\n keys?.find(({ didDocumentRelativeKeyId }) => verificationMethodObject.id.endsWith(didDocumentRelativeKeyId))\n ?.kmsKeyId ?? publicJwk.legacyKeyId\n\n return publicJwk\n }\n\n /**\n * This method tries to find the verification method associated with the JWT credential or presentation.\n * This verification method can then be used to verify the credential or presentation signature.\n *\n * The following methods are used to extract the verification method:\n * - verification method is resolved based on the `kid` in the protected header\n * - either as absolute reference (e.g. `did:example:123#key-1`)\n * - or as relative reference to the `iss` of the JWT (e.g. `iss` is `did:example:123` and `kid` is `#key-1`)\n * - the did document is resolved based on the `iss` field, after which the verification method is extracted based on the `alg`\n * used to sign the JWT and the specified `purpose`. Only a single verification method may be present, and in all other cases,\n * an error is thrown.\n *\n * The signer (`iss`) of the JWT is verified against the `controller` of the verificationMethod resolved in the did\n * document. This means if the `iss` of a credential is `did:example:123` and the controller of the verificationMethod\n * is `did:example:456`, an error is thrown to prevent the JWT from successfully being verified.\n *\n * In addition the JWT must conform to one of the following rules:\n * - MUST be a credential and have an `iss` field and MAY have an absolute or relative `kid`\n * - MUST not be a credential AND ONE of the following:\n * - have an `iss` field and MAY have an absolute or relative `kid`\n * - does not have an `iss` field and MUST have an absolute `kid`\n */\n private async getVerificationMethodForJwtCredential(\n agentContext: AgentContext,\n options: {\n credential: W3cJwtVerifiableCredential | W3cJwtVerifiablePresentation\n purpose?: DidPurpose[]\n }\n ) {\n const { credential, purpose } = options\n const kid = credential.jwt.header.kid\n\n const didResolver = agentContext.dependencyManager.resolve(DidResolverService)\n\n // The signerId is the `holder` of the presentation or the `issuer` of the credential\n // For a credential only the `iss` COULD be enough to resolve the signer key (see method comments)\n const signerId = credential.jwt.payload.iss\n\n let verificationMethod: VerificationMethod\n\n // If the kid starts with # we assume it is a relative did url, and we resolve it based on the `iss` and the `kid`\n if (kid?.startsWith('#')) {\n if (!signerId) {\n throw new CredoError(`JWT 'kid' MUST be absolute when when no 'iss' is present in JWT payload`)\n }\n\n const didDocument = await didResolver.resolveDidDocument(agentContext, signerId)\n verificationMethod = didDocument.dereferenceKey(`${signerId}${kid}`, purpose)\n }\n // this is a full did url (todo check if it contains a #)\n else if (kid && isDid(kid)) {\n const didDocument = await didResolver.resolveDidDocument(agentContext, kid)\n\n verificationMethod = didDocument.dereferenceKey(kid, purpose)\n\n if (signerId && didDocument.id !== signerId) {\n throw new CredoError(`kid '${kid}' does not match id of signer (holder/issuer) '${signerId}'`)\n }\n } else {\n if (!signerId) {\n throw new CredoError(`JWT 'iss' MUST be present in payload when no 'kid' is specified`)\n }\n\n // Find the verificationMethod in the did document based on the alg and proofPurpose\n const jwkClass = PublicJwk.supportedPublicJwkClassForSignatureAlgorithm(\n credential.jwt.header.alg as KnownJwaSignatureAlgorithm\n )\n const supportedVerificationMethodTypes = getSupportedVerificationMethodTypesForPublicJwk(jwkClass)\n\n const didDocument = await didResolver.resolveDidDocument(agentContext, signerId)\n const verificationMethods =\n didDocument.assertionMethod\n ?.map((v) => (typeof v === 'string' ? didDocument.dereferenceVerificationMethod(v) : v))\n .filter((v) => supportedVerificationMethodTypes.includes(v.type)) ?? []\n\n if (verificationMethods.length === 0) {\n throw new CredoError(\n `No verification methods found for signer '${signerId}' and key type '${jwkClass.name}' for alg '${credential.jwt.header.alg}'. Unable to determine which public key is associated with the credential.`\n )\n }\n if (verificationMethods.length > 1) {\n throw new CredoError(\n `Multiple verification methods found for signer '${signerId}' and key type '${jwkClass.name}' for alg '${credential.jwt.header.alg}'. Unable to determine which public key is associated with the credential.`\n )\n }\n\n verificationMethod = verificationMethods[0]\n }\n\n // Verify the controller of the verificationMethod matches the signer of the credential\n if (signerId && verificationMethod.controller !== signerId) {\n throw new CredoError(\n `Verification method controller '${verificationMethod.controller}' does not match the signer '${signerId}'`\n )\n }\n\n return verificationMethod\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCO,oCAAMA,0BAAwB;CAGnC,AAAO,YAAY,YAAwB;AACzC,OAAK,aAAa;;;;;CAMpB,MAAa,eACX,cACA,SACqC;AAErC,mBAAiB,aAAa,QAAQ,WAAW;EAIjD,MAAM,aAAa,4BAA4B,QAAQ,WAAW;AAElE,MAAI,CAAC,MAAM,QAAQ,mBAAmB,CACpC,OAAM,IAAI,WAAW,4DAA4D;EAGnF,MAAM,YAAY,MAAM,KAAK,0BAA0B,cAAc,QAAQ,oBAAoB,CAC/F,kBACD,CAAC;EAEF,MAAM,MAAM,MAAM,KAAK,WAAW,iBAAiB,cAAc;GAC/D,SAAS;GACT,OAAO,UAAU;GACjB,wBAAwB;IACtB,KAAK;IACL,KAAK,QAAQ;IACb,KAAK,QAAQ;IACd;GACF,CAAC;AAMF,SAFc,2BAA2B,kBAAkB,IAAI;;;;;;;;CAWjE,MAAa,iBACX,cACA,SACoC;EAIpC,MAAM,yBAAyB,QAAQ,0BAA0B;EAEjE,MAAMC,oBAA+C;GACnD,SAAS;GACT,aAAa,EAAE;GAChB;AAED,MAAI;GACF,IAAIC;AACJ,OAAI;AAEF,QAAI,QAAQ,sBAAsB,2BAChC,kBAAiB,aAAa,QAAQ,WAAW,WAAW;AAG9D,iBACE,QAAQ,sBAAsB,6BAC1B,QAAQ,aACR,2BAA2B,kBAAkB,QAAQ,WAAW;AAGtE,eAAW,IAAI,QAAQ,UAAU;AAEjC,sBAAkB,YAAY,YAAY,EACxC,SAAS,MACV;YACM,OAAO;AACd,sBAAkB,YAAY,YAAY;KACxC,SAAS;KACT;KACD;AAED,WAAO;;GAGT,MAAM,2BAA2B,MAAM,KAAK,sCAAsC,cAAc;IAC9F;IACA,SAAS,CA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AC,SACH,OAAM,IAAI,WAAW,kEAAkE;GAIzF,MAAM,WAAW,UAAU,6CACzB,WAAW,IAAI,OAAO,IACvB;GACD,MAAM,mCAAmC,gDAAgD,SAAS;GAElG,MAAM,cAAc,MAAM,YAAY,mBAAmB,cAAc,SAAS;GAChF,MAAM,sBACJ,YAAY,iBACR,KAAK,MAAO,OAAO,MAAM,WAAW,YAAY,8BAA8B,EAAE,GAAG,EAAG,CACvF,QAAQ,MAAM,iCAAiC,SAAS,EAAE,KAAK,CAAC,IAAI,EAAE;AAE3E,OAAI,oBAAoB,WAAW,EACjC,OAAM,IAAI,WACR,6CAA6C,SAAS,kBAAkB,SAAS,KAAK,aAAa,WAAW,IAAI,OAAO,IAAI,4EAC9H;AAEH,OAAI,oBAAoB,SAAS,EAC/B,OAAM,IAAI,WACR,mDAAmD,SAAS,kBAAkB,SAAS,KAAK,aAAa,WAAW,IAAI,OAAO,IAAI,4EACpI;AAGH,wBAAqB,oBAAoB;;AAI3C,MAAI,YAAY,mBAAmB,eAAe,SAChD,OAAM,IAAI,WACR,mCAAmC,mBAAmB,WAAW,+BAA+B,SAAS,GAC1G;AAGH,SAAO;;;sCAngBV,YAAY"}
1
+ {"version":3,"file":"W3cJwtCredentialService.mjs","names":["W3cJwtCredentialService","validationResults: W3cVerifyCredentialResult","credential: W3cJwtVerifiableCredential","signatureResult: VerifyJwsResult | undefined","validationResults: W3cVerifyPresentationResult","presentation: W3cJwtVerifiablePresentation","credentialSubjectAuthentication: SingleValidationResult","verificationMethod: VerificationMethod"],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtCredentialService.ts"],"sourcesContent":["import type { AgentContext } from '../../../agent/context'\nimport type { VerifyJwsResult } from '../../../crypto/JwsService'\nimport { JwsService } from '../../../crypto/JwsService'\nimport { CredoError } from '../../../error'\nimport { injectable } from '../../../plugins'\nimport { asArray, isDid, MessageValidator } from '../../../utils'\nimport type { DidPurpose, VerificationMethod } from '../../dids'\nimport { DidResolverService, DidsApi, parseDid } from '../../dids'\nimport {\n getPublicJwkFromVerificationMethod,\n getSupportedVerificationMethodTypesForPublicJwk,\n} from '../../dids/domain/key-type/keyDidMapping'\nimport { type KnownJwaSignatureAlgorithm, PublicJwk } from '../../kms'\nimport { W3cJsonLdVerifiableCredential } from '../data-integrity'\nimport type { SingleValidationResult, W3cVerifyCredentialResult, W3cVerifyPresentationResult } from '../models'\nimport type {\n W3cJwtSignCredentialOptions,\n W3cJwtSignPresentationOptions,\n W3cJwtVerifyCredentialOptions,\n W3cJwtVerifyPresentationOptions,\n} from '../W3cCredentialServiceOptions'\nimport { getJwtPayloadFromCredential } from './credentialTransformer'\nimport { getJwtPayloadFromPresentation } from './presentationTransformer'\nimport { W3cJwtVerifiableCredential } from './W3cJwtVerifiableCredential'\nimport { W3cJwtVerifiablePresentation } from './W3cJwtVerifiablePresentation'\n\n/**\n * Supports signing and verification of credentials according to the [Verifiable Credential Data Model](https://www.w3.org/TR/vc-data-model)\n * using [Json Web Tokens](https://www.w3.org/TR/vc-data-model/#json-web-token).\n */\n@injectable()\nexport class W3cJwtCredentialService {\n private jwsService: JwsService\n\n public constructor(jwsService: JwsService) {\n this.jwsService = jwsService\n }\n\n /**\n * Signs a credential\n */\n public async signCredential(\n agentContext: AgentContext,\n options: W3cJwtSignCredentialOptions\n ): Promise<W3cJwtVerifiableCredential> {\n // Validate the instance\n MessageValidator.validateSync(options.credential)\n\n // Get the JWT payload for the JWT based on the JWT Encoding rules form the VC-DATA-MODEL\n // https://www.w3.org/TR/vc-data-model/#jwt-encoding\n const jwtPayload = getJwtPayloadFromCredential(options.credential)\n\n if (!isDid(options.verificationMethod)) {\n throw new CredoError('Only did identifiers are supported as verification method')\n }\n\n const publicJwk = await this.resolveVerificationMethod(agentContext, options.verificationMethod, [\n 'assertionMethod',\n ])\n\n const jwt = await this.jwsService.createJwsCompact(agentContext, {\n payload: jwtPayload,\n keyId: publicJwk.keyId,\n protectedHeaderOptions: {\n typ: 'JWT',\n alg: options.alg,\n kid: options.verificationMethod,\n },\n })\n\n // TODO: this re-parses and validates the credential in the JWT, which is not necessary.\n // We should somehow create an instance of W3cJwtVerifiableCredential directly from the JWT\n const jwtVc = W3cJwtVerifiableCredential.fromSerializedJwt(jwt)\n\n return jwtVc\n }\n\n /**\n * Verifies the signature(s) of a credential\n *\n * @param credential the credential to be verified\n * @returns the verification result\n */\n public async verifyCredential(\n agentContext: AgentContext,\n options: W3cJwtVerifyCredentialOptions\n ): Promise<W3cVerifyCredentialResult> {\n // NOTE: this is mostly from the JSON-LD service that adds this option. Once we support\n // the same granular validation results, we can remove this and the user could just check\n // which of the validations failed. Supporting for consistency with the JSON-LD service for now.\n const verifyCredentialStatus = options.verifyCredentialStatus ?? true\n\n const validationResults: W3cVerifyCredentialResult = {\n isValid: false,\n validations: {},\n }\n\n try {\n let credential: W3cJwtVerifiableCredential\n try {\n // If instance is provided as input, we want to validate the credential (otherwise it's done in the fromSerializedJwt method below)\n if (options.credential instanceof W3cJwtVerifiableCredential) {\n MessageValidator.validateSync(options.credential.credential)\n }\n\n credential =\n options.credential instanceof W3cJwtVerifiableCredential\n ? options.credential\n : W3cJwtVerifiableCredential.fromSerializedJwt(options.credential)\n\n // Verify the JWT payload (verifies whether it's not expired, etc...)\n credential.jwt.payload.validate()\n\n validationResults.validations.dataModel = {\n isValid: true,\n }\n } catch (error) {\n validationResults.validations.dataModel = {\n isValid: false,\n error,\n }\n\n return validationResults\n }\n\n const issuerVerificationMethod = await this.getVerificationMethodForJwtCredential(agentContext, {\n credential,\n purpose: ['assertionMethod'],\n })\n const issuerPublicKey = getPublicJwkFromVerificationMethod(issuerVerificationMethod)\n\n let signatureResult: VerifyJwsResult | undefined\n try {\n // Verify the JWS signature\n signatureResult = await this.jwsService.verifyJws(agentContext, {\n jws: credential.jwt.serializedJwt,\n // We have pre-fetched the key based on the issuer/signer of the credential\n jwsSigner: {\n method: 'did',\n jwk: issuerPublicKey,\n didUrl: issuerVerificationMethod.id,\n },\n })\n\n if (!signatureResult.isValid) {\n validationResults.validations.signature = {\n isValid: false,\n error: new CredoError('Invalid JWS signature'),\n }\n } else {\n validationResults.validations.signature = {\n isValid: true,\n }\n }\n } catch (error) {\n validationResults.validations.signature = {\n isValid: false,\n error,\n }\n }\n\n // Validate whether the credential is signed with the 'issuer' id\n // NOTE: this uses the verificationMethod.controller. We may want to use the verificationMethod.id?\n if (credential.issuerId !== issuerVerificationMethod.controller) {\n validationResults.validations.issuerIsSigner = {\n isValid: false,\n error: new CredoError(\n `Credential is signed using verification method ${issuerVerificationMethod.id}, while the issuer of the credential is '${credential.issuerId}'`\n ),\n }\n } else {\n validationResults.validations.issuerIsSigner = {\n isValid: true,\n }\n }\n\n // Validate whether the `issuer` of the credential is also the signer\n const issuerIsSigner = signatureResult?.jwsSigners.some(\n (jwsSigner) => jwsSigner.jwk.fingerprint === issuerPublicKey.fingerprint\n )\n if (!issuerIsSigner) {\n validationResults.validations.issuerIsSigner = {\n isValid: false,\n error: new CredoError('Credential is not signed by the issuer of the credential'),\n }\n } else {\n validationResults.validations.issuerIsSigner = {\n isValid: true,\n }\n }\n\n // Validate credentialStatus\n if (verifyCredentialStatus && !credential.credentialStatus) {\n validationResults.validations.credentialStatus = {\n isValid: true,\n }\n } else if (verifyCredentialStatus && credential.credentialStatus) {\n validationResults.validations.credentialStatus = {\n isValid: false,\n error: new CredoError('Verifying credential status is not supported for JWT VCs'),\n }\n }\n\n validationResults.isValid = Object.values(validationResults.validations).every((v) => v.isValid)\n\n return validationResults\n } catch (error) {\n validationResults.error = error\n return validationResults\n }\n }\n\n /**\n * Signs a presentation including the credentials it includes\n *\n * @param presentation the presentation to be signed\n * @returns the signed presentation\n */\n public async signPresentation(\n agentContext: AgentContext,\n options: W3cJwtSignPresentationOptions\n ): Promise<W3cJwtVerifiablePresentation> {\n // Validate the instance\n MessageValidator.validateSync(options.presentation)\n\n // Get the JWT payload for the JWT based on the JWT Encoding rules form the VC-DATA-MODEL\n // https://www.w3.org/TR/vc-data-model/#jwt-encoding\n const jwtPayload = getJwtPayloadFromPresentation(options.presentation)\n\n // Set the nonce so it's included in the signature\n jwtPayload.additionalClaims.nonce = options.challenge\n jwtPayload.aud = options.domain\n\n const publicJwk = await this.resolveVerificationMethod(agentContext, options.verificationMethod, ['authentication'])\n\n const jwt = await this.jwsService.createJwsCompact(agentContext, {\n payload: jwtPayload,\n keyId: publicJwk.keyId,\n protectedHeaderOptions: {\n typ: 'JWT',\n alg: options.alg,\n kid: options.verificationMethod,\n },\n })\n\n // TODO: this re-parses and validates the presentation in the JWT, which is not necessary.\n // We should somehow create an instance of W3cJwtVerifiablePresentation directly from the JWT\n const jwtVp = W3cJwtVerifiablePresentation.fromSerializedJwt(jwt)\n\n return jwtVp\n }\n\n /**\n * Verifies a presentation including the credentials it includes\n *\n * @param presentation the presentation to be verified\n * @returns the verification result\n */\n public async verifyPresentation(\n agentContext: AgentContext,\n options: W3cJwtVerifyPresentationOptions\n ): Promise<W3cVerifyPresentationResult> {\n const validationResults: W3cVerifyPresentationResult = {\n isValid: false,\n validations: {},\n }\n\n try {\n let presentation: W3cJwtVerifiablePresentation\n try {\n // If instance is provided as input, we want to validate the presentation\n if (options.presentation instanceof W3cJwtVerifiablePresentation) {\n MessageValidator.validateSync(options.presentation.presentation)\n }\n\n presentation =\n options.presentation instanceof W3cJwtVerifiablePresentation\n ? options.presentation\n : W3cJwtVerifiablePresentation.fromSerializedJwt(options.presentation)\n\n // Verify the JWT payload (verifies whether it's not expired, etc...)\n presentation.jwt.payload.validate()\n\n // Make sure challenge matches nonce\n if (options.challenge !== presentation.jwt.payload.additionalClaims.nonce) {\n throw new CredoError(`JWT payload 'nonce' does not match challenge '${options.challenge}'`)\n }\n\n const audArray = asArray(presentation.jwt.payload.aud)\n if (options.domain && !audArray.includes(options.domain)) {\n throw new CredoError(`JWT payload 'aud' does not include domain '${options.domain}'`)\n }\n\n validationResults.validations.dataModel = {\n isValid: true,\n }\n } catch (error) {\n validationResults.validations.dataModel = {\n isValid: false,\n error,\n }\n\n return validationResults\n }\n\n const proverVerificationMethod = await this.getVerificationMethodForJwtCredential(agentContext, {\n credential: presentation,\n purpose: ['authentication'],\n })\n const proverPublicKey = getPublicJwkFromVerificationMethod(proverVerificationMethod)\n\n let signatureResult: VerifyJwsResult | undefined\n try {\n // Verify the JWS signature\n signatureResult = await this.jwsService.verifyJws(agentContext, {\n jws: presentation.jwt.serializedJwt,\n allowedJwsSignerMethods: ['did'],\n jwsSigner: {\n method: 'did',\n didUrl: proverVerificationMethod.id,\n jwk: proverPublicKey,\n },\n trustedCertificates: [],\n })\n\n if (!signatureResult.isValid) {\n validationResults.validations.presentationSignature = {\n isValid: false,\n error: new CredoError('Invalid JWS signature on presentation'),\n }\n } else {\n validationResults.validations.presentationSignature = {\n isValid: true,\n }\n }\n } catch (error) {\n validationResults.validations.presentationSignature = {\n isValid: false,\n error,\n }\n }\n\n // Validate whether the presentation is signed with the 'holder' id\n // NOTE: this uses the verificationMethod.controller. We may want to use the verificationMethod.id?\n if (presentation.holderId && proverVerificationMethod.controller !== presentation.holderId) {\n validationResults.validations.holderIsSigner = {\n isValid: false,\n error: new CredoError(\n `Presentation is signed using verification method ${proverVerificationMethod.id}, while the holder of the presentation is '${presentation.holderId}'`\n ),\n }\n } else {\n // If no holderId is present, this validation passes by default as there can't be\n // a mismatch between the 'holder' property and the signer of the presentation.\n validationResults.validations.holderIsSigner = {\n isValid: true,\n }\n }\n\n // To keep things simple, we only support JWT VCs in JWT VPs for now\n const credentials = asArray(presentation.presentation.verifiableCredential)\n\n // Verify all credentials in parallel, and await the result\n validationResults.validations.credentials = await Promise.all(\n credentials.map(async (credential) => {\n if (credential instanceof W3cJsonLdVerifiableCredential) {\n return {\n isValid: false,\n error: new CredoError(\n 'Credential is of format ldp_vc. presentations in jwt_vp format can only contain credentials in jwt_vc format'\n ),\n validations: {},\n }\n }\n\n const credentialResult = await this.verifyCredential(agentContext, {\n credential,\n verifyCredentialStatus: options.verifyCredentialStatus,\n })\n\n let credentialSubjectAuthentication: SingleValidationResult\n\n // Check whether any of the credentialSubjectIds for each credential is the same as the controller of the verificationMethod\n // This authenticates the presentation creator controls one of the credentialSubject ids.\n // NOTE: this doesn't take into account the case where the credentialSubject is no the holder. In the\n // future we can add support for other flows, but for now this is the most common use case.\n // TODO: should this be handled on a higher level? I don't really see it being handled in the jsonld lib\n // or in the did-jwt-vc lib (it seems they don't even verify the credentials itself), but we probably need some\n // more experience on the use cases before we loosen the restrictions (as it means we need to handle it on a higher layer).\n const credentialSubjectIds = credential.credentialSubjectIds\n const presentationAuthenticatesCredentialSubject = credentialSubjectIds.some(\n (subjectId) => proverVerificationMethod.controller === subjectId\n )\n\n if (credentialSubjectIds.length > 0 && !presentationAuthenticatesCredentialSubject) {\n credentialSubjectAuthentication = {\n isValid: false,\n error: new CredoError(\n 'Credential has one or more credentialSubject ids, but presentation does not authenticate credential subject'\n ),\n }\n } else {\n credentialSubjectAuthentication = {\n isValid: true,\n }\n }\n\n return {\n ...credentialResult,\n isValid: credentialResult.isValid && credentialSubjectAuthentication.isValid,\n validations: {\n ...credentialResult.validations,\n credentialSubjectAuthentication,\n },\n }\n })\n )\n\n // Deeply nested check whether all validations have passed\n validationResults.isValid = Object.values(validationResults.validations).every((v) =>\n Array.isArray(v) ? v.every((vv) => vv.isValid) : v.isValid\n )\n\n return validationResults\n } catch (error) {\n validationResults.error = error\n return validationResults\n }\n }\n\n private async resolveVerificationMethod(\n agentContext: AgentContext,\n verificationMethod: string,\n allowsPurposes?: DidPurpose[]\n ): Promise<PublicJwk> {\n const dids = agentContext.resolve(DidsApi)\n\n const parsedDid = parseDid(verificationMethod)\n const { didDocument, keys } = await dids.resolveCreatedDidDocumentWithKeys(parsedDid.did)\n const verificationMethodObject = didDocument.dereferenceKey(verificationMethod, allowsPurposes)\n const publicJwk = getPublicJwkFromVerificationMethod(verificationMethodObject)\n\n publicJwk.keyId =\n keys?.find(({ didDocumentRelativeKeyId }) => verificationMethodObject.id.endsWith(didDocumentRelativeKeyId))\n ?.kmsKeyId ?? publicJwk.legacyKeyId\n\n return publicJwk\n }\n\n /**\n * This method tries to find the verification method associated with the JWT credential or presentation.\n * This verification method can then be used to verify the credential or presentation signature.\n *\n * The following methods are used to extract the verification method:\n * - verification method is resolved based on the `kid` in the protected header\n * - either as absolute reference (e.g. `did:example:123#key-1`)\n * - or as relative reference to the `iss` of the JWT (e.g. `iss` is `did:example:123` and `kid` is `#key-1`)\n * - the did document is resolved based on the `iss` field, after which the verification method is extracted based on the `alg`\n * used to sign the JWT and the specified `purpose`. Only a single verification method may be present, and in all other cases,\n * an error is thrown.\n *\n * The signer (`iss`) of the JWT is verified against the `controller` of the verificationMethod resolved in the did\n * document. This means if the `iss` of a credential is `did:example:123` and the controller of the verificationMethod\n * is `did:example:456`, an error is thrown to prevent the JWT from successfully being verified.\n *\n * In addition the JWT must conform to one of the following rules:\n * - MUST be a credential and have an `iss` field and MAY have an absolute or relative `kid`\n * - MUST not be a credential AND ONE of the following:\n * - have an `iss` field and MAY have an absolute or relative `kid`\n * - does not have an `iss` field and MUST have an absolute `kid`\n */\n private async getVerificationMethodForJwtCredential(\n agentContext: AgentContext,\n options: {\n credential: W3cJwtVerifiableCredential | W3cJwtVerifiablePresentation\n purpose?: DidPurpose[]\n }\n ) {\n const { credential, purpose } = options\n const kid = credential.jwt.header.kid\n\n const didResolver = agentContext.dependencyManager.resolve(DidResolverService)\n\n // The signerId is the `holder` of the presentation or the `issuer` of the credential\n // For a credential only the `iss` COULD be enough to resolve the signer key (see method comments)\n const signerId = credential.jwt.payload.iss\n\n let verificationMethod: VerificationMethod\n\n // If the kid starts with # we assume it is a relative did url, and we resolve it based on the `iss` and the `kid`\n if (kid?.startsWith('#')) {\n if (!signerId) {\n throw new CredoError(`JWT 'kid' MUST be absolute when when no 'iss' is present in JWT payload`)\n }\n\n const didDocument = await didResolver.resolveDidDocument(agentContext, signerId)\n verificationMethod = didDocument.dereferenceKey(`${signerId}${kid}`, purpose)\n }\n // this is a full did url (todo check if it contains a #)\n else if (kid && isDid(kid)) {\n const didDocument = await didResolver.resolveDidDocument(agentContext, kid)\n\n verificationMethod = didDocument.dereferenceKey(kid, purpose)\n\n if (signerId && didDocument.id !== signerId) {\n throw new CredoError(`kid '${kid}' does not match id of signer (holder/issuer) '${signerId}'`)\n }\n } else {\n if (!signerId) {\n throw new CredoError(`JWT 'iss' MUST be present in payload when no 'kid' is specified`)\n }\n\n // Find the verificationMethod in the did document based on the alg and proofPurpose\n const jwkClass = PublicJwk.supportedPublicJwkClassForSignatureAlgorithm(\n credential.jwt.header.alg as KnownJwaSignatureAlgorithm\n )\n const supportedVerificationMethodTypes = getSupportedVerificationMethodTypesForPublicJwk(jwkClass)\n\n const didDocument = await didResolver.resolveDidDocument(agentContext, signerId)\n const verificationMethods =\n didDocument.assertionMethod\n ?.map((v) => (typeof v === 'string' ? didDocument.dereferenceVerificationMethod(v) : v))\n .filter((v) => supportedVerificationMethodTypes.includes(v.type)) ?? []\n\n if (verificationMethods.length === 0) {\n throw new CredoError(\n `No verification methods found for signer '${signerId}' and key type '${jwkClass.name}' for alg '${credential.jwt.header.alg}'. Unable to determine which public key is associated with the credential.`\n )\n }\n if (verificationMethods.length > 1) {\n throw new CredoError(\n `Multiple verification methods found for signer '${signerId}' and key type '${jwkClass.name}' for alg '${credential.jwt.header.alg}'. Unable to determine which public key is associated with the credential.`\n )\n }\n\n verificationMethod = verificationMethods[0]\n }\n\n // Verify the controller of the verificationMethod matches the signer of the credential\n if (signerId && verificationMethod.controller !== signerId) {\n throw new CredoError(\n `Verification method controller '${verificationMethod.controller}' does not match the signer '${signerId}'`\n )\n }\n\n return verificationMethod\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BO,oCAAMA,0BAAwB;CAGnC,AAAO,YAAY,YAAwB;AACzC,OAAK,aAAa;;;;;CAMpB,MAAa,eACX,cACA,SACqC;AAErC,mBAAiB,aAAa,QAAQ,WAAW;EAIjD,MAAM,aAAa,4BA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,WAAW,EACjC,OAAM,IAAI,WACR,6CAA6C,SAAS,kBAAkB,SAAS,KAAK,aAAa,WAAW,IAAI,OAAO,IAAI,4EAC9H;AAEH,OAAI,oBAAoB,SAAS,EAC/B,OAAM,IAAI,WACR,mDAAmD,SAAS,kBAAkB,SAAS,KAAK,aAAa,WAAW,IAAI,OAAO,IAAI,4EACpI;AAGH,wBAAqB,oBAAoB;;AAI3C,MAAI,YAAY,mBAAmB,eAAe,SAChD,OAAM,IAAI,WACR,mCAAmC,mBAAmB,WAAW,+BAA+B,SAAS,GAC1G;AAGH,SAAO;;;sCAngBV,YAAY"}
@@ -1,12 +1,12 @@
1
- import { W3cCredentialSubject } from "../models/credential/W3cCredentialSubject.mjs";
2
- import { W3cIssuer } from "../models/credential/W3cIssuer.mjs";
1
+ import { JsonObject, SingleOrArray } from "../../../types.mjs";
2
+ import { ClaimFormat } from "../models/ClaimFormat.mjs";
3
3
  import { W3cCredentialSchema } from "../models/credential/W3cCredentialSchema.mjs";
4
4
  import { W3cCredentialStatus } from "../models/credential/W3cCredentialStatus.mjs";
5
+ import { W3cCredentialSubject } from "../models/credential/W3cCredentialSubject.mjs";
6
+ import { W3cIssuer } from "../models/credential/W3cIssuer.mjs";
5
7
  import { W3cCredential } from "../models/credential/W3cCredential.mjs";
6
8
  import { W3cJsonCredential } from "../models/credential/W3cJsonCredential.mjs";
7
- import { ClaimFormat } from "../models/ClaimFormat.mjs";
8
9
  import { Jwt } from "../../../crypto/jose/jwt/Jwt.mjs";
9
- import { JsonObject, SingleOrArray } from "../../../types.mjs";
10
10
 
11
11
  //#region src/modules/vc/jwt-vc/W3cJwtVerifiableCredential.d.ts
12
12
  interface W3cJwtVerifiableCredentialOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"W3cJwtVerifiableCredential.d.mts","names":[],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtVerifiableCredential.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;UASiB,iCAAA;OACV;;cAGM,0BA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MAAA,GAAA,SAAA;MAuBD,iBAAY,CAAA,CAAA,EA/BV,aA+BU,CA3CrB,oBAAA,CA2CqB;MAYT,gBAAA,CAAA,CAAA,EAvCF,aAuCE,CA3CD,mBAAA,CA2CC,GAAA,SAAA;EAAiB,IAAA,gBAAA,CAAA,CAAA,EAvCnB,mBAAA,GAuCmB,SAAA;;;;4BAnCnB;;;;qBAuBD,WAAA,CAAY;;;;;;wBAYT"}
@@ -1,12 +1,12 @@
1
- import { W3cCredentialSubject } from "../models/credential/W3cCredentialSubject.js";
2
- import { W3cIssuer } from "../models/credential/W3cIssuer.js";
1
+ import { JsonObject, SingleOrArray } from "../../../types.js";
2
+ import { ClaimFormat } from "../models/ClaimFormat.js";
3
3
  import { W3cCredentialSchema } from "../models/credential/W3cCredentialSchema.js";
4
4
  import { W3cCredentialStatus } from "../models/credential/W3cCredentialStatus.js";
5
+ import { W3cCredentialSubject } from "../models/credential/W3cCredentialSubject.js";
6
+ import { W3cIssuer } from "../models/credential/W3cIssuer.js";
5
7
  import { W3cCredential } from "../models/credential/W3cCredential.js";
6
8
  import { W3cJsonCredential } from "../models/credential/W3cJsonCredential.js";
7
- import { ClaimFormat } from "../models/ClaimFormat.js";
8
9
  import { Jwt } from "../../../crypto/jose/jwt/Jwt.js";
9
- import { JsonObject, SingleOrArray } from "../../../types.js";
10
10
 
11
11
  //#region src/modules/vc/jwt-vc/W3cJwtVerifiableCredential.d.ts
12
12
  interface W3cJwtVerifiableCredentialOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"W3cJwtVerifiableCredential.d.ts","names":[],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtVerifiableCredential.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;UASiB,iCAAA;OACV;;cAGM,0BAAA;gBACU;;uBAGO;EARb,OAAA,iBAAA,CAAA,aAAiC,EAAA,MAAA,CAAA,EAcK,0BAb7C;EAGG;;;;;;;;MAsDM,UAAA,CAAA,CAAA,EA5BQ,aA4BR;MAYW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;;qBAuBD,WAAA,CAAY;;;;;;wBAYT"}
@@ -1 +1 @@
1
- {"version":3,"file":"W3cJwtVerifiableCredential.mjs","names":[],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtVerifiableCredential.ts"],"sourcesContent":["import type { W3cCredential } from '../models/credential/W3cCredential'\nimport type { W3cJsonCredential } from '../models/credential/W3cJsonCredential'\n\nimport { Jwt } from '../../../crypto/jose/jwt/Jwt'\nimport { JsonTransformer } from '../../../utils'\nimport { ClaimFormat } from '../models/ClaimFormat'\n\nimport { getCredentialFromJwtPayload } from './credentialTransformer'\n\nexport interface W3cJwtVerifiableCredentialOptions {\n jwt: Jwt\n}\n\nexport class W3cJwtVerifiableCredential {\n public readonly jwt: Jwt\n private _credential: W3cCredential\n\n public constructor(options: W3cJwtVerifiableCredentialOptions) {\n this.jwt = options.jwt\n\n this._credential = getCredentialFromJwtPayload(this.jwt.payload)\n }\n\n public static fromSerializedJwt(serializedJwt: string) {\n const jwt = Jwt.fromSerializedJwt(serializedJwt)\n\n return new W3cJwtVerifiableCredential({\n jwt,\n })\n }\n\n /**\n * Get the W3cCredential from the JWT payload. This does not include the JWT wrapper,\n * and thus is not suitable for sharing. If you need a JWT, use the `serializedJwt` property.\n *\n * All properties and getters from the `W3cCredential` interface are implemented as getters\n * on the `W3cJwtVerifiableCredential` class itself, so you can also use this directly\n * instead of accessing the inner `credential` property.\n */\n public get credential(): W3cCredential {\n return this._credential\n }\n\n public get serializedJwt(): string {\n return this.jwt.serializedJwt\n }\n\n //\n // Below all properties from the `W3cCredential` interface are implemented as getters\n // this is to make the interface compatible with the W3cJsonLdVerifiableCredential interface\n // which makes using the different classes interchangeably from a user point of view.\n // This is 'easier' than extending the W3cCredential class as it means we have to create the\n // instance based on JSON, but also add custom properties.\n //\n\n public get context() {\n return this.credential.context\n }\n\n public get id() {\n return this.credential.id\n }\n\n public get type() {\n return this.credential.type\n }\n\n public get issuer() {\n return this.credential.issuer\n }\n\n public get issuanceDate() {\n return this.credential.issuanceDate\n }\n\n public get expirationDate() {\n return this.credential.expirationDate\n }\n\n public get credentialSubject() {\n return this.credential.credentialSubject\n }\n\n public get credentialSchema() {\n return this.credential.credentialSchema\n }\n\n public get credentialStatus() {\n return this.credential.credentialStatus\n }\n\n public get issuerId() {\n return this.credential.issuerId\n }\n\n public get credentialSchemaIds() {\n return this.credential.credentialSchemaIds\n }\n\n public get credentialSubjectIds() {\n return this.credential.credentialSubjectIds\n }\n\n public get contexts() {\n return this.credential.contexts\n }\n\n /**\n * The {@link ClaimFormat} of the credential. For JWT credentials this is always `jwt_vc`.\n */\n public get claimFormat(): ClaimFormat.JwtVc {\n return ClaimFormat.JwtVc\n }\n\n /**\n * Get the encoded variant of the W3C Verifiable Credential. For JWT credentials this is\n * a JWT string.\n */\n public get encoded() {\n return this.serializedJwt\n }\n\n public get jsonCredential(): W3cJsonCredential {\n return JsonTransformer.toJSON(this.credential) as W3cJsonCredential\n }\n}\n"],"mappings":";;;;;;;;;AAaA,IAAa,6BAAb,MAAa,2BAA2B;CAItC,AAAO,YAAY,SAA4C;AAC7D,OAAK,MAAM,QAAQ;AAEnB,OAAK,cAAc,4BAA4B,KAAK,IAAI,QAAQ;;CAGlE,OAAc,kBAAkB,eAAuB;AAGrD,SAAO,IAAI,2BAA2B,EACpC,KAHU,IAAI,kBAAkB,cAAc,EAI/C,CAAC;;;;;;;;;;CAWJ,IAAW,aAA4B;AACrC,SAAO,KAAK;;CAGd,IAAW,gBAAwB;AACjC,SAAO,KAAK,IAAI;;CAWlB,IAAW,UAAU;AACnB,SAAO,KAAK,WAAW;;CAGzB,IAAW,KAAK;AACd,SAAO,KAAK,WAAW;;CAGzB,IAAW,OAAO;AAChB,SAAO,KAAK,WAAW;;CAGzB,IAAW,SAAS;AAClB,SAAO,KAAK,WAAW;;CAGzB,IAAW,eAAe;AACxB,SAAO,KAAK,WAAW;;CAGzB,IAAW,iBAAiB;AAC1B,SAAO,KAAK,WAAW;;CAGzB,IAAW,oBAAoB;AAC7B,SAAO,KAAK,WAAW;;CAGzB,IAAW,mBAAmB;AAC5B,SAAO,KAAK,WAAW;;CAGzB,IAAW,mBAAmB;AAC5B,SAAO,KAAK,WAAW;;CAGzB,IAAW,WAAW;AACpB,SAAO,KAAK,WAAW;;CAGzB,IAAW,sBAAsB;AAC/B,SAAO,KAAK,WAAW;;CAGzB,IAAW,uBAAuB;AAChC,SAAO,KAAK,WAAW;;CAGzB,IAAW,WAAW;AACpB,SAAO,KAAK,WAAW;;;;;CAMzB,IAAW,cAAiC;AAC1C,SAAO,YAAY;;;;;;CAOrB,IAAW,UAAU;AACnB,SAAO,KAAK;;CAGd,IAAW,iBAAoC;AAC7C,SAAO,gBAAgB,OAAO,KAAK,WAAW"}
1
+ {"version":3,"file":"W3cJwtVerifiableCredential.mjs","names":[],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtVerifiableCredential.ts"],"sourcesContent":["import { Jwt } from '../../../crypto/jose/jwt/Jwt'\nimport { JsonTransformer } from '../../../utils'\nimport { ClaimFormat } from '../models/ClaimFormat'\nimport type { W3cCredential } from '../models/credential/W3cCredential'\nimport type { W3cJsonCredential } from '../models/credential/W3cJsonCredential'\n\nimport { getCredentialFromJwtPayload } from './credentialTransformer'\n\nexport interface W3cJwtVerifiableCredentialOptions {\n jwt: Jwt\n}\n\nexport class W3cJwtVerifiableCredential {\n public readonly jwt: Jwt\n private _credential: W3cCredential\n\n public constructor(options: W3cJwtVerifiableCredentialOptions) {\n this.jwt = options.jwt\n\n this._credential = getCredentialFromJwtPayload(this.jwt.payload)\n }\n\n public static fromSerializedJwt(serializedJwt: string) {\n const jwt = Jwt.fromSerializedJwt(serializedJwt)\n\n return new W3cJwtVerifiableCredential({\n jwt,\n })\n }\n\n /**\n * Get the W3cCredential from the JWT payload. This does not include the JWT wrapper,\n * and thus is not suitable for sharing. If you need a JWT, use the `serializedJwt` property.\n *\n * All properties and getters from the `W3cCredential` interface are implemented as getters\n * on the `W3cJwtVerifiableCredential` class itself, so you can also use this directly\n * instead of accessing the inner `credential` property.\n */\n public get credential(): W3cCredential {\n return this._credential\n }\n\n public get serializedJwt(): string {\n return this.jwt.serializedJwt\n }\n\n //\n // Below all properties from the `W3cCredential` interface are implemented as getters\n // this is to make the interface compatible with the W3cJsonLdVerifiableCredential interface\n // which makes using the different classes interchangeably from a user point of view.\n // This is 'easier' than extending the W3cCredential class as it means we have to create the\n // instance based on JSON, but also add custom properties.\n //\n\n public get context() {\n return this.credential.context\n }\n\n public get id() {\n return this.credential.id\n }\n\n public get type() {\n return this.credential.type\n }\n\n public get issuer() {\n return this.credential.issuer\n }\n\n public get issuanceDate() {\n return this.credential.issuanceDate\n }\n\n public get expirationDate() {\n return this.credential.expirationDate\n }\n\n public get credentialSubject() {\n return this.credential.credentialSubject\n }\n\n public get credentialSchema() {\n return this.credential.credentialSchema\n }\n\n public get credentialStatus() {\n return this.credential.credentialStatus\n }\n\n public get issuerId() {\n return this.credential.issuerId\n }\n\n public get credentialSchemaIds() {\n return this.credential.credentialSchemaIds\n }\n\n public get credentialSubjectIds() {\n return this.credential.credentialSubjectIds\n }\n\n public get contexts() {\n return this.credential.contexts\n }\n\n /**\n * The {@link ClaimFormat} of the credential. For JWT credentials this is always `jwt_vc`.\n */\n public get claimFormat(): ClaimFormat.JwtVc {\n return ClaimFormat.JwtVc\n }\n\n /**\n * Get the encoded variant of the W3C Verifiable Credential. For JWT credentials this is\n * a JWT string.\n */\n public get encoded() {\n return this.serializedJwt\n }\n\n public get jsonCredential(): W3cJsonCredential {\n return JsonTransformer.toJSON(this.credential) as W3cJsonCredential\n }\n}\n"],"mappings":";;;;;;;;;AAYA,IAAa,6BAAb,MAAa,2BAA2B;CAItC,AAAO,YAAY,SAA4C;AAC7D,OAAK,MAAM,QAAQ;AAEnB,OAAK,cAAc,4BAA4B,KAAK,IAAI,QAAQ;;CAGlE,OAAc,kBAAkB,eAAuB;AAGrD,SAAO,IAAI,2BAA2B,EACpC,KAHU,IAAI,kBAAkB,cAAc,EAI/C,CAAC;;;;;;;;;;CAWJ,IAAW,aAA4B;AACrC,SAAO,KAAK;;CAGd,IAAW,gBAAwB;AACjC,SAAO,KAAK,IAAI;;CAWlB,IAAW,UAAU;AACnB,SAAO,KAAK,WAAW;;CAGzB,IAAW,KAAK;AACd,SAAO,KAAK,WAAW;;CAGzB,IAAW,OAAO;AAChB,SAAO,KAAK,WAAW;;CAGzB,IAAW,SAAS;AAClB,SAAO,KAAK,WAAW;;CAGzB,IAAW,eAAe;AACxB,SAAO,KAAK,WAAW;;CAGzB,IAAW,iBAAiB;AAC1B,SAAO,KAAK,WAAW;;CAGzB,IAAW,oBAAoB;AAC7B,SAAO,KAAK,WAAW;;CAGzB,IAAW,mBAAmB;AAC5B,SAAO,KAAK,WAAW;;CAGzB,IAAW,mBAAmB;AAC5B,SAAO,KAAK,WAAW;;CAGzB,IAAW,WAAW;AACpB,SAAO,KAAK,WAAW;;CAGzB,IAAW,sBAAsB;AAC/B,SAAO,KAAK,WAAW;;CAGzB,IAAW,uBAAuB;AAChC,SAAO,KAAK,WAAW;;CAGzB,IAAW,WAAW;AACpB,SAAO,KAAK,WAAW;;;;;CAMzB,IAAW,cAAiC;AAC1C,SAAO,YAAY;;;;;;CAOrB,IAAW,UAAU;AACnB,SAAO,KAAK;;CAGd,IAAW,iBAAoC;AAC7C,SAAO,gBAAgB,OAAO,KAAK,WAAW"}
@@ -1,10 +1,10 @@
1
+ import { JsonObject, SingleOrArray } from "../../../types.mjs";
1
2
  import { ClaimFormat } from "../models/ClaimFormat.mjs";
2
3
  import { W3cJsonLdVerifiableCredential } from "../data-integrity/models/W3cJsonLdVerifiableCredential.mjs";
3
4
  import { Jwt } from "../../../crypto/jose/jwt/Jwt.mjs";
4
5
  import { W3cJwtVerifiableCredential } from "./W3cJwtVerifiableCredential.mjs";
5
6
  import { W3cHolder } from "../models/presentation/W3cHolder.mjs";
6
7
  import { W3cPresentation } from "../models/presentation/W3cPresentation.mjs";
7
- import { JsonObject, SingleOrArray } from "../../../types.mjs";
8
8
 
9
9
  //#region src/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.ts
10
10
  interface W3cJwtVerifiablePresentationOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"W3cJwtVerifiablePresentation.d.mts","names":[],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.ts"],"sourcesContent":[],"mappings":";;;;;;;;;UAQiB,mCAAA;OACV;;cAGM,4BAAA;gBACU;;uBAGO;mDAMyB;EAdtC;AAIjB;;;;;;;MA8CoB,YAAA,CAAA,CAAA,EAhBS,eAgBT;MAYD,aAAA,CAAA,CAAA,EAAA,MAAA;MAIc,OAAA,CAAA,CAAA,EAAA,CAAA,MAAA,GAhCW,UAgCX,CAAA,EAAA;MAAA,EAAA,CAAA,CAAA,EAAA,MAAA,GAAA,SAAA;MAWL,IAAA,CAAA,CAAA,EAAA,MAAY,EAAA;EAAK,IAAA,MAAA,CAAA,CAAA,EAAA,MAAA,GA3BzB,SAAA,GA2ByB,SAAA;8BAXZ,cAJd,0BAAA,GAIc;;;;;qBAWL,WAAA,CAAY"}
1
+ {"version":3,"file":"W3cJwtVerifiablePresentation.d.mts","names":[],"sources":["../../../../src/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.ts"],"sourcesContent":[],"mappings":";;;;;;;;;UAOiB,mCAAA;OACV;;cAGM,4BAAA;gBACU;;uBAGO;mDAMyB;EAdtC;AAIjB;;;;;;;MA8CoB,YAAA,CAAA,CAAA,EAhBS,eAgBT;MAYD,aAAA,CAAA,CAAA,EAAA,MAAA;MAIc,OAAA,CAAA,CAAA,EAAA,CAAA,MAAA,GAhCW,UAgCX,CAAA,EAAA;MAAA,EAAA,CAAA,CAAA,EAAA,MAAA,GAAA,SAAA;MAWL,IAAA,CAAA,CAAA,EAAA,MAAY,EAAA;EAAK,IAAA,MAAA,CAAA,CAAA,EAAA,MAAA,GA3BzB,SAAA,GA2ByB,SAAA;8BAXZ,cAJd,0BAAA,GAIc;;;;;qBAWL,WAAA,CAAY"}
@@ -1,10 +1,10 @@
1
+ import { JsonObject, SingleOrArray } from "../../../types.js";
1
2
  import { ClaimFormat } from "../models/ClaimFormat.js";
2
3
  import { W3cJsonLdVerifiableCredential } from "../data-integrity/models/W3cJsonLdVerifiableCredential.js";
3
4
  import { Jwt } from "../../../crypto/jose/jwt/Jwt.js";
4
5
  import { W3cJwtVerifiableCredential } from "./W3cJwtVerifiableCredential.js";
5
6
  import { W3cHolder } from "../models/presentation/W3cHolder.js";
6
7
  import { W3cPresentation } from "../models/presentation/W3cPresentation.js";
7
- import { JsonObject, SingleOrArray } from "../../../types.js";
8
8
 
9
9
  //#region src/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.ts
10
10
  interface W3cJwtVerifiablePresentationOptions {