@pagopa/io-react-native-wallet 1.0.0 → 1.1.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 (289) hide show
  1. package/lib/commonjs/credential/index.js +1 -5
  2. package/lib/commonjs/credential/index.js.map +1 -1
  3. package/lib/commonjs/credential/issuance/02-get-issuer-config.js +48 -0
  4. package/lib/commonjs/credential/issuance/02-get-issuer-config.js.map +1 -0
  5. package/lib/commonjs/credential/issuance/03-start-user-authorization.js +16 -20
  6. package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
  7. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +8 -8
  8. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
  9. package/lib/commonjs/credential/issuance/05-authorize-access.js +8 -9
  10. package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
  11. package/lib/commonjs/credential/issuance/06-obtain-credential.js +18 -21
  12. package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
  13. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +3 -3
  14. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  15. package/lib/commonjs/credential/issuance/README.md +18 -21
  16. package/lib/commonjs/credential/issuance/index.js +3 -3
  17. package/lib/commonjs/credential/issuance/index.js.map +1 -1
  18. package/lib/commonjs/credential/issuance/types.js +1 -1
  19. package/lib/commonjs/credential/issuance/types.js.map +1 -1
  20. package/lib/commonjs/credential/presentation/01-start-flow.js +7 -2
  21. package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -1
  22. package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js +2 -2
  23. package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
  24. package/lib/commonjs/credential/presentation/03-retrieve-jwks.js +68 -0
  25. package/lib/commonjs/credential/presentation/03-retrieve-jwks.js.map +1 -0
  26. package/lib/commonjs/credential/presentation/{03-get-request-object.js → 04-get-request-object.js} +27 -13
  27. package/lib/commonjs/credential/presentation/04-get-request-object.js.map +1 -0
  28. package/lib/commonjs/credential/presentation/{04-send-authorization-response.js → 05-send-authorization-response.js} +1 -1
  29. package/lib/commonjs/credential/presentation/{04-send-authorization-response.js.map → 05-send-authorization-response.js.map} +1 -1
  30. package/lib/commonjs/credential/presentation/README.md +74 -2
  31. package/lib/commonjs/credential/presentation/index.js +15 -2
  32. package/lib/commonjs/credential/presentation/index.js.map +1 -1
  33. package/lib/commonjs/credential/presentation/types.js +5 -3
  34. package/lib/commonjs/credential/presentation/types.js.map +1 -1
  35. package/lib/commonjs/entity/openid-connect/issuer/index.js +25 -0
  36. package/lib/commonjs/entity/openid-connect/issuer/index.js.map +1 -0
  37. package/lib/commonjs/entity/openid-connect/issuer/types.js +61 -0
  38. package/lib/commonjs/entity/openid-connect/issuer/types.js.map +1 -0
  39. package/lib/commonjs/{trust → entity/trust}/chain.js +1 -1
  40. package/lib/commonjs/entity/trust/chain.js.map +1 -0
  41. package/lib/commonjs/{trust → entity/trust}/index.js +1 -1
  42. package/lib/commonjs/entity/trust/index.js.map +1 -0
  43. package/lib/commonjs/{trust → entity/trust}/types.js +2 -2
  44. package/lib/commonjs/entity/trust/types.js.map +1 -0
  45. package/lib/commonjs/index.js +1 -3
  46. package/lib/commonjs/index.js.map +1 -1
  47. package/lib/commonjs/pid/sd-jwt/types.js +2 -18
  48. package/lib/commonjs/pid/sd-jwt/types.js.map +1 -1
  49. package/lib/commonjs/sd-jwt/__test__/index.test.js +32 -23
  50. package/lib/commonjs/sd-jwt/__test__/index.test.js.map +1 -1
  51. package/lib/commonjs/sd-jwt/__test__/types.test.js +20 -11
  52. package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
  53. package/lib/commonjs/sd-jwt/types.js +18 -5
  54. package/lib/commonjs/sd-jwt/types.js.map +1 -1
  55. package/lib/commonjs/utils/error-codes.js +1 -13
  56. package/lib/commonjs/utils/error-codes.js.map +1 -1
  57. package/lib/commonjs/utils/errors.js +2 -53
  58. package/lib/commonjs/utils/errors.js.map +1 -1
  59. package/lib/commonjs/utils/jwk.js +5 -1
  60. package/lib/commonjs/utils/jwk.js.map +1 -1
  61. package/lib/commonjs/utils/par.js +6 -12
  62. package/lib/commonjs/utils/par.js.map +1 -1
  63. package/lib/module/credential/index.js +1 -3
  64. package/lib/module/credential/index.js.map +1 -1
  65. package/lib/module/credential/issuance/02-get-issuer-config.js +42 -0
  66. package/lib/module/credential/issuance/02-get-issuer-config.js.map +1 -0
  67. package/lib/module/credential/issuance/03-start-user-authorization.js +16 -20
  68. package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
  69. package/lib/module/credential/issuance/04-complete-user-authorization.js +8 -8
  70. package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
  71. package/lib/module/credential/issuance/05-authorize-access.js +8 -9
  72. package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
  73. package/lib/module/credential/issuance/06-obtain-credential.js +18 -21
  74. package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
  75. package/lib/module/credential/issuance/07-verify-and-parse-credential.js +3 -3
  76. package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  77. package/lib/module/credential/issuance/README.md +18 -21
  78. package/lib/module/credential/issuance/index.js +2 -2
  79. package/lib/module/credential/issuance/index.js.map +1 -1
  80. package/lib/module/credential/issuance/types.js +1 -1
  81. package/lib/module/credential/issuance/types.js.map +1 -1
  82. package/lib/module/credential/presentation/01-start-flow.js +7 -2
  83. package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
  84. package/lib/module/credential/presentation/02-evaluate-rp-trust.js +1 -1
  85. package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
  86. package/lib/module/credential/presentation/03-retrieve-jwks.js +61 -0
  87. package/lib/module/credential/presentation/03-retrieve-jwks.js.map +1 -0
  88. package/lib/module/credential/presentation/{03-get-request-object.js → 04-get-request-object.js} +26 -12
  89. package/lib/module/credential/presentation/04-get-request-object.js.map +1 -0
  90. package/lib/module/credential/presentation/{04-send-authorization-response.js → 05-send-authorization-response.js} +1 -1
  91. package/lib/module/credential/presentation/{04-send-authorization-response.js.map → 05-send-authorization-response.js.map} +1 -1
  92. package/lib/module/credential/presentation/README.md +74 -2
  93. package/lib/module/credential/presentation/index.js +4 -3
  94. package/lib/module/credential/presentation/index.js.map +1 -1
  95. package/lib/module/credential/presentation/types.js +5 -3
  96. package/lib/module/credential/presentation/types.js.map +1 -1
  97. package/lib/module/entity/openid-connect/issuer/index.js +20 -0
  98. package/lib/module/entity/openid-connect/issuer/index.js.map +1 -0
  99. package/lib/module/entity/openid-connect/issuer/types.js +47 -0
  100. package/lib/module/entity/openid-connect/issuer/types.js.map +1 -0
  101. package/lib/module/{trust → entity/trust}/chain.js +1 -1
  102. package/lib/module/entity/trust/chain.js.map +1 -0
  103. package/lib/module/{trust → entity/trust}/index.js +1 -1
  104. package/lib/module/entity/trust/index.js.map +1 -0
  105. package/lib/module/{trust → entity/trust}/types.js +2 -2
  106. package/lib/module/entity/trust/types.js.map +1 -0
  107. package/lib/module/index.js +1 -2
  108. package/lib/module/index.js.map +1 -1
  109. package/lib/module/pid/sd-jwt/types.js +1 -16
  110. package/lib/module/pid/sd-jwt/types.js.map +1 -1
  111. package/lib/module/sd-jwt/__test__/index.test.js +32 -23
  112. package/lib/module/sd-jwt/__test__/index.test.js.map +1 -1
  113. package/lib/module/sd-jwt/__test__/types.test.js +20 -11
  114. package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
  115. package/lib/module/sd-jwt/types.js +16 -4
  116. package/lib/module/sd-jwt/types.js.map +1 -1
  117. package/lib/module/utils/error-codes.js +1 -13
  118. package/lib/module/utils/error-codes.js.map +1 -1
  119. package/lib/module/utils/errors.js +0 -48
  120. package/lib/module/utils/errors.js.map +1 -1
  121. package/lib/module/utils/jwk.js +3 -0
  122. package/lib/module/utils/jwk.js.map +1 -1
  123. package/lib/module/utils/par.js +6 -12
  124. package/lib/module/utils/par.js.map +1 -1
  125. package/lib/typescript/credential/index.d.ts +1 -3
  126. package/lib/typescript/credential/index.d.ts.map +1 -1
  127. package/lib/typescript/credential/issuance/01-start-flow.d.ts +1 -1
  128. package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts +32 -0
  129. package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts.map +1 -0
  130. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +3 -3
  131. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
  132. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +8 -8
  133. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
  134. package/lib/typescript/credential/issuance/05-authorize-access.d.ts +3 -3
  135. package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
  136. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +3 -3
  137. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
  138. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +3 -3
  139. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
  140. package/lib/typescript/credential/issuance/index.d.ts +3 -3
  141. package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
  142. package/lib/typescript/credential/issuance/types.d.ts +4 -9
  143. package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
  144. package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -1
  145. package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +1 -1
  146. package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +1 -1
  147. package/lib/typescript/credential/presentation/03-retrieve-jwks.d.ts +41 -0
  148. package/lib/typescript/credential/presentation/03-retrieve-jwks.d.ts.map +1 -0
  149. package/lib/typescript/credential/presentation/{03-get-request-object.d.ts → 04-get-request-object.d.ts} +4 -4
  150. package/lib/typescript/credential/presentation/04-get-request-object.d.ts.map +1 -0
  151. package/lib/typescript/credential/presentation/{04-send-authorization-response.d.ts → 05-send-authorization-response.d.ts} +2 -2
  152. package/lib/typescript/credential/presentation/{04-send-authorization-response.d.ts.map → 05-send-authorization-response.d.ts.map} +1 -1
  153. package/lib/typescript/credential/presentation/index.d.ts +5 -4
  154. package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
  155. package/lib/typescript/credential/presentation/types.d.ts +15 -15
  156. package/lib/typescript/entity/openid-connect/issuer/index.d.ts +12 -0
  157. package/lib/typescript/entity/openid-connect/issuer/index.d.ts.map +1 -0
  158. package/lib/typescript/entity/openid-connect/issuer/types.d.ts +641 -0
  159. package/lib/typescript/entity/openid-connect/issuer/types.d.ts.map +1 -0
  160. package/lib/typescript/entity/trust/chain.d.ts.map +1 -0
  161. package/lib/typescript/{trust → entity/trust}/index.d.ts +97 -97
  162. package/lib/typescript/entity/trust/index.d.ts.map +1 -0
  163. package/lib/typescript/{trust → entity/trust}/types.d.ts +597 -597
  164. package/lib/typescript/{trust → entity/trust}/types.d.ts.map +1 -1
  165. package/lib/typescript/index.d.ts +1 -2
  166. package/lib/typescript/index.d.ts.map +1 -1
  167. package/lib/typescript/pid/sd-jwt/types.d.ts +25 -103
  168. package/lib/typescript/pid/sd-jwt/types.d.ts.map +1 -1
  169. package/lib/typescript/sd-jwt/index.d.ts +60 -20
  170. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  171. package/lib/typescript/sd-jwt/types.d.ts +114 -24
  172. package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
  173. package/lib/typescript/utils/error-codes.d.ts +0 -12
  174. package/lib/typescript/utils/error-codes.d.ts.map +1 -1
  175. package/lib/typescript/utils/errors.d.ts +6 -37
  176. package/lib/typescript/utils/errors.d.ts.map +1 -1
  177. package/lib/typescript/utils/jwk.d.ts +135 -0
  178. package/lib/typescript/utils/jwk.d.ts.map +1 -1
  179. package/lib/typescript/utils/par.d.ts +1 -8
  180. package/lib/typescript/utils/par.d.ts.map +1 -1
  181. package/lib/typescript/wallet-instance-attestation/types.d.ts +12 -12
  182. package/package.json +1 -1
  183. package/src/credential/index.ts +1 -4
  184. package/src/credential/issuance/01-start-flow.ts +1 -1
  185. package/src/credential/issuance/02-get-issuer-config.ts +67 -0
  186. package/src/credential/issuance/03-start-user-authorization.ts +22 -30
  187. package/src/credential/issuance/04-complete-user-authorization.ts +11 -13
  188. package/src/credential/issuance/05-authorize-access.ts +8 -10
  189. package/src/credential/issuance/06-obtain-credential.ts +30 -31
  190. package/src/credential/issuance/07-verify-and-parse-credential.ts +6 -6
  191. package/src/credential/issuance/README.md +18 -21
  192. package/src/credential/issuance/index.ts +3 -6
  193. package/src/credential/issuance/types.ts +1 -1
  194. package/src/credential/presentation/01-start-flow.ts +8 -2
  195. package/src/credential/presentation/02-evaluate-rp-trust.ts +2 -2
  196. package/src/credential/presentation/03-retrieve-jwks.ts +73 -0
  197. package/src/credential/presentation/{03-get-request-object.ts → 04-get-request-object.ts} +33 -15
  198. package/src/credential/presentation/{04-send-authorization-response.ts → 05-send-authorization-response.ts} +1 -1
  199. package/src/credential/presentation/README.md +74 -2
  200. package/src/credential/presentation/index.ts +10 -2
  201. package/src/credential/presentation/types.ts +3 -3
  202. package/src/entity/openid-connect/issuer/index.ts +27 -0
  203. package/src/entity/openid-connect/issuer/types.ts +68 -0
  204. package/src/{trust → entity/trust}/chain.ts +2 -2
  205. package/src/{trust → entity/trust}/index.ts +1 -1
  206. package/src/{trust → entity/trust}/types.ts +2 -2
  207. package/src/index.ts +0 -2
  208. package/src/pid/sd-jwt/types.ts +1 -18
  209. package/src/sd-jwt/__test__/index.test.ts +47 -37
  210. package/src/sd-jwt/__test__/types.test.ts +26 -16
  211. package/src/sd-jwt/types.ts +16 -2
  212. package/src/utils/error-codes.ts +0 -12
  213. package/src/utils/errors.ts +12 -86
  214. package/src/utils/jwk.ts +5 -0
  215. package/src/utils/par.ts +3 -10
  216. package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +0 -27
  217. package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +0 -1
  218. package/lib/commonjs/credential/presentation/03-get-request-object.js.map +0 -1
  219. package/lib/commonjs/credential/status/01-start-flow.js +0 -2
  220. package/lib/commonjs/credential/status/01-start-flow.js.map +0 -1
  221. package/lib/commonjs/credential/status/02-status-attestation.js +0 -72
  222. package/lib/commonjs/credential/status/02-status-attestation.js.map +0 -1
  223. package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js +0 -52
  224. package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js.map +0 -1
  225. package/lib/commonjs/credential/status/README.md +0 -67
  226. package/lib/commonjs/credential/status/index.js +0 -27
  227. package/lib/commonjs/credential/status/index.js.map +0 -1
  228. package/lib/commonjs/credential/status/types.js +0 -48
  229. package/lib/commonjs/credential/status/types.js.map +0 -1
  230. package/lib/commonjs/credential/trustmark/README.md +0 -62
  231. package/lib/commonjs/credential/trustmark/get-credential-trustmark.js +0 -81
  232. package/lib/commonjs/credential/trustmark/get-credential-trustmark.js.map +0 -1
  233. package/lib/commonjs/credential/trustmark/index.js +0 -13
  234. package/lib/commonjs/credential/trustmark/index.js.map +0 -1
  235. package/lib/commonjs/trust/chain.js.map +0 -1
  236. package/lib/commonjs/trust/index.js.map +0 -1
  237. package/lib/commonjs/trust/types.js.map +0 -1
  238. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +0 -20
  239. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +0 -1
  240. package/lib/module/credential/presentation/03-get-request-object.js.map +0 -1
  241. package/lib/module/credential/status/01-start-flow.js +0 -2
  242. package/lib/module/credential/status/01-start-flow.js.map +0 -1
  243. package/lib/module/credential/status/02-status-attestation.js +0 -64
  244. package/lib/module/credential/status/02-status-attestation.js.map +0 -1
  245. package/lib/module/credential/status/03-verify-and-parse-status-attestation.js +0 -46
  246. package/lib/module/credential/status/03-verify-and-parse-status-attestation.js.map +0 -1
  247. package/lib/module/credential/status/README.md +0 -67
  248. package/lib/module/credential/status/index.js +0 -5
  249. package/lib/module/credential/status/index.js.map +0 -1
  250. package/lib/module/credential/status/types.js +0 -40
  251. package/lib/module/credential/status/types.js.map +0 -1
  252. package/lib/module/credential/trustmark/README.md +0 -62
  253. package/lib/module/credential/trustmark/get-credential-trustmark.js +0 -72
  254. package/lib/module/credential/trustmark/get-credential-trustmark.js.map +0 -1
  255. package/lib/module/credential/trustmark/index.js +0 -3
  256. package/lib/module/credential/trustmark/index.js.map +0 -1
  257. package/lib/module/trust/chain.js.map +0 -1
  258. package/lib/module/trust/index.js.map +0 -1
  259. package/lib/module/trust/types.js.map +0 -1
  260. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +0 -19
  261. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +0 -1
  262. package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +0 -1
  263. package/lib/typescript/credential/status/01-start-flow.d.ts +0 -10
  264. package/lib/typescript/credential/status/01-start-flow.d.ts.map +0 -1
  265. package/lib/typescript/credential/status/02-status-attestation.d.ts +0 -19
  266. package/lib/typescript/credential/status/02-status-attestation.d.ts.map +0 -1
  267. package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts +0 -24
  268. package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts.map +0 -1
  269. package/lib/typescript/credential/status/index.d.ts +0 -7
  270. package/lib/typescript/credential/status/index.d.ts.map +0 -1
  271. package/lib/typescript/credential/status/types.d.ts +0 -305
  272. package/lib/typescript/credential/status/types.d.ts.map +0 -1
  273. package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts +0 -52
  274. package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts.map +0 -1
  275. package/lib/typescript/credential/trustmark/index.d.ts +0 -4
  276. package/lib/typescript/credential/trustmark/index.d.ts.map +0 -1
  277. package/lib/typescript/trust/chain.d.ts.map +0 -1
  278. package/lib/typescript/trust/index.d.ts.map +0 -1
  279. package/src/credential/issuance/02-evaluate-issuer-trust.ts +0 -32
  280. package/src/credential/status/01-start-flow.ts +0 -9
  281. package/src/credential/status/02-status-attestation.ts +0 -102
  282. package/src/credential/status/03-verify-and-parse-status-attestation.ts +0 -60
  283. package/src/credential/status/README.md +0 -67
  284. package/src/credential/status/index.ts +0 -22
  285. package/src/credential/status/types.ts +0 -43
  286. package/src/credential/trustmark/README.md +0 -62
  287. package/src/credential/trustmark/get-credential-trustmark.ts +0 -120
  288. package/src/credential/trustmark/index.ts +0 -8
  289. /package/lib/typescript/{trust → entity/trust}/chain.d.ts +0 -0
@@ -29,20 +29,50 @@ export type DisclosureWithEncoded = {
29
29
  decoded: Disclosure;
30
30
  encoded: string;
31
31
  };
32
+ export type Verification = z.infer<typeof Verification>;
33
+ export declare const Verification: z.ZodObject<{
34
+ trust_framework: z.ZodLiteral<"eidas">;
35
+ assurance_level: z.ZodString;
36
+ evidence: z.ZodObject<{
37
+ method: z.ZodString;
38
+ }, "strip", z.ZodTypeAny, {
39
+ method: string;
40
+ }, {
41
+ method: string;
42
+ }>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ trust_framework: "eidas";
45
+ assurance_level: string;
46
+ evidence: {
47
+ method: string;
48
+ };
49
+ }, {
50
+ trust_framework: "eidas";
51
+ assurance_level: string;
52
+ evidence: {
53
+ method: string;
54
+ };
55
+ }>;
32
56
  export type SdJwt4VC = z.infer<typeof SdJwt4VC>;
33
57
  export declare const SdJwt4VC: z.ZodObject<{
34
58
  header: z.ZodObject<{
35
- typ: z.ZodLiteral<"vc+sd-jwt">;
59
+ typ: z.ZodUnion<[z.ZodLiteral<"vc+sd-jwt">, z.ZodLiteral<"example+sd-jwt">]>;
36
60
  alg: z.ZodString;
37
61
  kid: z.ZodOptional<z.ZodString>;
62
+ x5c: z.ZodOptional<z.ZodString>;
63
+ vctm: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
38
64
  }, "strip", z.ZodTypeAny, {
39
65
  alg: string;
40
- typ: "vc+sd-jwt";
66
+ typ: "vc+sd-jwt" | "example+sd-jwt";
41
67
  kid?: string | undefined;
68
+ x5c?: string | undefined;
69
+ vctm?: string[] | undefined;
42
70
  }, {
43
71
  alg: string;
44
- typ: "vc+sd-jwt";
72
+ typ: "vc+sd-jwt" | "example+sd-jwt";
45
73
  kid?: string | undefined;
74
+ x5c?: string | undefined;
75
+ vctm?: string[] | undefined;
46
76
  }>;
47
77
  payload: z.ZodIntersection<z.ZodObject<{
48
78
  iss: z.ZodString;
@@ -51,7 +81,7 @@ export declare const SdJwt4VC: z.ZodObject<{
51
81
  exp: z.ZodNumber;
52
82
  _sd_alg: z.ZodLiteral<"sha-256">;
53
83
  status: z.ZodObject<{
54
- status_attestation: z.ZodObject<{
84
+ status_assertion: z.ZodObject<{
55
85
  credential_hash_alg: z.ZodLiteral<"sha-256">;
56
86
  }, "strip", z.ZodTypeAny, {
57
87
  credential_hash_alg: "sha-256";
@@ -59,11 +89,11 @@ export declare const SdJwt4VC: z.ZodObject<{
59
89
  credential_hash_alg: "sha-256";
60
90
  }>;
61
91
  }, "strip", z.ZodTypeAny, {
62
- status_attestation: {
92
+ status_assertion: {
63
93
  credential_hash_alg: "sha-256";
64
94
  };
65
95
  }, {
66
- status_attestation: {
96
+ status_assertion: {
67
97
  credential_hash_alg: "sha-256";
68
98
  };
69
99
  }>;
@@ -190,16 +220,39 @@ export declare const SdJwt4VC: z.ZodObject<{
190
220
  };
191
221
  }>;
192
222
  vct: z.ZodString;
223
+ "vct#integrity": z.ZodOptional<z.ZodString>;
224
+ verification: z.ZodOptional<z.ZodObject<{
225
+ trust_framework: z.ZodLiteral<"eidas">;
226
+ assurance_level: z.ZodString;
227
+ evidence: z.ZodObject<{
228
+ method: z.ZodString;
229
+ }, "strip", z.ZodTypeAny, {
230
+ method: string;
231
+ }, {
232
+ method: string;
233
+ }>;
234
+ }, "strip", z.ZodTypeAny, {
235
+ trust_framework: "eidas";
236
+ assurance_level: string;
237
+ evidence: {
238
+ method: string;
239
+ };
240
+ }, {
241
+ trust_framework: "eidas";
242
+ assurance_level: string;
243
+ evidence: {
244
+ method: string;
245
+ };
246
+ }>>;
193
247
  }, "strip", z.ZodTypeAny, {
194
248
  iss: string;
195
249
  status: {
196
- status_attestation: {
250
+ status_assertion: {
197
251
  credential_hash_alg: "sha-256";
198
252
  };
199
253
  };
200
- sub: string;
254
+ vct: string;
201
255
  exp: number;
202
- _sd_alg: "sha-256";
203
256
  cnf: {
204
257
  jwk: {
205
258
  kty: "RSA" | "EC";
@@ -226,18 +279,26 @@ export declare const SdJwt4VC: z.ZodObject<{
226
279
  x5u?: string | undefined;
227
280
  };
228
281
  };
229
- vct: string;
282
+ sub: string;
283
+ _sd_alg: "sha-256";
230
284
  iat?: number | undefined;
285
+ "vct#integrity"?: string | undefined;
286
+ verification?: {
287
+ trust_framework: "eidas";
288
+ assurance_level: string;
289
+ evidence: {
290
+ method: string;
291
+ };
292
+ } | undefined;
231
293
  }, {
232
294
  iss: string;
233
295
  status: {
234
- status_attestation: {
296
+ status_assertion: {
235
297
  credential_hash_alg: "sha-256";
236
298
  };
237
299
  };
238
- sub: string;
300
+ vct: string;
239
301
  exp: number;
240
- _sd_alg: "sha-256";
241
302
  cnf: {
242
303
  jwk: {
243
304
  kty: "RSA" | "EC";
@@ -264,8 +325,17 @@ export declare const SdJwt4VC: z.ZodObject<{
264
325
  x5u?: string | undefined;
265
326
  };
266
327
  };
267
- vct: string;
328
+ sub: string;
329
+ _sd_alg: "sha-256";
268
330
  iat?: number | undefined;
331
+ "vct#integrity"?: string | undefined;
332
+ verification?: {
333
+ trust_framework: "eidas";
334
+ assurance_level: string;
335
+ evidence: {
336
+ method: string;
337
+ };
338
+ } | undefined;
269
339
  }>, z.ZodObject<{
270
340
  _sd: z.ZodArray<z.ZodString, "many">;
271
341
  }, "strip", z.ZodTypeAny, {
@@ -276,19 +346,20 @@ export declare const SdJwt4VC: z.ZodObject<{
276
346
  }, "strip", z.ZodTypeAny, {
277
347
  header: {
278
348
  alg: string;
279
- typ: "vc+sd-jwt";
349
+ typ: "vc+sd-jwt" | "example+sd-jwt";
280
350
  kid?: string | undefined;
351
+ x5c?: string | undefined;
352
+ vctm?: string[] | undefined;
281
353
  };
282
354
  payload: {
283
355
  iss: string;
284
356
  status: {
285
- status_attestation: {
357
+ status_assertion: {
286
358
  credential_hash_alg: "sha-256";
287
359
  };
288
360
  };
289
- sub: string;
361
+ vct: string;
290
362
  exp: number;
291
- _sd_alg: "sha-256";
292
363
  cnf: {
293
364
  jwk: {
294
365
  kty: "RSA" | "EC";
@@ -315,27 +386,37 @@ export declare const SdJwt4VC: z.ZodObject<{
315
386
  x5u?: string | undefined;
316
387
  };
317
388
  };
318
- vct: string;
389
+ sub: string;
390
+ _sd_alg: "sha-256";
319
391
  iat?: number | undefined;
392
+ "vct#integrity"?: string | undefined;
393
+ verification?: {
394
+ trust_framework: "eidas";
395
+ assurance_level: string;
396
+ evidence: {
397
+ method: string;
398
+ };
399
+ } | undefined;
320
400
  } & {
321
401
  _sd: string[];
322
402
  };
323
403
  }, {
324
404
  header: {
325
405
  alg: string;
326
- typ: "vc+sd-jwt";
406
+ typ: "vc+sd-jwt" | "example+sd-jwt";
327
407
  kid?: string | undefined;
408
+ x5c?: string | undefined;
409
+ vctm?: string[] | undefined;
328
410
  };
329
411
  payload: {
330
412
  iss: string;
331
413
  status: {
332
- status_attestation: {
414
+ status_assertion: {
333
415
  credential_hash_alg: "sha-256";
334
416
  };
335
417
  };
336
- sub: string;
418
+ vct: string;
337
419
  exp: number;
338
- _sd_alg: "sha-256";
339
420
  cnf: {
340
421
  jwk: {
341
422
  kty: "RSA" | "EC";
@@ -362,8 +443,17 @@ export declare const SdJwt4VC: z.ZodObject<{
362
443
  x5u?: string | undefined;
363
444
  };
364
445
  };
365
- vct: string;
446
+ sub: string;
447
+ _sd_alg: "sha-256";
366
448
  iat?: number | undefined;
449
+ "vct#integrity"?: string | undefined;
450
+ verification?: {
451
+ trust_framework: "eidas";
452
+ assurance_level: string;
453
+ evidence: {
454
+ method: string;
455
+ };
456
+ } | undefined;
367
457
  } & {
368
458
  _sd: string[];
369
459
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,QAAQ,aAAuC,CAAC;AAC7D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC1E,eAAO,MAAM,qBAAqB;;;;;;EAAyC,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,eAAO,MAAM,UAAU,4DAIrB,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,UAAU,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BnB,CAAC"}
@@ -1,21 +1,9 @@
1
1
  export declare const IssuerResponseErrorCodes: {
2
2
  readonly IssuerGenericError: "ERR_ISSUER_GENERIC_ERROR";
3
- /**
4
- * Error code thrown when a credential cannot be issued immediately because it follows the async flow.
5
- */
6
- readonly CredentialIssuingNotSynchronous: "ERR_CREDENTIAL_ISSUING_NOT_SYNCHRONOUS";
7
3
  /**
8
4
  * Error code thrown when an error occurs while requesting a credential.
9
5
  */
10
6
  readonly CredentialRequestFailed: "ERR_CREDENTIAL_REQUEST_FAILED";
11
- /**
12
- * Error code thrown when a credential status is invalid, either during issuance or when requesting a status attestation.
13
- */
14
- readonly CredentialInvalidStatus: "ERR_CREDENTIAL_INVALID_STATUS";
15
- /**
16
- * Error code thrown when an error occurs while obtaining a status attestation for a credential.
17
- */
18
- readonly StatusAttestationRequestFailed: "ERR_STATUS_ATTESTATION_REQUEST_FAILED";
19
7
  };
20
8
  export declare const WalletProviderResponseErrorCodes: {
21
9
  readonly WalletProviderGenericError: "ERR_IO_WALLET_PROVIDER_GENERIC_ERROR";
@@ -1 +1 @@
1
- {"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../../src/utils/error-codes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB;;IAEnC;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AAEX,eAAO,MAAM,gCAAgC;;IAE3C;;OAEG;;IAEH;;OAEG;;IAGH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE3E,MAAM,MAAM,+BAA+B,GACzC,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,OAAO,gCAAgC,CAAC,CAAC"}
1
+ {"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../../src/utils/error-codes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB;;IAEnC;;OAEG;;CAEK,CAAC;AAEX,eAAO,MAAM,gCAAgC;;IAE3C;;OAEG;;IAEH;;OAEG;;IAGH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE3E,MAAM,MAAM,+BAA+B,GACzC,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,OAAO,gCAAgC,CAAC,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import type { ProblemDetail } from "../client/generated/wallet-provider";
2
- import type { CredentialIssuerEntityConfiguration } from "../trust";
3
2
  import { IssuerResponseErrorCodes, WalletProviderResponseErrorCodes, type IssuerResponseErrorCode, type WalletProviderResponseErrorCode } from "./error-codes";
4
3
  export { IssuerResponseErrorCodes, WalletProviderResponseErrorCodes };
5
4
  type GenericErrorReason = string | Record<string, unknown>;
@@ -88,42 +87,6 @@ export declare class WalletProviderResponseError extends UnexpectedStatusCodeErr
88
87
  statusCode: number;
89
88
  });
90
89
  }
91
- type LocalizedIssuanceError = {
92
- [locale: string]: {
93
- title: string;
94
- description: string;
95
- };
96
- };
97
- /**
98
- * Function to extract the error message from the Entity Configuration's supported error codes.
99
- * @param errorCode The error code to map to a meaningful message
100
- * @param issuerConf The entity configuration for credentials
101
- * @param credentialType The type of credential the error belongs to
102
- * @returns A localized error {@link LocalizedIssuanceError} or undefined
103
- * @throws {IoWalletError} When no credential config is found
104
- */
105
- export declare function extractErrorMessageFromIssuerConf(errorCode: string, { issuerConf, credentialType, }: {
106
- issuerConf: CredentialIssuerEntityConfiguration["payload"]["metadata"];
107
- credentialType: string;
108
- }): LocalizedIssuanceError | undefined;
109
- /**
110
- * Type guard for issuer errors.
111
- * @param error The error to check
112
- * @param code Optional code to narrow down the issuer error
113
- */
114
- export declare const isIssuerResponseError: (error: unknown, code?: IssuerResponseErrorCode) => error is IssuerResponseError;
115
- /**
116
- * Type guard for wallet provider errors.
117
- * @param error The error to check
118
- * @param code Optional code to narrow down the wallet provider error
119
- */
120
- export declare const isWalletProviderResponseError: (error: unknown, code?: WalletProviderResponseErrorCode) => error is WalletProviderResponseError;
121
- type ErrorCodeMap<T> = T extends typeof IssuerResponseError ? IssuerResponseErrorCode : T extends typeof WalletProviderResponseError ? WalletProviderResponseErrorCode : never;
122
- type ErrorCase<T> = {
123
- code: ErrorCodeMap<T>;
124
- message: string;
125
- reason?: GenericErrorReason;
126
- };
127
90
  /**
128
91
  * Builder class used to create specialized errors from type {@link UnexpectedStatusCodeError} that handles multiple status codes.
129
92
  *
@@ -145,4 +108,10 @@ export declare class ResponseErrorBuilder<T extends typeof UnexpectedStatusCodeE
145
108
  handle(status: number | "*", params: ErrorCase<T>): this;
146
109
  buildFrom(originalError: UnexpectedStatusCodeError): UnexpectedStatusCodeError;
147
110
  }
111
+ type ErrorCodeMap<T> = T extends typeof IssuerResponseError ? IssuerResponseErrorCode : T extends typeof WalletProviderResponseError ? WalletProviderResponseErrorCode : never;
112
+ type ErrorCase<T> = {
113
+ code: ErrorCodeMap<T>;
114
+ message: string;
115
+ reason?: GenericErrorReason;
116
+ };
148
117
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/utils/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EACL,wBAAwB,EACxB,gCAAgC,EAChC,KAAK,uBAAuB,EA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O,mBAAmB,GACvD,uBAAuB,GACvB,CAAC,SAAS,OAAO,2BAA2B,GAC5C,+BAA+B,GAC/B,KAAK,CAAC;AAEV,KAAK,SAAS,CAAC,CAAC,IAAI;IAClB,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B,CAAC"}
@@ -91,4 +91,139 @@ export declare const JWK: z.ZodObject<{
91
91
  * @returns THe same input key with fixed values
92
92
  */
93
93
  export declare function fixBase64EncodingOnKey(key: JWK): JWK;
94
+ export type JWKS = z.infer<typeof JWKS>;
95
+ export declare const JWKS: z.ZodObject<{
96
+ keys: z.ZodArray<z.ZodObject<{
97
+ /** JWK "alg" (Algorithm) Parameter. */
98
+ alg: z.ZodOptional<z.ZodString>;
99
+ crv: z.ZodOptional<z.ZodString>;
100
+ d: z.ZodOptional<z.ZodString>;
101
+ dp: z.ZodOptional<z.ZodString>;
102
+ dq: z.ZodOptional<z.ZodString>;
103
+ e: z.ZodOptional<z.ZodString>;
104
+ /** JWK "ext" (Extractable) Parameter. */
105
+ ext: z.ZodOptional<z.ZodBoolean>;
106
+ k: z.ZodOptional<z.ZodString>;
107
+ /** JWK "key_ops" (Key Operations) Parameter. */
108
+ key_ops: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
109
+ /** JWK "kid" (Key ID) Parameter. */
110
+ kid: z.ZodOptional<z.ZodString>;
111
+ /** JWK "kty" (Key Type) Parameter.
112
+ * This attribute is required to discriminate the
113
+ * type of EC/RSA algorithm */
114
+ kty: z.ZodUnion<[z.ZodLiteral<"RSA">, z.ZodLiteral<"EC">]>;
115
+ n: z.ZodOptional<z.ZodString>;
116
+ p: z.ZodOptional<z.ZodString>;
117
+ q: z.ZodOptional<z.ZodString>;
118
+ qi: z.ZodOptional<z.ZodString>;
119
+ /** JWK "use" (Public Key Use) Parameter. */
120
+ use: z.ZodOptional<z.ZodString>;
121
+ x: z.ZodOptional<z.ZodString>;
122
+ y: z.ZodOptional<z.ZodString>;
123
+ /** JWK "x5c" (X.509 Certificate Chain) Parameter. */
124
+ x5c: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
125
+ /** JWK "x5t" (X.509 Certificate SHA-1 Thumbprint) Parameter. */
126
+ x5t: z.ZodOptional<z.ZodString>;
127
+ /** "x5t#S256" (X.509 Certificate SHA-256 Thumbprint) Parameter. */
128
+ "x5t#S256": z.ZodOptional<z.ZodString>;
129
+ /** JWK "x5u" (X.509 URL) Parameter. */
130
+ x5u: z.ZodOptional<z.ZodString>;
131
+ }, "strip", z.ZodTypeAny, {
132
+ kty: "RSA" | "EC";
133
+ alg?: string | undefined;
134
+ crv?: string | undefined;
135
+ d?: string | undefined;
136
+ dp?: string | undefined;
137
+ dq?: string | undefined;
138
+ e?: string | undefined;
139
+ ext?: boolean | undefined;
140
+ k?: string | undefined;
141
+ key_ops?: string[] | undefined;
142
+ kid?: string | undefined;
143
+ n?: string | undefined;
144
+ p?: string | undefined;
145
+ q?: string | undefined;
146
+ qi?: string | undefined;
147
+ use?: string | undefined;
148
+ x?: string | undefined;
149
+ y?: string | undefined;
150
+ x5c?: string[] | undefined;
151
+ x5t?: string | undefined;
152
+ "x5t#S256"?: string | undefined;
153
+ x5u?: string | undefined;
154
+ }, {
155
+ kty: "RSA" | "EC";
156
+ alg?: string | undefined;
157
+ crv?: string | undefined;
158
+ d?: string | undefined;
159
+ dp?: string | undefined;
160
+ dq?: string | undefined;
161
+ e?: string | undefined;
162
+ ext?: boolean | undefined;
163
+ k?: string | undefined;
164
+ key_ops?: string[] | undefined;
165
+ kid?: string | undefined;
166
+ n?: string | undefined;
167
+ p?: string | undefined;
168
+ q?: string | undefined;
169
+ qi?: string | undefined;
170
+ use?: string | undefined;
171
+ x?: string | undefined;
172
+ y?: string | undefined;
173
+ x5c?: string[] | undefined;
174
+ x5t?: string | undefined;
175
+ "x5t#S256"?: string | undefined;
176
+ x5u?: string | undefined;
177
+ }>, "many">;
178
+ }, "strip", z.ZodTypeAny, {
179
+ keys: {
180
+ kty: "RSA" | "EC";
181
+ alg?: string | undefined;
182
+ crv?: string | undefined;
183
+ d?: string | undefined;
184
+ dp?: string | undefined;
185
+ dq?: string | undefined;
186
+ e?: string | undefined;
187
+ ext?: boolean | undefined;
188
+ k?: string | undefined;
189
+ key_ops?: string[] | undefined;
190
+ kid?: string | undefined;
191
+ n?: string | undefined;
192
+ p?: string | undefined;
193
+ q?: string | undefined;
194
+ qi?: string | undefined;
195
+ use?: string | undefined;
196
+ x?: string | undefined;
197
+ y?: string | undefined;
198
+ x5c?: string[] | undefined;
199
+ x5t?: string | undefined;
200
+ "x5t#S256"?: string | undefined;
201
+ x5u?: string | undefined;
202
+ }[];
203
+ }, {
204
+ keys: {
205
+ kty: "RSA" | "EC";
206
+ alg?: string | undefined;
207
+ crv?: string | undefined;
208
+ d?: string | undefined;
209
+ dp?: string | undefined;
210
+ dq?: string | undefined;
211
+ e?: string | undefined;
212
+ ext?: boolean | undefined;
213
+ k?: string | undefined;
214
+ key_ops?: string[] | undefined;
215
+ kid?: string | undefined;
216
+ n?: string | undefined;
217
+ p?: string | undefined;
218
+ q?: string | undefined;
219
+ qi?: string | undefined;
220
+ use?: string | undefined;
221
+ x?: string | undefined;
222
+ y?: string | undefined;
223
+ x5c?: string[] | undefined;
224
+ x5t?: string | undefined;
225
+ "x5t#S256"?: string | undefined;
226
+ x5u?: string | undefined;
227
+ }[];
228
+ }>;
94
229
  //# sourceMappingURL=jwk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jwk.d.ts","sourceRoot":"","sources":["../../../src/utils/jwk.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;AACtC,eAAO,MAAM,GAAG;IACd,uCAAuC;;;;;;;IAOvC,yCAAyC;;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;;;;;;;;;;;;;;;;;;;;;;EA2BvC,CAAC"}
@@ -3,29 +3,23 @@ import * as z from "zod";
3
3
  export type AuthorizationDetail = z.infer<typeof AuthorizationDetail>;
4
4
  export declare const AuthorizationDetail: z.ZodObject<{
5
5
  credential_configuration_id: z.ZodString;
6
- format: z.ZodUnion<[z.ZodLiteral<"vc+sd-jwt">, z.ZodLiteral<"vc+mdoc-cbor">]>;
7
6
  type: z.ZodLiteral<"openid_credential">;
8
7
  }, "strip", z.ZodTypeAny, {
9
8
  type: "openid_credential";
10
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
11
9
  credential_configuration_id: string;
12
10
  }, {
13
11
  type: "openid_credential";
14
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
15
12
  credential_configuration_id: string;
16
13
  }>;
17
14
  export type AuthorizationDetails = z.infer<typeof AuthorizationDetails>;
18
15
  export declare const AuthorizationDetails: z.ZodArray<z.ZodObject<{
19
16
  credential_configuration_id: z.ZodString;
20
- format: z.ZodUnion<[z.ZodLiteral<"vc+sd-jwt">, z.ZodLiteral<"vc+mdoc-cbor">]>;
21
17
  type: z.ZodLiteral<"openid_credential">;
22
18
  }, "strip", z.ZodTypeAny, {
23
19
  type: "openid_credential";
24
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
25
20
  credential_configuration_id: string;
26
21
  }, {
27
22
  type: "openid_credential";
28
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
29
23
  credential_configuration_id: string;
30
24
  }>, "many">;
31
25
  /**
@@ -36,7 +30,6 @@ export declare const makeParRequest: ({ wiaCryptoContext, appFetch, }: {
36
30
  appFetch: GlobalFetch["fetch"];
37
31
  }) => (clientId: string, codeVerifier: string, redirectUri: string, responseMode: string, parEndpoint: string, walletInstanceAttestation: string, authorizationDetails: {
38
32
  type: "openid_credential";
39
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
40
33
  credential_configuration_id: string;
41
- }[], assertionType: string) => Promise<string>;
34
+ }[]) => Promise<string>;
42
35
  //# sourceMappingURL=par.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"par.d.ts","sourceRoot":"","sources":["../../../src/utils/par.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAMzB,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACxE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;WAA+B,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,cAAc;sBAKL,aAAa;cACrB,WAAW,CAAC,OAAO,CAAC;iBAGpB,MAAM,gBACF,MAAM,eACP,MAAM,gBACL,MAAM,eACP,MAAM,6BACQ,MAAM;;;;oBAElB,MAAM,KACpB,QAAQ,MAAM,CAyEhB,CAAC"}
1
+ {"version":3,"file":"par.d.ts","sourceRoot":"","sources":["../../../src/utils/par.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAMzB,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACxE,eAAO,MAAM,oBAAoB;;;;;;;;;WAA+B,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,cAAc;sBAKL,aAAa;cACrB,WAAW,CAAC,OAAO,CAAC;iBAGpB,MAAM,gBACF,MAAM,eACP,MAAM,gBACL,MAAM,eACP,MAAM,6BACQ,MAAM;;;QAEhC,QAAQ,MAAM,CAoEhB,CAAC"}
@@ -599,11 +599,10 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
599
599
  request_object_signing_alg_values_supported: z.ZodArray<z.ZodString, "many">;
600
600
  presentation_definition_uri_supported: z.ZodBoolean;
601
601
  }, "strip", z.ZodTypeAny, {
602
- sub: string;
603
602
  authorization_endpoint: string;
604
- response_types_supported: string[];
605
- request_object_signing_alg_values_supported: string[];
603
+ sub: string;
606
604
  aal: string;
605
+ response_types_supported: string[];
607
606
  vp_formats_supported: {
608
607
  "vc+sd-jwt"?: {
609
608
  "sd-jwt_alg_values": string[];
@@ -612,13 +611,13 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
612
611
  "sd-jwt_alg_values": string[];
613
612
  } | undefined;
614
613
  };
614
+ request_object_signing_alg_values_supported: string[];
615
615
  presentation_definition_uri_supported: boolean;
616
616
  }, {
617
- sub: string;
618
617
  authorization_endpoint: string;
619
- response_types_supported: string[];
620
- request_object_signing_alg_values_supported: string[];
618
+ sub: string;
621
619
  aal: string;
620
+ response_types_supported: string[];
622
621
  vp_formats_supported: {
623
622
  "vc+sd-jwt"?: {
624
623
  "sd-jwt_alg_values": string[];
@@ -627,6 +626,7 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
627
626
  "sd-jwt_alg_values": string[];
628
627
  } | undefined;
629
628
  };
629
+ request_object_signing_alg_values_supported: string[];
630
630
  presentation_definition_uri_supported: boolean;
631
631
  }>>;
632
632
  }, "strip", z.ZodTypeAny, {
@@ -672,11 +672,10 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
672
672
  };
673
673
  };
674
674
  } & {
675
- sub: string;
676
675
  authorization_endpoint: string;
677
- response_types_supported: string[];
678
- request_object_signing_alg_values_supported: string[];
676
+ sub: string;
679
677
  aal: string;
678
+ response_types_supported: string[];
680
679
  vp_formats_supported: {
681
680
  "vc+sd-jwt"?: {
682
681
  "sd-jwt_alg_values": string[];
@@ -685,6 +684,7 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
685
684
  "sd-jwt_alg_values": string[];
686
685
  } | undefined;
687
686
  };
687
+ request_object_signing_alg_values_supported: string[];
688
688
  presentation_definition_uri_supported: boolean;
689
689
  };
690
690
  }, {
@@ -730,11 +730,10 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
730
730
  };
731
731
  };
732
732
  } & {
733
- sub: string;
734
733
  authorization_endpoint: string;
735
- response_types_supported: string[];
736
- request_object_signing_alg_values_supported: string[];
734
+ sub: string;
737
735
  aal: string;
736
+ response_types_supported: string[];
738
737
  vp_formats_supported: {
739
738
  "vc+sd-jwt"?: {
740
739
  "sd-jwt_alg_values": string[];
@@ -743,6 +742,7 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
743
742
  "sd-jwt_alg_values": string[];
744
743
  } | undefined;
745
744
  };
745
+ request_object_signing_alg_values_supported: string[];
746
746
  presentation_definition_uri_supported: boolean;
747
747
  };
748
748
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagopa/io-react-native-wallet",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Provide data structures, helpers and API for IO Wallet",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -1,6 +1,3 @@
1
1
  import * as Issuance from "./issuance";
2
2
  import * as Presentation from "./presentation";
3
- import * as Status from "./status";
4
- import * as Trustmark from "./trustmark";
5
-
6
- export { Issuance, Presentation, Status, Trustmark };
3
+ export { Issuance, Presentation };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * WARNING: This is the first function to be called in the issuing flow. The next function to be called is {@link evaluateIssuerTrust}.
2
+ * WARNING: This is the first function to be called in the issuing flow. The next function to be called is {@link getIssuerConfig}.
3
3
  * The beginning of the issuing flow.
4
4
  * To be implemented accordind to the user touchpoint
5
5
  *