@pagopa/io-react-native-wallet 0.7.4 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. package/README.md +49 -31
  2. package/lib/commonjs/credential/index.js +13 -0
  3. package/lib/commonjs/credential/index.js.map +1 -0
  4. package/lib/commonjs/credential/issuance/01-start-flow.js +2 -0
  5. package/lib/commonjs/credential/issuance/01-start-flow.js.map +1 -0
  6. package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +26 -0
  7. package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
  8. package/lib/commonjs/credential/issuance/03-start-user-authorization.js +119 -0
  9. package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -0
  10. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +6 -0
  11. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -0
  12. package/lib/commonjs/credential/issuance/05-authorize-access.js +63 -0
  13. package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -0
  14. package/lib/commonjs/credential/issuance/06-obtain-credential.js +128 -0
  15. package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -0
  16. package/lib/commonjs/credential/issuance/07-confirm-credential.js +6 -0
  17. package/lib/commonjs/credential/issuance/07-confirm-credential.js.map +1 -0
  18. package/lib/commonjs/credential/issuance/const.js +9 -0
  19. package/lib/commonjs/credential/issuance/const.js.map +1 -0
  20. package/lib/commonjs/credential/issuance/index.js +34 -0
  21. package/lib/commonjs/credential/issuance/index.js.map +1 -0
  22. package/lib/commonjs/credential/presentation/01-start-flow.js +55 -0
  23. package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -0
  24. package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js +32 -0
  25. package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js.map +1 -0
  26. package/lib/commonjs/credential/presentation/03-get-request-object.js +68 -0
  27. package/lib/commonjs/credential/presentation/03-get-request-object.js.map +1 -0
  28. package/lib/commonjs/credential/presentation/04-send-authorization-response.js +139 -0
  29. package/lib/commonjs/credential/presentation/04-send-authorization-response.js.map +1 -0
  30. package/lib/commonjs/credential/presentation/index.js +34 -0
  31. package/lib/commonjs/credential/presentation/index.js.map +1 -0
  32. package/lib/commonjs/{rp → credential/presentation}/types.js +17 -34
  33. package/lib/commonjs/credential/presentation/types.js.map +1 -0
  34. package/lib/commonjs/index.js +10 -61
  35. package/lib/commonjs/index.js.map +1 -1
  36. package/lib/commonjs/pid/index.js +1 -3
  37. package/lib/commonjs/pid/index.js.map +1 -1
  38. package/lib/commonjs/sd-jwt/index.js +1 -1
  39. package/lib/commonjs/sd-jwt/index.js.map +1 -1
  40. package/lib/commonjs/sd-jwt/types.js +1 -1
  41. package/lib/commonjs/sd-jwt/types.js.map +1 -1
  42. package/lib/commonjs/trust/chain.js +32 -4
  43. package/lib/commonjs/trust/chain.js.map +1 -1
  44. package/lib/commonjs/trust/index.js +105 -20
  45. package/lib/commonjs/trust/index.js.map +1 -1
  46. package/lib/commonjs/trust/types.js +54 -35
  47. package/lib/commonjs/trust/types.js.map +1 -1
  48. package/lib/commonjs/utils/crypto.js +5 -18
  49. package/lib/commonjs/utils/crypto.js.map +1 -1
  50. package/lib/commonjs/utils/misc.js +23 -0
  51. package/lib/commonjs/utils/misc.js.map +1 -0
  52. package/lib/commonjs/utils/par.js +86 -0
  53. package/lib/commonjs/utils/par.js.map +1 -0
  54. package/lib/module/credential/index.js +4 -0
  55. package/lib/module/credential/index.js.map +1 -0
  56. package/lib/module/credential/issuance/01-start-flow.js +2 -0
  57. package/lib/module/credential/issuance/01-start-flow.js.map +1 -0
  58. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +19 -0
  59. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
  60. package/lib/module/credential/issuance/03-start-user-authorization.js +109 -0
  61. package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -0
  62. package/lib/module/credential/issuance/04-complete-user-authorization.js +2 -0
  63. package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -0
  64. package/lib/module/credential/issuance/05-authorize-access.js +55 -0
  65. package/lib/module/credential/issuance/05-authorize-access.js.map +1 -0
  66. package/lib/module/credential/issuance/06-obtain-credential.js +117 -0
  67. package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -0
  68. package/lib/module/credential/issuance/07-confirm-credential.js +2 -0
  69. package/lib/module/credential/issuance/07-confirm-credential.js.map +1 -0
  70. package/lib/module/credential/issuance/const.js +2 -0
  71. package/lib/module/credential/issuance/const.js.map +1 -0
  72. package/lib/module/credential/issuance/index.js +6 -0
  73. package/lib/module/credential/issuance/index.js.map +1 -0
  74. package/lib/module/credential/presentation/01-start-flow.js +46 -0
  75. package/lib/module/credential/presentation/01-start-flow.js.map +1 -0
  76. package/lib/module/credential/presentation/02-evaluate-rp-trust.js +25 -0
  77. package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +1 -0
  78. package/lib/module/credential/presentation/03-get-request-object.js +60 -0
  79. package/lib/module/credential/presentation/03-get-request-object.js.map +1 -0
  80. package/lib/module/credential/presentation/04-send-authorization-response.js +128 -0
  81. package/lib/module/credential/presentation/04-send-authorization-response.js.map +1 -0
  82. package/lib/module/credential/presentation/index.js +6 -0
  83. package/lib/module/credential/presentation/index.js.map +1 -0
  84. package/lib/module/credential/presentation/types.js +21 -0
  85. package/lib/module/credential/presentation/types.js.map +1 -0
  86. package/lib/module/index.js +4 -5
  87. package/lib/module/index.js.map +1 -1
  88. package/lib/module/pid/index.js +1 -2
  89. package/lib/module/pid/index.js.map +1 -1
  90. package/lib/module/sd-jwt/index.js +1 -1
  91. package/lib/module/sd-jwt/index.js.map +1 -1
  92. package/lib/module/sd-jwt/types.js +1 -1
  93. package/lib/module/sd-jwt/types.js.map +1 -1
  94. package/lib/module/trust/chain.js +30 -3
  95. package/lib/module/trust/chain.js.map +1 -1
  96. package/lib/module/trust/index.js +99 -16
  97. package/lib/module/trust/index.js.map +1 -1
  98. package/lib/module/trust/types.js +50 -31
  99. package/lib/module/trust/types.js.map +1 -1
  100. package/lib/module/utils/crypto.js +2 -15
  101. package/lib/module/utils/crypto.js.map +1 -1
  102. package/lib/module/utils/misc.js +17 -0
  103. package/lib/module/utils/misc.js.map +1 -0
  104. package/lib/module/utils/par.js +74 -0
  105. package/lib/module/utils/par.js.map +1 -0
  106. package/lib/typescript/credential/index.d.ts +4 -0
  107. package/lib/typescript/credential/index.d.ts.map +1 -0
  108. package/lib/typescript/credential/issuance/01-start-flow.d.ts +11 -0
  109. package/lib/typescript/credential/issuance/01-start-flow.d.ts.map +1 -0
  110. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +18 -0
  111. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +1 -0
  112. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +31 -0
  113. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -0
  114. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +16 -0
  115. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -0
  116. package/lib/typescript/credential/issuance/05-authorize-access.d.ts +26 -0
  117. package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -0
  118. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +32 -0
  119. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -0
  120. package/lib/typescript/credential/issuance/07-confirm-credential.d.ts +11 -0
  121. package/lib/typescript/credential/issuance/07-confirm-credential.d.ts.map +1 -0
  122. package/lib/typescript/credential/issuance/const.d.ts +2 -0
  123. package/lib/typescript/credential/issuance/const.d.ts.map +1 -0
  124. package/lib/typescript/credential/issuance/index.d.ts +10 -0
  125. package/lib/typescript/credential/issuance/index.d.ts.map +1 -0
  126. package/lib/typescript/credential/presentation/01-start-flow.d.ts +20 -0
  127. package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -0
  128. package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +18 -0
  129. package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +1 -0
  130. package/lib/typescript/credential/presentation/03-get-request-object.d.ts +25 -0
  131. package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +1 -0
  132. package/lib/typescript/credential/presentation/04-send-authorization-response.d.ts +34 -0
  133. package/lib/typescript/credential/presentation/04-send-authorization-response.d.ts.map +1 -0
  134. package/lib/typescript/credential/presentation/index.d.ts +7 -0
  135. package/lib/typescript/credential/presentation/index.d.ts.map +1 -0
  136. package/lib/typescript/credential/presentation/types.d.ts +49 -0
  137. package/lib/typescript/credential/presentation/types.d.ts.map +1 -0
  138. package/lib/typescript/index.d.ts +4 -5
  139. package/lib/typescript/index.d.ts.map +1 -1
  140. package/lib/typescript/pid/index.d.ts +1 -2
  141. package/lib/typescript/pid/index.d.ts.map +1 -1
  142. package/lib/typescript/sd-jwt/index.d.ts +2 -2
  143. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  144. package/lib/typescript/sd-jwt/types.d.ts +5 -5
  145. package/lib/typescript/trust/chain.d.ts +12 -3
  146. package/lib/typescript/trust/chain.d.ts.map +1 -1
  147. package/lib/typescript/trust/index.d.ts +198 -24
  148. package/lib/typescript/trust/index.d.ts.map +1 -1
  149. package/lib/typescript/trust/types.d.ts +1299 -623
  150. package/lib/typescript/trust/types.d.ts.map +1 -1
  151. package/lib/typescript/utils/crypto.d.ts +1 -1
  152. package/lib/typescript/utils/crypto.d.ts.map +1 -1
  153. package/lib/typescript/utils/dpop.d.ts +2 -2
  154. package/lib/typescript/utils/misc.d.ts +8 -0
  155. package/lib/typescript/utils/misc.d.ts.map +1 -0
  156. package/lib/typescript/utils/par.d.ts +68 -0
  157. package/lib/typescript/utils/par.d.ts.map +1 -0
  158. package/package.json +2 -2
  159. package/src/credential/index.ts +4 -0
  160. package/src/credential/issuance/01-start-flow.ts +10 -0
  161. package/src/credential/issuance/02-evaluate-issuer-trust.ts +31 -0
  162. package/src/credential/issuance/03-start-user-authorization.ts +138 -0
  163. package/src/credential/issuance/04-complete-user-authorization.ts +17 -0
  164. package/src/credential/issuance/05-authorize-access.ts +92 -0
  165. package/src/credential/issuance/06-obtain-credential.ts +179 -0
  166. package/src/credential/issuance/07-confirm-credential.ts +14 -0
  167. package/src/credential/issuance/const.ts +2 -0
  168. package/src/credential/issuance/index.ts +32 -0
  169. package/src/credential/presentation/01-start-flow.ts +51 -0
  170. package/src/credential/presentation/02-evaluate-rp-trust.ts +33 -0
  171. package/src/credential/presentation/03-get-request-object.ts +85 -0
  172. package/src/credential/presentation/04-send-authorization-response.ts +168 -0
  173. package/src/credential/presentation/index.ts +26 -0
  174. package/src/credential/presentation/types.ts +27 -0
  175. package/src/index.ts +7 -28
  176. package/src/pid/index.ts +1 -2
  177. package/src/sd-jwt/index.ts +2 -2
  178. package/src/sd-jwt/types.ts +1 -1
  179. package/src/trust/chain.ts +45 -3
  180. package/src/trust/index.ts +136 -19
  181. package/src/trust/types.ts +57 -35
  182. package/src/utils/crypto.ts +2 -20
  183. package/src/utils/misc.ts +23 -0
  184. package/src/utils/par.ts +103 -0
  185. package/lib/commonjs/pid/issuing.js +0 -276
  186. package/lib/commonjs/pid/issuing.js.map +0 -1
  187. package/lib/commonjs/rp/__test__/index.test.js +0 -172
  188. package/lib/commonjs/rp/__test__/index.test.js.map +0 -1
  189. package/lib/commonjs/rp/index.js +0 -239
  190. package/lib/commonjs/rp/index.js.map +0 -1
  191. package/lib/commonjs/rp/types.js.map +0 -1
  192. package/lib/module/pid/issuing.js +0 -266
  193. package/lib/module/pid/issuing.js.map +0 -1
  194. package/lib/module/rp/__test__/index.test.js +0 -168
  195. package/lib/module/rp/__test__/index.test.js.map +0 -1
  196. package/lib/module/rp/index.js +0 -228
  197. package/lib/module/rp/index.js.map +0 -1
  198. package/lib/module/rp/types.js +0 -36
  199. package/lib/module/rp/types.js.map +0 -1
  200. package/lib/typescript/pid/issuing.d.ts +0 -57
  201. package/lib/typescript/pid/issuing.d.ts.map +0 -1
  202. package/lib/typescript/rp/__test__/index.test.d.ts +0 -2
  203. package/lib/typescript/rp/__test__/index.test.d.ts.map +0 -1
  204. package/lib/typescript/rp/index.d.ts +0 -43
  205. package/lib/typescript/rp/index.d.ts.map +0 -1
  206. package/lib/typescript/rp/types.d.ts +0 -122
  207. package/lib/typescript/rp/types.d.ts.map +0 -1
  208. package/src/pid/issuing.ts +0 -405
  209. package/src/rp/__test__/index.test.ts +0 -250
  210. package/src/rp/index.ts +0 -287
  211. package/src/rp/types.ts +0 -42
@@ -1 +1 @@
1
- {"version":3,"names":["UnixTime","JWK","z","TrustMark","object","id","string","trust_mark","CredentialDisplayMetadata","name","locale","logo","url","alt_text","background_color","text_color","SupportedCredentialMetadata","format","literal","cryptographic_binding_methods_supported","array","cryptographic_suites_supported","display","EntityStatement","header","typ","alg","kid","payload","iss","sub","jwks","keys","trust_marks","iat","number","exp","EntityConfigurationHeader","BaseEntityConfiguration","metadata","federation_entity","federation_fetch_endpoint","optional","federation_list_endpoint","federation_resolve_endpoint","federation_trust_mark_status_endpoint","federation_trust_mark_list_endpoint","homepage_uri","policy_uri","logo_uri","contacts","passthrough","authority_hints","TrustAnchorEntityConfiguration","CredentialIssuerEntityConfiguration","and","openid_credential_issuer","credential_issuer","authorization_endpoint","token_endpoint","pushed_authorization_request_endpoint","dpop_signing_alg_values_supported","credential_endpoint","credentials_supported","WalletProviderEntityConfiguration","wallet_provider","attested_security_context_values_supported","grant_types_supported","token_endpoint_auth_methods_supported","token_endpoint_auth_signing_alg_values_supported","RelyingPartyEntityConfiguration","wallet_relying_party","application_type","client_id","client_name","EntityConfiguration","union","description"],"sourceRoot":"../../../src","sources":["trust/types.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,GAAG,QAAQ,cAAc;AAClC,OAAO,KAAKC,CAAC,MAAM,KAAK;AAExB,OAAO,MAAMC,SAAS,GAAGD,CAAC,CAACE,MAAM,CAAC;EAAEC,EAAE,EAAEH,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B,EAC9BiB,+BAA+B,CAChC,EACD;EACEO,WAAW,EAAE;AACf,CACF,CAAC"}
1
+ {"version":3,"names":["UnixTime","JWK","z","TrustMark","object","id","string","trust_mark","RelyingPartyMetadata","application_type","optional","client_id","client_name","jwks","keys","array","contacts","CredentialDisplayMetadata","name","locale","logo","url","alt_text","background_color","text_color","CredentialDefinitionMetadata","type","credentialSubject","record","mandatory","boolean","display","SupportedCredentialMetadata","format","literal","cryptographic_binding_methods_supported","cryptographic_suites_supported","credential_definition","EntityStatement","header","typ","alg","kid","payload","iss","sub","trust_marks","iat","number","exp","EntityConfigurationHeader","FederationEntityMetadata","federation_fetch_endpoint","federation_list_endpoint","federation_resolve_endpoint","federation_trust_mark_status_endpoint","federation_trust_mark_list_endpoint","homepage_uri","policy_uri","logo_uri","passthrough","BaseEntityConfiguration","metadata","federation_entity","authority_hints","TrustAnchorEntityConfiguration","CredentialIssuerEntityConfiguration","and","openid_credential_issuer","credential_issuer","authorization_endpoint","token_endpoint","pushed_authorization_request_endpoint","dpop_signing_alg_values_supported","credential_endpoint","credentials_supported","wallet_relying_party","RelyingPartyEntityConfiguration","WalletProviderEntityConfiguration","wallet_provider","attested_security_context_values_supported","grant_types_supported","token_endpoint_auth_methods_supported","token_endpoint_auth_signing_alg_values_supported","EntityConfiguration","union","description"],"sourceRoot":"../../../src","sources":["trust/types.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,GAAG,QAAQ,cAAc;AAClC,OAAO,KAAKC,CAAC,MAAM,KAAK;AAExB,OAAO,MAAMC,SAAS,GAAGD,CAAC,CAACE,MAAM,CAAC;EAAEC,EAAE,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EAAEC,UAAU,EAAEL,CAAC,CAACI,MAAM,CAAC;AAAE,CAAC,CAAC;AAG7E,MAAME,oBAAoB,GAAGN,CAAC,CAACE,MAAM,CAAC;EACpCK,gBAAgB,EAAEP,CAAC,CAACI,MAAM,CAAC,CAAC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KAAK,CAACb,CAAC,CAACI,MAAM,CAAC,CAAC,CAAC;QAC1D6E,gDAAgD,EAAEjF,CAAC,CAACa,KAAK,CACvDb,CAAC,CAACI,MAAM,CAAC,CACX,CAAC;QACDO,IAAI,EAAEX,CAAC,CAACE,MAAM,CAAC;UAAEU,IAAI,EAAEZ,CAAC,CAACa,KAAK,CAACd,GAAG;QAAE,CAAC;MACvC,CAAC,CAAC,CACD2D,WAAW,CAAC;IACjB,CAAC;EACH,CAAC;AACH,CAAC,CACH,CAAC;;AAED;;AAEA,OAAO,MAAMwB,mBAAmB,GAAGlF,CAAC,CAACmF,KAAK,CACxC,CACEP,iCAAiC,EACjCZ,mCAAmC,EACnCD,8BAA8B,EAC9BY,+BAA+B,CAChC,EACD;EACES,WAAW,EAAE;AACf,CACF,CAAC"}
@@ -39,19 +39,6 @@ export const createCryptoContextFor = keytag => {
39
39
  };
40
40
  };
41
41
 
42
- // Wraps finally for async expressions
43
- const asyncFinally = (fn, onFinally) => async function () {
44
- try {
45
- return await fn(...arguments);
46
- // ^^^^^ return await is usually to be avoided,
47
- // in this case is needed for the finally{} statement to be executed correctly
48
- } catch (error) {
49
- throw error;
50
- } finally {
51
- await onFinally();
52
- }
53
- };
54
-
55
42
  /**
56
43
  * Executes the input function injecting an ephemeral crypto context.
57
44
  * An ephemeral crypto context is a context which is bound to a key
@@ -60,11 +47,11 @@ const asyncFinally = (fn, onFinally) => async function () {
60
47
  * @param fn The procedure to be executed
61
48
  * @returns The returned value of the input procedure.
62
49
  */
63
- export const useEphemeralKey = async fn => {
50
+ export const withEphemeralKey = async fn => {
64
51
  // Use an ephemeral key to be destroyed after use
65
52
  const keytag = `ephemeral-${uuid.v4()}`;
66
53
  await generate(keytag);
67
54
  const ephemeralContext = createCryptoContextFor(keytag);
68
- return asyncFinally(fn, () => deleteKey(keytag))(ephemeralContext);
55
+ return fn(ephemeralContext).finally(() => deleteKey(keytag));
69
56
  };
70
57
  //# sourceMappingURL=crypto.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getPublicKey","sign","generate","deleteKey","uuid","thumbprint","fixBase64EncodingOnKey","createCryptoContextFor","keytag","then","jwk","kid","getSignature","value","asyncFinally","fn","onFinally","arguments","error","useEphemeralKey","v4","ephemeralContext"],"sourceRoot":"../../../src","sources":["utils/crypto.ts"],"mappings":"AAAA,SACEA,YAAY,EACZC,IAAI,EACJC,QAAQ,EACRC,SAAS,QACJ,gCAAgC;AACvC,OAAOC,IAAI,MAAM,mBAAmB;AACpC,SAASC,UAAU,QAA4B,6BAA6B;AAC5E,SAASC,sBAAsB,QAAQ,OAAO;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAIC,MAAc,IAAoB;EACvE,OAAO;IACL;AACJ;AACA;AACA;AACA;IACI,MAAMR,YAAYA,CAAA,EAAG;MACnB,OAAOA,YAAY,CAACQ,MAAM,CAAC,CACxBC,IAAI,CAACH,sBAAsB,CAAC,CAC5BG,IAAI,CAAC,MAAOC,GAAG,KAAM;QACpB,GAAGA,GAAG;QACN;QACA;QACA;QACA;QACAC,GAAG,EAAE,MAAMN,UAAU,CAACK,GAAG;MAC3B,CAAC,CAAC,CAAC;IACP,CAAC;IACD;AACJ;AACA;AACA;AACA;AACA;IACI,MAAME,YAAYA,CAACC,KAAa,EAAE;MAChC,OAAOZ,IAAI,CAACY,KAAK,EAAEL,MAAM,CAAC;IAC5B;EACF,CAAC;AACH,CAAC;;AAED;AACA,MAAMM,YAAY,GAChBA,CACEC,EAA8B,EAC9BC,SAAqC,KAEvC,kBAAkC;EAChC,IAAI;IACF,OAAO,MAAMD,EAAE,CAAC,GAAAE,SAAO,CAAC;IACxB;IACA;EACF,CAAC,CAAC,OAAOC,KAAK,EAAE;IACd,MAAMA,KAAK;EACb,CAAC,SAAS;IACR,MAAMF,SAAS,CAAC,CAAC;EACnB;AACF,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,eAAe,GAAG,MAC7BJ,EAAmD,IACpC;EACf;EACA,MAAMP,MAAM,GAAI,aAAYJ,IAAI,CAACgB,EAAE,CAAC,CAAE,EAAC;EACvC,MAAMlB,QAAQ,CAACM,MAAM,CAAC;EACtB,MAAMa,gBAAgB,GAAGd,sBAAsB,CAACC,MAAM,CAAC;EACvD,OAAOM,YAAY,CAACC,EAAE,EAAE,MAAMZ,SAAS,CAACK,MAAM,CAAC,CAAC,CAACa,gBAAgB,CAAC;AACpE,CAAC"}
1
+ {"version":3,"names":["getPublicKey","sign","generate","deleteKey","uuid","thumbprint","fixBase64EncodingOnKey","createCryptoContextFor","keytag","then","jwk","kid","getSignature","value","withEphemeralKey","fn","v4","ephemeralContext","finally"],"sourceRoot":"../../../src","sources":["utils/crypto.ts"],"mappings":"AAAA,SACEA,YAAY,EACZC,IAAI,EACJC,QAAQ,EACRC,SAAS,QACJ,gCAAgC;AACvC,OAAOC,IAAI,MAAM,mBAAmB;AACpC,SAASC,UAAU,QAA4B,6BAA6B;AAC5E,SAASC,sBAAsB,QAAQ,OAAO;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAIC,MAAc,IAAoB;EACvE,OAAO;IACL;AACJ;AACA;AACA;AACA;IACI,MAAMR,YAAYA,CAAA,EAAG;MACnB,OAAOA,YAAY,CAACQ,MAAM,CAAC,CACxBC,IAAI,CAACH,sBAAsB,CAAC,CAC5BG,IAAI,CAAC,MAAOC,GAAG,KAAM;QACpB,GAAGA,GAAG;QACN;QACA;QACA;QACA;QACAC,GAAG,EAAE,MAAMN,UAAU,CAACK,GAAG;MAC3B,CAAC,CAAC,CAAC;IACP,CAAC;IACD;AACJ;AACA;AACA;AACA;AACA;IACI,MAAME,YAAYA,CAACC,KAAa,EAAE;MAChC,OAAOZ,IAAI,CAACY,KAAK,EAAEL,MAAM,CAAC;IAC5B;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMM,gBAAgB,GAAG,MAC9BC,EAAmD,IACpC;EACf;EACA,MAAMP,MAAM,GAAI,aAAYJ,IAAI,CAACY,EAAE,CAAC,CAAE,EAAC;EACvC,MAAMd,QAAQ,CAACM,MAAM,CAAC;EACtB,MAAMS,gBAAgB,GAAGV,sBAAsB,CAACC,MAAM,CAAC;EACvD,OAAOO,EAAE,CAACE,gBAAgB,CAAC,CAACC,OAAO,CAAC,MAAMf,SAAS,CAACK,MAAM,CAAC,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { IoWalletError } from "./errors";
2
+
3
+ /**
4
+ * Check if a response is in the expected status, other
5
+ * @param status The expected status
6
+ * @returns The given response object
7
+ */
8
+ export const hasStatus = status => res => {
9
+ if (res.status !== status) {
10
+ throw new IoWalletError(`Http request failed. Expected ${status}, got ${res.status}, url: ${res.url}`);
11
+ }
12
+ return res;
13
+ };
14
+
15
+ // extract a type from an async function output
16
+ // helpful to bind the input of a function to the output of another
17
+ //# sourceMappingURL=misc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["IoWalletError","hasStatus","status","res","url"],"sourceRoot":"../../../src","sources":["utils/misc.ts"],"mappings":"AAAA,SAASA,aAAa,QAAQ,UAAU;;AAExC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GACnBC,MAAc,IACdC,GAAa,IAAe;EAC3B,IAAIA,GAAG,CAACD,MAAM,KAAKA,MAAM,EAAE;IACzB,MAAM,IAAIF,aAAa,CACpB,iCAAgCE,MAAO,SAAQC,GAAG,CAACD,MAAO,UAASC,GAAG,CAACC,GAAI,EAC9E,CAAC;EACH;EACA,OAAOD,GAAG;AACZ,CAAC;;AAEH;AACA"}
@@ -0,0 +1,74 @@
1
+ import { sha256ToBase64, SignJWT } from "@pagopa/io-react-native-jwt";
2
+ import uuid from "react-native-uuid";
3
+ import * as z from "zod";
4
+ import * as WalletInstanceAttestation from "../wallet-instance-attestation";
5
+ import { hasStatus } from "./misc";
6
+ export const AuthorizationDetail = z.object({
7
+ credential_definition: z.object({
8
+ type: z.string()
9
+ }),
10
+ format: z.literal("vc+sd-jwt"),
11
+ type: z.literal("openid_credential")
12
+ });
13
+ export const AuthorizationDetails = z.array(AuthorizationDetail);
14
+
15
+ /**
16
+ * Make a PAR request to the issuer and return the response url
17
+ */
18
+ export const makeParRequest = _ref => {
19
+ let {
20
+ wiaCryptoContext,
21
+ appFetch = fetch
22
+ } = _ref;
23
+ return async (clientId, codeVerifier, walletProviderBaseUrl, parEndpoint, walletInstanceAttestation, authorizationDetails, assertionType) => {
24
+ const wiaPublicKey = await wiaCryptoContext.getPublicKey();
25
+ const parUrl = new URL(parEndpoint);
26
+ const aud = `${parUrl.protocol}//${parUrl.hostname}`;
27
+ const iss = WalletInstanceAttestation.decode(walletInstanceAttestation).payload.cnf.jwk.kid;
28
+
29
+ /** A code challenge is provided so that the PAR is bound
30
+ to the subsequent authorization code request
31
+ @see https://datatracker.ietf.org/doc/html/rfc9126#name-request */
32
+ const codeChallengeMethod = "s256";
33
+ const codeChallenge = await sha256ToBase64(codeVerifier);
34
+
35
+ /** The PAR request token is signed used the Wallet Instance Attestation key.
36
+ The signature can be verified by reading the public key from the key set shippet
37
+ with the it will ship the Wallet Instance Attestation.
38
+ The key is matched by its kid */
39
+ const signedJwtForPar = await new SignJWT(wiaCryptoContext).setProtectedHeader({
40
+ kid: wiaPublicKey.kid
41
+ }).setPayload({
42
+ iss,
43
+ aud,
44
+ jti: `${uuid.v4()}`,
45
+ client_assertion_type: assertionType,
46
+ authorization_details: authorizationDetails,
47
+ response_type: "code",
48
+ redirect_uri: walletProviderBaseUrl,
49
+ state: `${uuid.v4()}`,
50
+ client_id: clientId,
51
+ code_challenge_method: codeChallengeMethod,
52
+ code_challenge: codeChallenge
53
+ }).setIssuedAt().setExpirationTime("1h").sign();
54
+
55
+ /** The request body for the Pushed Authorization Request */
56
+ var formBody = new URLSearchParams({
57
+ response_type: "code",
58
+ client_id: clientId,
59
+ code_challenge: codeChallenge,
60
+ code_challenge_method: "S256",
61
+ client_assertion_type: assertionType,
62
+ client_assertion: walletInstanceAttestation,
63
+ request: signedJwtForPar
64
+ });
65
+ return await appFetch(parEndpoint, {
66
+ method: "POST",
67
+ headers: {
68
+ "Content-Type": "application/x-www-form-urlencoded"
69
+ },
70
+ body: formBody.toString()
71
+ }).then(hasStatus(201)).then(res => res.json()).then(result => result.request_uri);
72
+ };
73
+ };
74
+ //# sourceMappingURL=par.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sha256ToBase64","SignJWT","uuid","z","WalletInstanceAttestation","hasStatus","AuthorizationDetail","object","credential_definition","type","string","format","literal","AuthorizationDetails","array","makeParRequest","_ref","wiaCryptoContext","appFetch","fetch","clientId","codeVerifier","walletProviderBaseUrl","parEndpoint","walletInstanceAttestation","authorizationDetails","assertionType","wiaPublicKey","getPublicKey","parUrl","URL","aud","protocol","hostname","iss","decode","payload","cnf","jwk","kid","codeChallengeMethod","codeChallenge","signedJwtForPar","setProtectedHeader","setPayload","jti","v4","client_assertion_type","authorization_details","response_type","redirect_uri","state","client_id","code_challenge_method","code_challenge","setIssuedAt","setExpirationTime","sign","formBody","URLSearchParams","client_assertion","request","method","headers","body","toString","then","res","json","result","request_uri"],"sourceRoot":"../../../src","sources":["utils/par.ts"],"mappings":"AAAA,SACEA,cAAc,EAEdC,OAAO,QACF,6BAA6B;AACpC,OAAOC,IAAI,MAAM,mBAAmB;AACpC,OAAO,KAAKC,CAAC,MAAM,KAAK;AACxB,OAAO,KAAKC,yBAAyB,MAAM,gCAAgC;AAC3E,SAASC,SAAS,QAAQ,QAAQ;AAGlC,OAAO,MAAMC,mBAAmB,GAAGH,CAAC,CAACI,MAAM,CAAC;EAC1CC,qBAAqB,EAAEL,CAAC,CAACI,MAAM,CAAC;IAC9BE,IAAI,EAAEN,CAAC,CAACO,MAAM,CAAC;EACjB,CAAC,CAAC;EACFC,MAAM,EAAER,CAAC,CAACS,OAAO,CAA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,qBAAqB;MACnC6B,KAAK,EAAG,GAAEjD,IAAI,CAAC4C,EAAE,CAAC,CAAE,EAAC;MACrBM,SAAS,EAAEhC,QAAQ;MACnBiC,qBAAqB,EAAEb,mBAAmB;MAC1Cc,cAAc,EAAEb;IAClB,CAAC,CAAC,CACDc,WAAW,CAAC,CAAC,CACbC,iBAAiB,CAAC,IAAI,CAAC,CACvBC,IAAI,CAAC,CAAC;;IAET;IACA,IAAIC,QAAQ,GAAG,IAAIC,eAAe,CAAC;MACjCV,aAAa,EAAE,MAAM;MACrBG,SAAS,EAAEhC,QAAQ;MACnBkC,cAAc,EAAEb,aAAa;MAC7BY,qBAAqB,EAAE,MAAM;MAC7BN,qBAAqB,EAAErB,aAAa;MACpCkC,gBAAgB,EAAEpC,yBAAyB;MAC3CqC,OAAO,EAAEnB;IACX,CAAC,CAAC;IAEF,OAAO,MAAMxB,QAAQ,CAACK,WAAW,EAAE;MACjCuC,MAAM,EAAE,MAAM;MACdC,OAAO,EAAE;QACP,cAAc,EAAE;MAClB,CAAC;MACDC,IAAI,EAAEN,QAAQ,CAACO,QAAQ,CAAC;IAC1B,CAAC,CAAC,CACCC,IAAI,CAAC7D,SAAS,CAAC,GAAG,CAAC,CAAC,CACpB6D,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC,CACzBF,IAAI,CAAEG,MAAM,IAAKA,MAAM,CAACC,WAAW,CAAC;EACzC,CAAC;AAAA"}
@@ -0,0 +1,4 @@
1
+ import * as Issuance from "./issuance";
2
+ import * as Presentation from "./presentation";
3
+ export { Issuance, Presentation };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/credential/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The beginning of the issuing flow.
3
+ * To be implemented accordind to the user touchpoint
4
+ *
5
+ * @returns The type of the Credential to be issued and the url of the Issuer
6
+ */
7
+ export type StartFlow = () => Promise<{
8
+ issuerUrl: string;
9
+ credentialType: string;
10
+ }>;
11
+ //# sourceMappingURL=01-start-flow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"01-start-flow.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/01-start-flow.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { CredentialIssuerEntityConfiguration } from "../../trust/types";
2
+ import type { StartFlow } from "./01-start-flow";
3
+ import type { Out } from "../../utils/misc";
4
+ export type EvaluateIssuerTrust = (issuerUrl: Out<StartFlow>["issuerUrl"], context?: {
5
+ appFetch?: GlobalFetch["fetch"];
6
+ }) => Promise<{
7
+ issuerConf: CredentialIssuerEntityConfiguration["payload"]["metadata"];
8
+ }>;
9
+ /**
10
+ * The Issuer trust evaluation phase.
11
+ * Fetch the Issuer's configuration and verify trust.
12
+ *
13
+ * @param issuerUrl The base url of the Issuer
14
+ * @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
15
+ * @returns The Issuer's configuration
16
+ */
17
+ export declare const evaluateIssuerTrust: EvaluateIssuerTrust;
18
+ //# sourceMappingURL=02-evaluate-issuer-trust.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"02-evaluate-issuer-trust.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/02-evaluate-issuer-trust.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,MAAM,mBAAmB,GAAG,CAChC,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,EACtC,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IACX,UAAU,EAAE,mCAAmC,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;CACxE,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,mBAQjC,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { CryptoContext } from "@pagopa/io-react-native-jwt";
2
+ import { type Out } from "../../utils/misc";
3
+ import type { StartFlow } from "./01-start-flow";
4
+ import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
5
+ export type StartUserAuthorization = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], credentialType: Out<StartFlow>["credentialType"], context: {
6
+ wiaCryptoContext: CryptoContext;
7
+ walletInstanceAttestation: string;
8
+ walletProviderBaseUrl: string;
9
+ additionalParams?: Record<string, string>;
10
+ appFetch?: GlobalFetch["fetch"];
11
+ }) => Promise<{
12
+ requestUri: string;
13
+ clientId: string;
14
+ }>;
15
+ /**
16
+ * Start the User authorization phase.
17
+ * Perform the Pushed Authorization Request as defined in OAuth 2.0 protocol.
18
+ *
19
+ * @param issuerConf The Issuer configuration
20
+ * @param credentialType The type of the credential to be requested
21
+ * @param context.wiaCryptoContext The context to access the key associated with the Wallet Instance Attestation
22
+ * @param context.walletInstanceAttestation The Wallet Instance Attestation token
23
+ * @param context.walletProviderBaseUrl The base url of the Wallet Provider
24
+ * @param context.additionalParams Hash set of parameters to be passed to the authorization endpoint
25
+ * (used as a temporary fix until we have a proper User identity in the PID token provider)
26
+ * TODO: [SIW-630]
27
+ * @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
28
+ * @returns The request uri to continue the authorization to
29
+ */
30
+ export declare const startUserAuthorization: StartUserAuthorization;
31
+ //# sourceMappingURL=03-start-user-authorization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"03-start-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/03-start-user-authorization.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAa,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AA4DtE,MAAM,MAAM,sBAAsB,GAAG,CACnC,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,cAAc,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,EAChD,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,yBAAyB,EAAE,MAAM,CAAC;IAClC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEvD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,sBAAsB,EAAE,sBA2CpC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { Out } from "../../utils/misc";
2
+ import type { StartUserAuthorization } from "./03-start-user-authorization";
3
+ /**
4
+ * The interface of the phase to complete User authorization.
5
+ * It may be implemented as a Credential presentation
6
+ * or with a strong User identification
7
+ *
8
+ * @param requestUri The url to reach to complete the user authorization.
9
+ * @param cliendId Identifies the current client across all the requests of the issuing flow
10
+ *
11
+ * @returns the access code to use to request the credental
12
+ */
13
+ export type CompleteUserAuthorization = (requestUri: Out<StartUserAuthorization>["requestUri"], clientId: Out<StartUserAuthorization>["clientId"]) => Promise<{
14
+ code: string;
15
+ }>;
16
+ //# sourceMappingURL=04-complete-user-authorization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"04-complete-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/04-complete-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAE5E;;;;;;;;;GASG;AACH,MAAM,MAAM,yBAAyB,GAAG,CACtC,UAAU,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,YAAY,CAAC,EACrD,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,KAC9C,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { StartUserAuthorization } from "./03-start-user-authorization";
2
+ import { type Out } from "../../utils/misc";
3
+ import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
4
+ import type { CompleteUserAuthorization } from "./04-complete-user-authorization";
5
+ export type AuthorizeAccess = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], code: Out<CompleteUserAuthorization>["code"], clientId: Out<StartUserAuthorization>["clientId"], context: {
6
+ walletInstanceAttestation: string;
7
+ walletProviderBaseUrl: string;
8
+ appFetch?: GlobalFetch["fetch"];
9
+ }) => Promise<{
10
+ accessToken: string;
11
+ nonce: string;
12
+ clientId: string;
13
+ }>;
14
+ /**
15
+ * Obtain the access token to finally request the credential
16
+ *
17
+ * @param issuerConf The Issuer configuration
18
+ * @param code The access code from the User authorization phase
19
+ * @param clientId Identifies the current client across all the requests of the issuing flow
20
+ * @param context.walletInstanceAttestation The Wallet Instance Attestation token
21
+ * @param context.walletProviderBaseUrl The base url of the Wallet Provider
22
+ * @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
23
+ * @returns
24
+ */
25
+ export declare const authorizeAccess: AuthorizeAccess;
26
+ //# sourceMappingURL=05-authorize-access.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"05-authorize-access.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/05-authorize-access.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAa,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAElF,MAAM,MAAM,eAAe,GAAG,CAC5B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,IAAI,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAC,MAAM,CAAC,EAC5C,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,OAAO,EAAE;IACP,yBAAyB,EAAE,MAAM,CAAC;IAClC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IAEX,WAAW,EAAE,MAAM,CAAC;IAEpB,KAAK,EAAE,MAAM,CAAC;IAEd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAAE,eAqD7B,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { type CryptoContext } from "@pagopa/io-react-native-jwt";
2
+ import type { StartFlow } from "./01-start-flow";
3
+ import { type Out } from "../../utils/misc";
4
+ import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
5
+ import type { AuthorizeAccess } from "./05-authorize-access";
6
+ /**
7
+ * Return the signed jwt for nonce proof of possession
8
+ */
9
+ export declare const createNonceProof: (nonce: string, issuer: string, audience: string, ctx: CryptoContext) => Promise<string>;
10
+ export type ObtainCredential = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], accessToken: Out<AuthorizeAccess>["accessToken"], nonce: Out<AuthorizeAccess>["nonce"], clientId: Out<AuthorizeAccess>["clientId"], credentialType: Out<StartFlow>["credentialType"], context: {
11
+ credentialCryptoContext: CryptoContext;
12
+ walletProviderBaseUrl: string;
13
+ appFetch?: GlobalFetch["fetch"];
14
+ }) => Promise<{
15
+ credential: string;
16
+ format: string;
17
+ }>;
18
+ /**
19
+ * Fetch a credential from the issuer
20
+ *
21
+ * @param issuerConf The Issuer configuration
22
+ * @param accessToken The access token to grant access to the credential, obtained with the access authorization step
23
+ * @param nonce The nonce value to prevent reply attacks, obtained with the access authorization step
24
+ * @param clientId Identifies the current client across all the requests of the issuing flow
25
+ * @param credentialType The type of the credential to be requested
26
+ * @param context.credentialCryptoContext The context to access the key the Credential will be bound to
27
+ * @param context.walletProviderBaseUrl The base url of the Wallet Provider
28
+ * @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
29
+ * @returns The signed credential token
30
+ */
31
+ export declare const obtainCredential: ObtainCredential;
32
+ //# sourceMappingURL=06-obtain-credential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"06-obtain-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/06-obtain-credential.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAI1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAa,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAK7D;;GAEG;AACH,eAAO,MAAM,gBAAgB,UACpB,MAAM,UACL,MAAM,YACJ,MAAM,OACX,aAAa,KACjB,QAAQ,MAAM,CAchB,CAAC;AA4CF,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,WAAW,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,EAChD,KAAK,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,EACpC,QAAQ,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,UAAU,CAAC,EAC1C,cAAc,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,EAChD,OAAO,EAAE;IACP,uBAAuB,EAAE,aAAa,CAAC;IACvC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAwE9B,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ObtainCredential } from "./06-obtain-credential";
2
+ import type { Out } from "../../utils/misc";
3
+ /**
4
+ * The end of the issuing flow.
5
+ * The User accepted the Credential and it can be stored in the device according to the app implementation preferences.
6
+ * To be implemented.
7
+ *
8
+ * @returns The type of the Credential to be issued and the url of the Issuer
9
+ */
10
+ export type ConfirmCredential = (credential: Out<ObtainCredential>["credential"], format: Out<ObtainCredential>["format"]) => Promise<void>;
11
+ //# sourceMappingURL=07-confirm-credential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"07-confirm-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/07-confirm-credential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAC9B,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,EAC/C,MAAM,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,KACpC,OAAO,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const ASSERTION_TYPE = "urn:ietf:params:oauth:client-assertion-type:jwt-client-attestation";
2
+ //# sourceMappingURL=const.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,uEAC2C,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type StartFlow } from "./01-start-flow";
2
+ import { evaluateIssuerTrust, type EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
3
+ import { startUserAuthorization, type StartUserAuthorization } from "./03-start-user-authorization";
4
+ import { type CompleteUserAuthorization } from "./04-complete-user-authorization";
5
+ import { authorizeAccess, type AuthorizeAccess } from "./05-authorize-access";
6
+ import { obtainCredential, type ObtainCredential } from "./06-obtain-credential";
7
+ import type { ConfirmCredential } from "./07-confirm-credential";
8
+ export { evaluateIssuerTrust, startUserAuthorization, authorizeAccess, obtainCredential, };
9
+ export type { StartFlow, EvaluateIssuerTrust, StartUserAuthorization, CompleteUserAuthorization, AuthorizeAccess, ObtainCredential, ConfirmCredential, };
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACL,mBAAmB,EACnB,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,EAC5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,GACjB,CAAC;AACF,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,GAClB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The beginning of the presentation flow.
3
+ * To be implemented accordind to the user touchpoint
4
+ *
5
+ * @param Optional parameters, depending on the starting touchoint
6
+ * @returns The url for the Relying Party to connect with
7
+ */
8
+ export type StartFlow<T extends Array<unknown> = []> = (...args: T) => Promise<{
9
+ requestURI: string;
10
+ clientId: string;
11
+ }>;
12
+ /**
13
+ * Start a presentation flow by decoding an incoming QR-code
14
+ *
15
+ * @param qrcode The encoded QR-code content
16
+ * @returns The url for the Relying Party to connect with
17
+ * @throws If the provided qr code fails to be decoded
18
+ */
19
+ export declare const startFlowFromQR: StartFlow<[string]>;
20
+ //# sourceMappingURL=01-start-flow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"01-start-flow.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/01-start-flow.ts"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC;IAC7E,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,CAoB/C,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { RelyingPartyEntityConfiguration } from "../../trust/types";
2
+ import type { StartFlow } from "../issuance/01-start-flow";
3
+ import type { Out } from "../../utils/misc";
4
+ export type EvaluateRelyingPartyTrust = (rpUrl: Out<StartFlow>["issuerUrl"], context?: {
5
+ appFetch?: GlobalFetch["fetch"];
6
+ }) => Promise<{
7
+ rpConf: RelyingPartyEntityConfiguration["payload"]["metadata"];
8
+ }>;
9
+ /**
10
+ * The Relying Party trust evaluation phase.
11
+ * Fetch the Relying Party's configuration and verify trust.
12
+ *
13
+ * @param rpUrl The base url of the Issuer
14
+ * @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
15
+ * @returns The Relying Party's configuration
16
+ */
17
+ export declare const evaluateRelyingPartyTrust: EvaluateRelyingPartyTrust;
18
+ //# sourceMappingURL=02-evaluate-rp-trust.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"02-evaluate-rp-trust.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/02-evaluate-rp-trust.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,MAAM,yBAAyB,GAAG,CACtC,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,EAClC,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IACX,MAAM,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;CAChE,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,EAAE,yBAUvC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { type CryptoContext } from "@pagopa/io-react-native-jwt";
2
+ import type { EvaluateRelyingPartyTrust } from "./02-evaluate-rp-trust";
3
+ import { type Out } from "../../utils/misc";
4
+ import type { StartFlow } from "./01-start-flow";
5
+ import { RequestObject } from "./types";
6
+ export type GetRequestObject = (requestUri: Out<StartFlow>["requestURI"], rpConf: Out<EvaluateRelyingPartyTrust>["rpConf"], context: {
7
+ wiaCryptoContext: CryptoContext;
8
+ appFetch?: GlobalFetch["fetch"];
9
+ walletInstanceAttestation: string;
10
+ }) => Promise<{
11
+ requestObject: RequestObject;
12
+ }>;
13
+ /**
14
+ * Obtain the Request Object for RP authentication
15
+ * @see https://italia.github.io/eudi-wallet-it-docs/versione-corrente/en/relying-party-solution.html
16
+ *
17
+ * @param requestUri The url for the Relying Party to connect with
18
+ * @param rpConf The Relying Party's configuration
19
+ * @param context.wiaCryptoContext The context to access the key associated with the Wallet Instance Attestation
20
+ * @param context.walletInstanceAttestation The Wallet Instance Attestation token
21
+ * @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
22
+ * @returns The Request Object that describes the presentation
23
+ */
24
+ export declare const getRequestObject: GetRequestObject;
25
+ //# sourceMappingURL=03-get-request-object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"03-get-request-object.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/03-get-request-object.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AAIrC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAa,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,EACxC,MAAM,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAC,QAAQ,CAAC,EAChD,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,yBAAyB,EAAE,MAAM,CAAC;CACnC,KACE,OAAO,CAAC;IAAE,aAAa,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAgD9B,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { type Out } from "../../utils/misc";
2
+ import type { GetRequestObject } from "./03-get-request-object";
3
+ import type { EvaluateRelyingPartyTrust } from "./02-evaluate-rp-trust";
4
+ import { type Presentation } from "./types";
5
+ import * as z from "zod";
6
+ export type AuthorizationResponse = z.infer<typeof AuthorizationResponse>;
7
+ export declare const AuthorizationResponse: z.ZodObject<{
8
+ status: z.ZodString;
9
+ response_code: z.ZodOptional<z.ZodString>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ status: string;
12
+ response_code?: string | undefined;
13
+ }, {
14
+ status: string;
15
+ response_code?: string | undefined;
16
+ }>;
17
+ export type SendAuthorizationResponse = (requestObject: Out<GetRequestObject>["requestObject"], rpConf: Out<EvaluateRelyingPartyTrust>["rpConf"], presentation: Presentation, // TODO: [SIW-353] support multiple presentations
18
+ context: {
19
+ walletInstanceAttestation: string;
20
+ appFetch?: GlobalFetch["fetch"];
21
+ }) => Promise<AuthorizationResponse>;
22
+ /**
23
+ * Complete the presentation flow by sending the authorization response to the Relying Party
24
+ *
25
+ * @param requestObject The Request Object that describes the presentation
26
+ * @param rpConf The Relying Party's configuration
27
+ * @param presentation The presentation tuple consisting in the signed credential,
28
+ * the list of claims to be disclosed, and the context to access the key that proves the holder binding
29
+ * @param context.walletInstanceAttestation The Wallet Instance Attestation token
30
+ * @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
31
+ * @returns The result of the presentation flow
32
+ */
33
+ export declare const sendAuthorizationResponse: SendAuthorizationResponse;
34
+ //# sourceMappingURL=04-send-authorization-response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"04-send-authorization-response.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/04-send-authorization-response.ts"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC1E,eAAO,MAAM,qBAAqB;;;;;;;;;EAShC,CAAC;AAkFH,MAAM,MAAM,yBAAyB,GAAG,CACtC,aAAa,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,eAAe,CAAC,EACrD,MAAM,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAC,QAAQ,CAAC,EAChD,YAAY,EAAE,YAAY,EAAE,iDAAiD;AAC7E,OAAO,EAAE;IACP,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,EAAE,yBA0CvC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { startFlowFromQR, type StartFlow } from "./01-start-flow";
2
+ import { evaluateRelyingPartyTrust, type EvaluateRelyingPartyTrust } from "./02-evaluate-rp-trust";
3
+ import { getRequestObject, type GetRequestObject } from "./03-get-request-object";
4
+ import { sendAuthorizationResponse, type SendAuthorizationResponse } from "./04-send-authorization-response";
5
+ export { startFlowFromQR, evaluateRelyingPartyTrust, getRequestObject, sendAuthorizationResponse, };
6
+ export type { StartFlow, EvaluateRelyingPartyTrust, GetRequestObject, SendAuthorizationResponse, };
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EACL,yBAAyB,EACzB,KAAK,yBAAyB,EAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,yBAAyB,EACzB,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,GAC1B,CAAC;AACF,YAAY,EACV,SAAS,EACT,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,GAC1B,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { CryptoContext } from "@pagopa/io-react-native-jwt";
2
+ import * as z from "zod";
3
+ /**
4
+ * A pair that associate a tokenized Verified Credential with the claims presented or requested to present.
5
+ */
6
+ export type Presentation = [
7
+ string,
8
+ string[],
9
+ CryptoContext
10
+ ];
11
+ export type RequestObject = z.infer<typeof RequestObject>;
12
+ export declare const RequestObject: z.ZodObject<{
13
+ iss: z.ZodString;
14
+ iat: z.ZodNumber;
15
+ exp: z.ZodNumber;
16
+ state: z.ZodString;
17
+ nonce: z.ZodString;
18
+ response_uri: z.ZodString;
19
+ response_type: z.ZodLiteral<"vp_token">;
20
+ response_mode: z.ZodLiteral<"direct_post.jwt">;
21
+ client_id: z.ZodString;
22
+ client_id_scheme: z.ZodLiteral<"entity_id">;
23
+ scope: z.ZodString;
24
+ }, "strip", z.ZodTypeAny, {
25
+ iss: string;
26
+ iat: number;
27
+ exp: number;
28
+ client_id: string;
29
+ nonce: string;
30
+ response_type: "vp_token";
31
+ state: string;
32
+ response_uri: string;
33
+ response_mode: "direct_post.jwt";
34
+ client_id_scheme: "entity_id";
35
+ scope: string;
36
+ }, {
37
+ iss: string;
38
+ iat: number;
39
+ exp: number;
40
+ client_id: string;
41
+ nonce: string;
42
+ response_type: "vp_token";
43
+ state: string;
44
+ response_uri: string;
45
+ response_mode: "direct_post.jwt";
46
+ client_id_scheme: "entity_id";
47
+ scope: string;
48
+ }>;
49
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACO,MAAM;IACzB,MAAM,EAAE;IACsC,aAAa;CACzE,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYxB,CAAC"}