@pagopa/io-react-native-wallet 1.7.1 → 2.0.0-next.1

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 (443) 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/trust/README.md +147 -0
  77. package/lib/commonjs/trust/chain.js +153 -0
  78. package/lib/commonjs/trust/chain.js.map +1 -0
  79. package/lib/commonjs/trust/errors.js +133 -0
  80. package/lib/commonjs/trust/errors.js.map +1 -0
  81. package/lib/commonjs/trust/index.js +288 -0
  82. package/lib/commonjs/trust/index.js.map +1 -0
  83. package/lib/commonjs/{entity/trust → trust}/types.js +27 -47
  84. package/lib/commonjs/trust/types.js.map +1 -0
  85. package/lib/commonjs/trust/utils.js +70 -0
  86. package/lib/commonjs/trust/utils.js.map +1 -0
  87. package/lib/commonjs/utils/crypto.js +5 -112
  88. package/lib/commonjs/utils/crypto.js.map +1 -1
  89. package/lib/commonjs/utils/decoder.js +2 -0
  90. package/lib/commonjs/utils/decoder.js.map +1 -1
  91. package/lib/commonjs/utils/error-codes.js +22 -2
  92. package/lib/commonjs/utils/error-codes.js.map +1 -1
  93. package/lib/commonjs/utils/errors.js +72 -4
  94. package/lib/commonjs/utils/errors.js.map +1 -1
  95. package/lib/commonjs/utils/logging.js +68 -0
  96. package/lib/commonjs/utils/logging.js.map +1 -0
  97. package/lib/commonjs/utils/misc.js +2 -0
  98. package/lib/commonjs/utils/misc.js.map +1 -1
  99. package/lib/commonjs/utils/par.js +17 -10
  100. package/lib/commonjs/utils/par.js.map +1 -1
  101. package/lib/commonjs/utils/string.js +1 -12
  102. package/lib/commonjs/utils/string.js.map +1 -1
  103. package/lib/commonjs/wallet-instance/index.js +14 -0
  104. package/lib/commonjs/wallet-instance/index.js.map +1 -1
  105. package/lib/commonjs/wallet-instance-attestation/README.md +8 -3
  106. package/lib/commonjs/wallet-instance-attestation/issuing.js +15 -8
  107. package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
  108. package/lib/commonjs/wallet-instance-attestation/types.js +16 -20
  109. package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
  110. package/lib/module/client/generated/wallet-provider.js +40 -15
  111. package/lib/module/client/generated/wallet-provider.js.map +1 -1
  112. package/lib/module/credential/index.js +3 -1
  113. package/lib/module/credential/index.js.map +1 -1
  114. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +20 -0
  115. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
  116. package/lib/module/credential/issuance/03-start-user-authorization.js +25 -16
  117. package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
  118. package/lib/module/credential/issuance/04-complete-user-authorization.js +30 -18
  119. package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
  120. package/lib/module/credential/issuance/05-authorize-access.js +17 -11
  121. package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
  122. package/lib/module/credential/issuance/06-obtain-credential.js +36 -28
  123. package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
  124. package/lib/module/credential/issuance/07-verify-and-parse-credential.js +27 -205
  125. package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  126. package/lib/module/credential/issuance/README.md +23 -20
  127. package/lib/module/credential/issuance/const.js +1 -1
  128. package/lib/module/credential/issuance/const.js.map +1 -1
  129. package/lib/module/credential/issuance/index.js +2 -2
  130. package/lib/module/credential/issuance/index.js.map +1 -1
  131. package/lib/module/credential/presentation/01-start-flow.js +14 -15
  132. package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
  133. package/lib/module/credential/presentation/02-evaluate-rp-trust.js +5 -3
  134. package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
  135. package/lib/module/credential/presentation/03-get-request-object.js +34 -7
  136. package/lib/module/credential/presentation/03-get-request-object.js.map +1 -1
  137. package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +2 -124
  138. package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +1 -1
  139. package/lib/module/credential/presentation/05-verify-request-object.js +78 -23
  140. package/lib/module/credential/presentation/05-verify-request-object.js.map +1 -1
  141. package/lib/module/credential/presentation/06-fetch-presentation-definition.js +6 -30
  142. package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +1 -1
  143. package/lib/module/credential/presentation/07-evaluate-dcql-query.js +97 -118
  144. package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
  145. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +83 -186
  146. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
  147. package/lib/module/credential/presentation/08-send-authorization-response.js +107 -170
  148. package/lib/module/credential/presentation/08-send-authorization-response.js.map +1 -1
  149. package/lib/module/credential/presentation/README.md +74 -79
  150. package/lib/module/credential/presentation/errors.js +30 -17
  151. package/lib/module/credential/presentation/errors.js.map +1 -1
  152. package/lib/module/credential/presentation/index.js +6 -6
  153. package/lib/module/credential/presentation/index.js.map +1 -1
  154. package/lib/module/credential/presentation/types.js +49 -27
  155. package/lib/module/credential/presentation/types.js.map +1 -1
  156. package/lib/module/credential/status/01-start-flow.js +2 -0
  157. package/lib/module/credential/status/01-start-flow.js.map +1 -0
  158. package/lib/module/credential/status/02-status-attestation.js +66 -0
  159. package/lib/module/credential/status/02-status-attestation.js.map +1 -0
  160. package/lib/module/credential/status/03-verify-and-parse-status-attestation.js +49 -0
  161. package/lib/module/credential/status/03-verify-and-parse-status-attestation.js.map +1 -0
  162. package/lib/module/credential/status/README.md +67 -0
  163. package/lib/module/credential/status/index.js +5 -0
  164. package/lib/module/credential/status/index.js.map +1 -0
  165. package/lib/module/credential/status/types.js +40 -0
  166. package/lib/module/credential/status/types.js.map +1 -0
  167. package/lib/module/credential/trustmark/README.md +62 -0
  168. package/lib/module/credential/trustmark/get-credential-trustmark.js +77 -0
  169. package/lib/module/credential/trustmark/get-credential-trustmark.js.map +1 -0
  170. package/lib/module/credential/trustmark/index.js +3 -0
  171. package/lib/module/credential/trustmark/index.js.map +1 -0
  172. package/lib/module/index.js +3 -1
  173. package/lib/module/index.js.map +1 -1
  174. package/lib/module/pid/sd-jwt/types.js +16 -1
  175. package/lib/module/pid/sd-jwt/types.js.map +1 -1
  176. package/lib/module/sd-jwt/__test__/index.test.js +22 -34
  177. package/lib/module/sd-jwt/__test__/index.test.js.map +1 -1
  178. package/lib/module/sd-jwt/__test__/types.test.js +11 -23
  179. package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
  180. package/lib/module/sd-jwt/index.js +1 -7
  181. package/lib/module/sd-jwt/index.js.map +1 -1
  182. package/lib/module/sd-jwt/types.js +4 -19
  183. package/lib/module/sd-jwt/types.js.map +1 -1
  184. package/lib/module/trust/README.md +147 -0
  185. package/lib/module/trust/chain.js +145 -0
  186. package/lib/module/trust/chain.js.map +1 -0
  187. package/lib/module/trust/errors.js +115 -0
  188. package/lib/module/trust/errors.js.map +1 -0
  189. package/lib/module/trust/index.js +269 -0
  190. package/lib/module/trust/index.js.map +1 -0
  191. package/lib/module/{entity/trust → trust}/types.js +25 -46
  192. package/lib/module/trust/types.js.map +1 -0
  193. package/lib/module/trust/utils.js +60 -0
  194. package/lib/module/trust/utils.js.map +1 -0
  195. package/lib/module/utils/crypto.js +4 -107
  196. package/lib/module/utils/crypto.js.map +1 -1
  197. package/lib/module/utils/decoder.js +3 -0
  198. package/lib/module/utils/decoder.js.map +1 -1
  199. package/lib/module/utils/error-codes.js +20 -1
  200. package/lib/module/utils/error-codes.js.map +1 -1
  201. package/lib/module/utils/errors.js +61 -4
  202. package/lib/module/utils/errors.js.map +1 -1
  203. package/lib/module/utils/logging.js +62 -0
  204. package/lib/module/utils/logging.js.map +1 -0
  205. package/lib/module/utils/misc.js +2 -0
  206. package/lib/module/utils/misc.js.map +1 -1
  207. package/lib/module/utils/par.js +17 -9
  208. package/lib/module/utils/par.js.map +1 -1
  209. package/lib/module/utils/string.js +0 -10
  210. package/lib/module/utils/string.js.map +1 -1
  211. package/lib/module/wallet-instance/index.js +13 -0
  212. package/lib/module/wallet-instance/index.js.map +1 -1
  213. package/lib/module/wallet-instance-attestation/README.md +8 -3
  214. package/lib/module/wallet-instance-attestation/index.js +2 -2
  215. package/lib/module/wallet-instance-attestation/index.js.map +1 -1
  216. package/lib/module/wallet-instance-attestation/issuing.js +16 -9
  217. package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
  218. package/lib/module/wallet-instance-attestation/types.js +14 -18
  219. package/lib/module/wallet-instance-attestation/types.js.map +1 -1
  220. package/lib/typescript/client/generated/wallet-provider.d.ts +206 -51
  221. package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
  222. package/lib/typescript/credential/index.d.ts +3 -1
  223. package/lib/typescript/credential/index.d.ts.map +1 -1
  224. package/lib/typescript/credential/issuance/01-start-flow.d.ts +1 -1
  225. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +19 -0
  226. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +1 -0
  227. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +3 -3
  228. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
  229. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +9 -9
  230. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
  231. package/lib/typescript/credential/issuance/05-authorize-access.d.ts +3 -3
  232. package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
  233. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +4 -4
  234. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
  235. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +3 -15
  236. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
  237. package/lib/typescript/credential/issuance/const.d.ts +1 -1
  238. package/lib/typescript/credential/issuance/const.d.ts.map +1 -1
  239. package/lib/typescript/credential/issuance/index.d.ts +3 -3
  240. package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
  241. package/lib/typescript/credential/issuance/types.d.ts +8 -3
  242. package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
  243. package/lib/typescript/credential/presentation/01-start-flow.d.ts +28 -9
  244. package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -1
  245. package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +2 -1
  246. package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +1 -1
  247. package/lib/typescript/credential/presentation/03-get-request-object.d.ts +7 -5
  248. package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +1 -1
  249. package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts +4 -30
  250. package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +1 -1
  251. package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +17 -4
  252. package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +1 -1
  253. package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +4 -9
  254. package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +1 -1
  255. package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +13 -12
  256. package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +1 -1
  257. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +40 -42
  258. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +1 -1
  259. package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +30 -43
  260. package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +1 -1
  261. package/lib/typescript/credential/presentation/errors.d.ts +25 -10
  262. package/lib/typescript/credential/presentation/errors.d.ts.map +1 -1
  263. package/lib/typescript/credential/presentation/index.d.ts +7 -8
  264. package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
  265. package/lib/typescript/credential/presentation/types.d.ts +137 -307
  266. package/lib/typescript/credential/presentation/types.d.ts.map +1 -1
  267. package/lib/typescript/credential/status/01-start-flow.d.ts +10 -0
  268. package/lib/typescript/credential/status/01-start-flow.d.ts.map +1 -0
  269. package/lib/typescript/credential/status/02-status-attestation.d.ts +19 -0
  270. package/lib/typescript/credential/status/02-status-attestation.d.ts.map +1 -0
  271. package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts +24 -0
  272. package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts.map +1 -0
  273. package/lib/typescript/credential/status/index.d.ts +7 -0
  274. package/lib/typescript/credential/status/index.d.ts.map +1 -0
  275. package/lib/typescript/credential/status/types.d.ts +305 -0
  276. package/lib/typescript/credential/status/types.d.ts.map +1 -0
  277. package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts +52 -0
  278. package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts.map +1 -0
  279. package/lib/typescript/credential/trustmark/index.d.ts +4 -0
  280. package/lib/typescript/credential/trustmark/index.d.ts.map +1 -0
  281. package/lib/typescript/index.d.ts +3 -1
  282. package/lib/typescript/index.d.ts.map +1 -1
  283. package/lib/typescript/pid/sd-jwt/types.d.ts +103 -25
  284. package/lib/typescript/pid/sd-jwt/types.d.ts.map +1 -1
  285. package/lib/typescript/sd-jwt/index.d.ts +20 -72
  286. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  287. package/lib/typescript/sd-jwt/types.d.ts +24 -129
  288. package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
  289. package/lib/typescript/trust/chain.d.ts +23 -0
  290. package/lib/typescript/trust/chain.d.ts.map +1 -0
  291. package/lib/typescript/trust/errors.d.ts +102 -0
  292. package/lib/typescript/trust/errors.d.ts.map +1 -0
  293. package/lib/typescript/{entity/trust → trust}/index.d.ts +308 -281
  294. package/lib/typescript/trust/index.d.ts.map +1 -0
  295. package/lib/typescript/{entity/trust → trust}/types.d.ts +1714 -1301
  296. package/lib/typescript/{entity/trust → trust}/types.d.ts.map +1 -1
  297. package/lib/typescript/trust/utils.d.ts +22 -0
  298. package/lib/typescript/trust/utils.d.ts.map +1 -0
  299. package/lib/typescript/utils/crypto.d.ts +0 -32
  300. package/lib/typescript/utils/crypto.d.ts.map +1 -1
  301. package/lib/typescript/utils/decoder.d.ts.map +1 -1
  302. package/lib/typescript/utils/error-codes.d.ts +20 -0
  303. package/lib/typescript/utils/error-codes.d.ts.map +1 -1
  304. package/lib/typescript/utils/errors.d.ts +55 -10
  305. package/lib/typescript/utils/errors.d.ts.map +1 -1
  306. package/lib/typescript/utils/logging.d.ts +35 -0
  307. package/lib/typescript/utils/logging.d.ts.map +1 -0
  308. package/lib/typescript/utils/misc.d.ts.map +1 -1
  309. package/lib/typescript/utils/par.d.ts +8 -1
  310. package/lib/typescript/utils/par.d.ts.map +1 -1
  311. package/lib/typescript/utils/string.d.ts +0 -7
  312. package/lib/typescript/utils/string.d.ts.map +1 -1
  313. package/lib/typescript/wallet-instance/index.d.ts +8 -0
  314. package/lib/typescript/wallet-instance/index.d.ts.map +1 -1
  315. package/lib/typescript/wallet-instance-attestation/index.d.ts +1 -2
  316. package/lib/typescript/wallet-instance-attestation/index.d.ts.map +1 -1
  317. package/lib/typescript/wallet-instance-attestation/issuing.d.ts +4 -2
  318. package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +1 -1
  319. package/lib/typescript/wallet-instance-attestation/types.d.ts +60 -102
  320. package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
  321. package/package.json +9 -10
  322. package/src/client/generated/wallet-provider.ts +52 -17
  323. package/src/credential/index.ts +4 -1
  324. package/src/credential/issuance/01-start-flow.ts +1 -1
  325. package/src/credential/issuance/02-evaluate-issuer-trust.ts +32 -0
  326. package/src/credential/issuance/03-start-user-authorization.ts +48 -22
  327. package/src/credential/issuance/04-complete-user-authorization.ts +74 -18
  328. package/src/credential/issuance/05-authorize-access.ts +29 -11
  329. package/src/credential/issuance/06-obtain-credential.ts +61 -36
  330. package/src/credential/issuance/07-verify-and-parse-credential.ts +37 -264
  331. package/src/credential/issuance/README.md +23 -20
  332. package/src/credential/issuance/const.ts +1 -1
  333. package/src/credential/issuance/index.ts +6 -3
  334. package/src/credential/presentation/01-start-flow.ts +19 -22
  335. package/src/credential/presentation/02-evaluate-rp-trust.ts +5 -4
  336. package/src/credential/presentation/03-get-request-object.ts +36 -8
  337. package/src/credential/presentation/04-retrieve-rp-jwks.ts +6 -148
  338. package/src/credential/presentation/05-verify-request-object.ts +115 -30
  339. package/src/credential/presentation/06-fetch-presentation-definition.ts +5 -35
  340. package/src/credential/presentation/07-evaluate-dcql-query.ts +132 -161
  341. package/src/credential/presentation/07-evaluate-input-descriptor.ts +136 -254
  342. package/src/credential/presentation/08-send-authorization-response.ts +178 -260
  343. package/src/credential/presentation/README.md +74 -79
  344. package/src/credential/presentation/errors.ts +38 -15
  345. package/src/credential/presentation/index.ts +18 -19
  346. package/src/credential/presentation/types.ts +67 -64
  347. package/src/credential/status/01-start-flow.ts +9 -0
  348. package/src/credential/status/02-status-attestation.ts +105 -0
  349. package/src/credential/status/03-verify-and-parse-status-attestation.ts +70 -0
  350. package/src/credential/status/README.md +67 -0
  351. package/src/credential/status/index.ts +22 -0
  352. package/src/credential/status/types.ts +43 -0
  353. package/src/credential/trustmark/README.md +62 -0
  354. package/src/credential/trustmark/get-credential-trustmark.ts +139 -0
  355. package/src/credential/trustmark/index.ts +8 -0
  356. package/src/index.ts +4 -0
  357. package/src/pid/sd-jwt/types.ts +18 -1
  358. package/src/sd-jwt/__test__/index.test.ts +36 -55
  359. package/src/sd-jwt/__test__/types.test.ts +16 -29
  360. package/src/sd-jwt/index.ts +1 -5
  361. package/src/sd-jwt/types.ts +2 -19
  362. package/src/trust/README.md +147 -0
  363. package/src/trust/chain.ts +227 -0
  364. package/src/trust/errors.ts +136 -0
  365. package/src/{entity/trust → trust}/index.ts +207 -25
  366. package/src/{entity/trust → trust}/types.ts +24 -37
  367. package/src/trust/utils.ts +70 -0
  368. package/src/utils/crypto.ts +4 -106
  369. package/src/utils/decoder.ts +6 -1
  370. package/src/utils/error-codes.ts +23 -0
  371. package/src/utils/errors.ts +119 -15
  372. package/src/utils/logging.ts +68 -0
  373. package/src/utils/misc.ts +5 -0
  374. package/src/utils/par.ts +19 -6
  375. package/src/utils/string.ts +0 -10
  376. package/src/wallet-instance/index.ts +30 -1
  377. package/src/wallet-instance-attestation/README.md +8 -3
  378. package/src/wallet-instance-attestation/index.ts +2 -2
  379. package/src/wallet-instance-attestation/issuing.ts +33 -12
  380. package/src/wallet-instance-attestation/types.ts +18 -22
  381. package/lib/commonjs/credential/issuance/02-get-issuer-config.js +0 -48
  382. package/lib/commonjs/credential/issuance/02-get-issuer-config.js.map +0 -1
  383. package/lib/commonjs/entity/openid-connect/issuer/index.js +0 -25
  384. package/lib/commonjs/entity/openid-connect/issuer/index.js.map +0 -1
  385. package/lib/commonjs/entity/openid-connect/issuer/types.js +0 -64
  386. package/lib/commonjs/entity/openid-connect/issuer/types.js.map +0 -1
  387. package/lib/commonjs/entity/trust/chain.js +0 -122
  388. package/lib/commonjs/entity/trust/chain.js.map +0 -1
  389. package/lib/commonjs/entity/trust/index.js +0 -148
  390. package/lib/commonjs/entity/trust/index.js.map +0 -1
  391. package/lib/commonjs/entity/trust/types.js.map +0 -1
  392. package/lib/commonjs/mdoc/converters.js +0 -26
  393. package/lib/commonjs/mdoc/converters.js.map +0 -1
  394. package/lib/commonjs/mdoc/index.js +0 -68
  395. package/lib/commonjs/mdoc/index.js.map +0 -1
  396. package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js +0 -469
  397. package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js.map +0 -1
  398. package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-utils.js +0 -90
  399. package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-utils.js.map +0 -1
  400. package/lib/module/credential/issuance/02-get-issuer-config.js +0 -42
  401. package/lib/module/credential/issuance/02-get-issuer-config.js.map +0 -1
  402. package/lib/module/entity/openid-connect/issuer/index.js +0 -20
  403. package/lib/module/entity/openid-connect/issuer/index.js.map +0 -1
  404. package/lib/module/entity/openid-connect/issuer/types.js +0 -48
  405. package/lib/module/entity/openid-connect/issuer/types.js.map +0 -1
  406. package/lib/module/entity/trust/chain.js +0 -113
  407. package/lib/module/entity/trust/chain.js.map +0 -1
  408. package/lib/module/entity/trust/index.js +0 -131
  409. package/lib/module/entity/trust/index.js.map +0 -1
  410. package/lib/module/entity/trust/types.js.map +0 -1
  411. package/lib/module/mdoc/converters.js +0 -20
  412. package/lib/module/mdoc/converters.js.map +0 -1
  413. package/lib/module/mdoc/index.js +0 -60
  414. package/lib/module/mdoc/index.js.map +0 -1
  415. package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js +0 -462
  416. package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js.map +0 -1
  417. package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-utils.js +0 -83
  418. package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-utils.js.map +0 -1
  419. package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts +0 -32
  420. package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts.map +0 -1
  421. package/lib/typescript/entity/openid-connect/issuer/index.d.ts +0 -12
  422. package/lib/typescript/entity/openid-connect/issuer/index.d.ts.map +0 -1
  423. package/lib/typescript/entity/openid-connect/issuer/types.d.ts +0 -777
  424. package/lib/typescript/entity/openid-connect/issuer/types.d.ts.map +0 -1
  425. package/lib/typescript/entity/trust/chain.d.ts +0 -26
  426. package/lib/typescript/entity/trust/chain.d.ts.map +0 -1
  427. package/lib/typescript/entity/trust/index.d.ts.map +0 -1
  428. package/lib/typescript/mdoc/converters.d.ts +0 -8
  429. package/lib/typescript/mdoc/converters.d.ts.map +0 -1
  430. package/lib/typescript/mdoc/index.d.ts +0 -10
  431. package/lib/typescript/mdoc/index.d.ts.map +0 -1
  432. package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-inputs.d.ts +0 -3
  433. package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-inputs.d.ts.map +0 -1
  434. package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-utils.d.ts +0 -42
  435. package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-utils.d.ts.map +0 -1
  436. package/src/credential/issuance/02-get-issuer-config.ts +0 -67
  437. package/src/entity/openid-connect/issuer/index.ts +0 -27
  438. package/src/entity/openid-connect/issuer/types.ts +0 -76
  439. package/src/entity/trust/chain.ts +0 -154
  440. package/src/mdoc/converters.ts +0 -26
  441. package/src/mdoc/index.ts +0 -95
  442. package/src/utils/credential/issuance/07-verify-and-parse-credentials-inputs.ts +0 -615
  443. package/src/utils/credential/issuance/07-verify-and-parse-credentials-utils.ts +0 -171
@@ -0,0 +1,305 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * Shape from parsing a status attestation response in case of 201.
4
+ */
5
+ export declare const StatusAttestationResponse: z.ZodObject<{
6
+ status_attestation: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ status_attestation: string;
9
+ }, {
10
+ status_attestation: string;
11
+ }>;
12
+ /**
13
+ * Type from parsing a status attestation response in case of 201.
14
+ * Inferred from {@link StatusAttestationResponse}.
15
+ */
16
+ export type StatusAttestationResponse = z.infer<typeof StatusAttestationResponse>;
17
+ /**
18
+ * Type for a parsed status attestation.
19
+ */
20
+ export type ParsedStatusAttestation = z.infer<typeof ParsedStatusAttestation>;
21
+ /**
22
+ * Shape for parsing a status attestation in a JWT.
23
+ */
24
+ export declare const ParsedStatusAttestation: z.ZodObject<{
25
+ header: z.ZodObject<{
26
+ typ: z.ZodLiteral<"status-attestation+jwt">;
27
+ alg: z.ZodString;
28
+ kid: z.ZodOptional<z.ZodString>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ alg: string;
31
+ typ: "status-attestation+jwt";
32
+ kid?: string | undefined;
33
+ }, {
34
+ alg: string;
35
+ typ: "status-attestation+jwt";
36
+ kid?: string | undefined;
37
+ }>;
38
+ payload: z.ZodObject<{
39
+ credential_hash_alg: z.ZodString;
40
+ credential_hash: z.ZodString;
41
+ cnf: z.ZodObject<{
42
+ jwk: z.ZodObject<{
43
+ alg: z.ZodOptional<z.ZodString>;
44
+ crv: z.ZodOptional<z.ZodString>;
45
+ d: z.ZodOptional<z.ZodString>;
46
+ dp: z.ZodOptional<z.ZodString>;
47
+ dq: z.ZodOptional<z.ZodString>;
48
+ e: z.ZodOptional<z.ZodString>;
49
+ ext: z.ZodOptional<z.ZodBoolean>;
50
+ k: z.ZodOptional<z.ZodString>;
51
+ key_ops: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
52
+ kid: z.ZodOptional<z.ZodString>;
53
+ kty: z.ZodUnion<[z.ZodLiteral<"RSA">, z.ZodLiteral<"EC">]>;
54
+ n: z.ZodOptional<z.ZodString>;
55
+ p: z.ZodOptional<z.ZodString>;
56
+ q: z.ZodOptional<z.ZodString>;
57
+ qi: z.ZodOptional<z.ZodString>;
58
+ use: z.ZodOptional<z.ZodString>;
59
+ x: z.ZodOptional<z.ZodString>;
60
+ y: z.ZodOptional<z.ZodString>;
61
+ x5c: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
62
+ x5t: z.ZodOptional<z.ZodString>;
63
+ "x5t#S256": z.ZodOptional<z.ZodString>;
64
+ x5u: z.ZodOptional<z.ZodString>;
65
+ }, "strip", z.ZodTypeAny, {
66
+ kty: "RSA" | "EC";
67
+ alg?: string | undefined;
68
+ crv?: string | undefined;
69
+ d?: string | undefined;
70
+ dp?: string | undefined;
71
+ dq?: string | undefined;
72
+ e?: string | undefined;
73
+ ext?: boolean | undefined;
74
+ k?: string | undefined;
75
+ key_ops?: string[] | undefined;
76
+ kid?: string | undefined;
77
+ n?: string | undefined;
78
+ p?: string | undefined;
79
+ q?: string | undefined;
80
+ qi?: string | undefined;
81
+ use?: string | undefined;
82
+ x?: string | undefined;
83
+ y?: string | undefined;
84
+ x5c?: string[] | undefined;
85
+ x5t?: string | undefined;
86
+ "x5t#S256"?: string | undefined;
87
+ x5u?: string | undefined;
88
+ }, {
89
+ kty: "RSA" | "EC";
90
+ alg?: string | undefined;
91
+ crv?: string | undefined;
92
+ d?: string | undefined;
93
+ dp?: string | undefined;
94
+ dq?: string | undefined;
95
+ e?: string | undefined;
96
+ ext?: boolean | undefined;
97
+ k?: string | undefined;
98
+ key_ops?: string[] | undefined;
99
+ kid?: string | undefined;
100
+ n?: string | undefined;
101
+ p?: string | undefined;
102
+ q?: string | undefined;
103
+ qi?: string | undefined;
104
+ use?: string | undefined;
105
+ x?: string | undefined;
106
+ y?: string | undefined;
107
+ x5c?: string[] | undefined;
108
+ x5t?: string | undefined;
109
+ "x5t#S256"?: string | undefined;
110
+ x5u?: string | undefined;
111
+ }>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ jwk: {
114
+ kty: "RSA" | "EC";
115
+ alg?: string | undefined;
116
+ crv?: string | undefined;
117
+ d?: string | undefined;
118
+ dp?: string | undefined;
119
+ dq?: string | undefined;
120
+ e?: string | undefined;
121
+ ext?: boolean | undefined;
122
+ k?: string | undefined;
123
+ key_ops?: string[] | undefined;
124
+ kid?: string | undefined;
125
+ n?: string | undefined;
126
+ p?: string | undefined;
127
+ q?: string | undefined;
128
+ qi?: string | undefined;
129
+ use?: string | undefined;
130
+ x?: string | undefined;
131
+ y?: string | undefined;
132
+ x5c?: string[] | undefined;
133
+ x5t?: string | undefined;
134
+ "x5t#S256"?: string | undefined;
135
+ x5u?: string | undefined;
136
+ };
137
+ }, {
138
+ jwk: {
139
+ kty: "RSA" | "EC";
140
+ alg?: string | undefined;
141
+ crv?: string | undefined;
142
+ d?: string | undefined;
143
+ dp?: string | undefined;
144
+ dq?: string | undefined;
145
+ e?: string | undefined;
146
+ ext?: boolean | undefined;
147
+ k?: string | undefined;
148
+ key_ops?: string[] | undefined;
149
+ kid?: string | undefined;
150
+ n?: string | undefined;
151
+ p?: string | undefined;
152
+ q?: string | undefined;
153
+ qi?: string | undefined;
154
+ use?: string | undefined;
155
+ x?: string | undefined;
156
+ y?: string | undefined;
157
+ x5c?: string[] | undefined;
158
+ x5t?: string | undefined;
159
+ "x5t#S256"?: string | undefined;
160
+ x5u?: string | undefined;
161
+ };
162
+ }>;
163
+ exp: z.ZodNumber;
164
+ iat: z.ZodNumber;
165
+ }, "strip", z.ZodTypeAny, {
166
+ iat: number;
167
+ exp: number;
168
+ credential_hash_alg: string;
169
+ cnf: {
170
+ jwk: {
171
+ kty: "RSA" | "EC";
172
+ alg?: string | undefined;
173
+ crv?: string | undefined;
174
+ d?: string | undefined;
175
+ dp?: string | undefined;
176
+ dq?: string | undefined;
177
+ e?: string | undefined;
178
+ ext?: boolean | undefined;
179
+ k?: string | undefined;
180
+ key_ops?: string[] | undefined;
181
+ kid?: string | undefined;
182
+ n?: string | undefined;
183
+ p?: string | undefined;
184
+ q?: string | undefined;
185
+ qi?: string | undefined;
186
+ use?: string | undefined;
187
+ x?: string | undefined;
188
+ y?: string | undefined;
189
+ x5c?: string[] | undefined;
190
+ x5t?: string | undefined;
191
+ "x5t#S256"?: string | undefined;
192
+ x5u?: string | undefined;
193
+ };
194
+ };
195
+ credential_hash: string;
196
+ }, {
197
+ iat: number;
198
+ exp: number;
199
+ credential_hash_alg: string;
200
+ cnf: {
201
+ jwk: {
202
+ kty: "RSA" | "EC";
203
+ alg?: string | undefined;
204
+ crv?: string | undefined;
205
+ d?: string | undefined;
206
+ dp?: string | undefined;
207
+ dq?: string | undefined;
208
+ e?: string | undefined;
209
+ ext?: boolean | undefined;
210
+ k?: string | undefined;
211
+ key_ops?: string[] | undefined;
212
+ kid?: string | undefined;
213
+ n?: string | undefined;
214
+ p?: string | undefined;
215
+ q?: string | undefined;
216
+ qi?: string | undefined;
217
+ use?: string | undefined;
218
+ x?: string | undefined;
219
+ y?: string | undefined;
220
+ x5c?: string[] | undefined;
221
+ x5t?: string | undefined;
222
+ "x5t#S256"?: string | undefined;
223
+ x5u?: string | undefined;
224
+ };
225
+ };
226
+ credential_hash: string;
227
+ }>;
228
+ }, "strip", z.ZodTypeAny, {
229
+ header: {
230
+ alg: string;
231
+ typ: "status-attestation+jwt";
232
+ kid?: string | undefined;
233
+ };
234
+ payload: {
235
+ iat: number;
236
+ exp: number;
237
+ credential_hash_alg: string;
238
+ cnf: {
239
+ jwk: {
240
+ kty: "RSA" | "EC";
241
+ alg?: string | undefined;
242
+ crv?: string | undefined;
243
+ d?: string | undefined;
244
+ dp?: string | undefined;
245
+ dq?: string | undefined;
246
+ e?: string | undefined;
247
+ ext?: boolean | undefined;
248
+ k?: string | undefined;
249
+ key_ops?: string[] | undefined;
250
+ kid?: string | undefined;
251
+ n?: string | undefined;
252
+ p?: string | undefined;
253
+ q?: string | undefined;
254
+ qi?: string | undefined;
255
+ use?: string | undefined;
256
+ x?: string | undefined;
257
+ y?: string | undefined;
258
+ x5c?: string[] | undefined;
259
+ x5t?: string | undefined;
260
+ "x5t#S256"?: string | undefined;
261
+ x5u?: string | undefined;
262
+ };
263
+ };
264
+ credential_hash: string;
265
+ };
266
+ }, {
267
+ header: {
268
+ alg: string;
269
+ typ: "status-attestation+jwt";
270
+ kid?: string | undefined;
271
+ };
272
+ payload: {
273
+ iat: number;
274
+ exp: number;
275
+ credential_hash_alg: string;
276
+ cnf: {
277
+ jwk: {
278
+ kty: "RSA" | "EC";
279
+ alg?: string | undefined;
280
+ crv?: string | undefined;
281
+ d?: string | undefined;
282
+ dp?: string | undefined;
283
+ dq?: string | undefined;
284
+ e?: string | undefined;
285
+ ext?: boolean | undefined;
286
+ k?: string | undefined;
287
+ key_ops?: string[] | undefined;
288
+ kid?: string | undefined;
289
+ n?: string | undefined;
290
+ p?: string | undefined;
291
+ q?: string | undefined;
292
+ qi?: string | undefined;
293
+ use?: string | undefined;
294
+ x?: string | undefined;
295
+ y?: string | undefined;
296
+ x5c?: string[] | undefined;
297
+ x5t?: string | undefined;
298
+ "x5t#S256"?: string | undefined;
299
+ x5u?: string | undefined;
300
+ };
301
+ };
302
+ credential_hash: string;
303
+ };
304
+ }>;
305
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,yBAAyB,CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAelC,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { type CryptoContext } from "@pagopa/io-react-native-jwt";
2
+ export type GetCredentialTrustmarkJwt = (params: {
3
+ /**
4
+ * The Wallet Instance's attestation
5
+ */
6
+ walletInstanceAttestation: string;
7
+ /**
8
+ * The Wallet Instance's crypto context associated with the walletInstanceAttestation parameter
9
+ */
10
+ wiaCryptoContext: CryptoContext;
11
+ /**
12
+ * The type of credential for which the trustmark is generated
13
+ */
14
+ credentialType: string;
15
+ /**
16
+ * (Optional) Document number contained in the credential, if applicable
17
+ */
18
+ docNumber?: string;
19
+ /**
20
+ * (Optional) Expiration time for the trustmark, default is 2 minutes.
21
+ * If a number is provided, it is interpreted as a timestamp in seconds.
22
+ * If a string is provided, it is interpreted as a time span and added to the current timestamp.
23
+ */
24
+ expirationTime?: number | string;
25
+ }) => Promise<{
26
+ /**
27
+ * The signed JWT
28
+ */
29
+ jwt: string;
30
+ /**
31
+ * The expiration time of the JWT in seconds
32
+ */
33
+ expirationTime: number;
34
+ }>;
35
+ /**
36
+ * Generates a trustmark signed JWT, which is used to verify the authenticity of a credential.
37
+ * The public key used to sign the trustmark must the same used for the Wallet Instance Attestation.
38
+ *
39
+ * @param walletInstanceAttestation the Wallet Instance's attestation
40
+ * @param wiaCryptoContext The Wallet Instance's crypto context associated with the walletInstanceAttestation parameter
41
+ * @param credentialType The type of credential for which the trustmark is generated
42
+ * @param docNumber (Optional) Document number contained in the credential, if applicable
43
+ * @param expirationTime (Optional) Expiration time for the trustmark, default is 2 minutes.
44
+ * If a number is provided, it is interpreted as a timestamp in seconds.
45
+ * If a string is provided, it is interpreted as a time span and added to the current timestamp.
46
+ * @throws {IoWalletError} If the WIA is expired
47
+ * @throws {IoWalletError} If the public key associated to the WIA is not the same for the CryptoContext
48
+ * @throws {JWSSignatureVerificationFailed} If the WIA signature is not valid
49
+ * @returns A promise containing the signed JWT and its expiration time in seconds
50
+ */
51
+ export declare const getCredentialTrustmark: GetCredentialTrustmarkJwt;
52
+ //# sourceMappingURL=get-credential-trustmark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-credential-trustmark.d.ts","sourceRoot":"","sources":["../../../../src/credential/trustmark/get-credential-trustmark.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AAMrC,MAAM,MAAM,yBAAyB,GAAG,CAAC,MAAM,EAAE;IAC/C;;OAEG;IACH,yBAAyB,EAAE,MAAM,CAAC;IAClC;;OAEG;IACH,gBAAgB,EAAE,aAAa,CAAC;IAChC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC,KAAK,OAAO,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,EAAE,yBA6EpC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type GetCredentialTrustmarkJwt, getCredentialTrustmark } from "./get-credential-trustmark";
2
+ export { getCredentialTrustmark };
3
+ export type { GetCredentialTrustmarkJwt };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/trustmark/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAC9B,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC,YAAY,EAAE,yBAAyB,EAAE,CAAC"}
@@ -6,10 +6,12 @@ import * as PID from "./pid";
6
6
  import * as SdJwt from "./sd-jwt";
7
7
  import * as Errors from "./utils/errors";
8
8
  import * as WalletInstanceAttestation from "./wallet-instance-attestation";
9
+ import * as Trust from "./trust";
9
10
  import * as WalletInstance from "./wallet-instance";
11
+ import * as Logging from "./utils/logging";
10
12
  import { AuthorizationDetail, AuthorizationDetails } from "./utils/par";
11
13
  import { createCryptoContextFor } from "./utils/crypto";
12
14
  import type { IntegrityContext } from "./utils/integrity";
13
- export { SdJwt, PID, Credential, WalletInstanceAttestation, WalletInstance, Errors, createCryptoContextFor, AuthorizationDetail, AuthorizationDetails, fixBase64EncodingOnKey, };
15
+ export { SdJwt, PID, Credential, WalletInstanceAttestation, WalletInstance, Errors, Trust, createCryptoContextFor, AuthorizationDetail, AuthorizationDetails, fixBase64EncodingOnKey, Logging, };
14
16
  export type { IntegrityContext, AuthorizationContext };
15
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,gCAAgC,CAAC;AAExC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,yBAAyB,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EACL,KAAK,EACL,GAAG,EACH,UAAU,EACV,yBAAyB,EACzB,cAAc,EACd,MAAM,EACN,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,GACvB,CAAC;AAEF,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,gCAAgC,CAAC;AAExC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,yBAAyB,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EACL,KAAK,EACL,GAAG,EACH,UAAU,EACV,yBAAyB,EACzB,cAAc,EACd,MAAM,EACN,KAAK,EACL,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,OAAO,GACR,CAAC;AAEF,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,CAAC"}
@@ -11,27 +11,89 @@ export declare const PID: z.ZodObject<{
11
11
  issuedAt: z.ZodDate;
12
12
  expiration: z.ZodDate;
13
13
  verification: z.ZodOptional<z.ZodObject<{
14
- trust_framework: z.ZodLiteral<"eidas">;
15
- assurance_level: z.ZodString;
16
- evidence: z.ZodObject<{
17
- method: z.ZodString;
14
+ trustFramework: z.ZodLiteral<"eidas">;
15
+ assuranceLevel: z.ZodString;
16
+ evidence: z.ZodArray<z.ZodObject<{
17
+ type: z.ZodString;
18
+ record: z.ZodObject<{
19
+ type: z.ZodString;
20
+ source: z.ZodObject<{
21
+ organization_name: z.ZodString;
22
+ organization_id: z.ZodString;
23
+ country_code: z.ZodString;
24
+ }, "strip", z.ZodTypeAny, {
25
+ organization_name: string;
26
+ organization_id: string;
27
+ country_code: string;
28
+ }, {
29
+ organization_name: string;
30
+ organization_id: string;
31
+ country_code: string;
32
+ }>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ type: string;
35
+ source: {
36
+ organization_name: string;
37
+ organization_id: string;
38
+ country_code: string;
39
+ };
40
+ }, {
41
+ type: string;
42
+ source: {
43
+ organization_name: string;
44
+ organization_id: string;
45
+ country_code: string;
46
+ };
47
+ }>;
18
48
  }, "strip", z.ZodTypeAny, {
19
- method: string;
49
+ type: string;
50
+ record: {
51
+ type: string;
52
+ source: {
53
+ organization_name: string;
54
+ organization_id: string;
55
+ country_code: string;
56
+ };
57
+ };
20
58
  }, {
21
- method: string;
22
- }>;
59
+ type: string;
60
+ record: {
61
+ type: string;
62
+ source: {
63
+ organization_name: string;
64
+ organization_id: string;
65
+ country_code: string;
66
+ };
67
+ };
68
+ }>, "many">;
23
69
  }, "strip", z.ZodTypeAny, {
24
- trust_framework: "eidas";
25
- assurance_level: string;
70
+ trustFramework: "eidas";
71
+ assuranceLevel: string;
26
72
  evidence: {
27
- method: string;
28
- };
73
+ type: string;
74
+ record: {
75
+ type: string;
76
+ source: {
77
+ organization_name: string;
78
+ organization_id: string;
79
+ country_code: string;
80
+ };
81
+ };
82
+ }[];
29
83
  }, {
30
- trust_framework: "eidas";
31
- assurance_level: string;
84
+ trustFramework: "eidas";
85
+ assuranceLevel: string;
32
86
  evidence: {
33
- method: string;
34
- };
87
+ type: string;
88
+ record: {
89
+ type: string;
90
+ source: {
91
+ organization_name: string;
92
+ organization_id: string;
93
+ country_code: string;
94
+ };
95
+ };
96
+ }[];
35
97
  }>>;
36
98
  claims: z.ZodObject<{
37
99
  uniqueId: z.ZodString;
@@ -82,15 +144,23 @@ export declare const PID: z.ZodObject<{
82
144
  locality: string;
83
145
  } | undefined;
84
146
  };
147
+ issuer: string;
85
148
  expiration: Date;
86
149
  issuedAt: Date;
87
- issuer: string;
88
150
  verification?: {
89
- trust_framework: "eidas";
90
- assurance_level: string;
151
+ trustFramework: "eidas";
152
+ assuranceLevel: string;
91
153
  evidence: {
92
- method: string;
93
- };
154
+ type: string;
155
+ record: {
156
+ type: string;
157
+ source: {
158
+ organization_name: string;
159
+ organization_id: string;
160
+ country_code: string;
161
+ };
162
+ };
163
+ }[];
94
164
  } | undefined;
95
165
  }, {
96
166
  claims: {
@@ -104,15 +174,23 @@ export declare const PID: z.ZodObject<{
104
174
  locality: string;
105
175
  } | undefined;
106
176
  };
177
+ issuer: string;
107
178
  expiration: Date;
108
179
  issuedAt: Date;
109
- issuer: string;
110
180
  verification?: {
111
- trust_framework: "eidas";
112
- assurance_level: string;
181
+ trustFramework: "eidas";
182
+ assuranceLevel: string;
113
183
  evidence: {
114
- method: string;
115
- };
184
+ type: string;
185
+ record: {
186
+ type: string;
187
+ source: {
188
+ organization_name: string;
189
+ organization_id: string;
190
+ country_code: string;
191
+ };
192
+ };
193
+ }[];
116
194
  } | undefined;
117
195
  }>;
118
196
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/pid/sd-jwt/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;GAKG;AACH,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;AACtC,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBd,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/pid/sd-jwt/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB;;;;;GAKG;AACH,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;AACtC,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBd,CAAC"}