@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,8 +1,8 @@
1
1
  import { W3cJsonLdVerifiableCredential } from "./models/W3cJsonLdVerifiableCredential.js";
2
- import { SignatureSuiteRegistry } from "./SignatureSuiteRegistry.js";
3
- import { W3cJsonLdSignCredentialOptions, W3cJsonLdSignPresentationOptions, W3cJsonLdVerifyCredentialOptions, W3cJsonLdVerifyPresentationOptions } from "../W3cCredentialServiceOptions.js";
4
2
  import { W3cVerifyCredentialResult, W3cVerifyPresentationResult } from "../models/W3cVerifyResult.js";
3
+ import { W3cJsonLdSignCredentialOptions, W3cJsonLdSignPresentationOptions, W3cJsonLdVerifyCredentialOptions, W3cJsonLdVerifyPresentationOptions } from "../W3cCredentialServiceOptions.js";
5
4
  import { W3cJsonLdVerifiablePresentation } from "./models/W3cJsonLdVerifiablePresentation.js";
5
+ import { SignatureSuiteRegistry } from "./SignatureSuiteRegistry.js";
6
6
  import { W3cCredentialsModuleConfig } from "../W3cCredentialsModuleConfig.js";
7
7
  import { AgentContext } from "../../../agent/context/AgentContext.js";
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"W3cJsonLdCredentialService.d.ts","names":[],"sources":["../../../../src/modules/vc/data-integrity/W3cJsonLdCredentialService.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;AAiCA;;AAM4B,cALf,0BAAA,CAKe;UACI,sBAAA;UAUd,0BAAA;aACL,CAAA,sBAAA,EAZe,sBAYf,EAAA,0BAAA,EAXmB,0BAWnB;;;;gBAuDA,CAAA,YAAA,EAxDK,YAwDL,EAAA,OAAA,EAvDA,8BAuDA,CAAA,EAtDR,OAsDQ,CAtDA,6BAsDA,CAAA;;;;;;;kBAoIK,CAAA,YAAA,EArIA,YAqIA,EAAA,OAAA,EApIL,gCAoIK,CAAA,EAnIb,OAmIa,CAnIL,yBAmIK,CAAA;;;;;;;EA+EgG,gBAAA,CAAA,YAAA,EAjJhG,YAiJgG,EAAA,OAAA,EAhJrG,gCAgJqG,CAAA,EA/I7G,OA+I6G,CA/IrG,+BA+IqG,CAAA;;;;;;;mCA/EhG,uBACL,qCACR,QAAQ;;8CA6E8C,0BAA0B,gCAA6B"}
1
+ {"version":3,"file":"W3cJsonLdCredentialService.d.ts","names":[],"sources":["../../../../src/modules/vc/data-integrity/W3cJsonLdCredentialService.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;AA8BA;;AAM4B,cALf,0BAAA,CAKe;UACI,sBAAA;UAUd,0BAAA;aACL,CAAA,sBAAA,EAZe,sBAYf,EAAA,0BAAA,EAXmB,0BAWnB;;;;gBAuDA,CAAA,YAAA,EAxDK,YAwDL,EAAA,OAAA,EAvDA,8BAuDA,CAAA,EAtDR,OAsDQ,CAtDA,6BAsDA,CAAA;;;;;;;kBAoIK,CAAA,YAAA,EArIA,YAqIA,EAAA,OAAA,EApIL,gCAoIK,CAAA,EAnIb,OAmIa,CAnIL,yBAmIK,CAAA;;;;;;;EA+EgG,gBAAA,CAAA,YAAA,EAjJhG,YAiJgG,EAAA,OAAA,EAhJrG,gCAgJqG,CAAA,EA/I7G,OA+I6G,CA/IrG,+BA+IqG,CAAA;;;;;;;mCA/EhG,uBACL,qCACR,QAAQ;;8CA6E8C,0BAA0B,gCAA6B"}
@@ -6,24 +6,24 @@ 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_JsonTransformer = require('../../../utils/JsonTransformer.js');
10
9
  const require_array = require('../../../utils/array.js');
10
+ const require_JsonTransformer = require('../../../utils/JsonTransformer.js');
11
11
  require('../../../utils/index.js');
12
12
  require('../../kms/index.js');
13
+ const require_parse = require('../../dids/domain/parse.js');
13
14
  const require_VerificationMethod = require('../../dids/domain/verificationMethod/VerificationMethod.js');
14
15
  const require_keyDidMapping = require('../../dids/domain/key-type/keyDidMapping.js');
15
16
  require('../../dids/domain/key-type/index.js');
16
- const require_parse = require('../../dids/domain/parse.js');
17
17
  const require_DidsApi = require('../../dids/DidsApi.js');
18
18
  require('../../dids/index.js');
19
- const require_W3cJsonLdVerifiableCredential = require('./models/W3cJsonLdVerifiableCredential.js');
20
- const require_util = require('../util.js');
21
- const require_SignatureSuiteRegistry = require('./SignatureSuiteRegistry.js');
22
19
  const require_jsonld = require('./libraries/jsonld.js');
20
+ const require_W3cJsonLdVerifiableCredential = require('./models/W3cJsonLdVerifiableCredential.js');
23
21
  const require_jsonldUtil = require('./jsonldUtil.js');
24
22
  const require_vc = require('./libraries/vc.js');
23
+ const require_util = require('../util.js');
25
24
  const require_W3cJsonLdVerifiablePresentation = require('./models/W3cJsonLdVerifiablePresentation.js');
26
25
  require('./models/index.js');
26
+ const require_SignatureSuiteRegistry = require('./SignatureSuiteRegistry.js');
27
27
  const require_KmsKeyPair = require('../../../crypto/KmsKeyPair.js');
28
28
  const require_W3cCredentialsModuleConfig = require('../W3cCredentialsModuleConfig.js');
29
29
  let tsyringe = require("tsyringe");
@@ -219,7 +219,7 @@ let W3cJsonLdCredentialService = class W3cJsonLdCredentialService$1 {
219
219
  if (!Array.isArray(proofs)) proofs = [proofs];
220
220
  return proofs.map((proof) => {
221
221
  const SuiteClass = this.signatureSuiteRegistry.getByProofType(proof.type)?.suiteClass;
222
- if (SuiteClass) return new SuiteClass({
222
+ return new SuiteClass({
223
223
  LDKeyClass: WalletKeyPair,
224
224
  proof: { verificationMethod: proof.verificationMethod },
225
225
  date: proof.created,
@@ -5,24 +5,24 @@ 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 { JsonTransformer } from "../../../utils/JsonTransformer.mjs";
9
8
  import { asArray } from "../../../utils/array.mjs";
9
+ import { JsonTransformer } from "../../../utils/JsonTransformer.mjs";
10
10
  import "../../../utils/index.mjs";
11
11
  import "../../kms/index.mjs";
12
+ import { parseDid } from "../../dids/domain/parse.mjs";
12
13
  import { VerificationMethod } from "../../dids/domain/verificationMethod/VerificationMethod.mjs";
13
14
  import { getPublicJwkFromVerificationMethod } from "../../dids/domain/key-type/keyDidMapping.mjs";
14
15
  import "../../dids/domain/key-type/index.mjs";
15
- import { parseDid } from "../../dids/domain/parse.mjs";
16
16
  import { DidsApi } from "../../dids/DidsApi.mjs";
17
17
  import "../../dids/index.mjs";
18
- import { W3cJsonLdVerifiableCredential } from "./models/W3cJsonLdVerifiableCredential.mjs";
19
- import { w3cDate } from "../util.mjs";
20
- import { SignatureSuiteRegistry } from "./SignatureSuiteRegistry.mjs";
21
18
  import jsonld_default from "./libraries/jsonld.mjs";
19
+ import { W3cJsonLdVerifiableCredential } from "./models/W3cJsonLdVerifiableCredential.mjs";
22
20
  import { assertOnlyW3cJsonLdVerifiableCredentials } from "./jsonldUtil.mjs";
23
21
  import vc_default from "./libraries/vc.mjs";
22
+ import { w3cDate } from "../util.mjs";
24
23
  import { W3cJsonLdVerifiablePresentation } from "./models/W3cJsonLdVerifiablePresentation.mjs";
25
24
  import "./models/index.mjs";
25
+ import { SignatureSuiteRegistry } from "./SignatureSuiteRegistry.mjs";
26
26
  import { createKmsKeyPairClass } from "../../../crypto/KmsKeyPair.mjs";
27
27
  import { W3cCredentialsModuleConfig } from "../W3cCredentialsModuleConfig.mjs";
28
28
 
@@ -216,7 +216,7 @@ let W3cJsonLdCredentialService = class W3cJsonLdCredentialService$1 {
216
216
  if (!Array.isArray(proofs)) proofs = [proofs];
217
217
  return proofs.map((proof) => {
218
218
  const SuiteClass = this.signatureSuiteRegistry.getByProofType(proof.type)?.suiteClass;
219
- if (SuiteClass) return new SuiteClass({
219
+ return new SuiteClass({
220
220
  LDKeyClass: WalletKeyPair,
221
221
  proof: { verificationMethod: proof.verificationMethod },
222
222
  date: proof.created,
@@ -1 +1 @@
1
- {"version":3,"file":"W3cJsonLdCredentialService.mjs","names":["W3cJsonLdCredentialService","vc","verifyOptions: Record<string, unknown>","signOptions: Record<string, unknown>","expandedTypes: SingleOrArray<string>","jsonld"],"sources":["../../../../src/modules/vc/data-integrity/W3cJsonLdCredentialService.ts"],"sourcesContent":["import type { AgentContext } from '../../../agent/context'\n\nimport type {\n W3cJsonLdSignCredentialOptions,\n W3cJsonLdSignPresentationOptions,\n W3cJsonLdVerifyCredentialOptions,\n W3cJsonLdVerifyPresentationOptions,\n} from '../W3cCredentialServiceOptions'\nimport type { W3cVerifyCredentialResult, W3cVerifyPresentationResult } from '../models'\nimport type { W3cJsonCredential } from '../models/credential/W3cJsonCredential'\n\nimport { createKmsKeyPairClass } from '../../../crypto/KmsKeyPair'\nimport { CredoError } from '../../../error'\nimport { injectable } from '../../../plugins'\nimport { JsonTransformer, asArray } from '../../../utils'\nimport { DidsApi, VerificationMethod, parseDid } from '../../dids'\nimport { getPublicJwkFromVerificationMethod } from '../../dids/domain/key-type'\nimport { W3cCredentialsModuleConfig } from '../W3cCredentialsModuleConfig'\nimport { w3cDate } from '../util'\n\nimport type { SingleOrArray } from '../../../types'\nimport { PublicJwk } from '../../kms'\nimport { SignatureSuiteRegistry } from './SignatureSuiteRegistry'\nimport { assertOnlyW3cJsonLdVerifiableCredentials } from './jsonldUtil'\nimport jsonld from './libraries/jsonld'\nimport vc from './libraries/vc'\nimport { W3cJsonLdVerifiableCredential } from './models'\nimport { W3cJsonLdVerifiablePresentation } from './models/W3cJsonLdVerifiablePresentation'\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 [Data Integrity Proof](https://www.w3.org/TR/vc-data-model/#data-integrity-proofs).\n */\n@injectable()\nexport class W3cJsonLdCredentialService {\n private signatureSuiteRegistry: SignatureSuiteRegistry\n private w3cCredentialsModuleConfig: W3cCredentialsModuleConfig\n\n public constructor(\n signatureSuiteRegistry: SignatureSuiteRegistry,\n w3cCredentialsModuleConfig: W3cCredentialsModuleConfig\n ) {\n this.signatureSuiteRegistry = signatureSuiteRegistry\n this.w3cCredentialsModuleConfig = w3cCredentialsModuleConfig\n }\n\n /**\n * Signs a credential\n */\n public async signCredential(\n agentContext: AgentContext,\n options: W3cJsonLdSignCredentialOptions\n ): Promise<W3cJsonLdVerifiableCredential> {\n const WalletKeyPair = createKmsKeyPairClass(agentContext)\n\n const signingKey = await this.getPublicJwkFromVerificationMethod(agentContext, options.verificationMethod)\n const suiteInfo = this.signatureSuiteRegistry.getByProofType(options.proofType)\n\n const suitesForKey = this.signatureSuiteRegistry.getAllByPublicJwkType(signingKey)\n\n if (!suitesForKey.some(({ suiteClass }) => suiteClass === suiteInfo.suiteClass)) {\n throw new CredoError('The key type of the verification method does not match the suite')\n }\n\n const keyPair = new WalletKeyPair({\n controller: options.credential.issuerId, // should we check this against the verificationMethod.controller?\n id: options.verificationMethod,\n publicJwk: signingKey,\n })\n\n const SuiteClass = suiteInfo.suiteClass\n\n const suite = new SuiteClass({\n key: keyPair,\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: options.verificationMethod,\n },\n useNativeCanonize: false,\n date: options.created ?? w3cDate(),\n })\n\n try {\n const result = await vc.issue({\n credential: JsonTransformer.toJSON(options.credential),\n suite: suite,\n purpose: options.proofPurpose,\n documentLoader: this.w3cCredentialsModuleConfig.documentLoader(agentContext),\n })\n\n return JsonTransformer.fromJSON(result, W3cJsonLdVerifiableCredential)\n } catch (error) {\n throw new CredoError(`Error issuing W3C JSON-LD VC. ${error.message}`, {\n cause: error,\n })\n }\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: W3cJsonLdVerifyCredentialOptions\n ): Promise<W3cVerifyCredentialResult> {\n try {\n const verifyCredentialStatus = options.verifyCredentialStatus ?? true\n\n const suites = this.getSignatureSuitesForCredential(agentContext, options.credential)\n\n const verifyOptions: Record<string, unknown> = {\n credential: JsonTransformer.toJSON(options.credential),\n suite: suites,\n documentLoader: this.w3cCredentialsModuleConfig.documentLoader(agentContext),\n checkStatus: ({ credential }: { credential: W3cJsonCredential }) => {\n // Only throw error if credentialStatus is present\n if (verifyCredentialStatus && 'credentialStatus' in credential) {\n throw new CredoError('Verifying credential status for JSON-LD credentials is currently not supported')\n }\n return {\n verified: true,\n }\n },\n }\n\n // this is a hack because vcjs throws if purpose is passed as undefined or null\n if (options.proofPurpose) {\n verifyOptions.purpose = options.proofPurpose\n }\n\n const result = await vc.verifyCredential(verifyOptions)\n\n const { verified: isValid, ...remainingResult } = result\n\n if (!isValid) {\n agentContext.config.logger.debug(`Credential verification failed: ${result.error?.message}`, {\n stack: result.error?.stack,\n })\n }\n\n // We map the result to our own result type to make it easier to work with\n // however, for now we just add a single vcJs validation result as we don't\n // have access to the internal validation results of vc-js\n return {\n isValid,\n validations: {\n vcJs: {\n isValid,\n ...remainingResult,\n },\n },\n error: result.error,\n }\n } catch (error) {\n return {\n isValid: false,\n validations: {},\n error,\n }\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: W3cJsonLdSignPresentationOptions\n ): Promise<W3cJsonLdVerifiablePresentation> {\n // create keyPair\n const WalletKeyPair = createKmsKeyPairClass(agentContext)\n\n const suiteInfo = this.signatureSuiteRegistry.getByProofType(options.proofType)\n\n if (!suiteInfo) {\n throw new CredoError(`The requested proofType ${options.proofType} is not supported`)\n }\n\n const signingKey = await this.getPublicJwkFromVerificationMethod(agentContext, options.verificationMethod)\n const suitesForKey = this.signatureSuiteRegistry.getAllByPublicJwkType(signingKey)\n\n if (!suitesForKey.some(({ suiteClass }) => suiteClass === suiteInfo.suiteClass)) {\n throw new CredoError('The key type of the verification method does not match the suite')\n }\n\n const documentLoader = this.w3cCredentialsModuleConfig.documentLoader(agentContext)\n const verificationMethodObject = (await documentLoader(options.verificationMethod)).document as Record<\n string,\n unknown\n >\n\n const keyPair = new WalletKeyPair({\n controller: verificationMethodObject.controller as string,\n id: options.verificationMethod,\n publicJwk: signingKey,\n })\n\n const suite = new suiteInfo.suiteClass({\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: options.verificationMethod,\n },\n date: new Date().toISOString(),\n key: keyPair,\n useNativeCanonize: false,\n })\n\n const signOptions: Record<string, unknown> = {\n presentation: JsonTransformer.toJSON(options.presentation),\n suite: suite,\n challenge: options.challenge,\n domain: options.domain,\n documentLoader: this.w3cCredentialsModuleConfig.documentLoader(agentContext),\n }\n\n // this is a hack because vcjs throws if purpose is passed as undefined or null\n if (options.proofPurpose) {\n signOptions.purpose = options.proofPurpose\n }\n\n const result = await vc.signPresentation(signOptions)\n\n return JsonTransformer.fromJSON(result, W3cJsonLdVerifiablePresentation)\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: W3cJsonLdVerifyPresentationOptions\n ): Promise<W3cVerifyPresentationResult> {\n try {\n // create keyPair\n const WalletKeyPair = createKmsKeyPairClass(agentContext)\n\n let proofs = options.presentation.proof\n\n if (!Array.isArray(proofs)) {\n proofs = [proofs]\n }\n if (options.purpose) {\n proofs = proofs.filter((proof) => proof.proofPurpose === options.purpose.term)\n }\n\n const presentationSuites = proofs.map((proof) => {\n const SuiteClass = this.signatureSuiteRegistry.getByProofType(proof.type).suiteClass\n return new SuiteClass({\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: proof.verificationMethod,\n },\n date: proof.created,\n useNativeCanonize: false,\n })\n })\n\n const credentials = asArray(options.presentation.verifiableCredential)\n assertOnlyW3cJsonLdVerifiableCredentials(credentials)\n\n const credentialSuites = credentials.map((credential) =>\n this.getSignatureSuitesForCredential(agentContext, credential)\n )\n const allSuites = presentationSuites.concat(...credentialSuites)\n\n const verifyOptions: Record<string, unknown> = {\n presentation: JsonTransformer.toJSON(options.presentation),\n suite: allSuites,\n challenge: options.challenge,\n domain: options.domain,\n documentLoader: this.w3cCredentialsModuleConfig.documentLoader(agentContext),\n }\n\n // this is a hack because vcjs throws if purpose is passed as undefined or null\n if (options.purpose) {\n verifyOptions.presentationPurpose = options.purpose\n }\n\n const result = await vc.verify(verifyOptions)\n\n const { verified: isValid, ...remainingResult } = result\n\n // We map the result to our own result type to make it easier to work with\n // however, for now we just add a single vcJs validation result as we don't\n // have access to the internal validation results of vc-js\n return {\n isValid,\n validations: {\n vcJs: {\n isValid,\n ...remainingResult,\n },\n },\n error: result.error,\n }\n } catch (error) {\n return {\n isValid: false,\n validations: {},\n error,\n }\n }\n }\n\n public getVerificationMethodTypesByProofType(proofType: string): string[] {\n return this.signatureSuiteRegistry.getByProofType(proofType).verificationMethodTypes\n }\n\n public async getExpandedTypesForCredential(agentContext: AgentContext, credential: W3cJsonLdVerifiableCredential) {\n // Get the expanded types\n const expandedTypes: SingleOrArray<string> = (\n await jsonld.expand(JsonTransformer.toJSON(credential), {\n documentLoader: this.w3cCredentialsModuleConfig.documentLoader(agentContext),\n })\n )[0]['@type']\n\n return asArray(expandedTypes)\n }\n\n private async getPublicJwkFromVerificationMethod(\n agentContext: AgentContext,\n verificationMethod: string\n ): Promise<PublicJwk> {\n const dids = agentContext.resolve(DidsApi)\n\n const documentLoader = this.w3cCredentialsModuleConfig.documentLoader(agentContext)\n const verificationMethodObject = await documentLoader(verificationMethod)\n const verificationMethodInstance = JsonTransformer.fromJSON(verificationMethodObject.document, VerificationMethod)\n const did = parseDid(verificationMethod)\n const publicJwk = getPublicJwkFromVerificationMethod(verificationMethodInstance)\n\n const [didRecord] = await dids.getCreatedDids({ did: did.did })\n\n // For all modern uses of did bound credentials there MUST be a did record\n if (didRecord) {\n publicJwk.keyId =\n didRecord.keys?.find(({ didDocumentRelativeKeyId }) => didDocumentRelativeKeyId === `#${did.fragment}`)\n ?.kmsKeyId ?? publicJwk.legacyKeyId\n } else {\n // If we don't have a did record we assume legacy key id should be used.\n publicJwk.keyId = publicJwk.legacyKeyId\n }\n\n return publicJwk\n }\n\n private getSignatureSuitesForCredential(agentContext: AgentContext, credential: W3cJsonLdVerifiableCredential) {\n const WalletKeyPair = createKmsKeyPairClass(agentContext)\n\n let proofs = credential.proof\n\n if (!Array.isArray(proofs)) {\n proofs = [proofs]\n }\n\n return proofs.map((proof) => {\n const SuiteClass = this.signatureSuiteRegistry.getByProofType(proof.type)?.suiteClass\n if (SuiteClass) {\n return new SuiteClass({\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: proof.verificationMethod,\n },\n date: proof.created,\n useNativeCanonize: false,\n })\n }\n })\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"W3cJsonLdCredentialService.mjs","names":["W3cJsonLdCredentialService","vc","verifyOptions: Record<string, unknown>","signOptions: Record<string, unknown>","expandedTypes: SingleOrArray<string>","jsonld"],"sources":["../../../../src/modules/vc/data-integrity/W3cJsonLdCredentialService.ts"],"sourcesContent":["import type { AgentContext } from '../../../agent/context'\nimport { createKmsKeyPairClass } from '../../../crypto/KmsKeyPair'\nimport { CredoError } from '../../../error'\nimport { injectable } from '../../../plugins'\nimport type { SingleOrArray } from '../../../types'\nimport { asArray, JsonTransformer } from '../../../utils'\nimport { DidsApi, parseDid, VerificationMethod } from '../../dids'\nimport { getPublicJwkFromVerificationMethod } from '../../dids/domain/key-type'\nimport { PublicJwk } from '../../kms'\nimport type { W3cVerifyCredentialResult, W3cVerifyPresentationResult } from '../models'\nimport type { W3cJsonCredential } from '../models/credential/W3cJsonCredential'\nimport { w3cDate } from '../util'\nimport type {\n W3cJsonLdSignCredentialOptions,\n W3cJsonLdSignPresentationOptions,\n W3cJsonLdVerifyCredentialOptions,\n W3cJsonLdVerifyPresentationOptions,\n} from '../W3cCredentialServiceOptions'\nimport { W3cCredentialsModuleConfig } from '../W3cCredentialsModuleConfig'\nimport { assertOnlyW3cJsonLdVerifiableCredentials } from './jsonldUtil'\nimport jsonld from './libraries/jsonld'\nimport vc from './libraries/vc'\nimport { W3cJsonLdVerifiableCredential } from './models'\nimport { W3cJsonLdVerifiablePresentation } from './models/W3cJsonLdVerifiablePresentation'\nimport { SignatureSuiteRegistry } from './SignatureSuiteRegistry'\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 [Data Integrity Proof](https://www.w3.org/TR/vc-data-model/#data-integrity-proofs).\n */\n@injectable()\nexport class W3cJsonLdCredentialService {\n private signatureSuiteRegistry: SignatureSuiteRegistry\n private w3cCredentialsModuleConfig: W3cCredentialsModuleConfig\n\n public constructor(\n signatureSuiteRegistry: SignatureSuiteRegistry,\n w3cCredentialsModuleConfig: W3cCredentialsModuleConfig\n ) {\n this.signatureSuiteRegistry = signatureSuiteRegistry\n this.w3cCredentialsModuleConfig = w3cCredentialsModuleConfig\n }\n\n /**\n * Signs a credential\n */\n public async signCredential(\n agentContext: AgentContext,\n options: W3cJsonLdSignCredentialOptions\n ): Promise<W3cJsonLdVerifiableCredential> {\n const WalletKeyPair = createKmsKeyPairClass(agentContext)\n\n const signingKey = await this.getPublicJwkFromVerificationMethod(agentContext, options.verificationMethod)\n const suiteInfo = this.signatureSuiteRegistry.getByProofType(options.proofType)\n\n const suitesForKey = this.signatureSuiteRegistry.getAllByPublicJwkType(signingKey)\n\n if (!suitesForKey.some(({ suiteClass }) => suiteClass === suiteInfo.suiteClass)) {\n throw new CredoError('The key type of the verification method does not match the suite')\n }\n\n const keyPair = new WalletKeyPair({\n controller: options.credential.issuerId, // should we check this against the verificationMethod.controller?\n id: options.verificationMethod,\n publicJwk: signingKey,\n })\n\n const SuiteClass = suiteInfo.suiteClass\n\n const suite = new SuiteClass({\n key: keyPair,\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: options.verificationMethod,\n },\n useNativeCanonize: false,\n date: options.created ?? w3cDate(),\n })\n\n try {\n const result = await vc.issue({\n credential: JsonTransformer.toJSON(options.credential),\n suite: suite,\n purpose: options.proofPurpose,\n documentLoader: this.w3cCredentialsModuleConfig.documentLoader(agentContext),\n })\n\n return JsonTransformer.fromJSON(result, W3cJsonLdVerifiableCredential)\n } catch (error) {\n throw new CredoError(`Error issuing W3C JSON-LD VC. ${error.message}`, {\n cause: error,\n })\n }\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: W3cJsonLdVerifyCredentialOptions\n ): Promise<W3cVerifyCredentialResult> {\n try {\n const verifyCredentialStatus = options.verifyCredentialStatus ?? true\n\n const suites = this.getSignatureSuitesForCredential(agentContext, options.credential)\n\n const verifyOptions: Record<string, unknown> = {\n credential: JsonTransformer.toJSON(options.credential),\n suite: suites,\n documentLoader: this.w3cCredentialsModuleConfig.documentLoader(agentContext),\n checkStatus: ({ credential }: { credential: W3cJsonCredential }) => {\n // Only throw error if credentialStatus is present\n if (verifyCredentialStatus && 'credentialStatus' in credential) {\n throw new CredoError('Verifying credential status for JSON-LD credentials is currently not supported')\n }\n return {\n verified: true,\n }\n },\n }\n\n // this is a hack because vcjs throws if purpose is passed as undefined or null\n if (options.proofPurpose) {\n verifyOptions.purpose = options.proofPurpose\n }\n\n const result = await vc.verifyCredential(verifyOptions)\n\n const { verified: isValid, ...remainingResult } = result\n\n if (!isValid) {\n agentContext.config.logger.debug(`Credential verification failed: ${result.error?.message}`, {\n stack: result.error?.stack,\n })\n }\n\n // We map the result to our own result type to make it easier to work with\n // however, for now we just add a single vcJs validation result as we don't\n // have access to the internal validation results of vc-js\n return {\n isValid,\n validations: {\n vcJs: {\n isValid,\n ...remainingResult,\n },\n },\n error: result.error,\n }\n } catch (error) {\n return {\n isValid: false,\n validations: {},\n error,\n }\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: W3cJsonLdSignPresentationOptions\n ): Promise<W3cJsonLdVerifiablePresentation> {\n // create keyPair\n const WalletKeyPair = createKmsKeyPairClass(agentContext)\n\n const suiteInfo = this.signatureSuiteRegistry.getByProofType(options.proofType)\n\n if (!suiteInfo) {\n throw new CredoError(`The requested proofType ${options.proofType} is not supported`)\n }\n\n const signingKey = await this.getPublicJwkFromVerificationMethod(agentContext, options.verificationMethod)\n const suitesForKey = this.signatureSuiteRegistry.getAllByPublicJwkType(signingKey)\n\n if (!suitesForKey.some(({ suiteClass }) => suiteClass === suiteInfo.suiteClass)) {\n throw new CredoError('The key type of the verification method does not match the suite')\n }\n\n const documentLoader = this.w3cCredentialsModuleConfig.documentLoader(agentContext)\n const verificationMethodObject = (await documentLoader(options.verificationMethod)).document as Record<\n string,\n unknown\n >\n\n const keyPair = new WalletKeyPair({\n controller: verificationMethodObject.controller as string,\n id: options.verificationMethod,\n publicJwk: signingKey,\n })\n\n const suite = new suiteInfo.suiteClass({\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: options.verificationMethod,\n },\n date: new Date().toISOString(),\n key: keyPair,\n useNativeCanonize: false,\n })\n\n const signOptions: Record<string, unknown> = {\n presentation: JsonTransformer.toJSON(options.presentation),\n suite: suite,\n challenge: options.challenge,\n domain: options.domain,\n documentLoader: this.w3cCredentialsModuleConfig.documentLoader(agentContext),\n }\n\n // this is a hack because vcjs throws if purpose is passed as undefined or null\n if (options.proofPurpose) {\n signOptions.purpose = options.proofPurpose\n }\n\n const result = await vc.signPresentation(signOptions)\n\n return JsonTransformer.fromJSON(result, W3cJsonLdVerifiablePresentation)\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: W3cJsonLdVerifyPresentationOptions\n ): Promise<W3cVerifyPresentationResult> {\n try {\n // create keyPair\n const WalletKeyPair = createKmsKeyPairClass(agentContext)\n\n let proofs = options.presentation.proof\n\n if (!Array.isArray(proofs)) {\n proofs = [proofs]\n }\n if (options.purpose) {\n proofs = proofs.filter((proof) => proof.proofPurpose === options.purpose.term)\n }\n\n const presentationSuites = proofs.map((proof) => {\n const SuiteClass = this.signatureSuiteRegistry.getByProofType(proof.type).suiteClass\n return new SuiteClass({\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: proof.verificationMethod,\n },\n date: proof.created,\n useNativeCanonize: false,\n })\n })\n\n const credentials = asArray(options.presentation.verifiableCredential)\n assertOnlyW3cJsonLdVerifiableCredentials(credentials)\n\n const credentialSuites = credentials.map((credential) =>\n this.getSignatureSuitesForCredential(agentContext, credential)\n )\n const allSuites = presentationSuites.concat(...credentialSuites)\n\n const verifyOptions: Record<string, unknown> = {\n presentation: JsonTransformer.toJSON(options.presentation),\n suite: allSuites,\n challenge: options.challenge,\n domain: options.domain,\n documentLoader: this.w3cCredentialsModuleConfig.documentLoader(agentContext),\n }\n\n // this is a hack because vcjs throws if purpose is passed as undefined or null\n if (options.purpose) {\n verifyOptions.presentationPurpose = options.purpose\n }\n\n const result = await vc.verify(verifyOptions)\n\n const { verified: isValid, ...remainingResult } = result\n\n // We map the result to our own result type to make it easier to work with\n // however, for now we just add a single vcJs validation result as we don't\n // have access to the internal validation results of vc-js\n return {\n isValid,\n validations: {\n vcJs: {\n isValid,\n ...remainingResult,\n },\n },\n error: result.error,\n }\n } catch (error) {\n return {\n isValid: false,\n validations: {},\n error,\n }\n }\n }\n\n public getVerificationMethodTypesByProofType(proofType: string): string[] {\n return this.signatureSuiteRegistry.getByProofType(proofType).verificationMethodTypes\n }\n\n public async getExpandedTypesForCredential(agentContext: AgentContext, credential: W3cJsonLdVerifiableCredential) {\n // Get the expanded types\n const expandedTypes: SingleOrArray<string> = (\n await jsonld.expand(JsonTransformer.toJSON(credential), {\n documentLoader: this.w3cCredentialsModuleConfig.documentLoader(agentContext),\n })\n )[0]['@type']\n\n return asArray(expandedTypes)\n }\n\n private async getPublicJwkFromVerificationMethod(\n agentContext: AgentContext,\n verificationMethod: string\n ): Promise<PublicJwk> {\n const dids = agentContext.resolve(DidsApi)\n\n const documentLoader = this.w3cCredentialsModuleConfig.documentLoader(agentContext)\n const verificationMethodObject = await documentLoader(verificationMethod)\n const verificationMethodInstance = JsonTransformer.fromJSON(verificationMethodObject.document, VerificationMethod)\n const did = parseDid(verificationMethod)\n const publicJwk = getPublicJwkFromVerificationMethod(verificationMethodInstance)\n\n const [didRecord] = await dids.getCreatedDids({ did: did.did })\n\n // For all modern uses of did bound credentials there MUST be a did record\n if (didRecord) {\n publicJwk.keyId =\n didRecord.keys?.find(({ didDocumentRelativeKeyId }) => didDocumentRelativeKeyId === `#${did.fragment}`)\n ?.kmsKeyId ?? publicJwk.legacyKeyId\n } else {\n // If we don't have a did record we assume legacy key id should be used.\n publicJwk.keyId = publicJwk.legacyKeyId\n }\n\n return publicJwk\n }\n\n private getSignatureSuitesForCredential(agentContext: AgentContext, credential: W3cJsonLdVerifiableCredential) {\n const WalletKeyPair = createKmsKeyPairClass(agentContext)\n\n let proofs = credential.proof\n\n if (!Array.isArray(proofs)) {\n proofs = [proofs]\n }\n\n return proofs.map((proof) => {\n const SuiteClass = this.signatureSuiteRegistry.getByProofType(proof.type)?.suiteClass\n return new SuiteClass({\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: proof.verificationMethod,\n },\n date: proof.created,\n useNativeCanonize: false,\n })\n })\n }\n}\n"],"mappings":"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"}
@@ -1,5 +1,5 @@
1
- import { W3cJsonLdVerifiableCredential } from "./models/W3cJsonLdVerifiableCredential.mjs";
2
1
  import { JsonObject } from "../../../types.mjs";
2
+ import { W3cJsonLdVerifiableCredential } from "./models/W3cJsonLdVerifiableCredential.mjs";
3
3
 
4
4
  //#region src/modules/vc/data-integrity/deriveProof.d.ts
5
5
  interface W3cJsonLdDeriveProofOptions {
@@ -1,5 +1,5 @@
1
- import { W3cJsonLdVerifiableCredential } from "./models/W3cJsonLdVerifiableCredential.js";
2
1
  import { JsonObject } from "../../../types.js";
2
+ import { W3cJsonLdVerifiableCredential } from "./models/W3cJsonLdVerifiableCredential.js";
3
3
 
4
4
  //#region src/modules/vc/data-integrity/deriveProof.d.ts
5
5
  interface W3cJsonLdDeriveProofOptions {
@@ -3,8 +3,8 @@
3
3
  const require_JsonTransformer = require('../../../utils/JsonTransformer.js');
4
4
  require('../../../utils/index.js');
5
5
  const require_constants = require('../constants.js');
6
- const require_W3cJsonLdVerifiableCredential = require('./models/W3cJsonLdVerifiableCredential.js');
7
6
  const require_jsonld = require('./libraries/jsonld.js');
7
+ const require_W3cJsonLdVerifiableCredential = require('./models/W3cJsonLdVerifiableCredential.js');
8
8
  const require_jsonldUtil = require('./jsonldUtil.js');
9
9
 
10
10
  //#region src/modules/vc/data-integrity/deriveProof.ts
@@ -3,8 +3,8 @@
3
3
  import { JsonTransformer } from "../../../utils/JsonTransformer.mjs";
4
4
  import "../../../utils/index.mjs";
5
5
  import { SECURITY_PROOF_URL } from "../constants.mjs";
6
- import { W3cJsonLdVerifiableCredential } from "./models/W3cJsonLdVerifiableCredential.mjs";
7
6
  import jsonld_default from "./libraries/jsonld.mjs";
7
+ import { W3cJsonLdVerifiableCredential } from "./models/W3cJsonLdVerifiableCredential.mjs";
8
8
  import { getProofs, getTypeInfo } from "./jsonldUtil.mjs";
9
9
 
10
10
  //#region src/modules/vc/data-integrity/deriveProof.ts
@@ -1 +1 @@
1
- {"version":3,"file":"deriveProof.mjs","names":["expandedProof: Record<string, unknown>","jsonld"],"sources":["../../../../src/modules/vc/data-integrity/deriveProof.ts"],"sourcesContent":["/*\n * Copyright 2020 - MATTR Limited\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { JsonObject } from '../../../types'\n\nimport { JsonTransformer } from '../../../utils'\nimport { SECURITY_PROOF_URL } from '../constants'\n\nimport { getProofs, getTypeInfo } from './jsonldUtil'\nimport jsonld from './libraries/jsonld'\nimport { W3cJsonLdVerifiableCredential } from './models/W3cJsonLdVerifiableCredential'\n\nexport interface W3cJsonLdDeriveProofOptions {\n credential: W3cJsonLdVerifiableCredential\n revealDocument: JsonObject\n verificationMethod: string\n}\n\n/**\n * Derives a proof from a document featuring a supported linked data proof\n *\n * NOTE - This is a temporary API extending JSON-LD signatures\n *\n * @param proofDocument A document featuring a linked data proof capable of proof derivation\n * @param revealDocument A document of the form of a JSON-LD frame describing the terms to selectively derive from the proof document\n * @param options Options for proof derivation\n */\nexport const deriveProof = async (\n proofDocument: JsonObject,\n revealDocument: JsonObject,\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n { suite, skipProofCompaction, documentLoader, nonce }: any\n): Promise<W3cJsonLdVerifiableCredential> => {\n if (!suite) {\n throw new TypeError('\"options.suite\" is required.')\n }\n\n if (Array.isArray(proofDocument)) {\n throw new TypeError('proofDocument should be an object not an array.')\n }\n\n const { proofs, document } = await getProofs({\n document: proofDocument,\n proofType: suite.supportedDeriveProofType,\n documentLoader,\n })\n\n if (proofs.length === 0) {\n throw new Error('There were not any proofs provided that can be used to derive a proof with this suite.')\n }\n\n let derivedProof = await suite.deriveProof({\n document,\n proof: proofs[0],\n revealDocument,\n documentLoader,\n\n nonce,\n })\n\n if (proofs.length > 1) {\n // convert the proof property value from object ot array of objects\n derivedProof = { ...derivedProof, proof: [derivedProof.proof] }\n\n // drop the first proof because it's already been processed\n proofs.splice(0, 1)\n\n // add all the additional proofs to the derivedProof document\n for (const proof of proofs) {\n const additionalDerivedProofValue = await suite.deriveProof({\n document,\n proof,\n revealDocument,\n documentLoader,\n })\n derivedProof.proof.push(additionalDerivedProofValue.proof)\n }\n }\n\n if (!skipProofCompaction) {\n const expandedProof: Record<string, unknown> = {\n [SECURITY_PROOF_URL]: {\n '@graph': derivedProof.proof,\n },\n }\n\n // account for type-scoped `proof` definition by getting document types\n const { types, alias } = await getTypeInfo(derivedProof.document, {\n documentLoader,\n })\n\n expandedProof['@type'] = types\n\n const ctx = jsonld.getValues(derivedProof.document, '@context')\n\n const compactProof = await jsonld.compact(expandedProof, ctx, {\n documentLoader,\n compactToRelative: false,\n })\n\n delete compactProof[alias]\n // biome-ignore lint/performance/noDelete: <explanation>\n delete compactProof['@context']\n\n /**\n * removes the @included tag when multiple proofs exist because the\n * @included tag messes up the canonicalized bytes leading to a bad\n * signature that won't verify.\n **/\n if (compactProof.proof?.['@included']) {\n compactProof.proof = compactProof.proof['@included']\n }\n\n // add proof to document\n const key = Object.keys(compactProof)[0]\n jsonld.addValue(derivedProof.document, key, compactProof[key])\n } else {\n // biome-ignore lint/performance/noDelete: <explanation>\n delete derivedProof.proof['@context']\n jsonld.addValue(derivedProof.document, 'proof', derivedProof.proof)\n }\n\n return JsonTransformer.fromJSON(derivedProof.document, W3cJsonLdVerifiableCredential)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqCA,MAAa,cAAc,OACzB,eACA,gBAEA,EAAE,OAAO,qBAAqB,gBAAgB,YACH;AAC3C,KAAI,CAAC,MACH,OAAM,IAAI,UAAU,iCAA+B;AAGrD,KAAI,MAAM,QAAQ,cAAc,CAC9B,OAAM,IAAI,UAAU,kDAAkD;CAGxE,MAAM,EAAE,QAAQ,aAAa,MAAM,UAAU;EAC3C,UAAU;EACV,WAAW,MAAM;EACjB;EACD,CAAC;AAEF,KAAI,OAAO,WAAW,EACpB,OAAM,IAAI,MAAM,yFAAyF;CAG3G,IAAI,eAAe,MAAM,MAAM,YAAY;EACzC;EACA,OAAO,OAAO;EACd;EACA;EAEA;EACD,CAAC;AAEF,KAAI,OAAO,SAAS,GAAG;AAErB,iBAAe;GAAE,GAAG;GAAc,OAAO,CAAC,aAAa,MAAM;GAAE;AAG/D,SAAO,OAAO,GAAG,EAAE;AAGnB,OAAK,MAAM,SAAS,QAAQ;GAC1B,MAAM,8BAA8B,MAAM,MAAM,YAAY;IAC1D;IACA;IACA;IACA;IACD,CAAC;AACF,gBAAa,MAAM,KAAK,4BAA4B,MAAM;;;AAI9D,KAAI,CAAC,qBAAqB;EACxB,MAAMA,gBAAyC,GAC5C,qBAAqB,EACpB,UAAU,aAAa,OACxB,EACF;EAGD,MAAM,EAAE,OAAO,UAAU,MAAM,YAAY,aAAa,UAAU,EAChE,gBACD,CAAC;AAEF,gBAAc,WAAW;EAEzB,MAAM,MAAMC,eAAO,UAAU,aAAa,UAAU,WAAW;EAE/D,MAAM,eAAe,MAAMA,eAAO,QAAQ,eAAe,KAAK;GAC5D;GACA,mBAAmB;GACpB,CAAC;AAEF,SAAO,aAAa;AAEpB,SAAO,aAAa;;;;;;AAOpB,MAAI,aAAa,QAAQ,aACvB,cAAa,QAAQ,aAAa,MAAM;EAI1C,MAAM,MAAM,OAAO,KAAK,aAAa,CAAC;AACtC,iBAAO,SAAS,aAAa,UAAU,KAAK,aAAa,KAAK;QACzD;AAEL,SAAO,aAAa,MAAM;AAC1B,iBAAO,SAAS,aAAa,UAAU,SAAS,aAAa,MAAM;;AAGrE,QAAO,gBAAgB,SAAS,aAAa,UAAU,8BAA8B"}
1
+ {"version":3,"file":"deriveProof.mjs","names":["expandedProof: Record<string, unknown>","jsonld"],"sources":["../../../../src/modules/vc/data-integrity/deriveProof.ts"],"sourcesContent":["/*\n * Copyright 2020 - MATTR Limited\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { JsonObject } from '../../../types'\n\nimport { JsonTransformer } from '../../../utils'\nimport { SECURITY_PROOF_URL } from '../constants'\n\nimport { getProofs, getTypeInfo } from './jsonldUtil'\nimport jsonld from './libraries/jsonld'\nimport { W3cJsonLdVerifiableCredential } from './models/W3cJsonLdVerifiableCredential'\n\nexport interface W3cJsonLdDeriveProofOptions {\n credential: W3cJsonLdVerifiableCredential\n revealDocument: JsonObject\n verificationMethod: string\n}\n\n/**\n * Derives a proof from a document featuring a supported linked data proof\n *\n * NOTE - This is a temporary API extending JSON-LD signatures\n *\n * @param proofDocument A document featuring a linked data proof capable of proof derivation\n * @param revealDocument A document of the form of a JSON-LD frame describing the terms to selectively derive from the proof document\n * @param options Options for proof derivation\n */\nexport const deriveProof = async (\n proofDocument: JsonObject,\n revealDocument: JsonObject,\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n { suite, skipProofCompaction, documentLoader, nonce }: any\n): Promise<W3cJsonLdVerifiableCredential> => {\n if (!suite) {\n throw new TypeError('\"options.suite\" is required.')\n }\n\n if (Array.isArray(proofDocument)) {\n throw new TypeError('proofDocument should be an object not an array.')\n }\n\n const { proofs, document } = await getProofs({\n document: proofDocument,\n proofType: suite.supportedDeriveProofType,\n documentLoader,\n })\n\n if (proofs.length === 0) {\n throw new Error('There were not any proofs provided that can be used to derive a proof with this suite.')\n }\n\n let derivedProof = await suite.deriveProof({\n document,\n proof: proofs[0],\n revealDocument,\n documentLoader,\n\n nonce,\n })\n\n if (proofs.length > 1) {\n // convert the proof property value from object ot array of objects\n derivedProof = { ...derivedProof, proof: [derivedProof.proof] }\n\n // drop the first proof because it's already been processed\n proofs.splice(0, 1)\n\n // add all the additional proofs to the derivedProof document\n for (const proof of proofs) {\n const additionalDerivedProofValue = await suite.deriveProof({\n document,\n proof,\n revealDocument,\n documentLoader,\n })\n derivedProof.proof.push(additionalDerivedProofValue.proof)\n }\n }\n\n if (!skipProofCompaction) {\n const expandedProof: Record<string, unknown> = {\n [SECURITY_PROOF_URL]: {\n '@graph': derivedProof.proof,\n },\n }\n\n // account for type-scoped `proof` definition by getting document types\n const { types, alias } = await getTypeInfo(derivedProof.document, {\n documentLoader,\n })\n\n expandedProof['@type'] = types\n\n const ctx = jsonld.getValues(derivedProof.document, '@context')\n\n const compactProof = await jsonld.compact(expandedProof, ctx, {\n documentLoader,\n compactToRelative: false,\n })\n\n delete compactProof[alias]\n // biome-ignore lint/performance/noDelete: no explanation\n delete compactProof['@context']\n\n /**\n * removes the @included tag when multiple proofs exist because the\n * @included tag messes up the canonicalized bytes leading to a bad\n * signature that won't verify.\n **/\n if (compactProof.proof?.['@included']) {\n compactProof.proof = compactProof.proof['@included']\n }\n\n // add proof to document\n const key = Object.keys(compactProof)[0]\n jsonld.addValue(derivedProof.document, key, compactProof[key])\n } else {\n // biome-ignore lint/performance/noDelete: no explanation\n delete derivedProof.proof['@context']\n jsonld.addValue(derivedProof.document, 'proof', derivedProof.proof)\n }\n\n return JsonTransformer.fromJSON(derivedProof.document, W3cJsonLdVerifiableCredential)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqCA,MAAa,cAAc,OACzB,eACA,gBAEA,EAAE,OAAO,qBAAqB,gBAAgB,YACH;AAC3C,KAAI,CAAC,MACH,OAAM,IAAI,UAAU,iCAA+B;AAGrD,KAAI,MAAM,QAAQ,cAAc,CAC9B,OAAM,IAAI,UAAU,kDAAkD;CAGxE,MAAM,EAAE,QAAQ,aAAa,MAAM,UAAU;EAC3C,UAAU;EACV,WAAW,MAAM;EACjB;EACD,CAAC;AAEF,KAAI,OAAO,WAAW,EACpB,OAAM,IAAI,MAAM,yFAAyF;CAG3G,IAAI,eAAe,MAAM,MAAM,YAAY;EACzC;EACA,OAAO,OAAO;EACd;EACA;EAEA;EACD,CAAC;AAEF,KAAI,OAAO,SAAS,GAAG;AAErB,iBAAe;GAAE,GAAG;GAAc,OAAO,CAAC,aAAa,MAAM;GAAE;AAG/D,SAAO,OAAO,GAAG,EAAE;AAGnB,OAAK,MAAM,SAAS,QAAQ;GAC1B,MAAM,8BAA8B,MAAM,MAAM,YAAY;IAC1D;IACA;IACA;IACA;IACD,CAAC;AACF,gBAAa,MAAM,KAAK,4BAA4B,MAAM;;;AAI9D,KAAI,CAAC,qBAAqB;EACxB,MAAMA,gBAAyC,GAC5C,qBAAqB,EACpB,UAAU,aAAa,OACxB,EACF;EAGD,MAAM,EAAE,OAAO,UAAU,MAAM,YAAY,aAAa,UAAU,EAChE,gBACD,CAAC;AAEF,gBAAc,WAAW;EAEzB,MAAM,MAAMC,eAAO,UAAU,aAAa,UAAU,WAAW;EAE/D,MAAM,eAAe,MAAMA,eAAO,QAAQ,eAAe,KAAK;GAC5D;GACA,mBAAmB;GACpB,CAAC;AAEF,SAAO,aAAa;AAEpB,SAAO,aAAa;;;;;;AAOpB,MAAI,aAAa,QAAQ,aACvB,cAAa,QAAQ,aAAa,MAAM;EAI1C,MAAM,MAAM,OAAO,KAAK,aAAa,CAAC;AACtC,iBAAO,SAAS,aAAa,UAAU,KAAK,aAAa,KAAK;QACzD;AAEL,SAAO,aAAa,MAAM;AAC1B,iBAAO,SAAS,aAAa,UAAU,SAAS,aAAa,MAAM;;AAGrE,QAAO,gBAAgB,SAAS,aAAa,UAAU,8BAA8B"}
@@ -2,17 +2,17 @@
2
2
 
3
3
  const require_DataIntegrityProof = require('./models/DataIntegrityProof.js');
4
4
  const require_W3cJsonLdVerifiableCredential = require('./models/W3cJsonLdVerifiableCredential.js');
5
+ const require_deriveProof = require('./deriveProof.js');
6
+ const require_index = require('./libraries/index.js');
7
+ const require_IAnonCredsDataIntegrityService = require('./models/IAnonCredsDataIntegrityService.js');
8
+ const require_LdKeyPair = require('./models/LdKeyPair.js');
9
+ const require_W3cJsonLdVerifiablePresentation = require('./models/W3cJsonLdVerifiablePresentation.js');
10
+ require('./models/index.js');
11
+ const require_CredentialIssuancePurpose = require('./proof-purposes/CredentialIssuancePurpose.js');
12
+ require('./proof-purposes/index.js');
5
13
  const require_SignatureSuiteRegistry = require('./SignatureSuiteRegistry.js');
6
14
  const require_JwsLinkedDataSignature = require('./signature-suites/JwsLinkedDataSignature.js');
7
15
  const require_Ed25519Signature2018 = require('./signature-suites/ed25519/Ed25519Signature2018.js');
8
16
  const require_Ed25519Signature2020 = require('./signature-suites/ed25519/Ed25519Signature2020.js');
9
17
  require('./signature-suites/index.js');
10
- const require_index$1 = require('./libraries/index.js');
11
- const require_W3cJsonLdVerifiablePresentation = require('./models/W3cJsonLdVerifiablePresentation.js');
12
- const require_LdKeyPair = require('./models/LdKeyPair.js');
13
- const require_IAnonCredsDataIntegrityService = require('./models/IAnonCredsDataIntegrityService.js');
14
- require('./models/index.js');
15
- const require_CredentialIssuancePurpose = require('./proof-purposes/CredentialIssuancePurpose.js');
16
- require('./proof-purposes/index.js');
17
- const require_deriveProof = require('./deriveProof.js');
18
18
  const require_W3cJsonLdCredentialService = require('./W3cJsonLdCredentialService.js');
@@ -2,17 +2,17 @@
2
2
 
3
3
  import { DataIntegrityProof } from "./models/DataIntegrityProof.mjs";
4
4
  import { W3cJsonLdVerifiableCredential } from "./models/W3cJsonLdVerifiableCredential.mjs";
5
- import { SignatureSuiteRegistry, SignatureSuiteToken } from "./SignatureSuiteRegistry.mjs";
6
- import { JwsLinkedDataSignature } from "./signature-suites/JwsLinkedDataSignature.mjs";
7
- import { Ed25519Signature2018 } from "./signature-suites/ed25519/Ed25519Signature2018.mjs";
8
- import { Ed25519Signature2020 } from "./signature-suites/ed25519/Ed25519Signature2020.mjs";
9
- import "./signature-suites/index.mjs";
5
+ import { deriveProof } from "./deriveProof.mjs";
10
6
  import { vcLibraries } from "./libraries/index.mjs";
11
- import { W3cJsonLdVerifiablePresentation } from "./models/W3cJsonLdVerifiablePresentation.mjs";
12
- import { LdKeyPair } from "./models/LdKeyPair.mjs";
13
7
  import { ANONCREDS_DATA_INTEGRITY_CRYPTOSUITE, AnonCredsDataIntegrityServiceSymbol } from "./models/IAnonCredsDataIntegrityService.mjs";
8
+ import { LdKeyPair } from "./models/LdKeyPair.mjs";
9
+ import { W3cJsonLdVerifiablePresentation } from "./models/W3cJsonLdVerifiablePresentation.mjs";
14
10
  import "./models/index.mjs";
15
11
  import { CredentialIssuancePurpose } from "./proof-purposes/CredentialIssuancePurpose.mjs";
16
12
  import "./proof-purposes/index.mjs";
17
- import { deriveProof } from "./deriveProof.mjs";
13
+ import { SignatureSuiteRegistry, SignatureSuiteToken } from "./SignatureSuiteRegistry.mjs";
14
+ import { JwsLinkedDataSignature } from "./signature-suites/JwsLinkedDataSignature.mjs";
15
+ import { Ed25519Signature2018 } from "./signature-suites/ed25519/Ed25519Signature2018.mjs";
16
+ import { Ed25519Signature2020 } from "./signature-suites/ed25519/Ed25519Signature2020.mjs";
17
+ import "./signature-suites/index.mjs";
18
18
  import { W3cJsonLdCredentialService } from "./W3cJsonLdCredentialService.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"jsonldUtil.d.mts","names":[],"sources":["../../../../src/modules/vc/data-integrity/jsonldUtil.ts"],"sourcesContent":[],"mappings":";;;AAWY,KAAA,SAAA,GAAY,MAAA,CAAA,MAAM,EAAA,OAAA,CAAA;AACb,UAAA,kBAAA,SAA2B,UAAR,CAAA;EAAA,EAAA,EAAA,MAAA;MAEnB,EAAA,MAAA,CAAA,EAAA,SAAA;;AAFqC,UAKrC,KAAA,SAAc,UALuB,CAAA;EAKrC,kBAAM,EAAA,MAAA,GACQ,kBADR;EAAA,CAAA,GAAA,EAAA,MAAA,CAAA,EAEN,SAFM;;AAEN,UAGA,oBAAA,CAHA;YAFc,CAAA,EAAA,MAAA,GAAA,IAAA;EAAU,WAAA,EAAA,MAAA;EAKxB,QAAA,EAGL,MAHK,CAAA,MAAoB,EAAA,OAAA,CAAA;AAMrC;AAA0B,KAAd,cAAA,GAAc,CAAA,GAAA,EAAA,MAAA,EAAA,GAAoB,OAApB,CAA4B,oBAA5B,CAAA"}
1
+ {"version":3,"file":"jsonldUtil.d.mts","names":[],"sources":["../../../../src/modules/vc/data-integrity/jsonldUtil.ts"],"sourcesContent":[],"mappings":";;;AASY,KAAA,SAAA,GAAY,MAAA,CAAA,MAAM,EAAA,OAAA,CAAA;AACb,UAAA,kBAAA,SAA2B,UAAR,CAAA;EAAA,EAAA,EAAA,MAAA;MAEnB,EAAA,MAAA,CAAA,EAAA,SAAA;;AAFqC,UAKrC,KAAA,SAAc,UALuB,CAAA;EAKrC,kBAAM,EAAA,MAAA,GACQ,kBADR;EAAA,CAAA,GAAA,EAAA,MAAA,CAAA,EAEN,SAFM;;AAEN,UAGA,oBAAA,CAHA;YAFc,CAAA,EAAA,MAAA,GAAA,IAAA;EAAU,WAAA,EAAA,MAAA;EAKxB,QAAA,EAGL,MAHK,CAAA,MAAoB,EAAA,OAAA,CAAA;AAMrC;AAA0B,KAAd,cAAA,GAAc,CAAA,GAAA,EAAA,MAAA,EAAA,GAAoB,OAApB,CAA4B,oBAA5B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"jsonldUtil.d.ts","names":[],"sources":["../../../../src/modules/vc/data-integrity/jsonldUtil.ts"],"sourcesContent":[],"mappings":";;;;AAYoC,KADxB,SAAA,GAAY,MACY,CAAA,MAAA,EAAA,OAAA,CAAA;AAEnB,UAFA,kBAAA,SAA2B,UAE3B,CAAA;MAF2B,MAAA;EAAU,CAAA,GAAA,EAAA,MAAA,CAAA,EAErC,SAFqC;AAKtD;AAAuB,UAAN,KAAA,SAAc,UAAR,CAAA;oBACQ,EAAA,MAAA,GAAA,kBAAA;MACd,EAAA,MAAA,CAAA,EAAA,SAAA;;AAFwB,UAKxB,oBAAA,CALwB;EAKxB,UAAA,CAAA,EAAA,MAAA,GAAA,IAAoB;EAMzB,WAAA,EAAA,MAAc;EAAA,QAAA,EAHd,MAGc,CAAA,MAAA,EAAA,OAAA,CAAA;;AAAoB,KAAlC,cAAA,GAAkC,CAAA,GAAA,EAAA,MAAA,EAAA,GAAA,OAAA,CAAQ,oBAAR,CAAA"}
1
+ {"version":3,"file":"jsonldUtil.d.ts","names":[],"sources":["../../../../src/modules/vc/data-integrity/jsonldUtil.ts"],"sourcesContent":[],"mappings":";;;;AAUoC,KADxB,SAAA,GAAY,MACY,CAAA,MAAA,EAAA,OAAA,CAAA;AAEnB,UAFA,kBAAA,SAA2B,UAE3B,CAAA;MAF2B,MAAA;EAAU,CAAA,GAAA,EAAA,MAAA,CAAA,EAErC,SAFqC;AAKtD;AAAuB,UAAN,KAAA,SAAc,UAAR,CAAA;oBACQ,EAAA,MAAA,GAAA,kBAAA;MACd,EAAA,MAAA,CAAA,EAAA,SAAA;;AAFwB,UAKxB,oBAAA,CALwB;EAKxB,UAAA,CAAA,EAAA,MAAA,GAAA,IAAoB;EAMzB,WAAA,EAAA,MAAc;EAAA,QAAA,EAHd,MAGc,CAAA,MAAA,EAAA,OAAA,CAAA;;AAAoB,KAAlC,cAAA,GAAkC,CAAA,GAAA,EAAA,MAAA,EAAA,GAAA,OAAA,CAAQ,oBAAR,CAAA"}
@@ -3,8 +3,8 @@
3
3
  const require_CredoError = require('../../../error/CredoError.js');
4
4
  require('../../../error/index.js');
5
5
  const require_constants = require('../constants.js');
6
- const require_W3cJsonLdVerifiableCredential = require('./models/W3cJsonLdVerifiableCredential.js');
7
6
  const require_jsonld = require('./libraries/jsonld.js');
7
+ const require_W3cJsonLdVerifiableCredential = require('./models/W3cJsonLdVerifiableCredential.js');
8
8
 
9
9
  //#region src/modules/vc/data-integrity/jsonldUtil.ts
10
10
  const _includesContext = (options) => {
@@ -3,8 +3,8 @@
3
3
  import { CredoError } from "../../../error/CredoError.mjs";
4
4
  import "../../../error/index.mjs";
5
5
  import { SECURITY_CONTEXT_URL } from "../constants.mjs";
6
- import { W3cJsonLdVerifiableCredential } from "./models/W3cJsonLdVerifiableCredential.mjs";
7
6
  import jsonld_default from "./libraries/jsonld.mjs";
7
+ import { W3cJsonLdVerifiableCredential } from "./models/W3cJsonLdVerifiableCredential.mjs";
8
8
 
9
9
  //#region src/modules/vc/data-integrity/jsonldUtil.ts
10
10
  const _includesContext = (options) => {
@@ -1 +1 @@
1
- {"version":3,"file":"jsonldUtil.mjs","names":["jsonld","toExpand: Record<string, unknown>"],"sources":["../../../../src/modules/vc/data-integrity/jsonldUtil.ts"],"sourcesContent":["import type { JsonObject, JsonValue } from '../../../types'\nimport type { GetProofsOptions } from './models/GetProofsOptions'\nimport type { GetProofsResult } from './models/GetProofsResult'\nimport type { GetTypeOptions } from './models/GetTypeOptions'\n\nimport { CredoError } from '../../../error'\nimport { SECURITY_CONTEXT_URL } from '../constants'\n\nimport jsonld from './libraries/jsonld'\nimport { W3cJsonLdVerifiableCredential } from './models/W3cJsonLdVerifiableCredential'\n\nexport type JsonLdDoc = Record<string, unknown>\nexport interface VerificationMethod extends JsonObject {\n id: string\n [key: string]: JsonValue\n}\n\nexport interface Proof extends JsonObject {\n verificationMethod: string | VerificationMethod\n [key: string]: JsonValue\n}\n\nexport interface DocumentLoaderResult {\n contextUrl?: string | null\n documentUrl: string\n document: Record<string, unknown>\n}\n\nexport type DocumentLoader = (url: string) => Promise<DocumentLoaderResult>\n\nexport const _includesContext = (options: { document: JsonLdDoc; contextUrl: string }) => {\n const context = options.document['@context']\n\n return context === options.contextUrl || (Array.isArray(context) && context.includes(options.contextUrl))\n}\n\nexport function assertOnlyW3cJsonLdVerifiableCredentials(\n credentials: unknown[]\n): asserts credentials is W3cJsonLdVerifiableCredential[] {\n if (credentials.some((c) => !(c instanceof W3cJsonLdVerifiableCredential))) {\n throw new CredoError('JSON-LD VPs can only contain JSON-LD VCs')\n }\n}\n\n/*\n * The code in this file originated from\n * @see https://github.com/digitalbazaar/jsonld-signatures\n * Hence the following copyright notice applies\n *\n * Copyright (c) 2017-2018 Digital Bazaar, Inc. All rights reserved.\n */\n\n/**\n * The property identifying the linked data proof\n * Note - this will not work for legacy systems that\n * relying on `signature`\n */\nconst PROOF_PROPERTY = 'proof'\n\n/**\n * Gets a supported linked data proof from a JSON-LD Document\n * Note - unless instructed not to the document will be compacted\n * against the security v2 context @see https://w3id.org/security/v2\n *\n * @param options Options for extracting the proof from the document\n *\n * @returns {GetProofsResult} An object containing the matched proofs and the JSON-LD document\n */\nexport const getProofs = async (options: GetProofsOptions): Promise<GetProofsResult> => {\n const { proofType, skipProofCompaction, documentLoader } = options\n let { document } = options\n\n // biome-ignore lint/suspicious/noImplicitAnyLet: <explanation>\n let proofs\n if (!skipProofCompaction) {\n // If we must compact the proof then we must first compact the input\n // document to find the proof\n document = await jsonld.compact(document, SECURITY_CONTEXT_URL, {\n documentLoader,\n compactToRelative: false,\n })\n }\n\n // @ts-ignore - needed because getValues is not part of the public API.\n proofs = jsonld.getValues(document, PROOF_PROPERTY)\n delete document[PROOF_PROPERTY]\n\n if (typeof proofType === 'string') {\n proofs = proofs.filter((_: Record<string, unknown>) => _.type === proofType)\n }\n if (Array.isArray(proofType)) {\n proofs = proofs.filter((_: Record<string, unknown>) => proofType.includes(_.type))\n }\n\n proofs = proofs.map((matchedProof: Record<string, unknown>) => ({\n '@context': SECURITY_CONTEXT_URL,\n ...matchedProof,\n }))\n\n return {\n proofs,\n document,\n }\n}\n\n/**\n * Gets the JSON-LD type information for a document\n * @param document {any} JSON-LD document to extract the type information from\n * @param options {GetTypeInfoOptions} Options for extracting the JSON-LD document\n *\n * @returns {object} Type info for the JSON-LD document\n */\nexport const getTypeInfo = async (\n document: JsonObject,\n options: GetTypeOptions\n): Promise<{ types: string[]; alias: string }> => {\n const { documentLoader } = options\n\n // determine `@type` alias, if any\n // @ts-ignore - needed because getValues is not part of the public API.\n const context = jsonld.getValues(document, '@context')\n\n const compacted = await jsonld.compact({ '@type': '_:b0' }, context, {\n documentLoader,\n })\n\n // biome-ignore lint/performance/noDelete: <explanation>\n delete compacted['@context']\n\n const alias = Object.keys(compacted)[0]\n\n // optimize: expand only `@type` and `type` values\n const toExpand: Record<string, unknown> = { '@context': context }\n\n // @ts-ignore - needed because getValues is not part of the public API.\n toExpand['@type'] = jsonld.getValues(document, '@type').concat(jsonld.getValues(document, alias))\n\n const expanded = (await jsonld.expand(toExpand, { documentLoader }))[0] || {}\n\n // @ts-ignore - needed because getValues is not part of the public API.\n return { types: jsonld.getValues(expanded, '@type'), alias }\n}\n"],"mappings":";;;;;;;;;AA8BA,MAAa,oBAAoB,YAAyD;CACxF,MAAM,UAAU,QAAQ,SAAS;AAEjC,QAAO,YAAY,QAAQ,cAAe,MAAM,QAAQ,QAAQ,IAAI,QAAQ,SAAS,QAAQ,WAAW;;AAG1G,SAAgB,yCACd,aACwD;AACxD,KAAI,YAAY,MAAM,MAAM,EAAE,aAAa,+BAA+B,CACxE,OAAM,IAAI,WAAW,2CAA2C;;;;;;;AAiBpE,MAAM,iBAAiB;;;;;;;;;;AAWvB,MAAa,YAAY,OAAO,YAAwD;CACtF,MAAM,EAAE,WAAW,qBAAqB,mBAAmB;CAC3D,IAAI,EAAE,aAAa;CAGnB,IAAI;AACJ,KAAI,CAAC,oBAGH,YAAW,MAAMA,eAAO,QAAQ,UAAU,sBAAsB;EAC9D;EACA,mBAAmB;EACpB,CAAC;AAIJ,UAASA,eAAO,UAAU,UAAU,eAAe;AACnD,QAAO,SAAS;AAEhB,KAAI,OAAO,cAAc,SACvB,UAAS,OAAO,QAAQ,MAA+B,EAAE,SAAS,UAAU;AAE9E,KAAI,MAAM,QAAQ,UAAU,CAC1B,UAAS,OAAO,QAAQ,MAA+B,UAAU,SAAS,EAAE,KAAK,CAAC;AAGpF,UAAS,OAAO,KAAK,kBAA2C;EAC9D,YAAY;EACZ,GAAG;EACJ,EAAE;AAEH,QAAO;EACL;EACA;EACD;;;;;;;;;AAUH,MAAa,cAAc,OACzB,UACA,YACgD;CAChD,MAAM,EAAE,mBAAmB;CAI3B,MAAM,UAAUA,eAAO,UAAU,UAAU,WAAW;CAEtD,MAAM,YAAY,MAAMA,eAAO,QAAQ,EAAE,SAAS,QAAQ,EAAE,SAAS,EACnE,gBACD,CAAC;AAGF,QAAO,UAAU;CAEjB,MAAM,QAAQ,OAAO,KAAK,UAAU,CAAC;CAGrC,MAAMC,WAAoC,EAAE,YAAY,SAAS;AAGjE,UAAS,WAAWD,eAAO,UAAU,UAAU,QAAQ,CAAC,OAAOA,eAAO,UAAU,UAAU,MAAM,CAAC;CAEjG,MAAM,YAAY,MAAMA,eAAO,OAAO,UAAU,EAAE,gBAAgB,CAAC,EAAE,MAAM,EAAE;AAG7E,QAAO;EAAE,OAAOA,eAAO,UAAU,UAAU,QAAQ;EAAE;EAAO"}
1
+ {"version":3,"file":"jsonldUtil.mjs","names":["jsonld","toExpand: Record<string, unknown>"],"sources":["../../../../src/modules/vc/data-integrity/jsonldUtil.ts"],"sourcesContent":["import { CredoError } from '../../../error'\nimport type { JsonObject, JsonValue } from '../../../types'\nimport { SECURITY_CONTEXT_URL } from '../constants'\nimport jsonld from './libraries/jsonld'\nimport type { GetProofsOptions } from './models/GetProofsOptions'\nimport type { GetProofsResult } from './models/GetProofsResult'\nimport type { GetTypeOptions } from './models/GetTypeOptions'\nimport { W3cJsonLdVerifiableCredential } from './models/W3cJsonLdVerifiableCredential'\n\nexport type JsonLdDoc = Record<string, unknown>\nexport interface VerificationMethod extends JsonObject {\n id: string\n [key: string]: JsonValue\n}\n\nexport interface Proof extends JsonObject {\n verificationMethod: string | VerificationMethod\n [key: string]: JsonValue\n}\n\nexport interface DocumentLoaderResult {\n contextUrl?: string | null\n documentUrl: string\n document: Record<string, unknown>\n}\n\nexport type DocumentLoader = (url: string) => Promise<DocumentLoaderResult>\n\nexport const _includesContext = (options: { document: JsonLdDoc; contextUrl: string }) => {\n const context = options.document['@context']\n\n return context === options.contextUrl || (Array.isArray(context) && context.includes(options.contextUrl))\n}\n\nexport function assertOnlyW3cJsonLdVerifiableCredentials(\n credentials: unknown[]\n): asserts credentials is W3cJsonLdVerifiableCredential[] {\n if (credentials.some((c) => !(c instanceof W3cJsonLdVerifiableCredential))) {\n throw new CredoError('JSON-LD VPs can only contain JSON-LD VCs')\n }\n}\n\n/*\n * The code in this file originated from\n * @see https://github.com/digitalbazaar/jsonld-signatures\n * Hence the following copyright notice applies\n *\n * Copyright (c) 2017-2018 Digital Bazaar, Inc. All rights reserved.\n */\n\n/**\n * The property identifying the linked data proof\n * Note - this will not work for legacy systems that\n * relying on `signature`\n */\nconst PROOF_PROPERTY = 'proof'\n\n/**\n * Gets a supported linked data proof from a JSON-LD Document\n * Note - unless instructed not to the document will be compacted\n * against the security v2 context @see https://w3id.org/security/v2\n *\n * @param options Options for extracting the proof from the document\n *\n * @returns {GetProofsResult} An object containing the matched proofs and the JSON-LD document\n */\nexport const getProofs = async (options: GetProofsOptions): Promise<GetProofsResult> => {\n const { proofType, skipProofCompaction, documentLoader } = options\n let { document } = options\n\n // biome-ignore lint/suspicious/noImplicitAnyLet: no explanation\n let proofs\n if (!skipProofCompaction) {\n // If we must compact the proof then we must first compact the input\n // document to find the proof\n document = await jsonld.compact(document, SECURITY_CONTEXT_URL, {\n documentLoader,\n compactToRelative: false,\n })\n }\n\n proofs = jsonld.getValues(document, PROOF_PROPERTY)\n delete document[PROOF_PROPERTY]\n\n if (typeof proofType === 'string') {\n proofs = proofs.filter((_: Record<string, unknown>) => _.type === proofType)\n }\n if (Array.isArray(proofType)) {\n proofs = proofs.filter((_: Record<string, unknown>) => proofType.includes(_.type))\n }\n\n proofs = proofs.map((matchedProof: Record<string, unknown>) => ({\n '@context': SECURITY_CONTEXT_URL,\n ...matchedProof,\n }))\n\n return {\n proofs,\n document,\n }\n}\n\n/**\n * Gets the JSON-LD type information for a document\n * @param document {any} JSON-LD document to extract the type information from\n * @param options {GetTypeInfoOptions} Options for extracting the JSON-LD document\n *\n * @returns {object} Type info for the JSON-LD document\n */\nexport const getTypeInfo = async (\n document: JsonObject,\n options: GetTypeOptions\n): Promise<{ types: string[]; alias: string }> => {\n const { documentLoader } = options\n\n // determine `@type` alias, if any\n const context = jsonld.getValues(document, '@context')\n\n const compacted = await jsonld.compact({ '@type': '_:b0' }, context, {\n documentLoader,\n })\n\n // biome-ignore lint/performance/noDelete: no explanation\n delete compacted['@context']\n\n const alias = Object.keys(compacted)[0]\n\n // optimize: expand only `@type` and `type` values\n const toExpand: Record<string, unknown> = { '@context': context }\n\n toExpand['@type'] = jsonld.getValues(document, '@type').concat(jsonld.getValues(document, alias))\n\n const expanded = (await jsonld.expand(toExpand, { documentLoader }))[0] || {}\n\n return { types: jsonld.getValues(expanded, '@type'), alias }\n}\n"],"mappings":";;;;;;;;;AA4BA,MAAa,oBAAoB,YAAyD;CACxF,MAAM,UAAU,QAAQ,SAAS;AAEjC,QAAO,YAAY,QAAQ,cAAe,MAAM,QAAQ,QAAQ,IAAI,QAAQ,SAAS,QAAQ,WAAW;;AAG1G,SAAgB,yCACd,aACwD;AACxD,KAAI,YAAY,MAAM,MAAM,EAAE,aAAa,+BAA+B,CACxE,OAAM,IAAI,WAAW,2CAA2C;;;;;;;AAiBpE,MAAM,iBAAiB;;;;;;;;;;AAWvB,MAAa,YAAY,OAAO,YAAwD;CACtF,MAAM,EAAE,WAAW,qBAAqB,mBAAmB;CAC3D,IAAI,EAAE,aAAa;CAGnB,IAAI;AACJ,KAAI,CAAC,oBAGH,YAAW,MAAMA,eAAO,QAAQ,UAAU,sBAAsB;EAC9D;EACA,mBAAmB;EACpB,CAAC;AAGJ,UAASA,eAAO,UAAU,UAAU,eAAe;AACnD,QAAO,SAAS;AAEhB,KAAI,OAAO,cAAc,SACvB,UAAS,OAAO,QAAQ,MAA+B,EAAE,SAAS,UAAU;AAE9E,KAAI,MAAM,QAAQ,UAAU,CAC1B,UAAS,OAAO,QAAQ,MAA+B,UAAU,SAAS,EAAE,KAAK,CAAC;AAGpF,UAAS,OAAO,KAAK,kBAA2C;EAC9D,YAAY;EACZ,GAAG;EACJ,EAAE;AAEH,QAAO;EACL;EACA;EACD;;;;;;;;;AAUH,MAAa,cAAc,OACzB,UACA,YACgD;CAChD,MAAM,EAAE,mBAAmB;CAG3B,MAAM,UAAUA,eAAO,UAAU,UAAU,WAAW;CAEtD,MAAM,YAAY,MAAMA,eAAO,QAAQ,EAAE,SAAS,QAAQ,EAAE,SAAS,EACnE,gBACD,CAAC;AAGF,QAAO,UAAU;CAEjB,MAAM,QAAQ,OAAO,KAAK,UAAU,CAAC;CAGrC,MAAMC,WAAoC,EAAE,YAAY,SAAS;AAEjE,UAAS,WAAWD,eAAO,UAAU,UAAU,QAAQ,CAAC,OAAOA,eAAO,UAAU,UAAU,MAAM,CAAC;CAEjG,MAAM,YAAY,MAAMA,eAAO,OAAO,UAAU,EAAE,gBAAgB,CAAC,EAAE,MAAM,EAAE;AAE7E,QAAO;EAAE,OAAOA,eAAO,UAAU,UAAU,QAAQ;EAAE;EAAO"}
@@ -1,6 +1,5 @@
1
1
 
2
2
 
3
- const require_X25519_v1 = require('./X25519_v1.js');
4
3
  const require_credentials_v1 = require('./credentials_v1.js');
5
4
  const require_dataIntegrity_v2 = require('./dataIntegrity_v2.js');
6
5
  const require_did_v1 = require('./did_v1.js');
@@ -13,6 +12,7 @@ const require_security_v1 = require('./security_v1.js');
13
12
  const require_security_v2 = require('./security_v2.js');
14
13
  const require_submission = require('./submission.js');
15
14
  const require_vc_revocation_list_2020 = require('./vc_revocation_list_2020.js');
15
+ const require_X25519_v1 = require('./X25519_v1.js');
16
16
 
17
17
  //#region src/modules/vc/data-integrity/libraries/contexts/defaultContexts.ts
18
18
  const DEFAULT_CONTEXTS = {
@@ -1,6 +1,5 @@
1
1
 
2
2
 
3
- import { X25519_V1 } from "./X25519_v1.mjs";
4
3
  import { CREDENTIALS_V1 } from "./credentials_v1.mjs";
5
4
  import { DATA_INTEGRITY_V2 } from "./dataIntegrity_v2.mjs";
6
5
  import { DID_V1 } from "./did_v1.mjs";
@@ -13,6 +12,7 @@ import { SECURITY_V1 } from "./security_v1.mjs";
13
12
  import { SECURITY_V2 } from "./security_v2.mjs";
14
13
  import { PRESENTATION_SUBMISSION } from "./submission.mjs";
15
14
  import { VC_REVOCATION_LIST_2020 } from "./vc_revocation_list_2020.mjs";
15
+ import { X25519_V1 } from "./X25519_v1.mjs";
16
16
 
17
17
  //#region src/modules/vc/data-integrity/libraries/contexts/defaultContexts.ts
18
18
  const DEFAULT_CONTEXTS = {
@@ -1 +1 @@
1
- {"version":3,"file":"defaultContexts.mjs","names":[],"sources":["../../../../../../src/modules/vc/data-integrity/libraries/contexts/defaultContexts.ts"],"sourcesContent":["import { X25519_V1 } from './X25519_v1'\nimport { CREDENTIALS_V1 } from './credentials_v1'\nimport { DATA_INTEGRITY_V2 } from './dataIntegrity_v2'\nimport { DID_V1 } from './did_v1'\nimport { ED25519_V1 } from './ed25519_v1'\nimport { ODRL } from './odrl'\nimport { PURL_OB_V3P0 } from './purl_ob_v3po'\nimport { SCHEMA_ORG } from './schema_org'\nimport { SECP256K1_V1 } from './secp256k1_v1'\nimport { SECURITY_V1 } from './security_v1'\nimport { SECURITY_V2 } from './security_v2'\nimport { PRESENTATION_SUBMISSION } from './submission'\nimport { VC_REVOCATION_LIST_2020 } from './vc_revocation_list_2020'\n\nexport const DEFAULT_CONTEXTS = {\n 'https://w3id.org/security/v1': SECURITY_V1,\n 'https://w3id.org/security/v2': SECURITY_V2,\n 'https://w3id.org/security/suites/x25519-2019/v1': X25519_V1,\n 'https://w3id.org/security/suites/ed25519-2018/v1': ED25519_V1,\n 'https://w3id.org/security/suites/secp256k1-2019/v1': SECP256K1_V1,\n 'https://www.w3.org/2018/credentials/v1': CREDENTIALS_V1,\n 'https://w3id.org/did/v1': DID_V1,\n 'https://www.w3.org/ns/did/v1': DID_V1,\n 'https://w3.org/ns/did/v1': DID_V1,\n 'https://www.w3.org/ns/odrl.jsonld': ODRL,\n 'http://schema.org/': SCHEMA_ORG,\n 'https://identity.foundation/presentation-exchange/submission/v1': PRESENTATION_SUBMISSION,\n 'https://purl.imsglobal.org/spec/ob/v3p0/context.json': PURL_OB_V3P0,\n 'https://w3c-ccg.github.io/vc-status-rl-2020/contexts/vc-revocation-list-2020/v1.jsonld': VC_REVOCATION_LIST_2020,\n 'https://w3id.org/security/data-integrity/v2': DATA_INTEGRITY_V2,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAcA,MAAa,mBAAmB;CAC9B,gCAAgC;CAChC,gCAAgC;CAChC,mDAAmD;CACnD,oDAAoD;CACpD,sDAAsD;CACtD,0CAA0C;CAC1C,2BAA2B;CAC3B,gCAAgC;CAChC,4BAA4B;CAC5B,qCAAqC;CACrC,sBAAsB;CACtB,mEAAmE;CACnE,wDAAwD;CACxD,0FAA0F;CAC1F,+CAA+C;CAChD"}
1
+ {"version":3,"file":"defaultContexts.mjs","names":[],"sources":["../../../../../../src/modules/vc/data-integrity/libraries/contexts/defaultContexts.ts"],"sourcesContent":["import { CREDENTIALS_V1 } from './credentials_v1'\nimport { DATA_INTEGRITY_V2 } from './dataIntegrity_v2'\nimport { DID_V1 } from './did_v1'\nimport { ED25519_V1 } from './ed25519_v1'\nimport { ODRL } from './odrl'\nimport { PURL_OB_V3P0 } from './purl_ob_v3po'\nimport { SCHEMA_ORG } from './schema_org'\nimport { SECP256K1_V1 } from './secp256k1_v1'\nimport { SECURITY_V1 } from './security_v1'\nimport { SECURITY_V2 } from './security_v2'\nimport { PRESENTATION_SUBMISSION } from './submission'\nimport { VC_REVOCATION_LIST_2020 } from './vc_revocation_list_2020'\nimport { X25519_V1 } from './X25519_v1'\n\nexport const DEFAULT_CONTEXTS = {\n 'https://w3id.org/security/v1': SECURITY_V1,\n 'https://w3id.org/security/v2': SECURITY_V2,\n 'https://w3id.org/security/suites/x25519-2019/v1': X25519_V1,\n 'https://w3id.org/security/suites/ed25519-2018/v1': ED25519_V1,\n 'https://w3id.org/security/suites/secp256k1-2019/v1': SECP256K1_V1,\n 'https://www.w3.org/2018/credentials/v1': CREDENTIALS_V1,\n 'https://w3id.org/did/v1': DID_V1,\n 'https://www.w3.org/ns/did/v1': DID_V1,\n 'https://w3.org/ns/did/v1': DID_V1,\n 'https://www.w3.org/ns/odrl.jsonld': ODRL,\n 'http://schema.org/': SCHEMA_ORG,\n 'https://identity.foundation/presentation-exchange/submission/v1': PRESENTATION_SUBMISSION,\n 'https://purl.imsglobal.org/spec/ob/v3p0/context.json': PURL_OB_V3P0,\n 'https://w3c-ccg.github.io/vc-status-rl-2020/contexts/vc-revocation-list-2020/v1.jsonld': VC_REVOCATION_LIST_2020,\n 'https://w3id.org/security/data-integrity/v2': DATA_INTEGRITY_V2,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAcA,MAAa,mBAAmB;CAC9B,gCAAgC;CAChC,gCAAgC;CAChC,mDAAmD;CACnD,oDAAoD;CACpD,sDAAsD;CACtD,0CAA0C;CAC1C,2BAA2B;CAC3B,gCAAgC;CAChC,4BAA4B;CAC5B,qCAAqC;CACrC,sBAAsB;CACtB,mEAAmE;CACnE,wDAAwD;CACxD,0FAA0F;CAC1F,+CAA+C;CAChD"}
@@ -1 +1 @@
1
- {"version":3,"file":"documentLoader.d.mts","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/documentLoader.ts"],"sourcesContent":[],"mappings":";;;;KAWY,yBAAA,kBAA2C,iBAAiB"}
1
+ {"version":3,"file":"documentLoader.d.mts","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/documentLoader.ts"],"sourcesContent":[],"mappings":";;;;KASY,yBAAA,kBAA2C,iBAAiB"}
@@ -1 +1 @@
1
- {"version":3,"file":"documentLoader.d.ts","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/documentLoader.ts"],"sourcesContent":[],"mappings":";;;;KAWY,yBAAA,kBAA2C,iBAAiB"}
1
+ {"version":3,"file":"documentLoader.d.ts","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/documentLoader.ts"],"sourcesContent":[],"mappings":";;;;KASY,yBAAA,kBAA2C,iBAAiB"}
@@ -1 +1 @@
1
- {"version":3,"file":"documentLoader.mjs","names":["jsonld"],"sources":["../../../../../src/modules/vc/data-integrity/libraries/documentLoader.ts"],"sourcesContent":["import type { AgentContext } from '../../../../agent/context/AgentContext'\nimport type { DocumentLoader } from './jsonld'\n\nimport { CredoError } from '../../../../error/CredoError'\nimport { isDid } from '../../../../utils'\nimport { DidResolverService } from '../../../dids'\n\nimport { DEFAULT_CONTEXTS } from './contexts'\nimport jsonld from './jsonld'\nimport { getNativeDocumentLoader } from './nativeDocumentLoader'\n\nexport type DocumentLoaderWithContext = (agentContext: AgentContext) => DocumentLoader\n\nexport function defaultDocumentLoader(agentContext: AgentContext): DocumentLoader {\n const didResolver = agentContext.dependencyManager.resolve(DidResolverService)\n\n async function loader(url: string) {\n // Check if in the default contexts shipped with Credo\n if (url in DEFAULT_CONTEXTS) {\n return {\n contextUrl: null,\n documentUrl: url,\n document: DEFAULT_CONTEXTS[url as keyof typeof DEFAULT_CONTEXTS],\n }\n }\n\n const withoutFragment = url.split('#')[0]\n if (withoutFragment in DEFAULT_CONTEXTS) {\n return {\n contextUrl: null,\n documentUrl: url,\n document: DEFAULT_CONTEXTS[url as keyof typeof DEFAULT_CONTEXTS],\n }\n }\n\n if (isDid(url)) {\n const result = await didResolver.resolve(agentContext, url)\n\n if (result.didResolutionMetadata.error || !result.didDocument) {\n throw new CredoError(`Unable to resolve DID: ${url}`)\n }\n\n const framed = await jsonld.frame(\n result.didDocument.toJSON(),\n {\n '@context': result.didDocument.context,\n '@embed': '@never',\n id: url,\n },\n // @ts-ignore\n { documentLoader: this }\n )\n\n return {\n contextUrl: null,\n documentUrl: url,\n document: framed,\n }\n }\n\n // fetches the documentLoader from documentLoader.ts or documentLoader.native.ts depending on the platform at bundle time\n const platformLoader = await getNativeDocumentLoader()\n const nativeLoader = platformLoader.apply(jsonld, [])\n\n return await nativeLoader(url)\n }\n\n return loader.bind(loader)\n}\n"],"mappings":";;;;;;;;;;;;AAaA,SAAgB,sBAAsB,cAA4C;CAChF,MAAM,cAAc,aAAa,kBAAkB,QAAQ,mBAAmB;CAE9E,eAAe,OAAO,KAAa;AAEjC,MAAI,OAAO,iBACT,QAAO;GACL,YAAY;GACZ,aAAa;GACb,UAAU,iBAAiB;GAC5B;AAIH,MADwB,IAAI,MAAM,IAAI,CAAC,MAChB,iBACrB,QAAO;GACL,YAAY;GACZ,aAAa;GACb,UAAU,iBAAiB;GAC5B;AAGH,MAAI,MAAM,IAAI,EAAE;GACd,MAAM,SAAS,MAAM,YAAY,QAAQ,cAAc,IAAI;AAE3D,OAAI,OAAO,sBAAsB,SAAS,CAAC,OAAO,YAChD,OAAM,IAAI,WAAW,0BAA0B,MAAM;AAcvD,UAAO;IACL,YAAY;IACZ,aAAa;IACb,UAda,MAAMA,eAAO,MAC1B,OAAO,YAAY,QAAQ,EAC3B;KACE,YAAY,OAAO,YAAY;KAC/B,UAAU;KACV,IAAI;KACL,EAED,EAAE,gBAAgB,MAAM,CACzB;IAMA;;AAOH,SAAO,OAHgB,MAAM,yBAAyB,EAClB,MAAMA,gBAAQ,EAAE,CAAC,CAE3B,IAAI;;AAGhC,QAAO,OAAO,KAAK,OAAO"}
1
+ {"version":3,"file":"documentLoader.mjs","names":["jsonld"],"sources":["../../../../../src/modules/vc/data-integrity/libraries/documentLoader.ts"],"sourcesContent":["import type { AgentContext } from '../../../../agent/context/AgentContext'\nimport { CredoError } from '../../../../error/CredoError'\nimport { isDid } from '../../../../utils'\nimport { DidResolverService } from '../../../dids'\nimport { DEFAULT_CONTEXTS } from './contexts'\nimport type { DocumentLoader } from './jsonld'\nimport jsonld from './jsonld'\nimport { getNativeDocumentLoader } from './nativeDocumentLoader'\n\nexport type DocumentLoaderWithContext = (agentContext: AgentContext) => DocumentLoader\n\nexport function defaultDocumentLoader(agentContext: AgentContext): DocumentLoader {\n const didResolver = agentContext.dependencyManager.resolve(DidResolverService)\n\n async function loader(url: string) {\n // Check if in the default contexts shipped with Credo\n if (url in DEFAULT_CONTEXTS) {\n return {\n contextUrl: null,\n documentUrl: url,\n document: DEFAULT_CONTEXTS[url as keyof typeof DEFAULT_CONTEXTS],\n }\n }\n\n const withoutFragment = url.split('#')[0]\n if (withoutFragment in DEFAULT_CONTEXTS) {\n return {\n contextUrl: null,\n documentUrl: url,\n document: DEFAULT_CONTEXTS[url as keyof typeof DEFAULT_CONTEXTS],\n }\n }\n\n if (isDid(url)) {\n const result = await didResolver.resolve(agentContext, url)\n\n if (result.didResolutionMetadata.error || !result.didDocument) {\n throw new CredoError(`Unable to resolve DID: ${url}`)\n }\n\n const framed = await jsonld.frame(\n result.didDocument.toJSON(),\n {\n '@context': result.didDocument.context,\n '@embed': '@never',\n id: url,\n },\n // @ts-expect-error\n { documentLoader: this }\n )\n\n return {\n contextUrl: null,\n documentUrl: url,\n document: framed,\n }\n }\n\n // fetches the documentLoader from documentLoader.ts or documentLoader.native.ts depending on the platform at bundle time\n const platformLoader = await getNativeDocumentLoader()\n const nativeLoader = platformLoader.apply(jsonld, [])\n\n return await nativeLoader(url)\n }\n\n return loader.bind(loader)\n}\n"],"mappings":";;;;;;;;;;;;AAWA,SAAgB,sBAAsB,cAA4C;CAChF,MAAM,cAAc,aAAa,kBAAkB,QAAQ,mBAAmB;CAE9E,eAAe,OAAO,KAAa;AAEjC,MAAI,OAAO,iBACT,QAAO;GACL,YAAY;GACZ,aAAa;GACb,UAAU,iBAAiB;GAC5B;AAIH,MADwB,IAAI,MAAM,IAAI,CAAC,MAChB,iBACrB,QAAO;GACL,YAAY;GACZ,aAAa;GACb,UAAU,iBAAiB;GAC5B;AAGH,MAAI,MAAM,IAAI,EAAE;GACd,MAAM,SAAS,MAAM,YAAY,QAAQ,cAAc,IAAI;AAE3D,OAAI,OAAO,sBAAsB,SAAS,CAAC,OAAO,YAChD,OAAM,IAAI,WAAW,0BAA0B,MAAM;AAcvD,UAAO;IACL,YAAY;IACZ,aAAa;IACb,UAda,MAAMA,eAAO,MAC1B,OAAO,YAAY,QAAQ,EAC3B;KACE,YAAY,OAAO,YAAY;KAC/B,UAAU;KACV,IAAI;KACL,EAED,EAAE,gBAAgB,MAAM,CACzB;IAMA;;AAOH,SAAO,OAHgB,MAAM,yBAAyB,EAClB,MAAMA,gBAAQ,EAAE,CAAC,CAE3B,IAAI;;AAGhC,QAAO,OAAO,KAAK,OAAO"}
@@ -1,7 +1,7 @@
1
1
 
2
2
 
3
- const require_jsonld_signatures = require('./jsonld-signatures.js');
4
3
  const require_jsonld = require('./jsonld.js');
4
+ const require_jsonld_signatures = require('./jsonld-signatures.js');
5
5
  const require_vc = require('./vc.js');
6
6
 
7
7
  //#region src/modules/vc/data-integrity/libraries/index.ts
@@ -1,7 +1,7 @@
1
1
 
2
2
 
3
- import { jsonld_signatures_exports } from "./jsonld-signatures.mjs";
4
3
  import jsonld_default, { jsonld_exports } from "./jsonld.mjs";
4
+ import { jsonld_signatures_exports } from "./jsonld-signatures.mjs";
5
5
  import vc_default, { vc_exports } from "./vc.mjs";
6
6
 
7
7
  //#region src/modules/vc/data-integrity/libraries/index.ts
@@ -1 +1 @@
1
- {"version":3,"file":"jsonld-signatures.d.mts","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/jsonld-signatures.ts"],"sourcesContent":[],"mappings":";;;UAKiB,MAAA;;;;UAOA,QAAA;;;;KAQZ,SAAA;cAEQ,QAAyB;cAEzB,UAA6B;cAE7B,WAA+B"}
1
+ {"version":3,"file":"jsonld-signatures.d.mts","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/jsonld-signatures.ts"],"sourcesContent":[],"mappings":";;;UAMiB,MAAA;;;;UAOA,QAAA;;;;KAQZ,SAAA;cAEQ,QAAyB;cAEzB,UAA6B;cAE7B,WAA+B"}
@@ -1 +1 @@
1
- {"version":3,"file":"jsonld-signatures.d.ts","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/jsonld-signatures.ts"],"sourcesContent":[],"mappings":";;;UAKiB,MAAA;;;;UAOA,QAAA;;;;KAQZ,SAAA;cAEQ,QAAyB;AAjBrB,cAmBJ,QAnBU,EAmBmB,QAnBnB;AAON,cAcJ,SAdY,EAcmB,SAdnB"}
1
+ {"version":3,"file":"jsonld-signatures.d.ts","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/jsonld-signatures.ts"],"sourcesContent":[],"mappings":";;;UAMiB,MAAA;;;;UAOA,QAAA;;;;KAQZ,SAAA;cAEQ,QAAyB;AAjBrB,cAmBJ,QAnBU,EAmBmB,QAnBnB;AAON,cAcJ,SAdY,EAcmB,SAdnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"jsonld-signatures.mjs","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/jsonld-signatures.ts"],"sourcesContent":["// No type definitions available for this library\n//@ts-ignore\nimport jsonLdSignatures from '@digitalcredentials/jsonld-signatures'\nconst { constants: JsonLdConstants, purposes: JsonLdPurposes, suites: JsonLdSuites } = jsonLdSignatures\n\nexport interface Suites {\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n LinkedDataSignature: any\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n LinkedDataProof: any\n}\n\nexport interface Purposes {\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n AssertionProofPurpose: any\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n AuthenticationProofPurpose: any\n}\n\n// biome-ignore lint/suspicious/noExplicitAny: <explanation>\ntype Constants = any\n\nexport const suites = JsonLdSuites as Suites\n\nexport const purposes = JsonLdPurposes as Purposes\n\nexport const constants = JsonLdConstants as Constants\n"],"mappings":";;;;;;;;;;;AAGA,MAAM,EAAE,WAAW,iBAAiB,UAAU,gBAAgB,QAAQ,iBAAiB;AAmBvF,MAAa,SAAS;AAEtB,MAAa,WAAW;AAExB,MAAa,YAAY"}
1
+ {"version":3,"file":"jsonld-signatures.mjs","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/jsonld-signatures.ts"],"sourcesContent":["// No type definitions available for this library\n//@ts-expect-error\nimport jsonLdSignatures from '@digitalcredentials/jsonld-signatures'\n\nconst { constants: JsonLdConstants, purposes: JsonLdPurposes, suites: JsonLdSuites } = jsonLdSignatures\n\nexport interface Suites {\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n LinkedDataSignature: any\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n LinkedDataProof: any\n}\n\nexport interface Purposes {\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n AssertionProofPurpose: any\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n AuthenticationProofPurpose: any\n}\n\n// biome-ignore lint/suspicious/noExplicitAny: no explanation\ntype Constants = any\n\nexport const suites = JsonLdSuites as Suites\n\nexport const purposes = JsonLdPurposes as Purposes\n\nexport const constants = JsonLdConstants as Constants\n"],"mappings":";;;;;;;;;;;AAIA,MAAM,EAAE,WAAW,iBAAiB,UAAU,gBAAgB,QAAQ,iBAAiB;AAmBvF,MAAa,SAAS;AAEtB,MAAa,WAAW;AAExB,MAAa,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"jsonld.mjs","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/jsonld.ts"],"sourcesContent":["// No type definitions available for this library\n//@ts-ignore\nimport jsonld from '@digitalcredentials/jsonld'\n\nexport interface JsonLd {\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n compact(document: any, context: any, options?: any): any\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n fromRDF(document: any): any\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n frame(document: any, revealDocument: any, options?: any): any\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n canonize(document: any, options?: any): any\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n expand(document: any, options?: any): any\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n getValues(document: any, key: string): any\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n addValue(document: any, key: string, value: any): void\n}\n\nexport interface DocumentLoaderResult {\n contextUrl?: string | null\n documentUrl: string\n document: Record<string, unknown>\n}\n\nexport type DocumentLoader = (url: string) => Promise<DocumentLoaderResult>\n\nexport default jsonld as unknown as JsonLd\n"],"mappings":";;;;;;;AA6BA,qBAAe"}
1
+ {"version":3,"file":"jsonld.mjs","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/jsonld.ts"],"sourcesContent":["// No type definitions available for this library\n//@ts-expect-error\nimport jsonld from '@digitalcredentials/jsonld'\n\nexport interface JsonLd {\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n compact(document: any, context: any, options?: any): any\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n fromRDF(document: any): any\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n frame(document: any, revealDocument: any, options?: any): any\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n canonize(document: any, options?: any): any\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n expand(document: any, options?: any): any\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n getValues(document: any, key: string): any\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n addValue(document: any, key: string, value: any): void\n}\n\nexport interface DocumentLoaderResult {\n contextUrl?: string | null\n documentUrl: string\n document: Record<string, unknown>\n}\n\nexport type DocumentLoader = (url: string) => Promise<DocumentLoaderResult>\n\nexport default jsonld as unknown as JsonLd\n"],"mappings":";;;;;;;AA6BA,qBAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"nativeDocumentLoader.mjs","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/nativeDocumentLoader.ts"],"sourcesContent":["import type { DocumentLoader } from './jsonld'\n\nexport async function getNativeDocumentLoader(): Promise<() => DocumentLoader> {\n // @ts-ignore package doesn't have types\n const loader = await import('@digitalcredentials/jsonld/lib/documentLoaders/node')\n\n if (!loader) throw new Error('Could not load node document loader. Module did not contain a loader function')\n if (typeof loader === 'function') return loader\n if (typeof loader === 'object' && typeof loader.default === 'function') return loader.default\n\n throw new Error('Could not load node document loader. Module did not contain a loader function.')\n}\n"],"mappings":";;;AAEA,eAAsB,0BAAyD;CAE7E,MAAM,SAAS,MAAM,OAAO;AAE5B,KAAI,CAAC,OAAQ,OAAM,IAAI,MAAM,gFAAgF;AAC7G,KAAI,OAAO,WAAW,WAAY,QAAO;AACzC,KAAI,OAAO,WAAW,YAAY,OAAO,OAAO,YAAY,WAAY,QAAO,OAAO;AAEtF,OAAM,IAAI,MAAM,iFAAiF"}
1
+ {"version":3,"file":"nativeDocumentLoader.mjs","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/nativeDocumentLoader.ts"],"sourcesContent":["import type { DocumentLoader } from './jsonld'\n\nexport async function getNativeDocumentLoader(): Promise<() => DocumentLoader> {\n // @ts-expect-error package doesn't have types\n const loader = await import('@digitalcredentials/jsonld/lib/documentLoaders/node')\n\n if (!loader) throw new Error('Could not load node document loader. Module did not contain a loader function')\n if (typeof loader === 'function') return loader\n if (typeof loader === 'object' && typeof loader.default === 'function') return loader.default\n\n throw new Error('Could not load node document loader. Module did not contain a loader function.')\n}\n"],"mappings":";;;AAEA,eAAsB,0BAAyD;CAE7E,MAAM,SAAS,MAAM,OAAO;AAE5B,KAAI,CAAC,OAAQ,OAAM,IAAI,MAAM,gFAAgF;AAC7G,KAAI,OAAO,WAAW,WAAY,QAAO;AACzC,KAAI,OAAO,WAAW,YAAY,OAAO,OAAO,YAAY,WAAY,QAAO,OAAO;AAEtF,OAAM,IAAI,MAAM,iFAAiF"}
@@ -1 +1 @@
1
- {"version":3,"file":"vc.d.mts","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/vc.ts"],"sourcesContent":[],"mappings":";;;UAMiB,EAAA;uBAEM,QAAQ;kCAEG,QAAQ;oCAEN,QAAQ;EAN3B,gBAAE,CAAA,OAAA,EAAA,GAAA,CAAA,EAQe,OARf,CAQuB,MARvB,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA;EAAA,MAAA,CAAA,OAAA,EAAA,GAAA,CAAA,EAUK,OAVL,CAUa,2BAVb,CAAA;;UAaT,qBAAA,CAXa;SAEmB,EAAA,OAAA;OAAR,CAAA,EAYxB,KAZwB;oBAEU,CAAA,EAYrB,UAZqB;OAAR,CAAA,EAa1B,UAb0B;eAEM,CAAA,EAYxB,UAZwB;;AAEV,UAaf,yBAAA,CAbe;UAAR,EAAA,OAAA;EAAO,KAAA,CAAA,EAerB,KAfqB;EAGrB,OAAA,EAaC,qBAboB,EAAA;;AAGrB,UAaO,2BAAA,CAbP;UAEa,EAAA,OAAA;OACb,CAAA,EAYA,KAZA;oBACQ,EAaI,qBAbJ;EAAU,iBAAA,EAcP,yBAdO,EAAA;AAG5B"}
1
+ {"version":3,"file":"vc.d.mts","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/vc.ts"],"sourcesContent":[],"mappings":";;;UAKiB,EAAA;uBAEM,QAAQ;kCAEG,QAAQ;oCAEN,QAAQ;EAN3B,gBAAE,CAAA,OAAA,EAAA,GAAA,CAAA,EAQe,OARf,CAQuB,MARvB,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA;EAAA,MAAA,CAAA,OAAA,EAAA,GAAA,CAAA,EAUK,OAVL,CAUa,2BAVb,CAAA;;UAaT,qBAAA,CAXa;SAEmB,EAAA,OAAA;OAAR,CAAA,EAYxB,KAZwB;oBAEU,CAAA,EAYrB,UAZqB;OAAR,CAAA,EAa1B,UAb0B;eAEM,CAAA,EAYxB,UAZwB;;AAEV,UAaf,yBAAA,CAbe;UAAR,EAAA,OAAA;EAAO,KAAA,CAAA,EAerB,KAfqB;EAGrB,OAAA,EAaC,qBAboB,EAAA;;AAGrB,UAaO,2BAAA,CAbP;UAEa,EAAA,OAAA;OACb,CAAA,EAYA,KAZA;oBACQ,EAaI,qBAbJ;EAAU,iBAAA,EAcP,yBAdO,EAAA;AAG5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"vc.d.ts","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/vc.ts"],"sourcesContent":[],"mappings":";;;UAMiB,EAAA;uBAEM,QAAQ;EAFd,gBAAE,CAAA,OAAA,EAAA,GAAA,CAAA,EAIe,OAJf,CAIuB,yBAJvB,CAAA;EAAA,kBAAA,CAAA,OAAA,EAAA,GAAA,CAAA,EAMiB,OANjB,CAMyB,MANzB,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA;kBAEY,CAAA,OAAA,EAAA,GAAA,CAAA,EAMG,OANH,CAMW,MANX,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA;QAAR,CAAA,OAAA,EAAA,GAAA,CAAA,EAQC,OARD,CAQS,2BART,CAAA;;UAWb,qBAAA,CATwB;SAEU,EAAA,OAAA;OAAR,CAAA,EAU1B,KAV0B;oBAEM,CAAA,EAUnB,UAVmB;OAAR,CAAA,EAWxB,UAXwB;eAEF,CAAA,EAUd,UAVc;;AAAD,UAad,yBAAA,CAbc;EAGrB,QAAA,EAAA,OAAA;EAAqB,KAAA,CAAA,EAYrB,KAZqB;SAGrB,EAUC,qBAVD,EAAA;;AAGA,UAUO,2BAAA,CAVP;UACQ,EAAA,OAAA;EAAU,KAAA,CAAA,EAWlB,KAXkB;EAGX,kBAAA,EAUK,qBAVoB;EAAA,iBAAA,EAWrB,yBAXqB,EAAA"}
1
+ {"version":3,"file":"vc.d.ts","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/vc.ts"],"sourcesContent":[],"mappings":";;;UAKiB,EAAA;uBAEM,QAAQ;EAFd,gBAAE,CAAA,OAAA,EAAA,GAAA,CAAA,EAIe,OAJf,CAIuB,yBAJvB,CAAA;EAAA,kBAAA,CAAA,OAAA,EAAA,GAAA,CAAA,EAMiB,OANjB,CAMyB,MANzB,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA;kBAEY,CAAA,OAAA,EAAA,GAAA,CAAA,EAMG,OANH,CAMW,MANX,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA;QAAR,CAAA,OAAA,EAAA,GAAA,CAAA,EAQC,OARD,CAQS,2BART,CAAA;;UAWb,qBAAA,CATwB;SAEU,EAAA,OAAA;OAAR,CAAA,EAU1B,KAV0B;oBAEM,CAAA,EAUnB,UAVmB;OAAR,CAAA,EAWxB,UAXwB;eAEF,CAAA,EAUd,UAVc;;AAAD,UAad,yBAAA,CAbc;EAGrB,QAAA,EAAA,OAAA;EAAqB,KAAA,CAAA,EAYrB,KAZqB;SAGrB,EAUC,qBAVD,EAAA;;AAGA,UAUO,2BAAA,CAVP;UACQ,EAAA,OAAA;EAAU,KAAA,CAAA,EAWlB,KAXkB;EAGX,kBAAA,EAUK,qBAVoB;EAAA,iBAAA,EAWrB,yBAXqB,EAAA"}
@@ -6,7 +6,7 @@ __digitalcredentials_vc = require_rolldown_runtime.__toESM(__digitalcredentials_
6
6
 
7
7
  //#region src/modules/vc/data-integrity/libraries/vc.ts
8
8
  var vc_exports = /* @__PURE__ */ require_rolldown_runtime.__export({ default: () => vc_default });
9
- var vc_default = __digitalcredentials_vc.default;
9
+ var vc_default = __digitalcredentials_vc;
10
10
 
11
11
  //#endregion
12
12
  exports.default = vc_default;
@@ -1,7 +1,7 @@
1
1
 
2
2
 
3
3
  import { __export } from "../../../../_virtual/rolldown_runtime.mjs";
4
- import vc from "@digitalcredentials/vc";
4
+ import * as vc from "@digitalcredentials/vc";
5
5
 
6
6
  //#region src/modules/vc/data-integrity/libraries/vc.ts
7
7
  var vc_exports = /* @__PURE__ */ __export({ default: () => vc_default });
@@ -1 +1 @@
1
- {"version":3,"file":"vc.mjs","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/vc.ts"],"sourcesContent":["import type { JsonObject } from '../../../../types'\n\n// No type definitions available for this package\n// @ts-ignore\nimport vc from '@digitalcredentials/vc'\n\nexport interface VC {\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n issue(options: any): Promise<Record<string, unknown>>\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n verifyCredential(options: any): Promise<W3cVerifyCredentialResult>\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n createPresentation(options: any): Promise<Record<string, unknown>>\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n signPresentation(options: any): Promise<Record<string, unknown>>\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n verify(options: any): Promise<W3cVerifyPresentationResult>\n}\n\ninterface W3cVerificationResult {\n isValid: boolean\n\n error?: Error\n\n verificationMethod?: JsonObject\n proof?: JsonObject\n purposeResult?: JsonObject\n}\n\nexport interface W3cVerifyCredentialResult {\n verified: boolean\n error?: Error\n results: W3cVerificationResult[]\n}\n\nexport interface W3cVerifyPresentationResult {\n verified: boolean\n error?: Error\n\n presentationResult: W3cVerificationResult\n credentialResults: W3cVerifyCredentialResult[]\n}\n\nexport default vc as unknown as VC\n"],"mappings":";;;;;;;AA2CA,iBAAe"}
1
+ {"version":3,"file":"vc.mjs","names":[],"sources":["../../../../../src/modules/vc/data-integrity/libraries/vc.ts"],"sourcesContent":["// No type definitions available for this package\n// @ts-expect-error\nimport * as vc from '@digitalcredentials/vc'\nimport type { JsonObject } from '../../../../types'\n\nexport interface VC {\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n issue(options: any): Promise<Record<string, unknown>>\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n verifyCredential(options: any): Promise<W3cVerifyCredentialResult>\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n createPresentation(options: any): Promise<Record<string, unknown>>\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n signPresentation(options: any): Promise<Record<string, unknown>>\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n verify(options: any): Promise<W3cVerifyPresentationResult>\n}\n\ninterface W3cVerificationResult {\n isValid: boolean\n\n error?: Error\n\n verificationMethod?: JsonObject\n proof?: JsonObject\n purposeResult?: JsonObject\n}\n\nexport interface W3cVerifyCredentialResult {\n verified: boolean\n error?: Error\n results: W3cVerificationResult[]\n}\n\nexport interface W3cVerifyPresentationResult {\n verified: boolean\n error?: Error\n\n presentationResult: W3cVerificationResult\n credentialResults: W3cVerifyCredentialResult[]\n}\n\nexport default vc as unknown as VC\n"],"mappings":";;;;;;;AA0CA,iBAAe"}