@pagopa/io-react-native-wallet 1.7.0 → 2.0.0-next.0

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 (438) hide show
  1. package/README.md +47 -1
  2. package/lib/commonjs/client/generated/wallet-provider.js +49 -20
  3. package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
  4. package/lib/commonjs/credential/index.js +5 -1
  5. package/lib/commonjs/credential/index.js.map +1 -1
  6. package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +27 -0
  7. package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
  8. package/lib/commonjs/credential/issuance/03-start-user-authorization.js +25 -16
  9. package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
  10. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +30 -18
  11. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
  12. package/lib/commonjs/credential/issuance/05-authorize-access.js +17 -12
  13. package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
  14. package/lib/commonjs/credential/issuance/06-obtain-credential.js +36 -29
  15. package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
  16. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +27 -207
  17. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  18. package/lib/commonjs/credential/issuance/README.md +23 -20
  19. package/lib/commonjs/credential/issuance/const.js +1 -1
  20. package/lib/commonjs/credential/issuance/const.js.map +1 -1
  21. package/lib/commonjs/credential/issuance/index.js +3 -3
  22. package/lib/commonjs/credential/issuance/index.js.map +1 -1
  23. package/lib/commonjs/credential/presentation/01-start-flow.js +14 -15
  24. package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -1
  25. package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js +6 -4
  26. package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
  27. package/lib/commonjs/credential/presentation/03-get-request-object.js +34 -7
  28. package/lib/commonjs/credential/presentation/03-get-request-object.js.map +1 -1
  29. package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js +4 -126
  30. package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js.map +1 -1
  31. package/lib/commonjs/credential/presentation/05-verify-request-object.js +80 -25
  32. package/lib/commonjs/credential/presentation/05-verify-request-object.js.map +1 -1
  33. package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js +6 -30
  34. package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js.map +1 -1
  35. package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +97 -117
  36. package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
  37. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +86 -191
  38. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
  39. package/lib/commonjs/credential/presentation/08-send-authorization-response.js +112 -176
  40. package/lib/commonjs/credential/presentation/08-send-authorization-response.js.map +1 -1
  41. package/lib/commonjs/credential/presentation/README.md +74 -79
  42. package/lib/commonjs/credential/presentation/errors.js +42 -21
  43. package/lib/commonjs/credential/presentation/errors.js.map +1 -1
  44. package/lib/commonjs/credential/presentation/index.js +13 -13
  45. package/lib/commonjs/credential/presentation/index.js.map +1 -1
  46. package/lib/commonjs/credential/presentation/types.js +53 -29
  47. package/lib/commonjs/credential/presentation/types.js.map +1 -1
  48. package/lib/commonjs/credential/status/01-start-flow.js +2 -0
  49. package/lib/commonjs/credential/status/01-start-flow.js.map +1 -0
  50. package/lib/commonjs/credential/status/02-status-attestation.js +73 -0
  51. package/lib/commonjs/credential/status/02-status-attestation.js.map +1 -0
  52. package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js +55 -0
  53. package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js.map +1 -0
  54. package/lib/commonjs/credential/status/README.md +67 -0
  55. package/lib/commonjs/credential/status/index.js +27 -0
  56. package/lib/commonjs/credential/status/index.js.map +1 -0
  57. package/lib/commonjs/credential/status/types.js +48 -0
  58. package/lib/commonjs/credential/status/types.js.map +1 -0
  59. package/lib/commonjs/credential/trustmark/README.md +62 -0
  60. package/lib/commonjs/credential/trustmark/get-credential-trustmark.js +86 -0
  61. package/lib/commonjs/credential/trustmark/get-credential-trustmark.js.map +1 -0
  62. package/lib/commonjs/credential/trustmark/index.js +13 -0
  63. package/lib/commonjs/credential/trustmark/index.js.map +1 -0
  64. package/lib/commonjs/index.js +5 -1
  65. package/lib/commonjs/index.js.map +1 -1
  66. package/lib/commonjs/pid/sd-jwt/types.js +18 -2
  67. package/lib/commonjs/pid/sd-jwt/types.js.map +1 -1
  68. package/lib/commonjs/sd-jwt/__test__/index.test.js +22 -34
  69. package/lib/commonjs/sd-jwt/__test__/index.test.js.map +1 -1
  70. package/lib/commonjs/sd-jwt/__test__/types.test.js +11 -23
  71. package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
  72. package/lib/commonjs/sd-jwt/index.js +1 -7
  73. package/lib/commonjs/sd-jwt/index.js.map +1 -1
  74. package/lib/commonjs/sd-jwt/types.js +5 -21
  75. package/lib/commonjs/sd-jwt/types.js.map +1 -1
  76. package/lib/commonjs/{entity/trust → trust}/chain.js +49 -55
  77. package/lib/commonjs/trust/chain.js.map +1 -0
  78. package/lib/commonjs/trust/errors.js +110 -0
  79. package/lib/commonjs/trust/errors.js.map +1 -0
  80. package/lib/commonjs/trust/index.js +282 -0
  81. package/lib/commonjs/trust/index.js.map +1 -0
  82. package/lib/commonjs/{entity/trust → trust}/types.js +27 -47
  83. package/lib/commonjs/trust/types.js.map +1 -0
  84. package/lib/commonjs/trust/utils.js +41 -0
  85. package/lib/commonjs/trust/utils.js.map +1 -0
  86. package/lib/commonjs/utils/crypto.js +5 -112
  87. package/lib/commonjs/utils/crypto.js.map +1 -1
  88. package/lib/commonjs/utils/decoder.js +2 -0
  89. package/lib/commonjs/utils/decoder.js.map +1 -1
  90. package/lib/commonjs/utils/error-codes.js +22 -2
  91. package/lib/commonjs/utils/error-codes.js.map +1 -1
  92. package/lib/commonjs/utils/errors.js +72 -4
  93. package/lib/commonjs/utils/errors.js.map +1 -1
  94. package/lib/commonjs/utils/logging.js +68 -0
  95. package/lib/commonjs/utils/logging.js.map +1 -0
  96. package/lib/commonjs/utils/misc.js +2 -0
  97. package/lib/commonjs/utils/misc.js.map +1 -1
  98. package/lib/commonjs/utils/par.js +17 -10
  99. package/lib/commonjs/utils/par.js.map +1 -1
  100. package/lib/commonjs/utils/string.js +1 -12
  101. package/lib/commonjs/utils/string.js.map +1 -1
  102. package/lib/commonjs/wallet-instance/index.js +14 -0
  103. package/lib/commonjs/wallet-instance/index.js.map +1 -1
  104. package/lib/commonjs/wallet-instance-attestation/README.md +8 -3
  105. package/lib/commonjs/wallet-instance-attestation/issuing.js +15 -8
  106. package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
  107. package/lib/commonjs/wallet-instance-attestation/types.js +16 -20
  108. package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
  109. package/lib/module/client/generated/wallet-provider.js +40 -15
  110. package/lib/module/client/generated/wallet-provider.js.map +1 -1
  111. package/lib/module/credential/index.js +3 -1
  112. package/lib/module/credential/index.js.map +1 -1
  113. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +20 -0
  114. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
  115. package/lib/module/credential/issuance/03-start-user-authorization.js +25 -16
  116. package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
  117. package/lib/module/credential/issuance/04-complete-user-authorization.js +30 -18
  118. package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
  119. package/lib/module/credential/issuance/05-authorize-access.js +17 -11
  120. package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
  121. package/lib/module/credential/issuance/06-obtain-credential.js +36 -28
  122. package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
  123. package/lib/module/credential/issuance/07-verify-and-parse-credential.js +27 -205
  124. package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  125. package/lib/module/credential/issuance/README.md +23 -20
  126. package/lib/module/credential/issuance/const.js +1 -1
  127. package/lib/module/credential/issuance/const.js.map +1 -1
  128. package/lib/module/credential/issuance/index.js +2 -2
  129. package/lib/module/credential/issuance/index.js.map +1 -1
  130. package/lib/module/credential/presentation/01-start-flow.js +14 -15
  131. package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
  132. package/lib/module/credential/presentation/02-evaluate-rp-trust.js +5 -3
  133. package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
  134. package/lib/module/credential/presentation/03-get-request-object.js +34 -7
  135. package/lib/module/credential/presentation/03-get-request-object.js.map +1 -1
  136. package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +2 -124
  137. package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +1 -1
  138. package/lib/module/credential/presentation/05-verify-request-object.js +78 -23
  139. package/lib/module/credential/presentation/05-verify-request-object.js.map +1 -1
  140. package/lib/module/credential/presentation/06-fetch-presentation-definition.js +6 -30
  141. package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +1 -1
  142. package/lib/module/credential/presentation/07-evaluate-dcql-query.js +97 -118
  143. package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
  144. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +83 -186
  145. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
  146. package/lib/module/credential/presentation/08-send-authorization-response.js +107 -170
  147. package/lib/module/credential/presentation/08-send-authorization-response.js.map +1 -1
  148. package/lib/module/credential/presentation/README.md +74 -79
  149. package/lib/module/credential/presentation/errors.js +30 -17
  150. package/lib/module/credential/presentation/errors.js.map +1 -1
  151. package/lib/module/credential/presentation/index.js +6 -6
  152. package/lib/module/credential/presentation/index.js.map +1 -1
  153. package/lib/module/credential/presentation/types.js +49 -27
  154. package/lib/module/credential/presentation/types.js.map +1 -1
  155. package/lib/module/credential/status/01-start-flow.js +2 -0
  156. package/lib/module/credential/status/01-start-flow.js.map +1 -0
  157. package/lib/module/credential/status/02-status-attestation.js +66 -0
  158. package/lib/module/credential/status/02-status-attestation.js.map +1 -0
  159. package/lib/module/credential/status/03-verify-and-parse-status-attestation.js +49 -0
  160. package/lib/module/credential/status/03-verify-and-parse-status-attestation.js.map +1 -0
  161. package/lib/module/credential/status/README.md +67 -0
  162. package/lib/module/credential/status/index.js +5 -0
  163. package/lib/module/credential/status/index.js.map +1 -0
  164. package/lib/module/credential/status/types.js +40 -0
  165. package/lib/module/credential/status/types.js.map +1 -0
  166. package/lib/module/credential/trustmark/README.md +62 -0
  167. package/lib/module/credential/trustmark/get-credential-trustmark.js +77 -0
  168. package/lib/module/credential/trustmark/get-credential-trustmark.js.map +1 -0
  169. package/lib/module/credential/trustmark/index.js +3 -0
  170. package/lib/module/credential/trustmark/index.js.map +1 -0
  171. package/lib/module/index.js +3 -1
  172. package/lib/module/index.js.map +1 -1
  173. package/lib/module/pid/sd-jwt/types.js +16 -1
  174. package/lib/module/pid/sd-jwt/types.js.map +1 -1
  175. package/lib/module/sd-jwt/__test__/index.test.js +22 -34
  176. package/lib/module/sd-jwt/__test__/index.test.js.map +1 -1
  177. package/lib/module/sd-jwt/__test__/types.test.js +11 -23
  178. package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
  179. package/lib/module/sd-jwt/index.js +1 -7
  180. package/lib/module/sd-jwt/index.js.map +1 -1
  181. package/lib/module/sd-jwt/types.js +4 -19
  182. package/lib/module/sd-jwt/types.js.map +1 -1
  183. package/lib/module/trust/chain.js +108 -0
  184. package/lib/module/trust/chain.js.map +1 -0
  185. package/lib/module/trust/errors.js +94 -0
  186. package/lib/module/trust/errors.js.map +1 -0
  187. package/lib/module/trust/index.js +263 -0
  188. package/lib/module/trust/index.js.map +1 -0
  189. package/lib/module/{entity/trust → trust}/types.js +25 -46
  190. package/lib/module/trust/types.js.map +1 -0
  191. package/lib/module/trust/utils.js +33 -0
  192. package/lib/module/trust/utils.js.map +1 -0
  193. package/lib/module/utils/crypto.js +4 -107
  194. package/lib/module/utils/crypto.js.map +1 -1
  195. package/lib/module/utils/decoder.js +3 -0
  196. package/lib/module/utils/decoder.js.map +1 -1
  197. package/lib/module/utils/error-codes.js +20 -1
  198. package/lib/module/utils/error-codes.js.map +1 -1
  199. package/lib/module/utils/errors.js +61 -4
  200. package/lib/module/utils/errors.js.map +1 -1
  201. package/lib/module/utils/logging.js +62 -0
  202. package/lib/module/utils/logging.js.map +1 -0
  203. package/lib/module/utils/misc.js +2 -0
  204. package/lib/module/utils/misc.js.map +1 -1
  205. package/lib/module/utils/par.js +17 -9
  206. package/lib/module/utils/par.js.map +1 -1
  207. package/lib/module/utils/string.js +0 -10
  208. package/lib/module/utils/string.js.map +1 -1
  209. package/lib/module/wallet-instance/index.js +13 -0
  210. package/lib/module/wallet-instance/index.js.map +1 -1
  211. package/lib/module/wallet-instance-attestation/README.md +8 -3
  212. package/lib/module/wallet-instance-attestation/index.js +2 -2
  213. package/lib/module/wallet-instance-attestation/index.js.map +1 -1
  214. package/lib/module/wallet-instance-attestation/issuing.js +16 -9
  215. package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
  216. package/lib/module/wallet-instance-attestation/types.js +14 -18
  217. package/lib/module/wallet-instance-attestation/types.js.map +1 -1
  218. package/lib/typescript/client/generated/wallet-provider.d.ts +206 -51
  219. package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
  220. package/lib/typescript/credential/index.d.ts +3 -1
  221. package/lib/typescript/credential/index.d.ts.map +1 -1
  222. package/lib/typescript/credential/issuance/01-start-flow.d.ts +1 -1
  223. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +19 -0
  224. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +1 -0
  225. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +3 -3
  226. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
  227. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +9 -9
  228. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
  229. package/lib/typescript/credential/issuance/05-authorize-access.d.ts +3 -3
  230. package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
  231. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +4 -4
  232. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
  233. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +3 -15
  234. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
  235. package/lib/typescript/credential/issuance/const.d.ts +1 -1
  236. package/lib/typescript/credential/issuance/const.d.ts.map +1 -1
  237. package/lib/typescript/credential/issuance/index.d.ts +3 -3
  238. package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
  239. package/lib/typescript/credential/issuance/types.d.ts +8 -3
  240. package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
  241. package/lib/typescript/credential/presentation/01-start-flow.d.ts +28 -9
  242. package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -1
  243. package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +2 -1
  244. package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +1 -1
  245. package/lib/typescript/credential/presentation/03-get-request-object.d.ts +7 -5
  246. package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +1 -1
  247. package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts +4 -30
  248. package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +1 -1
  249. package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +17 -4
  250. package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +1 -1
  251. package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +4 -9
  252. package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +1 -1
  253. package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +13 -12
  254. package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +1 -1
  255. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +40 -42
  256. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +1 -1
  257. package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +30 -43
  258. package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +1 -1
  259. package/lib/typescript/credential/presentation/errors.d.ts +25 -10
  260. package/lib/typescript/credential/presentation/errors.d.ts.map +1 -1
  261. package/lib/typescript/credential/presentation/index.d.ts +7 -8
  262. package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
  263. package/lib/typescript/credential/presentation/types.d.ts +137 -307
  264. package/lib/typescript/credential/presentation/types.d.ts.map +1 -1
  265. package/lib/typescript/credential/status/01-start-flow.d.ts +10 -0
  266. package/lib/typescript/credential/status/01-start-flow.d.ts.map +1 -0
  267. package/lib/typescript/credential/status/02-status-attestation.d.ts +19 -0
  268. package/lib/typescript/credential/status/02-status-attestation.d.ts.map +1 -0
  269. package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts +24 -0
  270. package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts.map +1 -0
  271. package/lib/typescript/credential/status/index.d.ts +7 -0
  272. package/lib/typescript/credential/status/index.d.ts.map +1 -0
  273. package/lib/typescript/credential/status/types.d.ts +305 -0
  274. package/lib/typescript/credential/status/types.d.ts.map +1 -0
  275. package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts +52 -0
  276. package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts.map +1 -0
  277. package/lib/typescript/credential/trustmark/index.d.ts +4 -0
  278. package/lib/typescript/credential/trustmark/index.d.ts.map +1 -0
  279. package/lib/typescript/index.d.ts +3 -1
  280. package/lib/typescript/index.d.ts.map +1 -1
  281. package/lib/typescript/pid/sd-jwt/types.d.ts +103 -25
  282. package/lib/typescript/pid/sd-jwt/types.d.ts.map +1 -1
  283. package/lib/typescript/sd-jwt/index.d.ts +30 -82
  284. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  285. package/lib/typescript/sd-jwt/types.d.ts +29 -134
  286. package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
  287. package/lib/typescript/{entity/trust → trust}/chain.d.ts +5 -10
  288. package/lib/typescript/trust/chain.d.ts.map +1 -0
  289. package/lib/typescript/trust/errors.d.ts +80 -0
  290. package/lib/typescript/trust/errors.d.ts.map +1 -0
  291. package/lib/typescript/{entity/trust → trust}/index.d.ts +211 -186
  292. package/lib/typescript/trust/index.d.ts.map +1 -0
  293. package/lib/typescript/{entity/trust → trust}/types.d.ts +1533 -1120
  294. package/lib/typescript/{entity/trust → trust}/types.d.ts.map +1 -1
  295. package/lib/typescript/trust/utils.d.ts +12 -0
  296. package/lib/typescript/trust/utils.d.ts.map +1 -0
  297. package/lib/typescript/utils/crypto.d.ts +0 -32
  298. package/lib/typescript/utils/crypto.d.ts.map +1 -1
  299. package/lib/typescript/utils/decoder.d.ts.map +1 -1
  300. package/lib/typescript/utils/error-codes.d.ts +20 -0
  301. package/lib/typescript/utils/error-codes.d.ts.map +1 -1
  302. package/lib/typescript/utils/errors.d.ts +55 -10
  303. package/lib/typescript/utils/errors.d.ts.map +1 -1
  304. package/lib/typescript/utils/logging.d.ts +35 -0
  305. package/lib/typescript/utils/logging.d.ts.map +1 -0
  306. package/lib/typescript/utils/misc.d.ts.map +1 -1
  307. package/lib/typescript/utils/par.d.ts +8 -1
  308. package/lib/typescript/utils/par.d.ts.map +1 -1
  309. package/lib/typescript/utils/string.d.ts +0 -7
  310. package/lib/typescript/utils/string.d.ts.map +1 -1
  311. package/lib/typescript/wallet-instance/index.d.ts +8 -0
  312. package/lib/typescript/wallet-instance/index.d.ts.map +1 -1
  313. package/lib/typescript/wallet-instance-attestation/index.d.ts +1 -2
  314. package/lib/typescript/wallet-instance-attestation/index.d.ts.map +1 -1
  315. package/lib/typescript/wallet-instance-attestation/issuing.d.ts +4 -2
  316. package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +1 -1
  317. package/lib/typescript/wallet-instance-attestation/types.d.ts +78 -120
  318. package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
  319. package/package.json +8 -9
  320. package/src/client/generated/wallet-provider.ts +52 -17
  321. package/src/credential/index.ts +4 -1
  322. package/src/credential/issuance/01-start-flow.ts +1 -1
  323. package/src/credential/issuance/02-evaluate-issuer-trust.ts +32 -0
  324. package/src/credential/issuance/03-start-user-authorization.ts +48 -22
  325. package/src/credential/issuance/04-complete-user-authorization.ts +74 -18
  326. package/src/credential/issuance/05-authorize-access.ts +29 -11
  327. package/src/credential/issuance/06-obtain-credential.ts +61 -36
  328. package/src/credential/issuance/07-verify-and-parse-credential.ts +37 -264
  329. package/src/credential/issuance/README.md +23 -20
  330. package/src/credential/issuance/const.ts +1 -1
  331. package/src/credential/issuance/index.ts +6 -3
  332. package/src/credential/presentation/01-start-flow.ts +19 -22
  333. package/src/credential/presentation/02-evaluate-rp-trust.ts +5 -4
  334. package/src/credential/presentation/03-get-request-object.ts +36 -8
  335. package/src/credential/presentation/04-retrieve-rp-jwks.ts +6 -148
  336. package/src/credential/presentation/05-verify-request-object.ts +115 -30
  337. package/src/credential/presentation/06-fetch-presentation-definition.ts +5 -35
  338. package/src/credential/presentation/07-evaluate-dcql-query.ts +132 -161
  339. package/src/credential/presentation/07-evaluate-input-descriptor.ts +136 -254
  340. package/src/credential/presentation/08-send-authorization-response.ts +178 -260
  341. package/src/credential/presentation/README.md +74 -79
  342. package/src/credential/presentation/errors.ts +38 -15
  343. package/src/credential/presentation/index.ts +18 -19
  344. package/src/credential/presentation/types.ts +67 -64
  345. package/src/credential/status/01-start-flow.ts +9 -0
  346. package/src/credential/status/02-status-attestation.ts +105 -0
  347. package/src/credential/status/03-verify-and-parse-status-attestation.ts +70 -0
  348. package/src/credential/status/README.md +67 -0
  349. package/src/credential/status/index.ts +22 -0
  350. package/src/credential/status/types.ts +43 -0
  351. package/src/credential/trustmark/README.md +62 -0
  352. package/src/credential/trustmark/get-credential-trustmark.ts +139 -0
  353. package/src/credential/trustmark/index.ts +8 -0
  354. package/src/index.ts +4 -0
  355. package/src/pid/sd-jwt/types.ts +18 -1
  356. package/src/sd-jwt/__test__/index.test.ts +36 -55
  357. package/src/sd-jwt/__test__/types.test.ts +16 -29
  358. package/src/sd-jwt/index.ts +1 -5
  359. package/src/sd-jwt/types.ts +2 -19
  360. package/src/trust/chain.ts +151 -0
  361. package/src/trust/errors.ts +105 -0
  362. package/src/{entity/trust → trust}/index.ts +198 -23
  363. package/src/{entity/trust → trust}/types.ts +24 -37
  364. package/src/trust/utils.ts +35 -0
  365. package/src/utils/crypto.ts +4 -106
  366. package/src/utils/decoder.ts +6 -1
  367. package/src/utils/error-codes.ts +23 -0
  368. package/src/utils/errors.ts +119 -15
  369. package/src/utils/logging.ts +68 -0
  370. package/src/utils/misc.ts +5 -0
  371. package/src/utils/par.ts +19 -6
  372. package/src/utils/string.ts +0 -10
  373. package/src/wallet-instance/index.ts +30 -1
  374. package/src/wallet-instance-attestation/README.md +8 -3
  375. package/src/wallet-instance-attestation/index.ts +2 -2
  376. package/src/wallet-instance-attestation/issuing.ts +33 -12
  377. package/src/wallet-instance-attestation/types.ts +18 -22
  378. package/lib/commonjs/credential/issuance/02-get-issuer-config.js +0 -48
  379. package/lib/commonjs/credential/issuance/02-get-issuer-config.js.map +0 -1
  380. package/lib/commonjs/entity/openid-connect/issuer/index.js +0 -25
  381. package/lib/commonjs/entity/openid-connect/issuer/index.js.map +0 -1
  382. package/lib/commonjs/entity/openid-connect/issuer/types.js +0 -64
  383. package/lib/commonjs/entity/openid-connect/issuer/types.js.map +0 -1
  384. package/lib/commonjs/entity/trust/chain.js.map +0 -1
  385. package/lib/commonjs/entity/trust/index.js +0 -148
  386. package/lib/commonjs/entity/trust/index.js.map +0 -1
  387. package/lib/commonjs/entity/trust/types.js.map +0 -1
  388. package/lib/commonjs/mdoc/converters.js +0 -26
  389. package/lib/commonjs/mdoc/converters.js.map +0 -1
  390. package/lib/commonjs/mdoc/index.js +0 -68
  391. package/lib/commonjs/mdoc/index.js.map +0 -1
  392. package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js +0 -469
  393. package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js.map +0 -1
  394. package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-utils.js +0 -90
  395. package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-utils.js.map +0 -1
  396. package/lib/module/credential/issuance/02-get-issuer-config.js +0 -42
  397. package/lib/module/credential/issuance/02-get-issuer-config.js.map +0 -1
  398. package/lib/module/entity/openid-connect/issuer/index.js +0 -20
  399. package/lib/module/entity/openid-connect/issuer/index.js.map +0 -1
  400. package/lib/module/entity/openid-connect/issuer/types.js +0 -48
  401. package/lib/module/entity/openid-connect/issuer/types.js.map +0 -1
  402. package/lib/module/entity/trust/chain.js +0 -113
  403. package/lib/module/entity/trust/chain.js.map +0 -1
  404. package/lib/module/entity/trust/index.js +0 -131
  405. package/lib/module/entity/trust/index.js.map +0 -1
  406. package/lib/module/entity/trust/types.js.map +0 -1
  407. package/lib/module/mdoc/converters.js +0 -20
  408. package/lib/module/mdoc/converters.js.map +0 -1
  409. package/lib/module/mdoc/index.js +0 -60
  410. package/lib/module/mdoc/index.js.map +0 -1
  411. package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js +0 -462
  412. package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js.map +0 -1
  413. package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-utils.js +0 -83
  414. package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-utils.js.map +0 -1
  415. package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts +0 -32
  416. package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts.map +0 -1
  417. package/lib/typescript/entity/openid-connect/issuer/index.d.ts +0 -12
  418. package/lib/typescript/entity/openid-connect/issuer/index.d.ts.map +0 -1
  419. package/lib/typescript/entity/openid-connect/issuer/types.d.ts +0 -777
  420. package/lib/typescript/entity/openid-connect/issuer/types.d.ts.map +0 -1
  421. package/lib/typescript/entity/trust/chain.d.ts.map +0 -1
  422. package/lib/typescript/entity/trust/index.d.ts.map +0 -1
  423. package/lib/typescript/mdoc/converters.d.ts +0 -8
  424. package/lib/typescript/mdoc/converters.d.ts.map +0 -1
  425. package/lib/typescript/mdoc/index.d.ts +0 -10
  426. package/lib/typescript/mdoc/index.d.ts.map +0 -1
  427. package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-inputs.d.ts +0 -3
  428. package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-inputs.d.ts.map +0 -1
  429. package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-utils.d.ts +0 -42
  430. package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-utils.d.ts.map +0 -1
  431. package/src/credential/issuance/02-get-issuer-config.ts +0 -67
  432. package/src/entity/openid-connect/issuer/index.ts +0 -27
  433. package/src/entity/openid-connect/issuer/types.ts +0 -76
  434. package/src/entity/trust/chain.ts +0 -154
  435. package/src/mdoc/converters.ts +0 -26
  436. package/src/mdoc/index.ts +0 -95
  437. package/src/utils/credential/issuance/07-verify-and-parse-credentials-inputs.ts +0 -615
  438. package/src/utils/credential/issuance/07-verify-and-parse-credentials-utils.ts +0 -171
@@ -1,11 +1,11 @@
1
1
  import { type AuthorizationResult } from "../../utils/auth";
2
2
  import { type Out } from "../../utils/misc";
3
3
  import type { StartUserAuthorization } from "./03-start-user-authorization";
4
- import type { GetIssuerConfig } from "./02-get-issuer-config";
4
+ import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
5
5
  import { type CryptoContext } from "@pagopa/io-react-native-jwt";
6
6
  import { RequestObject } from "../presentation/types";
7
7
  /**
8
- * The interface of the phase to complete User authorization via strong identification when the response mode is "query" and the request credential is a urn:eu.europa.ec.eudi:pid:1.
8
+ * The interface of the phase to complete User authorization via strong identification when the response mode is "query" and the request credential is a PersonIdentificationData.
9
9
  */
10
10
  export type CompleteUserAuthorizationWithQueryMode = (authRedirectUrl: string) => Promise<AuthorizationResult>;
11
11
  export type CompleteUserAuthorizationWithFormPostJwtMode = (requestObject: Out<GetRequestedCredentialToBePresented>, context: {
@@ -15,8 +15,8 @@ export type CompleteUserAuthorizationWithFormPostJwtMode = (requestObject: Out<G
15
15
  walletInstanceAttestation: string;
16
16
  appFetch?: GlobalFetch["fetch"];
17
17
  }) => Promise<AuthorizationResult>;
18
- export type GetRequestedCredentialToBePresented = (issuerRequestUri: Out<StartUserAuthorization>["issuerRequestUri"], clientId: Out<StartUserAuthorization>["clientId"], issuerConf: Out<GetIssuerConfig>["issuerConf"], appFetch?: GlobalFetch["fetch"]) => Promise<RequestObject>;
19
- export type BuildAuthorizationUrl = (issuerRequestUri: Out<StartUserAuthorization>["issuerRequestUri"], clientId: Out<StartUserAuthorization>["clientId"], issuerConf: Out<GetIssuerConfig>["issuerConf"], idpHint?: string) => Promise<{
18
+ export type GetRequestedCredentialToBePresented = (issuerRequestUri: Out<StartUserAuthorization>["issuerRequestUri"], clientId: Out<StartUserAuthorization>["clientId"], issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], appFetch?: GlobalFetch["fetch"]) => Promise<RequestObject>;
19
+ export type BuildAuthorizationUrl = (issuerRequestUri: Out<StartUserAuthorization>["issuerRequestUri"], clientId: Out<StartUserAuthorization>["clientId"], issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], idpHint?: string) => Promise<{
20
20
  authUrl: string;
21
21
  }>;
22
22
  /**
@@ -24,14 +24,14 @@ export type BuildAuthorizationUrl = (issuerRequestUri: Out<StartUserAuthorizatio
24
24
  * Builds the authorization URL to which the end user should be redirected to continue the authentication flow.
25
25
  * @param issuerRequestUri the URI of the issuer where the request is sent
26
26
  * @param clientId Identifies the current client across all the requests of the issuing flow returned by {@link startUserAuthorization}
27
- * @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
28
- * @param idpHint Unique identifier of the IDP selected by the user
27
+ * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
28
+ * @param idpHint Unique identifier of the IDP selected by the user (optional)
29
29
  * @returns An object containing the authorization URL
30
30
  */
31
31
  export declare const buildAuthorizationUrl: BuildAuthorizationUrl;
32
32
  /**
33
33
  * WARNING: This function must be called after obtaining the authorization redirect URL from the webviews (SPID and CIE L3) or browser for CIEID.
34
- * Complete User authorization via strong identification when the response mode is "query" and the request credential is a urn:eu.europa.ec.eudi:pid:1.
34
+ * Complete User authorization via strong identification when the response mode is "query" and the request credential is a PersonIdentificationData.
35
35
  * This function parses the authorization redirect URL to extract the authorization response.
36
36
  * @param authRedirectUrl The URL to which the end user should be redirected to start the authentication flow
37
37
  * @returns the authorization response which contains code, state and iss
@@ -44,7 +44,7 @@ export declare const completeUserAuthorizationWithQueryMode: CompleteUserAuthori
44
44
  * The information is obtained by performing a GET request to the authorization endpoint with request_uri and client_id parameters.
45
45
  * @param issuerRequestUri the URI of the issuer where the request is sent
46
46
  * @param clientId Identifies the current client across all the requests of the issuing flow returned by {@link startUserAuthorization}
47
- * @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
47
+ * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
48
48
  * @param appFetch (optional) fetch api implementation. Default: built-in fetch
49
49
  * @throws {ValidationFailed} if an error while validating the response
50
50
  * @returns the request object which contains the credential to be presented in order to obtain the requested credential
@@ -57,7 +57,7 @@ export declare const getRequestedCredentialToBePresented: GetRequestedCredential
57
57
  * The information is obtained by performing a GET request to the authorization endpoint with request_uri and client_id parameters.
58
58
  * @param issuerRequestUri the URI of the issuer where the request is sent
59
59
  * @param clientId Identifies the current client across all the requests of the issuing flow returned by {@link startUserAuthorization}
60
- * @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
60
+ * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
61
61
  * @param context.walletInstanceAccestation the Wallet Instance's attestation to be presented
62
62
  * @param context.pid the PID to be presented
63
63
  * @param context.wiaCryptoContext The Wallet Instance's crypto context associated with the walletInstanceAttestation parameter
@@ -1 +1 @@
1
- {"version":3,"file":"04-complete-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/04-complete-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAG5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAMtD;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,CACnD,eAAe,EAAE,MAAM,KACpB,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,MAAM,4CAA4C,GAAG,CACzD,aAAa,EAAE,GAAG,CAAC,mCAAmC,CAAC,EACvD,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,gBAAgB,EAAE,aAAa,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,MAAM,mCAAmC,GAAG,CAChD,gBAAgB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,kBAAkB,CAAC,EACjE,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,UAAU,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,YAAY,CAAC,EAC9C,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,KAC5B,OAAO,CAAC,aAAa,CAAC,CAAC;AAE5B,MAAM,MAAM,qBAAqB,GAAG,CAClC,gBAAgB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,kBAAkB,CAAC,EACjE,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,UAAU,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,YAAY,CAAC,EAC9C,OAAO,CAAC,EAAE,MAAM,KACb,OAAO,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAAE,qBAiBnC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sCAAsC,EAAE,sCAKlD,CAAC;AAEJ;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mCAAmC,EAAE,mCAwB/C,CAAC;AAEJ;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,4CAA4C,EAAE,4CAuGxD,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,YAC5B,OAAO,KACf,mBAaF,CAAC"}
1
+ {"version":3,"file":"04-complete-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/04-complete-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAG5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAOtD;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,CACnD,eAAe,EAAE,MAAM,KACpB,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,MAAM,4CAA4C,GAAG,CACzD,aAAa,EAAE,GAAG,CAAC,mCAAmC,CAAC,EACvD,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,gBAAgB,EAAE,aAAa,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,MAAM,mCAAmC,GAAG,CAChD,gBAAgB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,kBAAkB,CAAC,EACjE,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,KAC5B,OAAO,CAAC,aAAa,CAAC,CAAC;AAE5B,MAAM,MAAM,qBAAqB,GAAG,CAClC,gBAAgB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,kBAAkB,CAAC,EACjE,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,OAAO,CAAC,EAAE,MAAM,KACb,OAAO,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAAE,qBAqBnC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sCAAsC,EAAE,sCASlD,CAAC;AAEJ;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mCAAmC,EAAE,mCAsC/C,CAAC;AAEJ;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,4CAA4C,EAAE,4CAgIxD,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,YAC5B,OAAO,KACf,mBAqBF,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { type Out } from "../../utils/misc";
2
- import type { GetIssuerConfig } from "./02-get-issuer-config";
2
+ import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
3
3
  import type { StartUserAuthorization } from "./03-start-user-authorization";
4
4
  import type { CryptoContext } from "@pagopa/io-react-native-jwt";
5
5
  import { TokenResponse } from "./types";
6
6
  import type { CompleteUserAuthorizationWithQueryMode } from "./04-complete-user-authorization";
7
- export type AuthorizeAccess = (issuerConf: Out<GetIssuerConfig>["issuerConf"], code: Out<CompleteUserAuthorizationWithQueryMode>["code"], redirectUri: string, clientId: Out<StartUserAuthorization>["clientId"], codeVerifier: Out<StartUserAuthorization>["codeVerifier"], context: {
7
+ export type AuthorizeAccess = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], code: Out<CompleteUserAuthorizationWithQueryMode>["code"], redirectUri: string, clientId: Out<StartUserAuthorization>["clientId"], codeVerifier: Out<StartUserAuthorization>["codeVerifier"], context: {
8
8
  walletInstanceAttestation: string;
9
9
  appFetch?: GlobalFetch["fetch"];
10
10
  wiaCryptoContext: CryptoContext;
@@ -17,7 +17,7 @@ export type AuthorizeAccess = (issuerConf: Out<GetIssuerConfig>["issuerConf"], c
17
17
  * for requesting the issuance of an access token bound to the public key of the Wallet Instance contained within the DPoP.
18
18
  * This enables the Wallet Instance to request a digital credential.
19
19
  * The DPoP Proof JWT is generated according to the section 4.3 of the DPoP RFC 9449 specification.
20
- * @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
20
+ * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
21
21
  * @param code The authorization code returned by {@link completeUserAuthorizationWithQueryMode} or {@link completeUserAuthorizationWithFormPost}
22
22
  * @param redirectUri The redirect URI which is the custom URL scheme that the Wallet Instance is registered to handle
23
23
  * @param clientId The client id returned by {@link startUserAuthorization}
@@ -1 +1 @@
1
- {"version":3,"file":"05-authorize-access.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/05-authorize-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAK5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,kCAAkC,CAAC;AAE/F,MAAM,MAAM,eAAe,GAAG,CAC5B,UAAU,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,YAAY,CAAC,EAC9C,IAAI,EAAE,GAAG,CAAC,sCAAsC,CAAC,CAAC,MAAM,CAAC,EACzD,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,YAAY,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,cAAc,CAAC,EACzD,OAAO,EAAE;IACP,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,gBAAgB,EAAE,aAAa,CAAC;IAChC,iBAAiB,EAAE,aAAa,CAAC;CAClC,KACE,OAAO,CAAC;IAAE,WAAW,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,EAAE,eAwE7B,CAAC"}
1
+ {"version":3,"file":"05-authorize-access.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/05-authorize-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAK5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,kCAAkC,CAAC;AAG/F,MAAM,MAAM,eAAe,GAAG,CAC5B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,IAAI,EAAE,GAAG,CAAC,sCAAsC,CAAC,CAAC,MAAM,CAAC,EACzD,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,YAAY,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,cAAc,CAAC,EACzD,OAAO,EAAE;IACP,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,gBAAgB,EAAE,aAAa,CAAC;IAChC,iBAAiB,EAAE,aAAa,CAAC;CAClC,KACE,OAAO,CAAC;IAAE,WAAW,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,EAAE,eAwF7B,CAAC"}
@@ -1,14 +1,14 @@
1
1
  import { type CryptoContext } from "@pagopa/io-react-native-jwt";
2
2
  import type { AuthorizeAccess } from "./05-authorize-access";
3
- import type { GetIssuerConfig } from "./02-get-issuer-config";
3
+ import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
4
4
  import { type Out } from "../../utils/misc";
5
5
  import type { StartUserAuthorization } from "./03-start-user-authorization";
6
6
  import { CredentialResponse } from "./types";
7
- export type ObtainCredential = (issuerConf: Out<GetIssuerConfig>["issuerConf"], accessToken: Out<AuthorizeAccess>["accessToken"], clientId: Out<StartUserAuthorization>["clientId"], credentialDefinition: Out<StartUserAuthorization>["credentialDefinition"], context: {
7
+ export type ObtainCredential = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], accessToken: Out<AuthorizeAccess>["accessToken"], clientId: Out<StartUserAuthorization>["clientId"], credentialDefinition: Out<StartUserAuthorization>["credentialDefinition"], context: {
8
8
  dPopCryptoContext: CryptoContext;
9
9
  credentialCryptoContext: CryptoContext;
10
10
  appFetch?: GlobalFetch["fetch"];
11
- }) => Promise<CredentialResponse>;
11
+ }, operationType?: "reissuing") => Promise<CredentialResponse>;
12
12
  export declare const createNonceProof: (nonce: string, issuer: string, audience: string, ctx: CryptoContext) => Promise<string>;
13
13
  /**
14
14
  * Obtains the credential from the issuer.
@@ -16,7 +16,7 @@ export declare const createNonceProof: (nonce: string, issuer: string, audience:
16
16
  * of the Credential Issuer to request the issuance of a credential linked to the public key contained in the JWT proof.
17
17
  * The Openid4vci proof JWT incapsulates the nonce extracted from the token response from the {@link authorizeAccess} step.
18
18
  * The credential request is sent to the Credential Endpoint of the Credential Issuer via HTTP POST with the type of the credential, its format, the access token and the JWT proof.
19
- * @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
19
+ * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
20
20
  * @param accessToken The access token response returned by {@link authorizeAccess}
21
21
  * @param clientId The client id returned by {@link startUserAuthorization}
22
22
  * @param credentialDefinition The credential definition of the credential to be obtained returned by {@link startUserAuthorization}
@@ -1 +1 @@
1
- {"version":3,"file":"06-obtain-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/06-obtain-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAQ5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAI7C,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,YAAY,CAAC,EAC9C,WAAW,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,EAChD,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,oBAAoB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,EACzE,OAAO,EAAE;IACP,iBAAiB,EAAE,aAAa,CAAC;IACjC,uBAAuB,EAAE,aAAa,CAAC;IACvC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC,eAAO,MAAM,gBAAgB,UACpB,MAAM,UACL,MAAM,YACJ,MAAM,OACX,aAAa,KACjB,QAAQ,MAAM,CAehB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAyG9B,CAAC"}
1
+ {"version":3,"file":"06-obtain-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/06-obtain-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAQ5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAK7C,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,WAAW,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,EAChD,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,oBAAoB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,EACzE,OAAO,EAAE;IACP,iBAAiB,EAAE,aAAa,CAAC;IACjC,uBAAuB,EAAE,aAAa,CAAC;IACvC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,EACD,aAAa,CAAC,EAAE,WAAW,KACxB,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC,eAAO,MAAM,gBAAgB,UACpB,MAAM,UACL,MAAM,YACJ,MAAM,OACX,aAAa,KACjB,QAAQ,MAAM,CAehB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBA+G9B,CAAC"}
@@ -1,12 +1,8 @@
1
1
  import type { CryptoContext } from "@pagopa/io-react-native-jwt";
2
- import { CBOR } from "@pagopa/io-react-native-cbor";
3
2
  import type { Out } from "../../utils/misc";
4
- import type { GetIssuerConfig } from "./02-get-issuer-config";
5
- import { SdJwt4VC } from "../../sd-jwt/types";
6
- import { verify as verifySdJwt } from "../../sd-jwt";
7
- import { verify as verifyMdoc } from "../../mdoc";
3
+ import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
8
4
  import type { ObtainCredential } from "./06-obtain-credential";
9
- export type VerifyAndParseCredential = (issuerConf: Out<GetIssuerConfig>["issuerConf"], credential: Out<ObtainCredential>["credential"], format: Out<ObtainCredential>["format"], credentialType: string, context: {
5
+ export type VerifyAndParseCredential = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], credential: Out<ObtainCredential>["credential"], format: Out<ObtainCredential>["format"], context: {
10
6
  credentialCryptoContext: CryptoContext;
11
7
  /**
12
8
  * Do not throw an error when an attribute is not found within disclosures.
@@ -29,17 +25,9 @@ string, {
29
25
  /** The actual value of the attribute */
30
26
  value: unknown;
31
27
  }>;
32
- type DecodedSdJwtCredential = Out<typeof verifySdJwt> & {
33
- sdJwt: SdJwt4VC;
34
- };
35
- type DecodedMDocCredential = Out<typeof verifyMdoc> & {
36
- issuerSigned: CBOR.IssuerSigned;
37
- };
38
- export declare const parseCredentialSdJwt: (credentials_supported: Out<GetIssuerConfig>["issuerConf"]["credential_configurations_supported"], { sdJwt, disclosures }: DecodedSdJwtCredential, ignoreMissingAttributes?: boolean, includeUndefinedAttributes?: boolean) => ParsedCredential;
39
- export declare const parseCredentialMDoc: (credentials_supported: Out<GetIssuerConfig>["issuerConf"]["credential_configurations_supported"], credential_type: string, { issuerSigned }: DecodedMDocCredential, ignoreMissingAttributes?: boolean, includeUndefinedAttributes?: boolean) => ParsedCredential;
40
28
  /**
41
29
  * Verify and parse an encoded credential.
42
- * @param issuerConf The Issuer configuration returned by {@link getIssuerConfig}
30
+ * @param issuerConf The Issuer configuration returned by {@link evaluateIssuerTrust}
43
31
  * @param credential The encoded credential returned by {@link obtainCredential}
44
32
  * @param format The format of the credentual returned by {@link obtainCredential}
45
33
  * @param context.credentialCryptoContext The crypto context used to obtain the credential in {@link obtainCredential}
@@ -1 +1 @@
1
- {"version":3,"file":"07-verify-and-parse-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/07-verify-and-parse-credential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,YAAY,CAAC;AAGlD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAO/D,MAAM,MAAM,wBAAwB,GAAG,CACrC,UAAU,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,YAAY,CAAC,EAC9C,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,EAC/C,MAAM,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,EACvC,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE;IACP,uBAAuB,EAAE,aAAa,CAAC;IACvC;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC,KACE,OAAO,CAAC;IACX,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,UAAU,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,IAAI,GAAG,SAAS,CAAC;CAC5B,CAAC,CAAC;AAGH,KAAK,gBAAgB,GAAG,MAAM;AAC5B,oBAAoB;AACpB,MAAM,EACN;IACE,2CAA2C;IAC3C,IAAI,EACA,yBAAyB,CAAC,MAAM,CAC9B,MAAM,EACN,MAAM,CACP,GACD,4BAA4B,CAAC,MAAM,GACnC,SAAS,CAAC;IACd,wCAAwC;IACxC,KAAK,EAAE,OAAO,CAAC;CAChB,CACF,CAAC;AAGF,KAAK,sBAAsB,GAAG,GAAG,CAAC,OAAO,WAAW,CAAC,GAAG;IACtD,KAAK,EAAE,QAAQ,CAAC;CACjB,CAAC;AAEF,KAAK,qBAAqB,GAAG,GAAG,CAAC,OAAO,UAAU,CAAC,GAAG;IACpD,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC;CACjC,CAAC;AAGF,eAAO,MAAM,oBAAoB,0BAER,IAAI,eAAe,CAAC,CAAC,YAAY,CAAC,CAAC,qCAAqC,CAAC,0BACxE,sBAAsB,4BACrB,OAAO,+BACJ,OAAO,KAClC,gBAsFF,CAAC;AAGF,eAAO,MAAM,mBAAmB,0BAEP,IAAI,eAAe,CAAC,CAAC,YAAY,CAAC,CAAC,qCAAqC,CAAC,mBAC/E,MAAM,oBACL,qBAAqB,4BACd,OAAO,+BACJ,OAAO,KAClC,gBAwHF,CAAC;AAkLF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,EAAE,wBA2BtC,CAAC"}
1
+ {"version":3,"file":"07-verify-and-parse-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/07-verify-and-parse-credential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAMtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/D,MAAM,MAAM,wBAAwB,GAAG,CACrC,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,EAC/C,MAAM,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,EACvC,OAAO,EAAE;IACP,uBAAuB,EAAE,aAAa,CAAC;IACvC;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC,KACE,OAAO,CAAC;IACX,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,UAAU,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,IAAI,GAAG,SAAS,CAAC;CAC5B,CAAC,CAAC;AAGH,KAAK,gBAAgB,GAAG,MAAM;AAC5B,oBAAoB;AACpB,MAAM,EACN;IACE,2CAA2C;IAC3C,IAAI,EACA,yBAAyB,CAAC,MAAM,CAC9B,MAAM,EACN,MAAM,CACP,GACD,4BAA4B,CAAC,MAAM,GACnC,SAAS,CAAC;IACd,wCAAwC;IACxC,KAAK,EAAE,OAAO,CAAC;CAChB,CACF,CAAC;AAyMF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,EAAE,wBAkBtC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import * as z from "zod";
2
2
  export declare const ASSERTION_TYPE = "urn:ietf:params:oauth:client-assertion-type:jwt-client-attestation";
3
3
  export type SupportedCredentialFormat = z.infer<typeof SupportedCredentialFormat>;
4
- export declare const SupportedCredentialFormat: z.ZodUnion<[z.ZodLiteral<"vc+sd-jwt">, z.ZodLiteral<"mso_mdoc">]>;
4
+ export declare const SupportedCredentialFormat: z.ZodUnion<[z.ZodLiteral<"vc+sd-jwt">, z.ZodLiteral<"vc+mdoc-cbor">]>;
5
5
  //# sourceMappingURL=const.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,eAAO,MAAM,cAAc,uEAC2C,CAAC;AAEvE,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,yBAAyB,CACjC,CAAC;AACF,eAAO,MAAM,yBAAyB,mEAGpC,CAAC"}
1
+ {"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,eAAO,MAAM,cAAc,uEAC2C,CAAC;AAEvE,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,yBAAyB,CACjC,CAAC;AACF,eAAO,MAAM,yBAAyB,uEAGpC,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { type StartFlow } from "./01-start-flow";
2
- import { getIssuerConfig, type GetIssuerConfig } from "./02-get-issuer-config";
2
+ import { evaluateIssuerTrust, type EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
3
3
  import { startUserAuthorization, type StartUserAuthorization } from "./03-start-user-authorization";
4
4
  import { completeUserAuthorizationWithQueryMode, completeUserAuthorizationWithFormPostJwtMode, parseAuthorizationResponse, buildAuthorizationUrl, type CompleteUserAuthorizationWithQueryMode, type CompleteUserAuthorizationWithFormPostJwtMode, type GetRequestedCredentialToBePresented, type BuildAuthorizationUrl, getRequestedCredentialToBePresented } from "./04-complete-user-authorization";
5
5
  import { authorizeAccess, type AuthorizeAccess } from "./05-authorize-access";
6
6
  import { obtainCredential, type ObtainCredential } from "./06-obtain-credential";
7
7
  import { verifyAndParseCredential, type VerifyAndParseCredential } from "./07-verify-and-parse-credential";
8
8
  import * as Errors from "./errors";
9
- export { getIssuerConfig, startUserAuthorization, buildAuthorizationUrl, completeUserAuthorizationWithQueryMode, getRequestedCredentialToBePresented, completeUserAuthorizationWithFormPostJwtMode, authorizeAccess, obtainCredential, verifyAndParseCredential, parseAuthorizationResponse, Errors, };
10
- export type { StartFlow, GetIssuerConfig, StartUserAuthorization, BuildAuthorizationUrl, CompleteUserAuthorizationWithQueryMode, GetRequestedCredentialToBePresented, CompleteUserAuthorizationWithFormPostJwtMode, AuthorizeAccess, ObtainCredential, VerifyAndParseCredential, };
9
+ export { evaluateIssuerTrust, startUserAuthorization, buildAuthorizationUrl, completeUserAuthorizationWithQueryMode, getRequestedCredentialToBePresented, completeUserAuthorizationWithFormPostJwtMode, authorizeAccess, obtainCredential, verifyAndParseCredential, parseAuthorizationResponse, Errors, };
10
+ export type { StartFlow, EvaluateIssuerTrust, StartUserAuthorization, BuildAuthorizationUrl, CompleteUserAuthorizationWithQueryMode, GetRequestedCredentialToBePresented, CompleteUserAuthorizationWithFormPostJwtMode, AuthorizeAccess, ObtainCredential, VerifyAndParseCredential, };
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,EAC5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sCAAsC,EACtC,4CAA4C,EAC5C,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,sCAAsC,EAC3C,KAAK,4CAA4C,EACjD,KAAK,mCAAmC,EACxC,KAAK,qBAAqB,EAC1B,mCAAmC,EACpC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,wBAAwB,EACxB,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,sCAAsC,EACtC,mCAAmC,EACnC,4CAA4C,EAC5C,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,0BAA0B,EAC1B,MAAM,GACP,CAAC;AACF,YAAY,EACV,SAAS,EACT,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,sCAAsC,EACtC,mCAAmC,EACnC,4CAA4C,EAC5C,eAAe,EACf,gBAAgB,EAChB,wBAAwB,GACzB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACL,mBAAmB,EACnB,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,EAC5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sCAAsC,EACtC,4CAA4C,EAC5C,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,sCAAsC,EAC3C,KAAK,4CAA4C,EACjD,KAAK,mCAAmC,EACxC,KAAK,qBAAqB,EAC1B,mCAAmC,EACpC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,wBAAwB,EACxB,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sCAAsC,EACtC,mCAAmC,EACnC,4CAA4C,EAC5C,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,0BAA0B,EAC1B,MAAM,GACP,CAAC;AACF,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sCAAsC,EACtC,mCAAmC,EACnC,4CAA4C,EAC5C,eAAe,EACf,gBAAgB,EAChB,wBAAwB,GACzB,CAAC"}
@@ -4,12 +4,15 @@ export declare const TokenResponse: z.ZodObject<{
4
4
  access_token: z.ZodString;
5
5
  authorization_details: z.ZodArray<z.ZodObject<{
6
6
  credential_configuration_id: z.ZodString;
7
+ format: z.ZodUnion<[z.ZodLiteral<"vc+sd-jwt">, z.ZodLiteral<"vc+mdoc-cbor">]>;
7
8
  type: z.ZodLiteral<"openid_credential">;
8
9
  }, "strip", z.ZodTypeAny, {
9
10
  type: "openid_credential";
11
+ format: "vc+sd-jwt" | "vc+mdoc-cbor";
10
12
  credential_configuration_id: string;
11
13
  }, {
12
14
  type: "openid_credential";
15
+ format: "vc+sd-jwt" | "vc+mdoc-cbor";
13
16
  credential_configuration_id: string;
14
17
  }>, "many">;
15
18
  c_nonce: z.ZodString;
@@ -19,6 +22,7 @@ export declare const TokenResponse: z.ZodObject<{
19
22
  }, "strip", z.ZodTypeAny, {
20
23
  authorization_details: {
21
24
  type: "openid_credential";
25
+ format: "vc+sd-jwt" | "vc+mdoc-cbor";
22
26
  credential_configuration_id: string;
23
27
  }[];
24
28
  access_token: string;
@@ -29,6 +33,7 @@ export declare const TokenResponse: z.ZodObject<{
29
33
  }, {
30
34
  authorization_details: {
31
35
  type: "openid_credential";
36
+ format: "vc+sd-jwt" | "vc+mdoc-cbor";
32
37
  credential_configuration_id: string;
33
38
  }[];
34
39
  access_token: string;
@@ -42,14 +47,14 @@ export declare const CredentialResponse: z.ZodObject<{
42
47
  c_nonce: z.ZodString;
43
48
  c_nonce_expires_in: z.ZodNumber;
44
49
  credential: z.ZodString;
45
- format: z.ZodUnion<[z.ZodLiteral<"vc+sd-jwt">, z.ZodLiteral<"mso_mdoc">]>;
50
+ format: z.ZodUnion<[z.ZodLiteral<"vc+sd-jwt">, z.ZodLiteral<"vc+mdoc-cbor">]>;
46
51
  }, "strip", z.ZodTypeAny, {
47
- format: "vc+sd-jwt" | "mso_mdoc";
52
+ format: "vc+sd-jwt" | "vc+mdoc-cbor";
48
53
  c_nonce: string;
49
54
  c_nonce_expires_in: number;
50
55
  credential: string;
51
56
  }, {
52
- format: "vc+sd-jwt" | "mso_mdoc";
57
+ format: "vc+sd-jwt" | "vc+mdoc-cbor";
53
58
  c_nonce: string;
54
59
  c_nonce_expires_in: number;
55
60
  credential: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,CAAC"}
@@ -1,20 +1,39 @@
1
+ import * as z from "zod";
2
+ declare const PresentationParams: z.ZodObject<{
3
+ client_id: z.ZodString;
4
+ request_uri: z.ZodString;
5
+ request_uri_method: z.ZodEnum<["get", "post"]>;
6
+ state: z.ZodOptional<z.ZodString>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ client_id: string;
9
+ request_uri: string;
10
+ request_uri_method: "get" | "post";
11
+ state?: string | undefined;
12
+ }, {
13
+ client_id: string;
14
+ request_uri: string;
15
+ request_uri_method: "get" | "post";
16
+ state?: string | undefined;
17
+ }>;
18
+ export type PresentationParams = z.infer<typeof PresentationParams>;
1
19
  /**
2
20
  * The beginning of the presentation flow.
3
21
  * To be implemented accordind to the user touchpoint
4
22
  *
5
- * @param Optional parameters, depending on the starting touchoint
23
+ * @param params Presentation parameters, depending on the starting touchpoint
6
24
  * @returns The url for the Relying Party to connect with
7
25
  */
8
- export type StartFlow<T extends Array<unknown> = []> = (...args: T) => {
9
- requestUri: string;
10
- clientId: string;
11
- };
26
+ export type StartFlow = (params: {
27
+ [K in keyof PresentationParams]?: PresentationParams[K] | null;
28
+ }) => PresentationParams;
12
29
  /**
13
- * Start a presentation flow by decoding the parameters needed to start the presentation flow.
30
+ * Start a presentation flow by validating the required parameters.
31
+ * Parameters are extracted from a url encoded in a QR code or in a deep link.
14
32
  *
15
- * @param qrcode The encoded QR-code content
33
+ * @param params The parameters to be validated
16
34
  * @returns The url for the Relying Party to connect with
17
- * @throws If the provided qr code fails to be decoded
35
+ * @throws If the provided parameters are not valid
18
36
  */
19
- export declare const startFlowFromQR: StartFlow<[string, string]>;
37
+ export declare const startFlowFromQR: StartFlow;
38
+ export {};
20
39
  //# sourceMappingURL=01-start-flow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"01-start-flow.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/01-start-flow.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAiBvD,CAAC"}
1
+ {"version":3,"file":"01-start-flow.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/01-start-flow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;EAKtB,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE;KAC9B,CAAC,IAAI,MAAM,kBAAkB,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,IAAI;CAC/D,KAAK,kBAAkB,CAAC;AAEzB;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,SAW7B,CAAC"}
@@ -1,10 +1,11 @@
1
- import { RelyingPartyEntityConfiguration } from "../../entity/trust/types";
1
+ import { RelyingPartyEntityConfiguration } from "../../trust/types";
2
2
  import type { StartFlow } from "../issuance/01-start-flow";
3
3
  import type { Out } from "../../utils/misc";
4
4
  export type EvaluateRelyingPartyTrust = (rpUrl: Out<StartFlow>["issuerUrl"], context?: {
5
5
  appFetch?: GlobalFetch["fetch"];
6
6
  }) => Promise<{
7
7
  rpConf: RelyingPartyEntityConfiguration["payload"]["metadata"];
8
+ subject: string;
8
9
  }>;
9
10
  /**
10
11
  * The Relying Party trust evaluation phase.
@@ -1 +1 @@
1
- {"version":3,"file":"02-evaluate-rp-trust.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/02-evaluate-rp-trust.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,MAAM,yBAAyB,GAAG,CACtC,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,EAClC,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IACX,MAAM,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;CAChE,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,EAAE,yBAUvC,CAAC"}
1
+ {"version":3,"file":"02-evaluate-rp-trust.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/02-evaluate-rp-trust.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,MAAM,yBAAyB,GAAG,CACtC,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,EAClC,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IACX,MAAM,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;IAC/D,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,EAAE,yBAUvC,CAAC"}
@@ -1,15 +1,17 @@
1
- import { type Out } from "../../utils/misc";
2
- import type { StartFlow } from "./01-start-flow";
3
- export type GetRequestObject = (requestUri: Out<StartFlow>["requestUri"], context?: {
1
+ import { RequestObjectWalletCapabilities } from "./types";
2
+ export type GetRequestObject = (requestUri: string, context?: {
4
3
  appFetch?: GlobalFetch["fetch"];
4
+ walletCapabilities?: RequestObjectWalletCapabilities;
5
5
  }) => Promise<{
6
6
  requestObjectEncodedJwt: string;
7
7
  }>;
8
8
  /**
9
- * Obtain the Request Object for RP authentication
9
+ * Obtain the Request Object for RP authentication. Both the GET and POST `request_uri_method` are supported.
10
10
  * @see https://italia.github.io/eudi-wallet-it-docs/versione-corrente/en/relying-party-solution.html
11
11
  *
12
- * @param requestUri The request uri of the Relying Party
12
+ * @param requestUri The url for the Relying Party to connect with
13
+ * @param rpConf The Relying Party's configuration * @param context.walletInstanceAttestation The Wallet Instance Attestation token
14
+ * @param context.walletCapabilities (optional) An object containing the wallet technical capabilities that will be sent with a POST request
13
15
  * @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
14
16
  * @returns The Request Object that describes the presentation
15
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"03-get-request-object.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/03-get-request-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,EACxC,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IAAE,uBAAuB,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAElD;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAc9B,CAAC"}
1
+ {"version":3,"file":"03-get-request-object.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/03-get-request-object.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,kBAAkB,CAAC,EAAE,+BAA+B,CAAC;CACtD,KACE,OAAO,CAAC;IAAE,uBAAuB,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAElD;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAsC9B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { JWK } from "../../utils/jwk";
2
- import { RelyingPartyEntityConfiguration } from "../../entity/trust/types";
2
+ import { RelyingPartyEntityConfiguration } from "../../trust/types";
3
3
  /**
4
4
  * Defines the signature for a function that retrieves JSON Web Key Sets (JWKS) from a client.
5
5
  *
@@ -7,35 +7,9 @@ import { RelyingPartyEntityConfiguration } from "../../entity/trust/types";
7
7
  * @param args - The arguments passed to the function.
8
8
  * @returns A promise resolving to an object containing an array of JWKs.
9
9
  */
10
- export type FetchJwks<T extends Array<unknown> = []> = (...args: T) => Promise<{
10
+ export type FetchJwks<T extends Array<unknown> = []> = (...args: T) => {
11
11
  keys: JWK[];
12
- }>;
13
- /**
14
- * Fetches the JSON Web Key Set (JWKS) based on the provided Request Object encoded as a JWT.
15
- * The retrieval process follows these steps in order:
16
- *
17
- * 1. **Direct JWK Retrieval**: If the JWT's protected header contains a `jwk` attribute, it uses this key directly.
18
- * 2. **X.509 Certificate Retrieval**: If the protected header includes an `x5c` attribute, it extracts the JWKs from the provided X.509 certificate chain.
19
- * 3. **Issuer's Well-Known Endpoint**: If neither `jwk` nor `x5c` are present, it constructs the JWKS URL using the issuer (`iss`) claim and fetches the keys from the issuer's well-known JWKS endpoint.
20
- *
21
- * The JWKS URL is constructed in the format `{issUrl.base}/.well-known/jar-issuer${issUrl.path}`,
22
- * as detailed in the SD-JWT VC issuer metadata specification.
23
- *
24
- * @param requestObjectEncodedJwt - The Request Object encoded as a JWT.
25
- * @param options - Optional parameters for fetching the JWKS.
26
- * @param options.context - Optional context providing a custom fetch implementation.
27
- * @param options.context.appFetch - A custom fetch function to replace the global `fetch` if provided.
28
- * @returns A promise that resolves to an object containing an array of JSON Web Keys (JWKs).
29
- * @throws {NoSuitableKeysFoundInEntityConfiguration} Throws an error if JWKS retrieval or key extraction fails.
30
- */
31
- export declare const fetchJwksFromRequestObject: FetchJwks<[
32
- string,
33
- {
34
- context?: {
35
- appFetch?: GlobalFetch["fetch"];
36
- };
37
- }?
38
- ]>;
12
+ };
39
13
  /**
40
14
  * Retrieves the JSON Web Key Set (JWKS) from a Relying Party's entity configuration.
41
15
  *
@@ -43,7 +17,7 @@ export declare const fetchJwksFromRequestObject: FetchJwks<[
43
17
  * @returns An object containing an array of JWKs.
44
18
  * @throws Will throw an error if the configuration is invalid or if JWKS is not found.
45
19
  */
46
- export declare const fetchJwksFromConfig: FetchJwks<[
20
+ export declare const getJwksFromConfig: FetchJwks<[
47
21
  RelyingPartyEntityConfiguration["payload"]["metadata"]
48
22
  ]>;
49
23
  //# sourceMappingURL=04-retrieve-rp-jwks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"04-retrieve-rp-jwks.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/04-retrieve-rp-jwks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAU3E;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC;IAC7E,IAAI,EAAE,GAAG,EAAE,CAAC;CACb,CAAC,CAAC;AA+DH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,0BAA0B,EAAE,SAAS,CAChD;IAAC,MAAM;IAAE;QAAE,OAAO,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;SAAE,CAAA;KAAE,CAAC;CAAC,CAmD7D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,CACzC;IAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC;CAAC,CAWzD,CAAC"}
1
+ {"version":3,"file":"04-retrieve-rp-jwks.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/04-retrieve-rp-jwks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AAEpE;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK;IACrE,IAAI,EAAE,GAAG,EAAE,CAAC;CACb,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,CACvC;IAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC;CAAC,CAWzD,CAAC"}
@@ -1,8 +1,21 @@
1
+ import type { RelyingPartyEntityConfiguration } from "../../trust";
1
2
  import { RequestObject } from "./types";
2
- import type { FetchJwks } from "./04-retrieve-rp-jwks";
3
- import { type Out } from "../../utils/misc";
4
- export type VerifyRequestObjectSignature = (requestObjectEncodedJwt: string, jwkKeys?: Out<FetchJwks>["keys"]) => Promise<{
3
+ export type VerifyRequestObject = (requestObjectEncodedJwt: string, context: {
4
+ clientId: string;
5
+ rpConf: RelyingPartyEntityConfiguration["payload"]["metadata"];
6
+ rpSubject: string;
7
+ state?: string;
8
+ }) => Promise<{
5
9
  requestObject: RequestObject;
6
10
  }>;
7
- export declare const verifyRequestObjectSignature: VerifyRequestObjectSignature;
11
+ /**
12
+ * Function to verify the Request Object's validity, from the signature to the required properties.
13
+ * @param requestObjectEncodedJwt The Request Object in JWT format
14
+ * @param context.clientId The client ID to verify
15
+ * @param context.rpConf The Entity Configuration of the Relying Party
16
+ * @param context.state Optional state
17
+ * @returns The verified Request Object
18
+ * @throws {InvalidRequestObjectError} if the Request Object cannot be validated
19
+ */
20
+ export declare const verifyRequestObject: VerifyRequestObject;
8
21
  //# sourceMappingURL=05-verify-request-object.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"05-verify-request-object.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/05-verify-request-object.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,MAAM,4BAA4B,GAAG,CACzC,uBAAuB,EAAE,MAAM,EAC/B,OAAO,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,KAC7B,OAAO,CAAC;IAAE,aAAa,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE/C,eAAO,MAAM,4BAA4B,EAAE,4BAuBxC,CAAC"}
1
+ {"version":3,"file":"05-verify-request-object.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/05-verify-request-object.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGxC,MAAM,MAAM,mBAAmB,GAAG,CAChC,uBAAuB,EAAE,MAAM,EAC/B,OAAO,EAAE;IACP,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,KACE,OAAO,CAAC;IAAE,aAAa,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE/C;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,EAAE,mBAsCjC,CAAC"}
@@ -1,8 +1,6 @@
1
1
  import { PresentationDefinition, RequestObject } from "./types";
2
- import { RelyingPartyEntityConfiguration } from "../../entity/trust/types";
3
- export type FetchPresentationDefinition = (requestObject: RequestObject, context?: {
4
- appFetch?: GlobalFetch["fetch"];
5
- }, rpConf?: RelyingPartyEntityConfiguration["payload"]["metadata"]) => Promise<{
2
+ import { RelyingPartyEntityConfiguration } from "../../trust/types";
3
+ export type FetchPresentationDefinition = (requestObject: RequestObject, rpConf?: RelyingPartyEntityConfiguration["payload"]["metadata"]) => Promise<{
6
4
  presentationDefinition: PresentationDefinition;
7
5
  }>;
8
6
  /**
@@ -10,15 +8,12 @@ export type FetchPresentationDefinition = (requestObject: RequestObject, context
10
8
  *
11
9
  * The method attempts the following strategies in order:
12
10
  * 1. Checks if `presentation_definition` is directly available in the request object.
13
- * 2. Fetches the `presentation_definition` from the URI provided in the relying party configuration.
14
- * 3. Uses a pre-configured `presentation_definition` from the relying party configuration if the `scope` is present in the request object.
11
+ * 2. Uses a pre-configured `presentation_definition` from the relying party configuration if the `scope` is present in the request object.
15
12
  *
16
- * If none of the above conditions are met, the function throws an error indicating the definition could not be found.
13
+ * If none of the above conditions are met, the function throws an error indicating the definition could not be found. Note that `presentation_definition_uri` is not supported in 0.9.x.
17
14
  *
18
15
  * @param {RequestObject} requestObject - The request object containing the presentation definition or references to it.
19
16
  * @param {RelyingPartyEntityConfiguration["payload"]["metadata"]} [rpConf] - Optional relying party configuration.
20
- * @param {Object} [context] - Optional context for providing a custom fetch implementation.
21
- * @param {GlobalFetch["fetch"]} [context.appFetch] - Custom fetch function, defaults to global `fetch`.
22
17
  * @returns {Promise<{ presentationDefinition: PresentationDefinition }>} - Resolves with the presentation definition.
23
18
  * @throws {Error} - Throws if the presentation definition cannot be found or fetched.
24
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"06-fetch-presentation-definition.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/06-fetch-presentation-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAG3E,MAAM,MAAM,2BAA2B,GAAG,CACxC,aAAa,EAAE,aAAa,EAC5B,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,EACD,MAAM,CAAC,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,KAC5D,OAAO,CAAC;IACX,sBAAsB,EAAE,sBAAsB,CAAC;CAChD,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB,EAAE,2BA8CpC,CAAC"}
1
+ {"version":3,"file":"06-fetch-presentation-definition.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/06-fetch-presentation-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AAEpE,MAAM,MAAM,2BAA2B,GAAG,CACxC,aAAa,EAAE,aAAa,EAC5B,MAAM,CAAC,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,KAC5D,OAAO,CAAC;IACX,sBAAsB,EAAE,sBAAsB,CAAC;CAChD,CAAC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,EAAE,2BAuBpC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { DcqlQuery } from "dcql";
2
- import type { CredentialFormat, EvaluatedDisclosure } from "./types";
2
+ import type { Disclosure } from "../../sd-jwt/types";
3
+ import type { RemotePresentation } from "./types";
3
4
  /**
4
5
  * The purpose for the credential request by the RP.
5
6
  */
@@ -7,21 +8,21 @@ type CredentialPurpose = {
7
8
  required: boolean;
8
9
  description?: string;
9
10
  };
10
- export type EvaluateDcqlQuery = (query: DcqlQuery.Input, credentialsSdJwt: [
11
- string,
12
- string,
13
- string
14
- ][], credentialsMdoc: [
15
- string,
16
- string,
17
- string
18
- ][]) => Promise<({
11
+ export type EvaluateDcqlQuery = (credentialsSdJwt: [string, string][], query: DcqlQuery.Input) => {
19
12
  id: string;
13
+ vct: string;
20
14
  credential: string;
21
15
  keyTag: string;
22
- requiredDisclosures: EvaluatedDisclosure[];
16
+ requiredDisclosures: Disclosure[];
23
17
  purposes: CredentialPurpose[];
24
- } & CredentialFormat)[]>;
18
+ }[];
19
+ export type PrepareRemotePresentations = (credentials: {
20
+ id: string;
21
+ credential: string;
22
+ keyTag: string;
23
+ requestedClaims: string[];
24
+ }[], nonce: string, clientId: string) => Promise<RemotePresentation[]>;
25
25
  export declare const evaluateDcqlQuery: EvaluateDcqlQuery;
26
+ export declare const prepareRemotePresentations: PrepareRemotePresentations;
26
27
  export {};
27
28
  //# sourceMappingURL=07-evaluate-dcql-query.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"07-evaluate-dcql-query.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/07-evaluate-dcql-query.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAKV,MAAM,MAAM,CAAC;AAMd,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGrE;;GAEG;AACH,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAC9B,KAAK,EAAE,SAAS,CAAC,KAAK,EACtB,gBAAgB,EAAE;IAChB,MAAM;IACN,MAAM;IACN,MAAM;CACP,EAAE,EACH,eAAe,EAAE;IACf,MAAM;IACN,MAAM;IACN,MAAM;CACP,EAAE,KACA,OAAO,CACV,CAAC;IACC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC3C,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B,GAAG,gBAAgB,CAAC,EAAE,CACxB,CAAC;AAkFF,eAAO,MAAM,iBAAiB,EAAE,iBAsG/B,CAAC"}
1
+ {"version":3,"file":"07-evaluate-dcql-query.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/07-evaluate-dcql-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA8B,MAAM,MAAM,CAAC;AAG7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD;;GAEG;AACH,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAC9B,gBAAgB,EAAE,CAAC,MAAM,EAAe,MAAM,CAAkB,EAAE,EAClE,KAAK,EAAE,SAAS,CAAC,KAAK,KACnB;IACH,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,UAAU,EAAE,CAAC;IAClC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B,EAAE,CAAC;AAEJ,MAAM,MAAM,0BAA0B,GAAG,CACvC,WAAW,EAAE;IACX,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,EAAE,EACH,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,KACb,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;AAwEnC,eAAO,MAAM,iBAAiB,EAAE,iBAkE/B,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,0BAqBxC,CAAC"}