@pagopa/io-react-native-wallet 3.0.1 → 3.1.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 (505) hide show
  1. package/lib/commonjs/api/index.js +3 -0
  2. package/lib/commonjs/api/index.js.map +1 -1
  3. package/lib/commonjs/client/generated/wallet-provider.js +42 -4
  4. package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
  5. package/lib/commonjs/client/index.js +5 -3
  6. package/lib/commonjs/client/index.js.map +1 -1
  7. package/lib/commonjs/credential/issuance/README.md +2 -0
  8. package/lib/commonjs/credential/issuance/api/IssuerConfig.js +2 -2
  9. package/lib/commonjs/credential/issuance/api/IssuerConfig.js.map +1 -1
  10. package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +2 -0
  11. package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -1
  12. package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js +2 -0
  13. package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -1
  14. package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js +15 -8
  15. package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -1
  16. package/lib/commonjs/credential/issuance/v1.3.3/mappers.js +0 -1
  17. package/lib/commonjs/credential/issuance/v1.3.3/mappers.js.map +1 -1
  18. package/lib/commonjs/credential/presentation/api/{06-send-authorization-response.js → 04-verify-certificate-chain.js} +1 -1
  19. package/lib/commonjs/credential/presentation/api/04-verify-certificate-chain.js.map +1 -0
  20. package/lib/commonjs/credential/presentation/api/{04-verify-request-object.js → 05-verify-request-object.js} +1 -1
  21. package/lib/commonjs/credential/presentation/api/05-verify-request-object.js.map +1 -0
  22. package/lib/commonjs/credential/presentation/api/{05-evaluate-dcql-query.js → 06-evaluate-dcql-query.js} +1 -1
  23. package/lib/commonjs/credential/presentation/api/06-evaluate-dcql-query.js.map +1 -0
  24. package/lib/commonjs/credential/presentation/api/07-send-authorization-response.js +6 -0
  25. package/lib/commonjs/credential/presentation/api/07-send-authorization-response.js.map +1 -0
  26. package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js +2 -2
  27. package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js.map +1 -1
  28. package/lib/commonjs/credential/presentation/api/index.js.map +1 -1
  29. package/lib/commonjs/credential/presentation/v1.0.0/04-verify-certificate-chain.js +12 -0
  30. package/lib/commonjs/credential/presentation/v1.0.0/04-verify-certificate-chain.js.map +1 -0
  31. package/lib/commonjs/credential/presentation/v1.0.0/{04-verify-request-object.js → 05-verify-request-object.js} +1 -1
  32. package/lib/commonjs/credential/presentation/v1.0.0/{04-verify-request-object.js.map → 05-verify-request-object.js.map} +1 -1
  33. package/lib/commonjs/credential/presentation/v1.0.0/{05-evaluate-dcql-query.js → 06-evaluate-dcql-query.js} +1 -1
  34. package/lib/commonjs/credential/presentation/v1.0.0/{05-evaluate-dcql-query.js.map → 06-evaluate-dcql-query.js.map} +1 -1
  35. package/lib/commonjs/credential/presentation/v1.0.0/{06-send-authorization-response.js → 07-send-authorization-response.js} +1 -1
  36. package/lib/commonjs/credential/presentation/v1.0.0/{06-send-authorization-response.js.map → 07-send-authorization-response.js.map} +1 -1
  37. package/lib/commonjs/credential/presentation/v1.0.0/index.js +5 -3
  38. package/lib/commonjs/credential/presentation/v1.0.0/index.js.map +1 -1
  39. package/lib/commonjs/credential/presentation/v1.3.3/04-verify-certificate-chain.js +33 -0
  40. package/lib/commonjs/credential/presentation/v1.3.3/04-verify-certificate-chain.js.map +1 -0
  41. package/lib/commonjs/credential/presentation/v1.3.3/{04-verify-request-object.js → 05-verify-request-object.js} +5 -3
  42. package/lib/commonjs/credential/presentation/v1.3.3/05-verify-request-object.js.map +1 -0
  43. package/lib/commonjs/credential/presentation/v1.3.3/{05-evaluate-dcql-query.js → 06-evaluate-dcql-query.js} +1 -1
  44. package/lib/commonjs/credential/presentation/v1.3.3/{05-evaluate-dcql-query.js.map → 06-evaluate-dcql-query.js.map} +1 -1
  45. package/lib/commonjs/credential/presentation/v1.3.3/{06-send-authorization-response.js → 07-send-authorization-response.js} +1 -1
  46. package/lib/commonjs/credential/presentation/v1.3.3/{06-send-authorization-response.js.map → 07-send-authorization-response.js.map} +1 -1
  47. package/lib/commonjs/credential/presentation/v1.3.3/index.js +5 -3
  48. package/lib/commonjs/credential/presentation/v1.3.3/index.js.map +1 -1
  49. package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js +53 -13
  50. package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -1
  51. package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js +16 -5
  52. package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js.map +1 -1
  53. package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-translations.js +32 -0
  54. package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-translations.js.map +1 -0
  55. package/lib/commonjs/credentials-catalogue/v1.3.3/index.js +3 -1
  56. package/lib/commonjs/credentials-catalogue/v1.3.3/index.js.map +1 -1
  57. package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js +6 -2
  58. package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js.map +1 -1
  59. package/lib/commonjs/credentials-catalogue/v1.3.3/types.js +91 -30
  60. package/lib/commonjs/credentials-catalogue/v1.3.3/types.js.map +1 -1
  61. package/lib/commonjs/credentials-catalogue/v1.3.3/utils.js +36 -5
  62. package/lib/commonjs/credentials-catalogue/v1.3.3/utils.js.map +1 -1
  63. package/lib/commonjs/index.js +3 -1
  64. package/lib/commonjs/index.js.map +1 -1
  65. package/lib/commonjs/trust/common/types.js +3 -3
  66. package/lib/commonjs/trust/common/types.js.map +1 -1
  67. package/lib/commonjs/trust/v1.0.0/types.js +6 -8
  68. package/lib/commonjs/trust/v1.0.0/types.js.map +1 -1
  69. package/lib/commonjs/trust/v1.3.3/types.js +1 -3
  70. package/lib/commonjs/trust/v1.3.3/types.js.map +1 -1
  71. package/lib/commonjs/utils/callbacks.js +2 -0
  72. package/lib/commonjs/utils/callbacks.js.map +1 -1
  73. package/lib/commonjs/utils/crypto.js +8 -0
  74. package/lib/commonjs/utils/crypto.js.map +1 -1
  75. package/lib/commonjs/utils/dpop.js +1 -1
  76. package/lib/commonjs/utils/dpop.js.map +1 -1
  77. package/lib/commonjs/utils/jwk.js +1 -1
  78. package/lib/commonjs/utils/jwk.js.map +1 -1
  79. package/lib/commonjs/utils/zod.js +1 -1
  80. package/lib/commonjs/utils/zod.js.map +1 -1
  81. package/lib/commonjs/wallet-instance-attestation/README.md +13 -10
  82. package/lib/commonjs/wallet-instance-attestation/api/types.js +9 -4
  83. package/lib/commonjs/wallet-instance-attestation/api/types.js.map +1 -1
  84. package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js +2 -2
  85. package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js.map +1 -1
  86. package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js +4 -5
  87. package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -1
  88. package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js +4 -5
  89. package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -1
  90. package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js +5 -7
  91. package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js.map +1 -1
  92. package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js +73 -3
  93. package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js.map +1 -1
  94. package/lib/commonjs/wallet-instance-attestation/v1.3.3/mappers.js +26 -0
  95. package/lib/commonjs/wallet-instance-attestation/v1.3.3/mappers.js.map +1 -0
  96. package/lib/commonjs/wallet-instance-attestation/v1.3.3/types.js +13 -24
  97. package/lib/commonjs/wallet-instance-attestation/v1.3.3/types.js.map +1 -1
  98. package/lib/commonjs/wallet-instance-attestation/v1.3.3/utils.js +35 -0
  99. package/lib/commonjs/wallet-instance-attestation/v1.3.3/utils.js.map +1 -0
  100. package/lib/commonjs/wallet-unit-attestation/README.md +73 -0
  101. package/lib/commonjs/wallet-unit-attestation/api/index.js +6 -0
  102. package/lib/commonjs/wallet-unit-attestation/api/index.js.map +1 -0
  103. package/lib/commonjs/wallet-unit-attestation/api/types.js +45 -0
  104. package/lib/commonjs/wallet-unit-attestation/api/types.js.map +1 -0
  105. package/lib/commonjs/wallet-unit-attestation/index.js +20 -0
  106. package/lib/commonjs/wallet-unit-attestation/index.js.map +1 -0
  107. package/lib/commonjs/wallet-unit-attestation/v1.0.0/index.js +11 -0
  108. package/lib/commonjs/wallet-unit-attestation/v1.0.0/index.js.map +1 -0
  109. package/lib/commonjs/wallet-unit-attestation/v1.3.3/index.js +17 -0
  110. package/lib/commonjs/wallet-unit-attestation/v1.3.3/index.js.map +1 -0
  111. package/lib/commonjs/wallet-unit-attestation/v1.3.3/issuing.js +118 -0
  112. package/lib/commonjs/wallet-unit-attestation/v1.3.3/issuing.js.map +1 -0
  113. package/lib/commonjs/wallet-unit-attestation/v1.3.3/mappers.js +13 -0
  114. package/lib/commonjs/wallet-unit-attestation/v1.3.3/mappers.js.map +1 -0
  115. package/lib/commonjs/wallet-unit-attestation/v1.3.3/types.js +23 -0
  116. package/lib/commonjs/wallet-unit-attestation/v1.3.3/types.js.map +1 -0
  117. package/lib/commonjs/wallet-unit-attestation/v1.3.3/utils.js +20 -0
  118. package/lib/commonjs/wallet-unit-attestation/v1.3.3/utils.js.map +1 -0
  119. package/lib/module/api/index.js +3 -0
  120. package/lib/module/api/index.js.map +1 -1
  121. package/lib/module/client/generated/wallet-provider.js +33 -1
  122. package/lib/module/client/generated/wallet-provider.js.map +1 -1
  123. package/lib/module/client/index.js +4 -2
  124. package/lib/module/client/index.js.map +1 -1
  125. package/lib/module/credential/issuance/README.md +2 -0
  126. package/lib/module/credential/issuance/api/IssuerConfig.js +2 -2
  127. package/lib/module/credential/issuance/api/IssuerConfig.js.map +1 -1
  128. package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +2 -0
  129. package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -1
  130. package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js +2 -0
  131. package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -1
  132. package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js +16 -9
  133. package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -1
  134. package/lib/module/credential/issuance/v1.3.3/mappers.js +0 -1
  135. package/lib/module/credential/issuance/v1.3.3/mappers.js.map +1 -1
  136. package/lib/module/credential/presentation/api/04-verify-certificate-chain.js +2 -0
  137. package/lib/module/credential/presentation/api/04-verify-certificate-chain.js.map +1 -0
  138. package/lib/module/credential/presentation/api/05-verify-request-object.js +2 -0
  139. package/lib/module/credential/presentation/api/05-verify-request-object.js.map +1 -0
  140. package/lib/module/credential/presentation/api/06-evaluate-dcql-query.js +2 -0
  141. package/lib/module/credential/presentation/api/06-evaluate-dcql-query.js.map +1 -0
  142. package/lib/module/credential/presentation/api/07-send-authorization-response.js +2 -0
  143. package/lib/module/credential/presentation/api/07-send-authorization-response.js.map +1 -0
  144. package/lib/module/credential/presentation/api/RelyingPartyConfig.js +1 -1
  145. package/lib/module/credential/presentation/api/RelyingPartyConfig.js.map +1 -1
  146. package/lib/module/credential/presentation/api/index.js.map +1 -1
  147. package/lib/module/credential/presentation/v1.0.0/04-verify-certificate-chain.js +5 -0
  148. package/lib/module/credential/presentation/v1.0.0/04-verify-certificate-chain.js.map +1 -0
  149. package/lib/module/credential/presentation/v1.0.0/{04-verify-request-object.js → 05-verify-request-object.js} +1 -1
  150. package/lib/module/credential/presentation/v1.0.0/{04-verify-request-object.js.map → 05-verify-request-object.js.map} +1 -1
  151. package/lib/module/credential/presentation/v1.0.0/{05-evaluate-dcql-query.js → 06-evaluate-dcql-query.js} +1 -1
  152. package/lib/module/credential/presentation/v1.0.0/{05-evaluate-dcql-query.js.map → 06-evaluate-dcql-query.js.map} +1 -1
  153. package/lib/module/credential/presentation/v1.0.0/{06-send-authorization-response.js → 07-send-authorization-response.js} +1 -1
  154. package/lib/module/credential/presentation/v1.0.0/{06-send-authorization-response.js.map → 07-send-authorization-response.js.map} +1 -1
  155. package/lib/module/credential/presentation/v1.0.0/index.js +5 -3
  156. package/lib/module/credential/presentation/v1.0.0/index.js.map +1 -1
  157. package/lib/module/credential/presentation/v1.3.3/04-verify-certificate-chain.js +26 -0
  158. package/lib/module/credential/presentation/v1.3.3/04-verify-certificate-chain.js.map +1 -0
  159. package/lib/module/credential/presentation/v1.3.3/{04-verify-request-object.js → 05-verify-request-object.js} +5 -3
  160. package/lib/module/credential/presentation/v1.3.3/05-verify-request-object.js.map +1 -0
  161. package/lib/module/credential/presentation/v1.3.3/{05-evaluate-dcql-query.js → 06-evaluate-dcql-query.js} +1 -1
  162. package/lib/module/credential/presentation/v1.3.3/{05-evaluate-dcql-query.js.map → 06-evaluate-dcql-query.js.map} +1 -1
  163. package/lib/module/credential/presentation/v1.3.3/{06-send-authorization-response.js → 07-send-authorization-response.js} +1 -1
  164. package/lib/module/credential/presentation/v1.3.3/{06-send-authorization-response.js.map → 07-send-authorization-response.js.map} +1 -1
  165. package/lib/module/credential/presentation/v1.3.3/index.js +5 -3
  166. package/lib/module/credential/presentation/v1.3.3/index.js.map +1 -1
  167. package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js +52 -12
  168. package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -1
  169. package/lib/module/credentials-catalogue/v1.0.0/mappers.js +16 -5
  170. package/lib/module/credentials-catalogue/v1.0.0/mappers.js.map +1 -1
  171. package/lib/module/credentials-catalogue/v1.3.3/fetch-translations.js +25 -0
  172. package/lib/module/credentials-catalogue/v1.3.3/fetch-translations.js.map +1 -0
  173. package/lib/module/credentials-catalogue/v1.3.3/index.js +3 -1
  174. package/lib/module/credentials-catalogue/v1.3.3/index.js.map +1 -1
  175. package/lib/module/credentials-catalogue/v1.3.3/mappers.js +6 -2
  176. package/lib/module/credentials-catalogue/v1.3.3/mappers.js.map +1 -1
  177. package/lib/module/credentials-catalogue/v1.3.3/types.js +91 -30
  178. package/lib/module/credentials-catalogue/v1.3.3/types.js.map +1 -1
  179. package/lib/module/credentials-catalogue/v1.3.3/utils.js +32 -4
  180. package/lib/module/credentials-catalogue/v1.3.3/utils.js.map +1 -1
  181. package/lib/module/index.js +2 -1
  182. package/lib/module/index.js.map +1 -1
  183. package/lib/module/trust/common/types.js +3 -3
  184. package/lib/module/trust/common/types.js.map +1 -1
  185. package/lib/module/trust/v1.0.0/types.js +5 -7
  186. package/lib/module/trust/v1.0.0/types.js.map +1 -1
  187. package/lib/module/trust/v1.3.3/types.js +1 -3
  188. package/lib/module/trust/v1.3.3/types.js.map +1 -1
  189. package/lib/module/utils/callbacks.js +3 -0
  190. package/lib/module/utils/callbacks.js.map +1 -1
  191. package/lib/module/utils/crypto.js +8 -0
  192. package/lib/module/utils/crypto.js.map +1 -1
  193. package/lib/module/utils/dpop.js +1 -1
  194. package/lib/module/utils/dpop.js.map +1 -1
  195. package/lib/module/utils/jwk.js +1 -1
  196. package/lib/module/utils/jwk.js.map +1 -1
  197. package/lib/module/utils/zod.js +1 -1
  198. package/lib/module/utils/zod.js.map +1 -1
  199. package/lib/module/wallet-instance-attestation/README.md +13 -10
  200. package/lib/module/wallet-instance-attestation/api/types.js +7 -2
  201. package/lib/module/wallet-instance-attestation/api/types.js.map +1 -1
  202. package/lib/module/wallet-instance-attestation/v1.0.0/index.js +3 -3
  203. package/lib/module/wallet-instance-attestation/v1.0.0/index.js.map +1 -1
  204. package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js +4 -5
  205. package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -1
  206. package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js +3 -4
  207. package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -1
  208. package/lib/module/wallet-instance-attestation/v1.3.3/index.js +5 -7
  209. package/lib/module/wallet-instance-attestation/v1.3.3/index.js.map +1 -1
  210. package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js +73 -3
  211. package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js.map +1 -1
  212. package/lib/module/wallet-instance-attestation/v1.3.3/mappers.js +19 -0
  213. package/lib/module/wallet-instance-attestation/v1.3.3/mappers.js.map +1 -0
  214. package/lib/module/wallet-instance-attestation/v1.3.3/types.js +10 -21
  215. package/lib/module/wallet-instance-attestation/v1.3.3/types.js.map +1 -1
  216. package/lib/module/wallet-instance-attestation/v1.3.3/utils.js +29 -0
  217. package/lib/module/wallet-instance-attestation/v1.3.3/utils.js.map +1 -0
  218. package/lib/module/wallet-unit-attestation/README.md +73 -0
  219. package/lib/module/wallet-unit-attestation/api/index.js +2 -0
  220. package/lib/module/wallet-unit-attestation/api/index.js.map +1 -0
  221. package/lib/module/wallet-unit-attestation/api/types.js +36 -0
  222. package/lib/module/wallet-unit-attestation/api/types.js.map +1 -0
  223. package/lib/module/wallet-unit-attestation/index.js +3 -0
  224. package/lib/module/wallet-unit-attestation/index.js.map +1 -0
  225. package/lib/module/wallet-unit-attestation/v1.0.0/index.js +4 -0
  226. package/lib/module/wallet-unit-attestation/v1.0.0/index.js.map +1 -0
  227. package/lib/module/wallet-unit-attestation/v1.3.3/index.js +10 -0
  228. package/lib/module/wallet-unit-attestation/v1.3.3/index.js.map +1 -0
  229. package/lib/module/wallet-unit-attestation/v1.3.3/issuing.js +112 -0
  230. package/lib/module/wallet-unit-attestation/v1.3.3/issuing.js.map +1 -0
  231. package/lib/module/wallet-unit-attestation/v1.3.3/mappers.js +6 -0
  232. package/lib/module/wallet-unit-attestation/v1.3.3/mappers.js.map +1 -0
  233. package/lib/module/wallet-unit-attestation/v1.3.3/types.js +14 -0
  234. package/lib/module/wallet-unit-attestation/v1.3.3/types.js.map +1 -0
  235. package/lib/module/wallet-unit-attestation/v1.3.3/utils.js +15 -0
  236. package/lib/module/wallet-unit-attestation/v1.3.3/utils.js.map +1 -0
  237. package/lib/typescript/api/index.d.ts +2 -0
  238. package/lib/typescript/api/index.d.ts.map +1 -1
  239. package/lib/typescript/client/generated/wallet-provider.d.ts +122 -358
  240. package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
  241. package/lib/typescript/client/index.d.ts.map +1 -1
  242. package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts +2 -0
  243. package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts.map +1 -1
  244. package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts +21 -357
  245. package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts.map +1 -1
  246. package/lib/typescript/credential/issuance/api/types.d.ts +5 -41
  247. package/lib/typescript/credential/issuance/api/types.d.ts.map +1 -1
  248. package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts.map +1 -1
  249. package/lib/typescript/credential/issuance/common/authorization.d.ts.map +1 -1
  250. package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts.map +1 -1
  251. package/lib/typescript/credential/issuance/v1.0.0/05-obtain-credential.d.ts.map +1 -1
  252. package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts +103 -106
  253. package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts.map +1 -1
  254. package/lib/typescript/credential/issuance/v1.0.0/types.d.ts +4 -26
  255. package/lib/typescript/credential/issuance/v1.0.0/types.d.ts.map +1 -1
  256. package/lib/typescript/credential/issuance/v1.3.3/01-evaluate-issuer-trust.d.ts.map +1 -1
  257. package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts.map +1 -1
  258. package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts.map +1 -1
  259. package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts +594 -2095
  260. package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts.map +1 -1
  261. package/lib/typescript/credential/issuance/v1.3.3/types.d.ts +1 -5
  262. package/lib/typescript/credential/issuance/v1.3.3/types.d.ts.map +1 -1
  263. package/lib/typescript/credential/presentation/api/04-verify-certificate-chain.d.ts +17 -0
  264. package/lib/typescript/credential/presentation/api/04-verify-certificate-chain.d.ts.map +1 -0
  265. package/lib/typescript/credential/presentation/api/{04-verify-request-object.d.ts → 05-verify-request-object.d.ts} +1 -1
  266. package/lib/typescript/credential/presentation/api/{04-verify-request-object.d.ts.map → 05-verify-request-object.d.ts.map} +1 -1
  267. package/lib/typescript/credential/presentation/api/{05-evaluate-dcql-query.d.ts → 06-evaluate-dcql-query.d.ts} +1 -1
  268. package/lib/typescript/credential/presentation/api/{05-evaluate-dcql-query.d.ts.map → 06-evaluate-dcql-query.d.ts.map} +1 -1
  269. package/lib/typescript/credential/presentation/api/{06-send-authorization-response.d.ts → 07-send-authorization-response.d.ts} +2 -2
  270. package/lib/typescript/credential/presentation/api/{06-send-authorization-response.d.ts.map → 07-send-authorization-response.d.ts.map} +1 -1
  271. package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts +9 -154
  272. package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts.map +1 -1
  273. package/lib/typescript/credential/presentation/api/index.d.ts +5 -4
  274. package/lib/typescript/credential/presentation/api/index.d.ts.map +1 -1
  275. package/lib/typescript/credential/presentation/api/types.d.ts +30 -106
  276. package/lib/typescript/credential/presentation/api/types.d.ts.map +1 -1
  277. package/lib/typescript/credential/presentation/common/utils/dcql.d.ts +29 -244
  278. package/lib/typescript/credential/presentation/common/utils/dcql.d.ts.map +1 -1
  279. package/lib/typescript/credential/presentation/common/utils/http.d.ts.map +1 -1
  280. package/lib/typescript/credential/presentation/common/utils/sd-jwt.d.ts.map +1 -1
  281. package/lib/typescript/credential/presentation/common/utils.d.ts.map +1 -1
  282. package/lib/typescript/credential/presentation/v1.0.0/04-verify-certificate-chain.d.ts +3 -0
  283. package/lib/typescript/credential/presentation/v1.0.0/04-verify-certificate-chain.d.ts.map +1 -0
  284. package/lib/typescript/credential/presentation/v1.0.0/{04-verify-request-object.d.ts → 05-verify-request-object.d.ts} +1 -1
  285. package/lib/typescript/credential/presentation/v1.0.0/05-verify-request-object.d.ts.map +1 -0
  286. package/lib/typescript/credential/presentation/v1.0.0/{05-evaluate-dcql-query.d.ts → 06-evaluate-dcql-query.d.ts} +1 -1
  287. package/lib/typescript/credential/presentation/v1.0.0/06-evaluate-dcql-query.d.ts.map +1 -0
  288. package/lib/typescript/credential/presentation/v1.0.0/{06-send-authorization-response.d.ts → 07-send-authorization-response.d.ts} +1 -1
  289. package/lib/typescript/credential/presentation/v1.0.0/07-send-authorization-response.d.ts.map +1 -0
  290. package/lib/typescript/credential/presentation/v1.0.0/index.d.ts.map +1 -1
  291. package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts +56 -58
  292. package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts.map +1 -1
  293. package/lib/typescript/credential/presentation/v1.0.0/types.d.ts +13 -52
  294. package/lib/typescript/credential/presentation/v1.0.0/types.d.ts.map +1 -1
  295. package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts.map +1 -1
  296. package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts.map +1 -1
  297. package/lib/typescript/credential/presentation/v1.3.3/04-verify-certificate-chain.d.ts +3 -0
  298. package/lib/typescript/credential/presentation/v1.3.3/04-verify-certificate-chain.d.ts.map +1 -0
  299. package/lib/typescript/credential/presentation/v1.3.3/{04-verify-request-object.d.ts → 05-verify-request-object.d.ts} +1 -1
  300. package/lib/typescript/credential/presentation/v1.3.3/05-verify-request-object.d.ts.map +1 -0
  301. package/lib/typescript/credential/presentation/v1.3.3/{05-evaluate-dcql-query.d.ts → 06-evaluate-dcql-query.d.ts} +1 -1
  302. package/lib/typescript/credential/presentation/v1.3.3/06-evaluate-dcql-query.d.ts.map +1 -0
  303. package/lib/typescript/credential/presentation/v1.3.3/{06-send-authorization-response.d.ts → 07-send-authorization-response.d.ts} +1 -1
  304. package/lib/typescript/credential/presentation/v1.3.3/{06-send-authorization-response.d.ts.map → 07-send-authorization-response.d.ts.map} +1 -1
  305. package/lib/typescript/credential/presentation/v1.3.3/index.d.ts.map +1 -1
  306. package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts +133 -525
  307. package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts.map +1 -1
  308. package/lib/typescript/credential/presentation/v1.3.3/sdkErrorMapper.d.ts.map +1 -1
  309. package/lib/typescript/credential/presentation/v1.3.3/types.d.ts +39 -3672
  310. package/lib/typescript/credential/presentation/v1.3.3/types.d.ts.map +1 -1
  311. package/lib/typescript/credential/presentation/v1.3.3/utils.mdoc.d.ts.map +1 -1
  312. package/lib/typescript/credential/status/v1.0.0/mappers.d.ts +6 -6
  313. package/lib/typescript/credential/status/v1.0.0/types.d.ts +33 -659
  314. package/lib/typescript/credential/status/v1.0.0/types.d.ts.map +1 -1
  315. package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts +135 -525
  316. package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts.map +1 -1
  317. package/lib/typescript/credentials-catalogue/api/index.d.ts +22 -2
  318. package/lib/typescript/credentials-catalogue/api/index.d.ts.map +1 -1
  319. package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts +60 -20
  320. package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts.map +1 -1
  321. package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts +41 -737
  322. package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts.map +1 -1
  323. package/lib/typescript/credentials-catalogue/v1.3.3/fetch-translations.d.ts +3 -0
  324. package/lib/typescript/credentials-catalogue/v1.3.3/fetch-translations.d.ts.map +1 -0
  325. package/lib/typescript/credentials-catalogue/v1.3.3/index.d.ts.map +1 -1
  326. package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts +159 -62
  327. package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts.map +1 -1
  328. package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts +180 -941
  329. package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts.map +1 -1
  330. package/lib/typescript/credentials-catalogue/v1.3.3/utils.d.ts +12 -1
  331. package/lib/typescript/credentials-catalogue/v1.3.3/utils.d.ts.map +1 -1
  332. package/lib/typescript/index.d.ts +4 -3
  333. package/lib/typescript/index.d.ts.map +1 -1
  334. package/lib/typescript/mdoc/index.d.ts.map +1 -1
  335. package/lib/typescript/mdoc/utils.d.ts.map +1 -1
  336. package/lib/typescript/sd-jwt/index.d.ts +15 -15
  337. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  338. package/lib/typescript/sd-jwt/types.d.ts +33 -492
  339. package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
  340. package/lib/typescript/sd-jwt/utils.d.ts.map +1 -1
  341. package/lib/typescript/trust/api/TrustAnchorConfig.d.ts +12 -201
  342. package/lib/typescript/trust/api/TrustAnchorConfig.d.ts.map +1 -1
  343. package/lib/typescript/trust/common/build-chain.d.ts.map +1 -1
  344. package/lib/typescript/trust/common/types.d.ts +32 -1198
  345. package/lib/typescript/trust/common/types.d.ts.map +1 -1
  346. package/lib/typescript/trust/common/utils.d.ts.map +1 -1
  347. package/lib/typescript/trust/v1.0.0/build-chain.d.ts +1 -53
  348. package/lib/typescript/trust/v1.0.0/build-chain.d.ts.map +1 -1
  349. package/lib/typescript/trust/v1.0.0/entities.d.ts +324 -347
  350. package/lib/typescript/trust/v1.0.0/entities.d.ts.map +1 -1
  351. package/lib/typescript/trust/v1.0.0/mappers.d.ts +31 -35
  352. package/lib/typescript/trust/v1.0.0/mappers.d.ts.map +1 -1
  353. package/lib/typescript/trust/v1.0.0/types.d.ts +678 -12454
  354. package/lib/typescript/trust/v1.0.0/types.d.ts.map +1 -1
  355. package/lib/typescript/trust/v1.0.0/verify-chain.d.ts +4 -56
  356. package/lib/typescript/trust/v1.0.0/verify-chain.d.ts.map +1 -1
  357. package/lib/typescript/trust/v1.3.3/entities.d.ts +43 -47
  358. package/lib/typescript/trust/v1.3.3/entities.d.ts.map +1 -1
  359. package/lib/typescript/trust/v1.3.3/types.d.ts +655 -14339
  360. package/lib/typescript/trust/v1.3.3/types.d.ts.map +1 -1
  361. package/lib/typescript/utils/auth.d.ts +3 -25
  362. package/lib/typescript/utils/auth.d.ts.map +1 -1
  363. package/lib/typescript/utils/callbacks.d.ts.map +1 -1
  364. package/lib/typescript/utils/config.d.ts +3 -3
  365. package/lib/typescript/utils/config.d.ts.map +1 -1
  366. package/lib/typescript/utils/credentials.d.ts.map +1 -1
  367. package/lib/typescript/utils/crypto.d.ts +18 -0
  368. package/lib/typescript/utils/crypto.d.ts.map +1 -1
  369. package/lib/typescript/utils/decoder.d.ts.map +1 -1
  370. package/lib/typescript/utils/dpop.d.ts +5 -12
  371. package/lib/typescript/utils/dpop.d.ts.map +1 -1
  372. package/lib/typescript/utils/errors.d.ts.map +1 -1
  373. package/lib/typescript/utils/jwk.d.ts +15 -175
  374. package/lib/typescript/utils/jwk.d.ts.map +1 -1
  375. package/lib/typescript/utils/mappers.d.ts.map +1 -1
  376. package/lib/typescript/utils/misc.d.ts +2 -2
  377. package/lib/typescript/utils/misc.d.ts.map +1 -1
  378. package/lib/typescript/utils/object.d.ts.map +1 -1
  379. package/lib/typescript/utils/par.d.ts +7 -45
  380. package/lib/typescript/utils/par.d.ts.map +1 -1
  381. package/lib/typescript/utils/parser.d.ts.map +1 -1
  382. package/lib/typescript/utils/pop.d.ts +1 -9
  383. package/lib/typescript/utils/pop.d.ts.map +1 -1
  384. package/lib/typescript/utils/string.d.ts.map +1 -1
  385. package/lib/typescript/utils/zod.d.ts +4 -4
  386. package/lib/typescript/utils/zod.d.ts.map +1 -1
  387. package/lib/typescript/wallet-instance-attestation/api/index.d.ts +9 -9
  388. package/lib/typescript/wallet-instance-attestation/api/index.d.ts.map +1 -1
  389. package/lib/typescript/wallet-instance-attestation/api/types.d.ts +19 -174
  390. package/lib/typescript/wallet-instance-attestation/api/types.d.ts.map +1 -1
  391. package/lib/typescript/wallet-instance-attestation/common/types.d.ts +14 -273
  392. package/lib/typescript/wallet-instance-attestation/common/types.d.ts.map +1 -1
  393. package/lib/typescript/wallet-instance-attestation/v1.0.0/issuing.d.ts.map +1 -1
  394. package/lib/typescript/wallet-instance-attestation/v1.0.0/mappers.d.ts +5 -3
  395. package/lib/typescript/wallet-instance-attestation/v1.0.0/mappers.d.ts.map +1 -1
  396. package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts +39 -629
  397. package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts.map +1 -1
  398. package/lib/typescript/wallet-instance-attestation/v1.3.3/index.d.ts.map +1 -1
  399. package/lib/typescript/wallet-instance-attestation/v1.3.3/issuing.d.ts.map +1 -1
  400. package/lib/typescript/wallet-instance-attestation/v1.3.3/mappers.d.ts +90 -0
  401. package/lib/typescript/wallet-instance-attestation/v1.3.3/mappers.d.ts.map +1 -0
  402. package/lib/typescript/wallet-instance-attestation/v1.3.3/types.d.ts +29 -891
  403. package/lib/typescript/wallet-instance-attestation/v1.3.3/types.d.ts.map +1 -1
  404. package/lib/typescript/wallet-instance-attestation/v1.3.3/utils.d.ts +15 -0
  405. package/lib/typescript/wallet-instance-attestation/v1.3.3/utils.d.ts.map +1 -0
  406. package/lib/typescript/wallet-unit-attestation/api/index.d.ts +39 -0
  407. package/lib/typescript/wallet-unit-attestation/api/index.d.ts.map +1 -0
  408. package/lib/typescript/wallet-unit-attestation/api/types.d.ts +67 -0
  409. package/lib/typescript/wallet-unit-attestation/api/types.d.ts.map +1 -0
  410. package/lib/typescript/wallet-unit-attestation/index.d.ts +4 -0
  411. package/lib/typescript/wallet-unit-attestation/index.d.ts.map +1 -0
  412. package/lib/typescript/wallet-unit-attestation/v1.0.0/index.d.ts +3 -0
  413. package/lib/typescript/wallet-unit-attestation/v1.0.0/index.d.ts.map +1 -0
  414. package/lib/typescript/wallet-unit-attestation/v1.3.3/index.d.ts +3 -0
  415. package/lib/typescript/wallet-unit-attestation/v1.3.3/index.d.ts.map +1 -0
  416. package/lib/typescript/wallet-unit-attestation/v1.3.3/issuing.d.ts +3 -0
  417. package/lib/typescript/wallet-unit-attestation/v1.3.3/issuing.d.ts.map +1 -0
  418. package/lib/typescript/wallet-unit-attestation/v1.3.3/mappers.d.ts +107 -0
  419. package/lib/typescript/wallet-unit-attestation/v1.3.3/mappers.d.ts.map +1 -0
  420. package/lib/typescript/wallet-unit-attestation/v1.3.3/types.d.ts +69 -0
  421. package/lib/typescript/wallet-unit-attestation/v1.3.3/types.d.ts.map +1 -0
  422. package/lib/typescript/wallet-unit-attestation/v1.3.3/utils.d.ts +7 -0
  423. package/lib/typescript/wallet-unit-attestation/v1.3.3/utils.d.ts.map +1 -0
  424. package/package.json +8 -8
  425. package/src/api/index.ts +4 -0
  426. package/src/client/generated/wallet-provider.ts +44 -0
  427. package/src/client/index.ts +5 -1
  428. package/src/credential/issuance/README.md +2 -0
  429. package/src/credential/issuance/api/05-obtain-credential.ts +2 -0
  430. package/src/credential/issuance/api/IssuerConfig.ts +4 -2
  431. package/src/credential/issuance/v1.3.3/01-evaluate-issuer-trust.ts +8 -3
  432. package/src/credential/issuance/v1.3.3/03-complete-user-authorization.ts +2 -0
  433. package/src/credential/issuance/v1.3.3/05-obtain-credential.ts +25 -11
  434. package/src/credential/issuance/v1.3.3/mappers.ts +10 -9
  435. package/src/credential/presentation/api/04-verify-certificate-chain.ts +20 -0
  436. package/src/credential/presentation/api/{06-send-authorization-response.ts → 07-send-authorization-response.ts} +1 -1
  437. package/src/credential/presentation/api/RelyingPartyConfig.ts +1 -1
  438. package/src/credential/presentation/api/index.ts +5 -3
  439. package/src/credential/presentation/v1.0.0/04-verify-certificate-chain.ts +10 -0
  440. package/src/credential/presentation/v1.0.0/{04-verify-request-object.ts → 05-verify-request-object.ts} +2 -2
  441. package/src/credential/presentation/v1.0.0/{05-evaluate-dcql-query.ts → 06-evaluate-dcql-query.ts} +1 -1
  442. package/src/credential/presentation/v1.0.0/index.ts +5 -3
  443. package/src/credential/presentation/v1.3.3/04-verify-certificate-chain.ts +49 -0
  444. package/src/credential/presentation/v1.3.3/{04-verify-request-object.ts → 05-verify-request-object.ts} +4 -2
  445. package/src/credential/presentation/v1.3.3/{05-evaluate-dcql-query.ts → 06-evaluate-dcql-query.ts} +1 -1
  446. package/src/credential/presentation/v1.3.3/index.ts +5 -3
  447. package/src/credentials-catalogue/api/DigitalCredentialsCatalogue.ts +58 -10
  448. package/src/credentials-catalogue/api/index.ts +36 -2
  449. package/src/credentials-catalogue/v1.0.0/mappers.ts +27 -12
  450. package/src/credentials-catalogue/v1.3.3/fetch-translations.ts +32 -0
  451. package/src/credentials-catalogue/v1.3.3/index.ts +2 -0
  452. package/src/credentials-catalogue/v1.3.3/mappers.ts +12 -4
  453. package/src/credentials-catalogue/v1.3.3/types.ts +102 -29
  454. package/src/credentials-catalogue/v1.3.3/utils.ts +42 -4
  455. package/src/index.ts +11 -2
  456. package/src/trust/common/types.ts +3 -3
  457. package/src/trust/v1.0.0/types.ts +10 -10
  458. package/src/trust/v1.3.3/types.ts +4 -7
  459. package/src/utils/callbacks.ts +7 -1
  460. package/src/utils/crypto.ts +18 -0
  461. package/src/utils/dpop.ts +1 -1
  462. package/src/utils/jwk.ts +1 -1
  463. package/src/utils/mappers.ts +2 -2
  464. package/src/utils/zod.ts +5 -1
  465. package/src/wallet-instance-attestation/README.md +13 -10
  466. package/src/wallet-instance-attestation/api/index.ts +20 -13
  467. package/src/wallet-instance-attestation/api/types.ts +16 -4
  468. package/src/wallet-instance-attestation/v1.0.0/index.ts +3 -3
  469. package/src/wallet-instance-attestation/v1.0.0/issuing.ts +7 -9
  470. package/src/wallet-instance-attestation/v1.0.0/mappers.ts +7 -5
  471. package/src/wallet-instance-attestation/v1.3.3/index.ts +5 -7
  472. package/src/wallet-instance-attestation/v1.3.3/issuing.ts +107 -3
  473. package/src/wallet-instance-attestation/v1.3.3/mappers.ts +18 -0
  474. package/src/wallet-instance-attestation/v1.3.3/types.ts +16 -30
  475. package/src/wallet-instance-attestation/v1.3.3/utils.ts +35 -0
  476. package/src/wallet-unit-attestation/README.md +73 -0
  477. package/src/wallet-unit-attestation/api/index.ts +51 -0
  478. package/src/wallet-unit-attestation/api/types.ts +49 -0
  479. package/src/wallet-unit-attestation/index.ts +3 -0
  480. package/src/wallet-unit-attestation/v1.0.0/index.ts +5 -0
  481. package/src/wallet-unit-attestation/v1.3.3/index.ts +11 -0
  482. package/src/wallet-unit-attestation/v1.3.3/issuing.ts +147 -0
  483. package/src/wallet-unit-attestation/v1.3.3/mappers.ts +10 -0
  484. package/src/wallet-unit-attestation/v1.3.3/types.ts +21 -0
  485. package/src/wallet-unit-attestation/v1.3.3/utils.ts +14 -0
  486. package/lib/commonjs/credential/presentation/api/04-verify-request-object.js.map +0 -1
  487. package/lib/commonjs/credential/presentation/api/05-evaluate-dcql-query.js.map +0 -1
  488. package/lib/commonjs/credential/presentation/api/06-send-authorization-response.js.map +0 -1
  489. package/lib/commonjs/credential/presentation/v1.3.3/04-verify-request-object.js.map +0 -1
  490. package/lib/module/credential/presentation/api/04-verify-request-object.js +0 -2
  491. package/lib/module/credential/presentation/api/04-verify-request-object.js.map +0 -1
  492. package/lib/module/credential/presentation/api/05-evaluate-dcql-query.js +0 -2
  493. package/lib/module/credential/presentation/api/05-evaluate-dcql-query.js.map +0 -1
  494. package/lib/module/credential/presentation/api/06-send-authorization-response.js +0 -2
  495. package/lib/module/credential/presentation/api/06-send-authorization-response.js.map +0 -1
  496. package/lib/module/credential/presentation/v1.3.3/04-verify-request-object.js.map +0 -1
  497. package/lib/typescript/credential/presentation/v1.0.0/04-verify-request-object.d.ts.map +0 -1
  498. package/lib/typescript/credential/presentation/v1.0.0/05-evaluate-dcql-query.d.ts.map +0 -1
  499. package/lib/typescript/credential/presentation/v1.0.0/06-send-authorization-response.d.ts.map +0 -1
  500. package/lib/typescript/credential/presentation/v1.3.3/04-verify-request-object.d.ts.map +0 -1
  501. package/lib/typescript/credential/presentation/v1.3.3/05-evaluate-dcql-query.d.ts.map +0 -1
  502. /package/src/credential/presentation/api/{04-verify-request-object.ts → 05-verify-request-object.ts} +0 -0
  503. /package/src/credential/presentation/api/{05-evaluate-dcql-query.ts → 06-evaluate-dcql-query.ts} +0 -0
  504. /package/src/credential/presentation/v1.0.0/{06-send-authorization-response.ts → 07-send-authorization-response.ts} +0 -0
  505. /package/src/credential/presentation/v1.3.3/{06-send-authorization-response.ts → 07-send-authorization-response.ts} +0 -0
@@ -2,8 +2,8 @@ import * as z from "zod";
2
2
  import { UnixTime } from "../../utils/zod";
3
3
 
4
4
  const ASDataCapability = z.object({
5
+ // required per spec
5
6
  dataset_id: z.string(),
6
- domains: z.array(z.string()),
7
7
  intended_purposes: z.array(z.string()),
8
8
  available_claims: z.array(
9
9
  z.object({
@@ -12,20 +12,48 @@ const ASDataCapability = z.object({
12
12
  mandatory: z.boolean(),
13
13
  })
14
14
  ),
15
- user_information: z.string().optional(),
15
+ domains: z.array(z.string()).optional(),
16
+ data_origin_l10n_id: z.string(),
17
+ integration_endpoint: z.string(),
18
+ integration_method: z.string(),
19
+ user_information_l10n_id: z.string(),
20
+ // optional per spec (api_specification required in spec but absent in actual responses)
21
+ api_specification: z.string().optional(),
22
+ background_color: z.string().optional(),
23
+ contacts: z.array(z.string()).optional(),
24
+ data_provision: z
25
+ .object({
26
+ deferred_flow: z.boolean(),
27
+ immediate_flow: z.boolean(),
28
+ })
29
+ .optional(),
30
+ logo_uri: z.string().optional(),
31
+ "logo_uri#integrity": z.string().optional(),
32
+ service_documentation: z.string().optional(),
33
+ update_frequency: z.string().optional(),
16
34
  });
17
35
 
18
36
  export const AuthenticSource = z.object({
19
37
  entity_id: z.string(),
20
38
  organization_info: z.object({
21
- organization_name: z.string(),
39
+ // required per spec
40
+ organization_name_l10n_id: z.string(),
22
41
  organization_type: z.string(),
23
42
  organization_country: z.string(),
43
+ legal_identifier: z.string(),
44
+ homepage_uri: z.string(),
45
+ contacts: z.array(z.string()),
46
+ policy_uri: z.string(),
47
+ // conditional: required for public AS
24
48
  ipa_code: z.string().optional(),
25
- contacts: z.array(z.string()).optional(),
26
- homepage_uri: z.string().optional(),
49
+ // conditional: required for private AS
50
+ tos_uri: z.string().optional(),
51
+ // optional per spec
27
52
  logo_uri: z.string().optional(),
28
- policy_uri: z.string().optional(),
53
+ "logo_uri#integrity": z.string().optional(),
54
+ logo_extended_uri: z.string().optional(),
55
+ "logo_extended_uri#integrity": z.string().optional(),
56
+ dpa_contact: z.string().optional(),
29
57
  }),
30
58
  data_capabilities: z.array(ASDataCapability),
31
59
  });
@@ -44,42 +72,65 @@ export const Schema = z.object({
44
72
  });
45
73
  export type Schema = z.infer<typeof Schema>;
46
74
 
47
- const CredentialPurpose = z.object({
48
- id: z.string(),
49
- description: z.string(),
50
- claims_required: z.array(z.string()),
51
- claim_recommended: z.array(z.string()),
75
+ const AdministrativeExpirationUserInfo = z.object({
76
+ title_l10n_id: z.string(),
77
+ description_l10n_id: z.string(),
52
78
  });
53
79
 
80
+ const AllowedState = z
81
+ .object({
82
+ title_l10n_id: z.string(),
83
+ description_l10n_id: z.string(),
84
+ })
85
+ .catchall(z.string());
86
+
54
87
  const CredentialIssuer = z.object({
55
88
  id: z.string(),
56
- organization_name: z.string(),
89
+ organization_name_l10n_id: z.string(),
57
90
  organization_code: z.string(),
58
91
  organization_country: z.string(),
92
+ legal_type: z.string().optional(),
59
93
  contacts: z.array(z.string()).optional(),
60
94
  homepage_uri: z.string().optional(),
61
95
  logo_uri: z.string().optional(),
62
96
  policy_uri: z.string().optional(),
63
97
  tos_uri: z.string().optional(),
98
+ service_documentation: z.string().optional(),
99
+ issuance_flows: z.object({ deferred_flow: z.boolean() }).optional(),
64
100
  });
65
101
 
66
102
  export const DigitalCredential = z.object({
67
103
  version: z.string(),
68
104
  credential_type: z.string(),
69
- credential_name: z.string(),
105
+ credential_name_l10n_id: z.string(),
70
106
  legal_type: z.string(),
71
- description: z.string(),
107
+ restriction_policy: z
108
+ .object({
109
+ allowed_wallet_ids: z.array(z.string()).optional(),
110
+ allowed_issuer_ids: z.array(z.string()).optional(),
111
+ presentation_flows: z.object({
112
+ remote: z.boolean(),
113
+ proximity: z.boolean(),
114
+ }),
115
+ })
116
+ .optional(),
72
117
  validity_info: z.object({
73
118
  max_validity_days: z.number(),
74
119
  status_methods: z.array(z.string()),
75
- allowed_states: z.array(z.string()),
120
+ administrative_expiration_user_info:
121
+ AdministrativeExpirationUserInfo.optional(),
122
+ allowed_states: z.array(AllowedState),
76
123
  }),
124
+ administrative_expiration_user_info:
125
+ AdministrativeExpirationUserInfo.optional(),
77
126
  authentication: z.object({
78
127
  user_auth_required: z.boolean(),
79
128
  min_loa: z.string(),
80
- supported_eid_schemes: z.array(z.string()),
129
+ supported_schemes: z.array(z.string()),
81
130
  }),
82
- purposes: z.array(CredentialPurpose),
131
+ domains: z.array(z.string()).optional(),
132
+ classes: z.array(z.string()).optional(),
133
+ purposes: z.array(z.string()),
83
134
  issuers: z.array(CredentialIssuer),
84
135
  authentic_sources: z.array(
85
136
  z.object({
@@ -102,7 +153,8 @@ const JwtHeader = z.object({
102
153
  */
103
154
  export const SchemaRegistry = z.object({
104
155
  version: z.string(),
105
- last_modified: z.string(),
156
+ last_modified: z.string().optional(),
157
+ last_updated: z.string().optional(),
106
158
  schemas: z.array(Schema),
107
159
  });
108
160
  export type SchemaRegistry = z.infer<typeof SchemaRegistry>;
@@ -112,8 +164,17 @@ export type SchemaRegistry = z.infer<typeof SchemaRegistry>;
112
164
  * @see https://italia.github.io/eid-wallet-it-docs/releases/1.3.3/en/registry.html#authentic-source-registry
113
165
  */
114
166
  export const AuthenticSourceRegistry = z.object({
167
+ id: z.string().optional(),
115
168
  version: z.string(),
116
169
  last_modified: z.string(),
170
+ localization: z
171
+ .object({
172
+ available_locales: z.array(z.string()),
173
+ base_uri: z.string(),
174
+ default_locale: z.string(),
175
+ version: z.string(),
176
+ })
177
+ .optional(),
117
178
  authentic_sources: z.array(AuthenticSource),
118
179
  });
119
180
  export type AuthenticSourceRegistry = z.infer<typeof AuthenticSourceRegistry>;
@@ -125,8 +186,18 @@ export type AuthenticSourceRegistry = z.infer<typeof AuthenticSourceRegistry>;
125
186
  export const DigitalCredentialsCatalogueJwt = z.object({
126
187
  header: JwtHeader,
127
188
  payload: z.object({
189
+ iss: z.string(),
190
+ id: z.string(),
128
191
  version: z.string(),
129
192
  last_modified: z.string(),
193
+ localization: z
194
+ .object({
195
+ available_locales: z.array(z.string()),
196
+ base_uri: z.string(),
197
+ default_locale: z.string(),
198
+ version: z.string(),
199
+ })
200
+ .optional(),
130
201
  credentials: z.array(DigitalCredential),
131
202
  iat: UnixTime,
132
203
  exp: UnixTime,
@@ -141,22 +212,24 @@ export type DigitalCredentialsCatalogueJwt = z.infer<
141
212
  * This is the entrypoint to build the full catalogue.
142
213
  * @see https://italia.github.io/eid-wallet-it-docs/releases/1.3.3/en/registry.html#registry-discovery-endpoint
143
214
  */
215
+ const RegistryDiscoveryEndpoints = z.object({
216
+ claims_registry: z.string(),
217
+ authentic_sources: z.string(),
218
+ credential_catalog: z.string(),
219
+ taxonomy: z.string(),
220
+ schema_registry: z.string(),
221
+ federation_list_endpoint: z.string(),
222
+ federation_fetch_endpoint: z.string(),
223
+ federation_resolve_endpoint: z.string(),
224
+ federation_trust_mark_status_endpoint: z.string(),
225
+ });
226
+
144
227
  export const RegistryDiscoveryJwt = z.object({
145
228
  header: JwtHeader,
146
229
  payload: z.object({
147
230
  registry_version: z.string(),
148
231
  last_updated: z.string(),
149
- endpoints: z.object({
150
- claims_registry: z.string(),
151
- authentic_sources: z.string(),
152
- credential_catalog: z.string(),
153
- taxonomy: z.string(),
154
- schema_registry: z.string(),
155
- federation_list: z.string(),
156
- federation_fetch: z.string(),
157
- federation_resolve: z.string(),
158
- federation_trust_mark_status: z.string(),
159
- }),
232
+ endpoints: RegistryDiscoveryEndpoints,
160
233
  }),
161
234
  });
162
235
  export type RegistryDiscoveryJwt = z.infer<typeof RegistryDiscoveryJwt>;
@@ -11,7 +11,7 @@ type FetchRegistryParams<T> = {
11
11
 
12
12
  /**
13
13
  * Utility to fetch an entity from the Registry Infrastructure.
14
- * The function supports both `application/json` and `application/jwt` responses.
14
+ * The function supports `application/json` and signed JOSE/JWT responses.
15
15
  * @see https://italia.github.io/eid-wallet-it-docs/releases/1.3.3/en/registry.html
16
16
  *
17
17
  * @param url The url to fetch from
@@ -30,7 +30,7 @@ export const fetchRegistry = async <T>(
30
30
  const response = await appFetch(url, {
31
31
  method: "GET",
32
32
  headers: {
33
- Accept: asJson ? "application/json" : "application/jwt",
33
+ Accept: asJson ? "application/json" : "application/jose, application/jwt",
34
34
  },
35
35
  }).then(hasStatusOrThrow(200));
36
36
 
@@ -41,7 +41,10 @@ export const fetchRegistry = async <T>(
41
41
  return schema.parse(responseJson);
42
42
  }
43
43
 
44
- if (contentType?.includes("application/jwt")) {
44
+ if (
45
+ contentType?.includes("application/jwt") ||
46
+ contentType?.includes("application/jose")
47
+ ) {
45
48
  assert("jwks" in params, "params.jwks required when response is JWT");
46
49
 
47
50
  const responseText = await response.text();
@@ -60,5 +63,40 @@ export const fetchRegistry = async <T>(
60
63
  });
61
64
  }
62
65
 
63
- throw new IoWalletError(`Unsupported content-type: ${contentType}`);
66
+ throw new IoWalletError(
67
+ `Unsupported content-type for ${url}: ${contentType}`
68
+ );
69
+ };
70
+
71
+ /**
72
+ * Fetch a locale bundle file from the Registry Infrastructure.
73
+ * Bundle files are flat JSON objects mapping l10n_id keys to translated strings.
74
+ * @see https://italia.github.io/eid-wallet-it-docs/releases/1.3.3/en/registry.html
75
+ *
76
+ * @param baseUri The base URI from a registry's localization object
77
+ * @param locale The locale code (e.g. "it", "en")
78
+ * @param appFetch Custom fetch implementation
79
+ * @returns Flat key→value translation map
80
+ */
81
+ export const fetchLocaleBundle = async (
82
+ baseUri: string,
83
+ locale: string,
84
+ appFetch: GlobalFetch["fetch"] = fetch
85
+ ): Promise<Record<string, string>> => {
86
+ const url = `${baseUri.replace(/\/$/, "")}/${locale}.json`;
87
+
88
+ const response = await appFetch(url, {
89
+ method: "GET",
90
+ headers: { Accept: "application/json" },
91
+ }).then(hasStatusOrThrow(200));
92
+
93
+ const contentType = response.headers.get("Content-Type");
94
+ if (!contentType?.includes("application/json")) {
95
+ throw new IoWalletError(
96
+ `Locale bundle at ${url} returned unexpected Content-Type: ${contentType}`
97
+ );
98
+ }
99
+
100
+ const responseJson = await response.json();
101
+ return z.record(z.string(), z.string()).parse(responseJson);
64
102
  };
package/src/index.ts CHANGED
@@ -15,10 +15,14 @@ import * as SdJwt from "./sd-jwt";
15
15
  import * as Mdoc from "./mdoc";
16
16
  import * as Errors from "./utils/errors";
17
17
  import * as WalletInstanceAttestation from "./wallet-instance-attestation";
18
+ import * as WalletUnitAttestation from "./wallet-unit-attestation";
18
19
  import * as WalletInstance from "./wallet-instance";
19
20
  import * as Logging from "./utils/logging";
20
21
  import { AuthorizationDetail, AuthorizationDetails } from "./utils/par";
21
- import { createCryptoContextFor } from "./utils/crypto";
22
+ import {
23
+ createCryptoContextFor,
24
+ type KeyAttestationCryptoContext,
25
+ } from "./utils/crypto";
22
26
  import type { IntegrityContext } from "./utils/integrity";
23
27
 
24
28
  export {
@@ -31,6 +35,7 @@ export {
31
35
  SdJwt,
32
36
  Mdoc,
33
37
  WalletInstanceAttestation,
38
+ WalletUnitAttestation,
34
39
  WalletInstance,
35
40
  Trustmark,
36
41
  Errors,
@@ -41,7 +46,11 @@ export {
41
46
  Logging,
42
47
  };
43
48
 
44
- export type { IntegrityContext, AuthorizationContext };
49
+ export type {
50
+ IntegrityContext,
51
+ AuthorizationContext,
52
+ KeyAttestationCryptoContext,
53
+ };
45
54
 
46
55
  export type * from "./api";
47
56
 
@@ -50,7 +50,7 @@ export const FederationEntityMetadata = z
50
50
  logo_uri: z.string().optional(),
51
51
  contacts: z.array(z.string()).optional(),
52
52
  })
53
- .passthrough();
53
+ .loose();
54
54
 
55
55
  // Structure common to every Entity Configuration document
56
56
  export type BaseEntityConfiguration = z.infer<typeof BaseEntityConfiguration>;
@@ -67,12 +67,12 @@ export const BaseEntityConfiguration = z.object({
67
67
  .object({
68
68
  federation_entity: FederationEntityMetadata,
69
69
  })
70
- .passthrough(),
70
+ .loose(),
71
71
  jwks: z.object({
72
72
  keys: z.array(JWK),
73
73
  }),
74
74
  })
75
- .passthrough(),
75
+ .loose(),
76
76
  });
77
77
 
78
78
  export const FederationListResponse = z.array(z.string());
@@ -1,7 +1,7 @@
1
1
  import * as z from "zod";
2
+ import { jsonWebKeySchema } from "@pagopa/io-wallet-oid-federation";
2
3
  import { JWK } from "../../utils/jwk";
3
4
  import { BaseEntityConfiguration } from "../common/types";
4
- import { jsonWebKeySchema } from "@openid-federation/core";
5
5
 
6
6
  const RelyingPartyMetadata = z.object({
7
7
  application_type: z.string().optional(),
@@ -65,7 +65,9 @@ const SupportedCredentialMetadata = z.intersection(
65
65
  cryptographic_binding_methods_supported: z.array(z.string()),
66
66
  credential_signing_alg_values_supported: z.array(z.string()),
67
67
  authentic_source: z.string().optional(),
68
- issuance_errors_supported: z.record(IssuanceErrorSupported).optional(),
68
+ issuance_errors_supported: z
69
+ .record(z.string(), IssuanceErrorSupported)
70
+ .optional(),
69
71
  })
70
72
  );
71
73
 
@@ -92,6 +94,7 @@ export const CredentialIssuerEntityConfiguration = BaseEntityConfiguration.and(
92
94
  status_attestation_endpoint: z.string(),
93
95
  display: z.array(CredentialIssuerDisplayMetadata),
94
96
  credential_configurations_supported: z.record(
97
+ z.string(),
95
98
  SupportedCredentialMetadata
96
99
  ),
97
100
  jwks: z.object({ keys: z.array(JWK) }),
@@ -157,7 +160,7 @@ export const WalletProviderEntityConfiguration = BaseEntityConfiguration.and(
157
160
  ),
158
161
  jwks: z.object({ keys: z.array(JWK) }),
159
162
  })
160
- .passthrough(),
163
+ .loose(),
161
164
  }),
162
165
  }),
163
166
  })
@@ -165,14 +168,11 @@ export const WalletProviderEntityConfiguration = BaseEntityConfiguration.and(
165
168
 
166
169
  // Maps any entity configuration by the union of every possible shapes
167
170
  export type EntityConfiguration = z.infer<typeof EntityConfiguration>;
168
- export const EntityConfiguration = z.union(
169
- [
171
+ export const EntityConfiguration = z
172
+ .union([
170
173
  WalletProviderEntityConfiguration,
171
174
  CredentialIssuerEntityConfiguration,
172
175
  TrustAnchorEntityConfiguration,
173
176
  RelyingPartyEntityConfiguration,
174
- ],
175
- {
176
- description: "Any kind of Entity Configuration allowed in the ecosystem",
177
- }
178
- );
177
+ ])
178
+ .describe("Any kind of Entity Configuration allowed in the ecosystem");
@@ -56,13 +56,10 @@ export const WalletProviderEntityConfiguration = BaseEntityConfiguration.and(
56
56
 
57
57
  // Maps any entity configuration by the union of every possible shapes
58
58
  export type EntityConfiguration = z.infer<typeof EntityConfiguration>;
59
- export const EntityConfiguration = z.union(
60
- [
59
+ export const EntityConfiguration = z
60
+ .union([
61
61
  WalletProviderEntityConfiguration,
62
62
  CredentialIssuerEntityConfiguration,
63
63
  RelyingPartyEntityConfiguration,
64
- ],
65
- {
66
- description: "Any kind of Entity Configuration allowed in the ecosystem",
67
- }
68
- );
64
+ ])
65
+ .describe("Any kind of Entity Configuration allowed in the ecosystem");
@@ -12,6 +12,12 @@ type PartialCallbackContext = Omit<
12
12
  "signJwt" | "clientAuthentication"
13
13
  >;
14
14
 
15
+ // Fix incompatibility between ArrayBuffer types
16
+ type DigestFixed = (
17
+ data: string | ArrayBuffer | ArrayBufferView,
18
+ algorithm?: string
19
+ ) => Uint8Array;
20
+
15
21
  /**
16
22
  * Shared callbacks with React Native implementations for use
17
23
  * in IO Wallet SDK. Callbacks not found here must be provided by the caller,
@@ -19,7 +25,7 @@ type PartialCallbackContext = Omit<
19
25
  */
20
26
  export const partialCallbacks: PartialCallbackContext = {
21
27
  generateRandom: generateRandomBytes,
22
- hash: digest,
28
+ hash: digest as DigestFixed,
23
29
  encryptJwe: async ({ publicJwk, alg, enc, kid }, data) => ({
24
30
  // @ts-expect-error `alg` and `enc` are strings, but EncryptJwe expects specific string literals
25
31
  jwe: await new EncryptJwe(data, { alg, enc, kid }).encrypt(publicJwk),
@@ -90,3 +90,21 @@ export const getSigninJwkFromCert = (pemCert: string): JWK => {
90
90
  "Unable to find the signing key inside the PEM certificate"
91
91
  );
92
92
  };
93
+
94
+ /**
95
+ * Extension of the {@link CryptoContext} that adds key generation with optional key attestation.
96
+ *
97
+ * This context requires the consumer to provide an additional method for **key generation**;
98
+ * on Android this method should also generate a key attestation as a certificate chain
99
+ * to ensure the key pair is hardware-backed.
100
+ */
101
+ export type KeyAttestationCryptoContext = CryptoContext & {
102
+ /**
103
+ * Generate a key pair with an **optional key attestation** (Android).
104
+ * @param challenge The challenge for the key attestation.
105
+ * @returns An object with a success flag and a key attestation, if it was generated.
106
+ */
107
+ generateKeyWithAttestation(
108
+ challenge: string
109
+ ): Promise<{ success: boolean; attestation?: string }>;
110
+ };
package/src/utils/dpop.ts CHANGED
@@ -29,7 +29,7 @@ export const createDPopToken = async (
29
29
  export type DPoPPayload = z.infer<typeof DPoPPayload>;
30
30
  export const DPoPPayload = z.object({
31
31
  jti: z.string(),
32
- htm: z.union([z.literal("POST"), z.literal("GET")]),
32
+ htm: z.enum(["POST", "GET"]),
33
33
  htu: z.string(),
34
34
  ath: z.string().optional(),
35
35
  });
package/src/utils/jwk.ts CHANGED
@@ -20,7 +20,7 @@ export const JWK = z.object({
20
20
  /** JWK "kty" (Key Type) Parameter.
21
21
  * This attribute is required to discriminate the
22
22
  * type of EC/RSA algorithm */
23
- kty: z.union([z.literal("RSA"), z.literal("EC")]),
23
+ kty: z.enum(["RSA", "EC"]),
24
24
  n: z.string().optional(),
25
25
  p: z.string().optional(),
26
26
  q: z.string().optional(),
@@ -33,8 +33,8 @@ export function createMapper<I, O>(
33
33
  export function createMapper<I, O>(
34
34
  mapper: (input: I) => O,
35
35
  config?: {
36
- inputSchema?: z.ZodType<I>;
37
- outputSchema: z.ZodType<O>;
36
+ inputSchema?: z.ZodType<I, any>;
37
+ outputSchema: z.ZodType<O, any>;
38
38
  }
39
39
  ) {
40
40
  if (!config) {
package/src/utils/zod.ts CHANGED
@@ -11,7 +11,11 @@ type Literal = z.infer<typeof literalSchema>;
11
11
  type Json = Literal | { [key: string]: Json } | Json[];
12
12
 
13
13
  const jsonSchema: z.ZodType<Json> = z.lazy(() =>
14
- z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)])
14
+ z.union([
15
+ literalSchema,
16
+ z.array(jsonSchema),
17
+ z.record(z.string(), jsonSchema),
18
+ ])
15
19
  );
16
20
 
17
21
  export const json = () => jsonSchema;
@@ -30,16 +30,19 @@ const { WALLET_PROVIDER_BASE_URL } = env; // Let's assume env is an object conta
30
30
  * WARNING: The integrity context must be the same used when creating the Wallet Instance with the same keytag.
31
31
  */
32
32
  const wallet = new IoWallet({ version: "1.0.0" });
33
- const issuedAttestation = await wallet.WalletInstanceAttestation.getAttestation({
34
- wiaCryptoContext,
35
- integrityContext,
36
- walletProviderBaseUrl: WALLET_PROVIDER_BASE_URL,
37
- appFetch,
38
- });
39
- // [
40
- // { type: "wallet_instance_attestation", "format": "jwt", "attestation": "ey..." },
41
- // { type: "wallet_instance_attestation", "format": "dc+sd-jwt", "attestation": "ey..." }
42
- // ]
33
+ const issuedAttestation = await wallet.WalletInstanceAttestation.getAttestation(
34
+ {
35
+ walletProviderBaseUrl: WALLET_PROVIDER_BASE_URL,
36
+ walletSolutionId: "exampleId",
37
+ walletSolutionVersion: "1.2.3",
38
+ },
39
+ {
40
+ wiaCryptoContext,
41
+ integrityContext,
42
+ appFetch,
43
+ }
44
+ );
45
+ // [{ "format": "jwt", "attestation": "ey..." }, { "format": "dc+sd-jwt", "attestation": "ey..." }]
43
46
  return issuedAttestation;
44
47
  ```
45
48
 
@@ -1,24 +1,31 @@
1
1
  import type { CryptoContext } from "@pagopa/io-react-native-jwt";
2
2
  import type { IntegrityContext } from "../../utils/integrity";
3
- import type { DecodedAttestationJwt, WalletAttestation } from "./types";
3
+ import type {
4
+ DecodedWalletInstanceAttestation,
5
+ WalletAttestation,
6
+ WalletAttestationRequestParams,
7
+ } from "./types";
4
8
 
5
9
  export interface WalletInstanceAttestationApi {
6
10
  /**
7
11
  * Request a Wallet Instance Attestation (WIA) to the Wallet provider.
8
- * The Wallet Attestation may be issued in different formats and components (Wallet App and Wallet Unit).
12
+ * The Wallet Instance Attestation may be issued in different formats.
9
13
  *
10
- * @param params.wiaCryptoContext The key pair associated with the WIA. Will be use to prove the ownership of the attestation.
11
- * @param params.appFetch (optional) Http client
12
- * @param walletProviderBaseUrl Base url for the Wallet Provider
14
+ * @param requestParams Wallet Provider data for the Wallet Attestation request
15
+ * @param ctx.wiaCryptoContext The key pair associated with the WIA. Will be use to prove the ownership of the attestation.
16
+ * @param ctx.integrityContext The hardware key pair associated with the Wallet Instance
17
+ * @param ctx.appFetch (optional) Http client
13
18
  * @returns The retrieved Wallet Instance Attestation tokens
14
19
  * @throws {WalletProviderResponseError} with a specific code for more context
15
20
  */
16
- getAttestation(ctx: {
17
- wiaCryptoContext: CryptoContext;
18
- integrityContext: IntegrityContext;
19
- walletProviderBaseUrl: string;
20
- appFetch?: GlobalFetch["fetch"];
21
- }): Promise<WalletAttestation[]>;
21
+ getAttestation(
22
+ requestParams: WalletAttestationRequestParams,
23
+ ctx: {
24
+ wiaCryptoContext: CryptoContext;
25
+ integrityContext: IntegrityContext;
26
+ appFetch?: GlobalFetch["fetch"];
27
+ }
28
+ ): Promise<WalletAttestation[]>;
22
29
 
23
30
  /**
24
31
  * Decode a given JWT to get the parsed Wallet Instance Attestation object they define.
@@ -32,7 +39,7 @@ export interface WalletInstanceAttestationApi {
32
39
  * @throws A decoding error if the token doesn't resolve in a valid JWT
33
40
  * @throws A validation error if the provided data doesn't result in a valid Wallet Instance Attestation
34
41
  */
35
- decode(token: string): DecodedAttestationJwt;
42
+ decode(token: string): DecodedWalletInstanceAttestation;
36
43
 
37
44
  /**
38
45
  * Verify a given JWT to get the parsed Wallet Instance Attestation object they define.
@@ -44,5 +51,5 @@ export interface WalletInstanceAttestationApi {
44
51
  * @throws A validation error if the provided data doesn't result in a valid Wallet Instance Attestation
45
52
  * @throws Invalid signature error if the token signature is not valid
46
53
  */
47
- verify(token: string): Promise<DecodedAttestationJwt>;
54
+ verify(token: string): Promise<DecodedWalletInstanceAttestation>;
48
55
  }
@@ -3,23 +3,35 @@ import { UnixTime } from "../../utils/zod";
3
3
  import { JWK } from "../../utils/jwk";
4
4
 
5
5
  /**
6
- * Common Wallet Attestation shape. This object is
6
+ * Common Wallet Instance Attestation shape. This object is
7
7
  * an abstraction over the version-specific JWTs.
8
8
  */
9
- export type DecodedAttestationJwt = z.infer<typeof DecodedAttestationJwt>;
10
- export const DecodedAttestationJwt = z.object({
9
+ export type DecodedWalletInstanceAttestation = z.infer<
10
+ typeof DecodedWalletInstanceAttestation
11
+ >;
12
+ export const DecodedWalletInstanceAttestation = z.object({
11
13
  iss: z.string(),
12
14
  iat: UnixTime,
13
15
  exp: UnixTime,
14
16
  cnf: z.object({ jwk: JWK }),
15
17
  sub: z.string(),
18
+ wallet_provider_name: z.string().optional(),
19
+ wallet_solution_id: z.string().optional(),
20
+ /** @deprecated */
16
21
  wallet_link: z.string().optional(),
22
+ /** @deprecated */
17
23
  wallet_name: z.string().optional(),
24
+ /** @deprecated */
18
25
  aal: z.string().optional(),
19
26
  });
20
27
 
21
28
  export type WalletAttestation = {
22
- type: "wallet_instance_attestation" | "wallet_unit_attestation";
23
29
  format: string;
24
30
  attestation: string;
25
31
  };
32
+
33
+ export type WalletAttestationRequestParams = {
34
+ walletProviderBaseUrl: string;
35
+ walletSolutionId: string;
36
+ walletSolutionVersion: string;
37
+ };
@@ -2,10 +2,10 @@ import type { WalletInstanceAttestationApi } from "../api";
2
2
  import { withMapper, withMapperAsync } from "../../utils/mappers";
3
3
  import { getAttestation } from "./issuing";
4
4
  import { decode, verify } from "./utils";
5
- import { mapToDecodedAttestationJwt } from "./mappers";
5
+ import { mapToDecodedWalletInstanceAttestation } from "./mappers";
6
6
 
7
7
  export const WalletInstanceAttestation: WalletInstanceAttestationApi = {
8
8
  getAttestation,
9
- decode: withMapper(mapToDecodedAttestationJwt, decode),
10
- verify: withMapperAsync(mapToDecodedAttestationJwt, verify),
9
+ decode: withMapper(mapToDecodedWalletInstanceAttestation, decode),
10
+ verify: withMapperAsync(mapToDecodedWalletInstanceAttestation, verify),
11
11
  };