@pagopa/io-react-native-wallet 2.0.0-next.2 → 2.0.0-next.4

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 (146) hide show
  1. package/lib/commonjs/credential/issuance/03-start-user-authorization.js +38 -24
  2. package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
  3. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +75 -57
  4. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
  5. package/lib/commonjs/credential/issuance/05-authorize-access.js +6 -10
  6. package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
  7. package/lib/commonjs/credential/issuance/06-obtain-credential.js +43 -11
  8. package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
  9. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +51 -48
  10. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  11. package/lib/commonjs/credential/issuance/README.md +77 -45
  12. package/lib/commonjs/credential/issuance/const.js +1 -1
  13. package/lib/commonjs/credential/issuance/types.js +17 -10
  14. package/lib/commonjs/credential/issuance/types.js.map +1 -1
  15. package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +6 -13
  16. package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
  17. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +10 -11
  18. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
  19. package/lib/commonjs/credential/presentation/types.js +1 -1
  20. package/lib/commonjs/credential/presentation/types.js.map +1 -1
  21. package/lib/commonjs/credential/status/README.md +0 -1
  22. package/lib/commonjs/sd-jwt/__test__/index.test.js +11 -15
  23. package/lib/commonjs/sd-jwt/__test__/index.test.js.map +1 -1
  24. package/lib/commonjs/sd-jwt/__test__/types.test.js +5 -2
  25. package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
  26. package/lib/commonjs/sd-jwt/__test__/utils.test.js +37 -0
  27. package/lib/commonjs/sd-jwt/__test__/utils.test.js.map +1 -0
  28. package/lib/commonjs/sd-jwt/index.js +26 -1
  29. package/lib/commonjs/sd-jwt/index.js.map +1 -1
  30. package/lib/commonjs/sd-jwt/types.js +71 -8
  31. package/lib/commonjs/sd-jwt/types.js.map +1 -1
  32. package/lib/commonjs/sd-jwt/utils.js +64 -0
  33. package/lib/commonjs/sd-jwt/utils.js.map +1 -0
  34. package/lib/commonjs/trust/types.js +18 -13
  35. package/lib/commonjs/trust/types.js.map +1 -1
  36. package/lib/commonjs/utils/par.js +32 -22
  37. package/lib/commonjs/utils/par.js.map +1 -1
  38. package/lib/commonjs/utils/pop.js +1 -1
  39. package/lib/commonjs/utils/pop.js.map +1 -1
  40. package/lib/commonjs/wallet-instance-attestation/types.js +4 -1
  41. package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
  42. package/lib/module/credential/issuance/03-start-user-authorization.js +38 -24
  43. package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
  44. package/lib/module/credential/issuance/04-complete-user-authorization.js +76 -58
  45. package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
  46. package/lib/module/credential/issuance/05-authorize-access.js +6 -10
  47. package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
  48. package/lib/module/credential/issuance/06-obtain-credential.js +44 -12
  49. package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
  50. package/lib/module/credential/issuance/07-verify-and-parse-credential.js +51 -48
  51. package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  52. package/lib/module/credential/issuance/README.md +77 -45
  53. package/lib/module/credential/issuance/const.js +1 -1
  54. package/lib/module/credential/issuance/types.js +13 -8
  55. package/lib/module/credential/issuance/types.js.map +1 -1
  56. package/lib/module/credential/presentation/07-evaluate-dcql-query.js +6 -13
  57. package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
  58. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +10 -11
  59. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
  60. package/lib/module/credential/presentation/types.js +1 -1
  61. package/lib/module/credential/presentation/types.js.map +1 -1
  62. package/lib/module/credential/status/README.md +0 -1
  63. package/lib/module/sd-jwt/__test__/index.test.js +11 -16
  64. package/lib/module/sd-jwt/__test__/index.test.js.map +1 -1
  65. package/lib/module/sd-jwt/__test__/types.test.js +5 -2
  66. package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
  67. package/lib/module/sd-jwt/__test__/utils.test.js +35 -0
  68. package/lib/module/sd-jwt/__test__/utils.test.js.map +1 -0
  69. package/lib/module/sd-jwt/index.js +7 -1
  70. package/lib/module/sd-jwt/index.js.map +1 -1
  71. package/lib/module/sd-jwt/types.js +70 -7
  72. package/lib/module/sd-jwt/types.js.map +1 -1
  73. package/lib/module/sd-jwt/utils.js +57 -0
  74. package/lib/module/sd-jwt/utils.js.map +1 -0
  75. package/lib/module/trust/types.js +18 -13
  76. package/lib/module/trust/types.js.map +1 -1
  77. package/lib/module/utils/par.js +29 -20
  78. package/lib/module/utils/par.js.map +1 -1
  79. package/lib/module/utils/pop.js +1 -1
  80. package/lib/module/utils/pop.js.map +1 -1
  81. package/lib/module/wallet-instance-attestation/types.js +4 -1
  82. package/lib/module/wallet-instance-attestation/types.js.map +1 -1
  83. package/lib/typescript/client/generated/wallet-provider.d.ts +12 -12
  84. package/lib/typescript/credential/issuance/01-start-flow.d.ts +2 -2
  85. package/lib/typescript/credential/issuance/01-start-flow.d.ts.map +1 -1
  86. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +7 -6
  87. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
  88. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +7 -14
  89. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
  90. package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
  91. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +10 -5
  92. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
  93. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +3 -2
  94. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
  95. package/lib/typescript/credential/issuance/const.d.ts +1 -1
  96. package/lib/typescript/credential/issuance/types.d.ts +49 -26
  97. package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
  98. package/lib/typescript/credential/presentation/01-start-flow.d.ts +2 -2
  99. package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +4 -3
  100. package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +1 -1
  101. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +9 -5
  102. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +1 -1
  103. package/lib/typescript/credential/presentation/types.d.ts +3 -4
  104. package/lib/typescript/credential/presentation/types.d.ts.map +1 -1
  105. package/lib/typescript/credential/status/types.d.ts +4 -4
  106. package/lib/typescript/pid/sd-jwt/types.d.ts +7 -7
  107. package/lib/typescript/sd-jwt/__test__/utils.test.d.ts +2 -0
  108. package/lib/typescript/sd-jwt/__test__/utils.test.d.ts.map +1 -0
  109. package/lib/typescript/sd-jwt/index.d.ts +69 -28
  110. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  111. package/lib/typescript/sd-jwt/types.d.ts +264 -31
  112. package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
  113. package/lib/typescript/sd-jwt/utils.d.ts +18 -0
  114. package/lib/typescript/sd-jwt/utils.d.ts.map +1 -0
  115. package/lib/typescript/trust/build-chain.d.ts +30 -14
  116. package/lib/typescript/trust/build-chain.d.ts.map +1 -1
  117. package/lib/typescript/trust/types.d.ts +322 -158
  118. package/lib/typescript/trust/types.d.ts.map +1 -1
  119. package/lib/typescript/utils/par.d.ts +29 -13
  120. package/lib/typescript/utils/par.d.ts.map +1 -1
  121. package/lib/typescript/wallet-instance-attestation/types.d.ts +9 -9
  122. package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
  123. package/package.json +1 -1
  124. package/src/credential/issuance/01-start-flow.ts +2 -2
  125. package/src/credential/issuance/03-start-user-authorization.ts +57 -38
  126. package/src/credential/issuance/04-complete-user-authorization.ts +79 -85
  127. package/src/credential/issuance/05-authorize-access.ts +5 -11
  128. package/src/credential/issuance/06-obtain-credential.ts +56 -23
  129. package/src/credential/issuance/07-verify-and-parse-credential.ts +54 -62
  130. package/src/credential/issuance/README.md +77 -45
  131. package/src/credential/issuance/const.ts +1 -1
  132. package/src/credential/issuance/types.ts +19 -8
  133. package/src/credential/presentation/07-evaluate-dcql-query.ts +16 -17
  134. package/src/credential/presentation/07-evaluate-input-descriptor.ts +19 -16
  135. package/src/credential/presentation/types.ts +1 -2
  136. package/src/credential/status/README.md +0 -1
  137. package/src/sd-jwt/__test__/index.test.ts +8 -29
  138. package/src/sd-jwt/__test__/types.test.ts +6 -2
  139. package/src/sd-jwt/__test__/utils.test.ts +37 -0
  140. package/src/sd-jwt/index.ts +7 -1
  141. package/src/sd-jwt/types.ts +68 -7
  142. package/src/sd-jwt/utils.ts +73 -0
  143. package/src/trust/types.ts +23 -17
  144. package/src/utils/par.ts +37 -21
  145. package/src/utils/pop.ts +1 -1
  146. package/src/wallet-instance-attestation/types.ts +3 -1
@@ -1 +1 @@
1
- {"version":3,"names":["sha256ToBase64","SignJWT","v4","uuidv4","z","WalletInstanceAttestation","generateRandomAlphaNumericString","hasStatusOrThrow","createPopToken","IssuerResponseError","LogLevel","Logger","AuthorizationDetail","object","credential_configuration_id","string","format","union","literal","type","AuthorizationDetails","array","makeParRequest","_ref","wiaCryptoContext","appFetch","clientId","codeVerifier","redirectUri","responseMode","parEndpoint","walletInstanceAttestation","authorizationDetails","assertionType","wiaPublicKey","getPublicKey","parUrl","URL","aud","protocol","hostname","iss","decode","payload","cnf","jwk","kid","signedWiaPoP","jti","codeChallengeMethod","codeChallenge","signedJwtForPar","setProtectedHeader","typ","setPayload","response_type","response_mode","client_id","state","code_challenge","code_challenge_method","authorization_details","redirect_uri","client_assertion_type","client_assertion","setIssuedAt","setExpirationTime","sign","formBody","URLSearchParams","request","log","DEBUG","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,SAASC,EAAE,IAAIC,MAAM,QAAQ,MAAM;AACnC,OAAO,KAAKC,CAAC,MAAM,KAAK;AACxB,OAAO,KAAKC,yBAAyB,MAAM,gCAAgC;AAC3E,SAASC,gCAAgC,EAAEC,gBAAgB,QAAQ,QAAQ;AAC3E,SAASC,cAAc,QAAQ,OAAO;AACtC,SAASC,mBAAmB,QAAQ,UAAU;AAC9C,SAASC,QAAQ,EAAEC,MAAM,QAAQ,WAAW;AAG5C,OAAO,MAAMC,mBAAmB,GAAGR,CAAC,CAACS,MAAM,CAAC;EAC1CC,2BAA2B,EAAEV,CAAC,CAACW,MAAM,CAAC,CAAC;EACvCC,MAAM,EAAEZ,CAAC,CAACa,KAAK,CAAC,CAACb,CAAC,CAACc,OAAO,CAAC,WAAW,CAAC,EAAEd,CAAC,CAACc,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;EACpEC,IAAI,EAAEf,CAAC,CAACc,OAAO,CAAC,mBAAmB;AACrC,CAAC,CAAC;AAGF,OAAO,MAAME,oBAAoB,GAAGhB,CAAC,CAACiB,KAAK,CAACT,mBAAmB,CAAC;;AAEhE;AACA;AACA;AACA,OAAO,MAAMU,cAAc,GACzBC,IAAA;EAAA,IAAC;IACCC,gBAAgB;IAChBC;EAIF,CAAC,GAAAF,IAAA;EAAA,OACD,OACEG,QAAgB,EAChBC,YAAoB,EACpBC,WAAmB,EACnBC,YAAoB,EACpBC,WAAmB,EACnBC,yBAAiC,EACjCC,oBAA0C,EAC1CC,aAAqB,KACD;IACpB,M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AAW,CAAC,CAAC,CAAC;IAAA,CACdC,iBAAiB,CAAC,MAAM,CAAC,CACzBC,IAAI,CAAC,CAAC;;IAET;IACA,IAAIC,QAAQ,GAAG,IAAIC,eAAe,CAAC;MACjCd,aAAa,EAAE,MAAM;MACrBE,SAAS,EAAE/B,QAAQ;MACnBiC,cAAc,EAAET,aAAa;MAC7BU,qBAAqB,EAAE,MAAM;MAC7BU,OAAO,EAAEnB,eAAe;MACxBY,qBAAqB,EAAE9B,aAAa;MACpC+B,gBAAgB,EAAEjC,yBAAyB,GAAG,GAAG,GAAGgB;IACtD,CAAC,CAAC;IAEFpC,MAAM,CAAC4D,GAAG,CACR7D,QAAQ,CAAC8D,KAAK,EACb,2BAA0B1C,WAAY,KAAIsC,QAAS,EACtD,CAAC;IAED,OAAO,MAAM3C,QAAQ,CAACK,WAAW,EAAE;MACjC2C,MAAM,EAAE,MAAM;MACdC,OAAO,EAAE;QACP,cAAc,EAAE;MAClB,CAAC;MACDC,IAAI,EAAEP,QAAQ,CAACQ,QAAQ,CAAC;IAC1B,CAAC,CAAC,CACCC,IAAI,CAACtE,gBAAgB,CAAC,GAAG,EAAEE,mBAAmB,CAAC,CAAC,CAChDoE,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC,CACzBF,IAAI,CAAEG,MAAM,IAAKA,MAAM,CAACC,WAAW,CAAC;EACzC,CAAC;AAAA"}
1
+ {"version":3,"names":["sha256ToBase64","SignJWT","v4","uuidv4","z","WalletInstanceAttestation","generateRandomAlphaNumericString","hasStatusOrThrow","createPopToken","IssuerResponseError","LogLevel","Logger","AuthorizationDetail","object","type","literal","credential_configuration_id","string","AuthorizationDetails","array","ParResponse","request_uri","expires_in","number","makeParRequest","_ref","wiaCryptoContext","appFetch","parEndpoint","walletInstanceAttestation","_ref2","codeVerifier","responseMode","clientId","redirectUri","authorizationDetails","scope","aud","wiaPublicKey","getPublicKey","iss","decode","payload","cnf","jwk","kid","signedWiaPoP","jti","codeChallengeMethod","codeChallenge","signedJwtForPar","setProtectedHeader","typ","setPayload","response_type","response_mode","client_id","state","code_challenge","code_challenge_method","redirect_uri","authorization_details","setIssuedAt","setExpirationTime","sign","formBody","URLSearchParams","request","log","DEBUG","method","headers","body","toString","then","res","json","parse","result"],"sourceRoot":"../../../src","sources":["utils/par.ts"],"mappings":"AAAA,SACEA,cAAc,EAEdC,OAAO,QACF,6BAA6B;AACpC,SAASC,EAAE,IAAIC,MAAM,QAAQ,MAAM;AACnC,OAAO,KAAKC,CAAC,MAAM,KAAK;AACxB,OAAO,KAAKC,yBAAyB,MAAM,gCAAgC;AAC3E,SAASC,gCAAgC,EAAEC,gBAAgB,QAAQ,QAAQ;AAC3E,SAASC,cAAc,QAAQ,OAAO;AACtC,SAASC,mBAAmB,QAAQ,UAAU;AAC9C,SAASC,QAAQ,EAAEC,MAAM,QAAQ,WAAW;AAG5C,OAAO,MAAMC,mBAAmB,GAAGR,CAAC,CAACS,MAAM,CAAC;EAC1CC,IAAI,EAAEV,CAAC,CAACW,OAAO,CAAC,mBAAmB,CAAC;EACpCC,2BAA2B,EAAEZ,CAAC,CAACa,MAAM,CAAC;AACxC,CAAC,CAAC;AAGF,OAAO,MAAMC,oBAAoB,GAAGd,CAAC,CAACe,KAAK,CAACP,mBAAmB,CAAC;AAGhE,OAAO,MAAMQ,WAAW,GAAGhB,CAAC,CAACS,MAAM,CAAC;EAClCQ,WAAW,EAAEjB,CAAC,CAACa,MAAM,CAAC,CAAC;EACvBK,UAAU,EAAElB,CAAC,CAACmB,MAAM,CAAC;AACvB,CAAC,CAAC;AAcF;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GACzBC,IAAA;EAAA,IAAC;IACCC,gBAAgB;IAChBC;EAIF,CAAC,GAAAF,IAAA;EAAA,OACD,OACEG,WAAmB,EACnBC,yBAAiC,EAAAC,KAAA,KAUb;IAAA,IATpB;MACEC,YAAY;MACZC,YAAY;MACZC,QAAQ;MACRC,WAAW;MACXC,o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AC;;IAET;IACA,IAAIC,QAAQ,GAAG,IAAIC,eAAe,CAAC;MACjCV,SAAS,EAAEvB,QAAQ;MACnBkC,OAAO,EAAEjB;IACX,CAAC,CAAC;IAEFvC,MAAM,CAACyD,GAAG,CACR1D,QAAQ,CAAC2D,KAAK,EACb,2BAA0BzC,WAAY,KAAIqC,QAAS,EACtD,CAAC;IAED,OAAO,MAAMtC,QAAQ,CAACC,WAAW,EAAE;MACjC0C,MAAM,EAAE,MAAM;MACdC,OAAO,EAAE;QACP,cAAc,EAAE,mCAAmC;QACnD,0BAA0B,EAAE1C,yBAAyB;QACrD,8BAA8B,EAAEiB;MAClC,CAAC;MACD0B,IAAI,EAAEP,QAAQ,CAACQ,QAAQ,CAAC;IAC1B,CAAC,CAAC,CACCC,IAAI,CAACnE,gBAAgB,CAAC,GAAG,EAAEE,mBAAmB,CAAC,CAAC,CAChDiE,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC,CACzBF,IAAI,CAACtD,WAAW,CAACyD,KAAK,CAAC,CACvBH,IAAI,CAAEI,MAAM,IAAKA,MAAM,CAACzD,WAAW,CAAC;EACzC,CAAC;AAAA"}
@@ -12,7 +12,7 @@ import { SignJWT } from "@pagopa/io-react-native-jwt";
12
12
  export const createPopToken = async (payload, crypto) => {
13
13
  const kid = await crypto.getPublicKey().then(_ => _.kid);
14
14
  return new SignJWT(crypto).setPayload(payload).setProtectedHeader({
15
- typ: "jwt-client-attestation-pop",
15
+ typ: "oauth-client-attestation-pop+jwt",
16
16
  kid
17
17
  }).setIssuedAt().setExpirationTime("5min").sign();
18
18
  };
@@ -1 +1 @@
1
- {"version":3,"names":["z","SignJWT","createPopToken","payload","crypto","kid","getPublicKey","then","_","setPayload","setProtectedHeader","typ","setIssuedAt","setExpirationTime","sign","PoPPayload","object","jti","string","aud","iss"],"sourceRoot":"../../../src","sources":["utils/pop.ts"],"mappings":"AAAA,OAAO,KAAKA,CAAC,MAAM,KAAK;AAExB,SAASC,OAAO,QAA4B,6BAA6B;;AAEzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG,MAAAA,CAC5BC,OAAmB,EACnBC,MAAqB,KACD;EACpB,MAAMC,GAAG,GAAG,MAAMD,MAAM,CAACE,YAAY,CAAC,CAAC,CAACC,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACH,GAAG,CAAC;EAC1D,OAAO,IAAIJ,OAAO,CAACG,MAAM,CAAC,CACvBK,UAAU,CAACN,OAAO,CAAC,CACnBO,kBAAkB,CAAC;IAClBC,GAAG,EAAE,4BAA4B;IACjCN;EACF,CAAC,CAAC,CACDO,WAAW,CAAC,CAAC,CACbC,iBAAiB,CAAC,MAAM,CAAC,CACzBC,IAAI,CAAC,CAAC;AACX,CAAC;AAGD,OAAO,MAAMC,UAAU,GAAGf,CAAC,CAACgB,MAAM,CAAC;EACjCC,GAAG,EAAEjB,CAAC,CAACkB,MAAM,CAAC,CAAC;EACfC,GAAG,EAAEnB,CAAC,CAACkB,MAAM,CAAC,CAAC;EACfE,GAAG,EAAEpB,CAAC,CAACkB,MAAM,CAAC;AAChB,CAAC,CAAC"}
1
+ {"version":3,"names":["z","SignJWT","createPopToken","payload","crypto","kid","getPublicKey","then","_","setPayload","setProtectedHeader","typ","setIssuedAt","setExpirationTime","sign","PoPPayload","object","jti","string","aud","iss"],"sourceRoot":"../../../src","sources":["utils/pop.ts"],"mappings":"AAAA,OAAO,KAAKA,CAAC,MAAM,KAAK;AAExB,SAASC,OAAO,QAA4B,6BAA6B;;AAEzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG,MAAAA,CAC5BC,OAAmB,EACnBC,MAAqB,KACD;EACpB,MAAMC,GAAG,GAAG,MAAMD,MAAM,CAACE,YAAY,CAAC,CAAC,CAACC,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACH,GAAG,CAAC;EAC1D,OAAO,IAAIJ,OAAO,CAACG,MAAM,CAAC,CACvBK,UAAU,CAACN,OAAO,CAAC,CACnBO,kBAAkB,CAAC;IAClBC,GAAG,EAAE,kCAAkC;IACvCN;EACF,CAAC,CAAC,CACDO,WAAW,CAAC,CAAC,CACbC,iBAAiB,CAAC,MAAM,CAAC,CACzBC,IAAI,CAAC,CAAC;AACX,CAAC;AAGD,OAAO,MAAMC,UAAU,GAAGf,CAAC,CAACgB,MAAM,CAAC;EACjCC,GAAG,EAAEjB,CAAC,CAACkB,MAAM,CAAC,CAAC;EACfC,GAAG,EAAEnB,CAAC,CAACkB,MAAM,CAAC,CAAC;EACfE,GAAG,EAAEpB,CAAC,CAACkB,MAAM,CAAC;AAChB,CAAC,CAAC"}
@@ -34,10 +34,13 @@ export const WalletInstanceAttestationRequestJwt = z.object({
34
34
  hardware_key_tag: z.string()
35
35
  }))
36
36
  });
37
+
38
+ // TODO: [SIW-2089] add type for Wallet Attestation in SD-JWT and MDOC format
39
+ // See https://italia.github.io/eid-wallet-it-docs/versione-corrente/en/wallet-solution.html#wallet-attestation-issuance step 18
37
40
  export const WalletInstanceAttestationJwt = z.object({
38
41
  header: z.intersection(Jwt.shape.header, z.object({
39
42
  typ: z.literal("oauth-client-attestation+jwt"),
40
- trust_chain: z.array(z.string())
43
+ trust_chain: z.array(z.string()).optional()
41
44
  })),
42
45
  payload: z.intersection(Jwt.shape.payload, z.object({
43
46
  sub: z.string(),
@@ -1 +1 @@
1
- {"version":3,"names":["JWK","z","UnixTime","number","min","max","Jwt","object","header","alg","string","kid","typ","x5c","array","optional","trust_chain","payload","iss","iat","exp","cnf","jwk","intersection","WalletInstanceAttestationRequestJwt","shape","literal","aud","nonce","hardware_signature","integrity_assertion","hardware_key_tag","WalletInstanceAttestationJwt","sub","aal","wallet_link","wallet_name","WalletAttestationResponse","wallet_attestations","wallet_attestation","format","enum"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/types.ts"],"mappings":"AAAA,SAASA,GAAG,QAAQ,cAAc;AA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B,mBAAmB,EAAErC,CAAC,CAACa,KAAK,CAC1Bb,CAAC,CAACM,MAAM,CAAC;IACPgC,kBAAkB,EAAEtC,CAAC,CAACS,MAAM,CAAC,CAAC;IAC9B8B,MAAM,EAAEvC,CAAC,CAACwC,IAAI,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC;EACjD,CAAC,CACH;AACF,CAAC,CAAC"}
1
+ {"version":3,"names":["JWK","z","UnixTime","number","min","max","Jwt","object","header","alg","string","kid","typ","x5c","array","optional","trust_chain","payload","iss","iat","exp","cnf","jwk","intersection","WalletInstanceAttestationRequestJwt","shape","literal","aud","nonce","hardware_signature","integrity_assertion","hardware_key_tag","WalletInstanceAttestationJwt","sub","aal","wallet_link","wallet_name","WalletAttestationResponse","wallet_attestations","wallet_attestation","format","enum"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/types.ts"],"mappings":"AAAA,SAASA,GAAG,QAAQ,cAAc;AAClC,OAAO,KAAKC,CAAC,MAAM,KAAK;AAExB,MAAMC,QAAQ,GAAGD,CAAC,CAACE,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,aAAa,CAAC;AAGrD,MAAMC,GAAG,GAAGL,CAAC,CAACM,MAAM,CAAC;EACnBC,MAAM,EAAEP,CAAC,CAACM,MAAM,CAAC;IACfE,GAAG,EAAER,CAAC,CAACS,MAAM,CAAC,CAAC;IACfC,GAAG,EAAEV,CAAC,CAACS,MAAM,CAAC,CAAC;IACfE,GAAG,EAAEX,CAAC,CAACS,MAAM,CAAC,CAAC;IACfG,GAAG,EAAEZ,CAAC,CAACa,KAAK,CAACb,CAAC,CAACS,MAAM,CAAC,CAAC,CAAC,CAACK,QAAQ,CAAC,CAAC;IACnCC,WAAW,EAAEf,CAAC,CAACa,KAAK,CAACb,CAAC,CAACS,MAAM,CAAC,CAAC,CAAC,CAACK,QAAQ,CAAC;EAC5C,CAAC,CAAC;EACFE,OAAO,EAAEhB,C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AAC,CAACyB,OAAO,CAAC,8BAA8B,CAAC;IAC9CV,WAAW,EAAEf,CAAC,CAACa,KAAK,CAACb,CAAC,CAACS,MAAM,CAAC,CAAC,CAAC,CAACK,QAAQ,CAAC;EAC5C,CAAC,CACH,CAAC;EACDE,OAAO,EAAEhB,CAAC,CAACsB,YAAY,CACrBjB,GAAG,CAACmB,KAAK,CAACR,OAAO,EACjBhB,CAAC,CAACM,MAAM,CAAC;IACP0B,GAAG,EAAEhC,CAAC,CAACS,MAAM,CAAC,CAAC;IACfwB,GAAG,EAAEjC,CAAC,CAACS,MAAM,CAAC,CAAC;IACfyB,WAAW,EAAElC,CAAC,CAACS,MAAM,CAAC,CAAC,CAACK,QAAQ,CAAC,CAAC;IAClCqB,WAAW,EAAEnC,CAAC,CAACS,MAAM,CAAC,CAAC,CAACK,QAAQ,CAAC;EACnC,CAAC,CACH;AACF,CAAC,CAAC;AAKF,OAAO,MAAMsB,yBAAyB,GAAGpC,CAAC,CAACM,MAAM,CAAC;EAChD+B,mBAAmB,EAAErC,CAAC,CAACa,KAAK,CAC1Bb,CAAC,CAACM,MAAM,CAAC;IACPgC,kBAAkB,EAAEtC,CAAC,CAACS,MAAM,CAAC,CAAC;IAC9B8B,MAAM,EAAEvC,CAAC,CAACwC,IAAI,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC;EACjD,CAAC,CACH;AACF,CAAC,CAAC"}
@@ -21,20 +21,20 @@ export declare const WalletAttestationsView: z.ZodObject<{
21
21
  format: z.ZodUnion<[z.ZodLiteral<"jwt">, z.ZodLiteral<"dc+sd-jwt">]>;
22
22
  wallet_attestation: z.ZodString;
23
23
  }, "strip", z.ZodTypeAny, {
24
- format: "jwt" | "dc+sd-jwt";
24
+ format: "dc+sd-jwt" | "jwt";
25
25
  wallet_attestation: string;
26
26
  }, {
27
- format: "jwt" | "dc+sd-jwt";
27
+ format: "dc+sd-jwt" | "jwt";
28
28
  wallet_attestation: string;
29
29
  }>, "many">;
30
30
  }, "strip", z.ZodTypeAny, {
31
31
  wallet_attestations: {
32
- format: "jwt" | "dc+sd-jwt";
32
+ format: "dc+sd-jwt" | "jwt";
33
33
  wallet_attestation: string;
34
34
  }[];
35
35
  }, {
36
36
  wallet_attestations: {
37
- format: "jwt" | "dc+sd-jwt";
37
+ format: "dc+sd-jwt" | "jwt";
38
38
  wallet_attestation: string;
39
39
  }[];
40
40
  }>;
@@ -221,20 +221,20 @@ export declare const post_CreateWalletAttestationV2: {
221
221
  format: z.ZodUnion<[z.ZodLiteral<"jwt">, z.ZodLiteral<"dc+sd-jwt">]>;
222
222
  wallet_attestation: z.ZodString;
223
223
  }, "strip", z.ZodTypeAny, {
224
- format: "jwt" | "dc+sd-jwt";
224
+ format: "dc+sd-jwt" | "jwt";
225
225
  wallet_attestation: string;
226
226
  }, {
227
- format: "jwt" | "dc+sd-jwt";
227
+ format: "dc+sd-jwt" | "jwt";
228
228
  wallet_attestation: string;
229
229
  }>, "many">;
230
230
  }, "strip", z.ZodTypeAny, {
231
231
  wallet_attestations: {
232
- format: "jwt" | "dc+sd-jwt";
232
+ format: "dc+sd-jwt" | "jwt";
233
233
  wallet_attestation: string;
234
234
  }[];
235
235
  }, {
236
236
  wallet_attestations: {
237
- format: "jwt" | "dc+sd-jwt";
237
+ format: "dc+sd-jwt" | "jwt";
238
238
  wallet_attestation: string;
239
239
  }[];
240
240
  }>;
@@ -487,20 +487,20 @@ export declare const EndpointByMethod: {
487
487
  format: z.ZodUnion<[z.ZodLiteral<"jwt">, z.ZodLiteral<"dc+sd-jwt">]>;
488
488
  wallet_attestation: z.ZodString;
489
489
  }, "strip", z.ZodTypeAny, {
490
- format: "jwt" | "dc+sd-jwt";
490
+ format: "dc+sd-jwt" | "jwt";
491
491
  wallet_attestation: string;
492
492
  }, {
493
- format: "jwt" | "dc+sd-jwt";
493
+ format: "dc+sd-jwt" | "jwt";
494
494
  wallet_attestation: string;
495
495
  }>, "many">;
496
496
  }, "strip", z.ZodTypeAny, {
497
497
  wallet_attestations: {
498
- format: "jwt" | "dc+sd-jwt";
498
+ format: "dc+sd-jwt" | "jwt";
499
499
  wallet_attestation: string;
500
500
  }[];
501
501
  }, {
502
502
  wallet_attestations: {
503
- format: "jwt" | "dc+sd-jwt";
503
+ format: "dc+sd-jwt" | "jwt";
504
504
  wallet_attestation: string;
505
505
  }[];
506
506
  }>;
@@ -3,10 +3,10 @@
3
3
  * The beginning of the issuing flow.
4
4
  * To be implemented accordind to the user touchpoint
5
5
  *
6
- * @returns The type of the Credential to be issued and the url of the Issuer
6
+ * @returns The configuration ID of the Credential to be issued and the url of the Issuer
7
7
  */
8
8
  export type StartFlow = () => {
9
9
  issuerUrl: string;
10
- credentialType: string;
10
+ credentialId: string;
11
11
  };
12
12
  //# sourceMappingURL=01-start-flow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"01-start-flow.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/01-start-flow.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC"}
1
+ {"version":3,"file":"01-start-flow.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/01-start-flow.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import type { CryptoContext } from "@pagopa/io-react-native-jwt";
2
2
  import { type Out } from "../../utils/misc";
3
3
  import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
4
- import type { StartFlow } from "./01-start-flow";
5
4
  import { AuthorizationDetail } from "../../utils/par";
6
- export type StartUserAuthorization = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], credentialType: Out<StartFlow>["credentialType"], context: {
5
+ export type StartUserAuthorization = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], credentialIds: string[], context: {
7
6
  wiaCryptoContext: CryptoContext;
8
7
  walletInstanceAttestation: string;
9
8
  redirectUri: string;
@@ -12,13 +11,15 @@ export type StartUserAuthorization = (issuerConf: Out<EvaluateIssuerTrust>["issu
12
11
  issuerRequestUri: string;
13
12
  clientId: string;
14
13
  codeVerifier: string;
15
- credentialDefinition: AuthorizationDetail;
14
+ credentialDefinition: AuthorizationDetail[];
16
15
  }>;
17
16
  /**
18
17
  * WARNING: This function must be called after {@link evaluateIssuerTrust} and {@link startFlow}. The next steam is {@link compeUserAuthorizationWithQueryMode} or {@link compeUserAuthorizationWithFormPostJwtMode}
18
+ *
19
19
  * Creates and sends a PAR request to the /as/par endpoint of the authorization server.
20
20
  * This starts the authentication flow to obtain an access token.
21
- * This token enables the Wallet Instance to request a digital credential from the Credential Endpoint of the Credential Issuer.
21
+ * This token enables the Wallet Instance to request a digital credential from the Credential Endpoint of the Credential Issuer; when multiple credential types are passed,
22
+ * it is possible to use the same access token for the issuance of all requested credentials.
22
23
  * This is an HTTP POST request containing the Wallet Instance identifier (client id), the code challenge and challenge method as specified by PKCE according to RFC 9126
23
24
  * along with the WTE and its proof of possession (WTE-PoP).
24
25
  * Additionally, it includes a request object, which is a signed JWT encapsulating the type of digital credential requested (authorization_details),
@@ -28,9 +29,9 @@ export type StartUserAuthorization = (issuerConf: Out<EvaluateIssuerTrust>["issu
28
29
  * to the Wallet Instance's Token Endpoint to obtain the Access Token, and the redirectUri of the Wallet Instance where the Authorization Response
29
30
  * should be delivered. The redirect is achived by using a custom URL scheme that the Wallet Instance is registered to handle.
30
31
  * @param issuerConf The issuer configuration
31
- * @param credentialType The type of the credential to be requested returned by {@link selectCredentialDefinition}
32
+ * @param credentialIds The credential configuration IDs to be requested
32
33
  * @param ctx The context object containing the Wallet Instance's cryptographic context, the Wallet Instance's attestation, the redirect URI and the fetch implementation
33
- * @returns The URI to which the end user should be redirected to start the authentication flow, along with the client id, the code verifier and the credential definition
34
+ * @returns The URI to which the end user should be redirected to start the authentication flow, along with the client id, the code verifier and the credential definition(s)
34
35
  */
35
36
  export declare const startUserAuthorization: StartUserAuthorization;
36
37
  //# sourceMappingURL=03-start-user-authorization.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"03-start-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/03-start-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAoC,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAkB,MAAM,iBAAiB,CAAC;AAItE,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,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,mBAAmB,CAAC;CAC3C,CAAC,CAAC;AAsEH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB,EAAE,sBA0CpC,CAAC"}
1
+ {"version":3,"file":"03-start-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/03-start-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAoC,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAkB,MAAM,iBAAiB,CAAC;AAGtE,MAAM,MAAM,sBAAsB,GAAG,CACnC,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,aAAa,EAAE,MAAM,EAAE,EACvB,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,yBAAyB,EAAE,MAAM,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;CAC7C,CAAC,CAAC;AAqFH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,eAAO,MAAM,sBAAsB,EAAE,sBA4CpC,CAAC"}
@@ -8,11 +8,9 @@ import { RequestObject } from "../presentation/types";
8
8
  * The interface of the phase to complete User authorization via strong identification when the response mode is "query" and the request credential is a PersonIdentificationData.
9
9
  */
10
10
  export type CompleteUserAuthorizationWithQueryMode = (authRedirectUrl: string) => Promise<AuthorizationResult>;
11
- export type CompleteUserAuthorizationWithFormPostJwtMode = (requestObject: Out<GetRequestedCredentialToBePresented>, context: {
11
+ export type CompleteUserAuthorizationWithFormPostJwtMode = (requestObject: Out<GetRequestedCredentialToBePresented>, pid: string, context: {
12
12
  wiaCryptoContext: CryptoContext;
13
13
  pidCryptoContext: CryptoContext;
14
- pid: string;
15
- walletInstanceAttestation: string;
16
14
  appFetch?: GlobalFetch["fetch"];
17
15
  }) => Promise<AuthorizationResult>;
18
16
  export type GetRequestedCredentialToBePresented = (issuerRequestUri: Out<StartUserAuthorization>["issuerRequestUri"], clientId: Out<StartUserAuthorization>["clientId"], issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], appFetch?: GlobalFetch["fetch"]) => Promise<RequestObject>;
@@ -51,18 +49,13 @@ export declare const completeUserAuthorizationWithQueryMode: CompleteUserAuthori
51
49
  */
52
50
  export declare const getRequestedCredentialToBePresented: GetRequestedCredentialToBePresented;
53
51
  /**
54
- * WARNING: This function must be called after {@link startUserAuthorization}. The next function to be called is {@link completeUserAuthorizationWithFormPostJwtMode}.
52
+ * WARNING: This function must be called after {@link getRequestedCredentialToBePresented}. The next function to be called is {@link authorizeAccess}.
55
53
  * The interface of the phase to complete User authorization via presentation of existing credentials when the response mode is "form_post.jwt".
56
- * It is used as a first step to complete the user authorization by obtaining the requested credential to be presented from the authorization server.
57
- * The information is obtained by performing a GET request to the authorization endpoint with request_uri and client_id parameters.
58
- * @param issuerRequestUri the URI of the issuer where the request is sent
59
- * @param clientId Identifies the current client across all the requests of the issuing flow returned by {@link startUserAuthorization}
60
- * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
61
- * @param context.walletInstanceAccestation the Wallet Instance's attestation to be presented
62
- * @param context.pid the PID to be presented
63
- * @param context.wiaCryptoContext The Wallet Instance's crypto context associated with the walletInstanceAttestation parameter
64
- * @param context.pidCryptoContext The PID crypto context associated with the pid parameter
65
- * @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
54
+ * The information is obtained by performing a POST request to the endpoint received in the response_uri field of the requestObject, where the Authorization Response payload is posted.
55
+ * Following this,the redirect_uri from the response is used to obtain the final authorization response.
56
+ * @param requestObject - The request object containing the necessary parameters for authorization.
57
+ * @param pid The `PID` that must be presented for the issuance of credentials.
58
+ * @param appFetch (optional) fetch api implementation. Default: built-in fetch
66
59
  * @throws {ValidationFailed} if an error while validating the response
67
60
  * @returns the authorization response which contains code, state and iss
68
61
  */
@@ -1 +1 @@
1
- {"version":3,"file":"04-complete-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/04-complete-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAG5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAOtD;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,CACnD,eAAe,EAAE,MAAM,KACpB,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,MAAM,4CAA4C,GAAG,CACzD,aAAa,EAAE,GAAG,CAAC,mCAAmC,CAAC,EACvD,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,gBAAgB,EAAE,aAAa,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,MAAM,mCAAmC,GAAG,CAChD,gBAAgB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,kBAAkB,CAAC,EACjE,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,KAC5B,OAAO,CAAC,aAAa,CAAC,CAAC;AAE5B,MAAM,MAAM,qBAAqB,GAAG,CAClC,gBAAgB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,kBAAkB,CAAC,EACjE,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,OAAO,CAAC,EAAE,MAAM,KACb,OAAO,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAAE,qBAqBnC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sCAAsC,EAAE,sCASlD,CAAC;AAEJ;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mCAAmC,EAAE,mCAsC/C,CAAC;AAEJ;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,4CAA4C,EAAE,4CAgIxD,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,YAC5B,OAAO,KACf,mBAqBF,CAAC"}
1
+ {"version":3,"file":"04-complete-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/04-complete-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAG5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAA2B,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAQ/E;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,CACnD,eAAe,EAAE,MAAM,KACpB,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MA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AAO,KACf,mBAqBF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"05-authorize-access.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/05-authorize-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAK5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,kCAAkC,CAAC;AAG/F,MAAM,MAAM,eAAe,GAAG,CAC5B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,IAAI,EAAE,GAAG,CAAC,sCAAsC,CAAC,CAAC,MAAM,CAAC,EACzD,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,YAAY,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,cAAc,CAAC,EACzD,OAAO,EAAE;IACP,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,gBAAgB,EAAE,aAAa,CAAC;IAChC,iBAAiB,EAAE,aAAa,CAAC;CAClC,KACE,OAAO,CAAC;IAAE,WAAW,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,EAAE,eAwF7B,CAAC"}
1
+ {"version":3,"file":"05-authorize-access.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/05-authorize-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAK5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,kCAAkC,CAAC;AAG/F,MAAM,MAAM,eAAe,GAAG,CAC5B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,IAAI,EAAE,GAAG,CAAC,sCAAsC,CAAC,CAAC,MAAM,CAAC,EACzD,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,YAAY,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,cAAc,CAAC,EACzD,OAAO,EAAE;IACP,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,gBAAgB,EAAE,aAAa,CAAC;IAChC,iBAAiB,EAAE,aAAa,CAAC;CAClC,KACE,OAAO,CAAC;IAAE,WAAW,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,EAAE,eAmF7B,CAAC"}
@@ -3,12 +3,17 @@ import type { AuthorizeAccess } from "./05-authorize-access";
3
3
  import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
4
4
  import { type Out } from "../../utils/misc";
5
5
  import type { StartUserAuthorization } from "./03-start-user-authorization";
6
- import { CredentialResponse } from "./types";
7
- export type ObtainCredential = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], accessToken: Out<AuthorizeAccess>["accessToken"], clientId: Out<StartUserAuthorization>["clientId"], credentialDefinition: Out<StartUserAuthorization>["credentialDefinition"], context: {
6
+ export type ObtainCredential = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], accessToken: Out<AuthorizeAccess>["accessToken"], clientId: Out<StartUserAuthorization>["clientId"], credentialDefinition: {
7
+ credential_configuration_id: string;
8
+ credential_identifier?: string;
9
+ }, context: {
8
10
  dPopCryptoContext: CryptoContext;
9
11
  credentialCryptoContext: CryptoContext;
10
12
  appFetch?: GlobalFetch["fetch"];
11
- }, operationType?: "reissuing") => Promise<CredentialResponse>;
13
+ }, operationType?: "reissuing") => Promise<{
14
+ credential: string;
15
+ format: string;
16
+ }>;
12
17
  export declare const createNonceProof: (nonce: string, issuer: string, audience: string, ctx: CryptoContext) => Promise<string>;
13
18
  /**
14
19
  * Obtains the credential from the issuer.
@@ -19,11 +24,11 @@ export declare const createNonceProof: (nonce: string, issuer: string, audience:
19
24
  * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
20
25
  * @param accessToken The access token response returned by {@link authorizeAccess}
21
26
  * @param clientId The client id returned by {@link startUserAuthorization}
22
- * @param credentialDefinition The credential definition of the credential to be obtained returned by {@link startUserAuthorization}
23
- * @param tokenRequestSignedDPop The DPoP signed token request returned by {@link authorizeAccess}
27
+ * @param credentialDefinition The credential definition of the credential to be obtained returned by {@link authorizeAccess}
24
28
  * @param context.credentialCryptoContext The crypto context used to obtain the credential
25
29
  * @param context.dPopCryptoContext The DPoP crypto context
26
30
  * @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
31
+ * @param operationType Specify the type of credential issuance (used for reissuing)
27
32
  * @returns The credential response containing the credential
28
33
  */
29
34
  export declare const obtainCredential: ObtainCredential;
@@ -1 +1 @@
1
- {"version":3,"file":"06-obtain-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/06-obtain-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAQ5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAK7C,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,WAAW,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,EAChD,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,oBAAoB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,EACzE,OAAO,EAAE;IACP,iBAAiB,EAAE,aAAa,CAAC;IACjC,uBAAuB,EAAE,aAAa,CAAC;IACvC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,EACD,aAAa,CAAC,EAAE,WAAW,KACxB,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC,eAAO,MAAM,gBAAgB,UACpB,MAAM,UACL,MAAM,YACJ,MAAM,OACX,aAAa,KACjB,QAAQ,MAAM,CAehB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBA+G9B,CAAC"}
1
+ {"version":3,"file":"06-obtain-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/06-obtain-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAa5E,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,WAAW,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,EAChD,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,oBAAoB,EAAE;IACpB,2BAA2B,EAAE,MAAM,CAAC;IACpC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,EACD,OAAO,EAAE;IACP,iBAAiB,EAAE,aAAa,CAAC;IACjC,uBAAuB,EAAE,aAAa,CAAC;IACvC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,EACD,aAAa,CAAC,EAAE,WAAW,KACxB,OAAO,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH,eAAO,MAAM,gBAAgB,UACpB,MAAM,UACL,MAAM,YACJ,MAAM,OACX,aAAa,KACjB,QAAQ,MAAM,CAehB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBA0I9B,CAAC"}
@@ -2,7 +2,8 @@ import type { CryptoContext } from "@pagopa/io-react-native-jwt";
2
2
  import type { Out } from "../../utils/misc";
3
3
  import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
4
4
  import type { ObtainCredential } from "./06-obtain-credential";
5
- export type VerifyAndParseCredential = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], credential: Out<ObtainCredential>["credential"], format: Out<ObtainCredential>["format"], context: {
5
+ type IssuerConf = Out<EvaluateIssuerTrust>["issuerConf"];
6
+ export type VerifyAndParseCredential = (issuerConf: IssuerConf, credential: Out<ObtainCredential>["credential"], credentialConfigurationId: string, context: {
6
7
  credentialCryptoContext: CryptoContext;
7
8
  /**
8
9
  * Do not throw an error when an attribute is not found within disclosures.
@@ -29,7 +30,7 @@ string, {
29
30
  * Verify and parse an encoded credential.
30
31
  * @param issuerConf The Issuer configuration returned by {@link evaluateIssuerTrust}
31
32
  * @param credential The encoded credential returned by {@link obtainCredential}
32
- * @param format The format of the credentual returned by {@link obtainCredential}
33
+ * @param credentialConfigurationId The credential configuration ID that defines the provided credential
33
34
  * @param context.credentialCryptoContext The crypto context used to obtain the credential in {@link obtainCredential}
34
35
  * @param context.ignoreMissingAttributes Skip error when attributes declared in the issuer configuration are not found within disclosures
35
36
  * @param context.includeUndefinedAttributes Include attributes not explicitly declared in the issuer configuration
@@ -1 +1 @@
1
- {"version":3,"file":"07-verify-and-parse-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/07-verify-and-parse-credential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAMtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/D,MAAM,MAAM,wBAAwB,GAAG,CACrC,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,EAC/C,MAAM,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,EACvC,OAAO,EAAE;IACP,uBAAuB,EAAE,aAAa,CAAC;IACvC;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC,KACE,OAAO,CAAC;IACX,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,UAAU,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,IAAI,GAAG,SAAS,CAAC;CAC5B,CAAC,CAAC;AAGH,KAAK,gBAAgB,GAAG,MAAM;AAC5B,oBAAoB;AACpB,MAAM,EACN;IACE,2CAA2C;IAC3C,IAAI,EACA,yBAAyB,CAAC,MAAM,CAC9B,MAAM,EACN,MAAM,CACP,GACD,4BAA4B,CAAC,MAAM,GACnC,SAAS,CAAC;IACd,wCAAwC;IACxC,KAAK,EAAE,OAAO,CAAC;CAChB,CACF,CAAC;AAyMF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,EAAE,wBAkBtC,CAAC"}
1
+ {"version":3,"file":"07-verify-and-parse-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/07-verify-and-parse-credential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAMtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/D,KAAK,UAAU,GAAG,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,CAAC;AAIzD,MAAM,MAAM,wBAAwB,GAAG,CACrC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,EAC/C,yBAAyB,EAAE,MAAM,EACjC,OAAO,EAAE;IACP,uBAAuB,EAAE,aAAa,CAAC;IACvC;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC,KACE,OAAO,CAAC;IACX,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,UAAU,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,IAAI,GAAG,SAAS,CAAC;CAC5B,CAAC,CAAC;AAGH,KAAK,gBAAgB,GAAG,MAAM;AAC5B,oBAAoB;AACpB,MAAM,EACN;IACE,2CAA2C;IAC3C,IAAI,EACA,yBAAyB,CAAC,MAAM,CAC9B,MAAM,EACN,MAAM,CACP,GACD,4BAA4B,CAAC,MAAM,GACnC,SAAS,CAAC;IACd,wCAAwC;IACxC,KAAK,EAAE,OAAO,CAAC;CAChB,CACF,CAAC;AAuLF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,EAAE,wBAwBtC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import * as z from "zod";
2
2
  export declare const ASSERTION_TYPE = "urn:ietf:params:oauth:client-assertion-type:jwt-client-attestation";
3
3
  export type SupportedCredentialFormat = z.infer<typeof SupportedCredentialFormat>;
4
- export declare const SupportedCredentialFormat: z.ZodUnion<[z.ZodLiteral<"vc+sd-jwt">, z.ZodLiteral<"vc+mdoc-cbor">]>;
4
+ export declare const SupportedCredentialFormat: z.ZodUnion<[z.ZodLiteral<"dc+sd-jwt">, z.ZodLiteral<"vc+mdoc-cbor">]>;
5
5
  //# sourceMappingURL=const.d.ts.map
@@ -1,63 +1,78 @@
1
1
  import * as z from "zod";
2
+ export type AuthorizationDetail = z.infer<typeof AuthorizationDetail>;
3
+ export declare const AuthorizationDetail: z.ZodObject<{
4
+ type: z.ZodLiteral<"openid_credential">;
5
+ credential_configuration_id: z.ZodString;
6
+ credential_identifiers: z.ZodArray<z.ZodString, "many">;
7
+ }, "strip", z.ZodTypeAny, {
8
+ type: "openid_credential";
9
+ credential_configuration_id: string;
10
+ credential_identifiers: string[];
11
+ }, {
12
+ type: "openid_credential";
13
+ credential_configuration_id: string;
14
+ credential_identifiers: string[];
15
+ }>;
2
16
  export type TokenResponse = z.infer<typeof TokenResponse>;
3
17
  export declare const TokenResponse: z.ZodObject<{
4
18
  access_token: z.ZodString;
19
+ refresh_token: z.ZodOptional<z.ZodString>;
5
20
  authorization_details: z.ZodArray<z.ZodObject<{
6
- credential_configuration_id: z.ZodString;
7
- format: z.ZodUnion<[z.ZodLiteral<"vc+sd-jwt">, z.ZodLiteral<"vc+mdoc-cbor">]>;
8
21
  type: z.ZodLiteral<"openid_credential">;
22
+ credential_configuration_id: z.ZodString;
23
+ credential_identifiers: z.ZodArray<z.ZodString, "many">;
9
24
  }, "strip", z.ZodTypeAny, {
10
25
  type: "openid_credential";
11
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
12
26
  credential_configuration_id: string;
27
+ credential_identifiers: string[];
13
28
  }, {
14
29
  type: "openid_credential";
15
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
16
30
  credential_configuration_id: string;
31
+ credential_identifiers: string[];
17
32
  }>, "many">;
18
- c_nonce: z.ZodString;
19
- c_nonce_expires_in: z.ZodNumber;
20
33
  expires_in: z.ZodNumber;
21
34
  token_type: z.ZodString;
22
35
  }, "strip", z.ZodTypeAny, {
36
+ access_token: string;
23
37
  authorization_details: {
24
38
  type: "openid_credential";
25
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
26
39
  credential_configuration_id: string;
40
+ credential_identifiers: string[];
27
41
  }[];
28
- access_token: string;
29
- c_nonce: string;
30
- c_nonce_expires_in: number;
31
42
  expires_in: number;
32
43
  token_type: string;
44
+ refresh_token?: string | undefined;
33
45
  }, {
46
+ access_token: string;
34
47
  authorization_details: {
35
48
  type: "openid_credential";
36
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
37
49
  credential_configuration_id: string;
50
+ credential_identifiers: string[];
38
51
  }[];
39
- access_token: string;
40
- c_nonce: string;
41
- c_nonce_expires_in: number;
42
52
  expires_in: number;
43
53
  token_type: string;
54
+ refresh_token?: string | undefined;
44
55
  }>;
45
56
  export type CredentialResponse = z.infer<typeof CredentialResponse>;
46
57
  export declare const CredentialResponse: z.ZodObject<{
47
- c_nonce: z.ZodString;
48
- c_nonce_expires_in: z.ZodNumber;
49
- credential: z.ZodString;
50
- format: z.ZodUnion<[z.ZodLiteral<"vc+sd-jwt">, z.ZodLiteral<"vc+mdoc-cbor">]>;
58
+ credentials: z.ZodArray<z.ZodObject<{
59
+ credential: z.ZodString;
60
+ }, "strip", z.ZodTypeAny, {
61
+ credential: string;
62
+ }, {
63
+ credential: string;
64
+ }>, "many">;
65
+ notification_id: z.ZodOptional<z.ZodString>;
51
66
  }, "strip", z.ZodTypeAny, {
52
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
53
- c_nonce: string;
54
- c_nonce_expires_in: number;
55
- credential: string;
67
+ credentials: {
68
+ credential: string;
69
+ }[];
70
+ notification_id?: string | undefined;
56
71
  }, {
57
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
58
- c_nonce: string;
59
- c_nonce_expires_in: number;
60
- credential: string;
72
+ credentials: {
73
+ credential: string;
74
+ }[];
75
+ notification_id?: string | undefined;
61
76
  }>;
62
77
  /**
63
78
  * Shape from parsing a response given by a request uri during the EAA credential issuance flow with response mode "form_post.jwt".
@@ -70,4 +85,12 @@ export declare const ResponseUriResultShape: z.ZodObject<{
70
85
  redirect_uri: string;
71
86
  }>;
72
87
  export type ResponseMode = "query" | "form_post.jwt";
88
+ export type NonceResponse = z.infer<typeof NonceResponse>;
89
+ export declare const NonceResponse: z.ZodObject<{
90
+ c_nonce: z.ZodString;
91
+ }, "strip", z.ZodTypeAny, {
92
+ c_nonce: string;
93
+ }, {
94
+ c_nonce: string;
95
+ }>;
73
96
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMxB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;EAO7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,CAAC;AAErD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,eAAO,MAAM,aAAa;;;;;;EAExB,CAAC"}
@@ -5,14 +5,14 @@ declare const PresentationParams: z.ZodObject<{
5
5
  request_uri_method: z.ZodEnum<["get", "post"]>;
6
6
  state: z.ZodOptional<z.ZodString>;
7
7
  }, "strip", z.ZodTypeAny, {
8
+ request_uri_method: "get" | "post";
8
9
  client_id: string;
9
10
  request_uri: string;
10
- request_uri_method: "get" | "post";
11
11
  state?: string | undefined;
12
12
  }, {
13
+ request_uri_method: "get" | "post";
13
14
  client_id: string;
14
15
  request_uri: string;
15
- request_uri_method: "get" | "post";
16
16
  state?: string | undefined;
17
17
  }>;
18
18
  export type PresentationParams = z.infer<typeof PresentationParams>;
@@ -1,6 +1,7 @@
1
1
  import { DcqlQuery } from "dcql";
2
2
  import type { Disclosure } from "../../sd-jwt/types";
3
3
  import type { RemotePresentation } from "./types";
4
+ import type { CryptoContext } from "@pagopa/io-react-native-jwt";
4
5
  /**
5
6
  * The purpose for the credential request by the RP.
6
7
  */
@@ -8,18 +9,18 @@ type CredentialPurpose = {
8
9
  required: boolean;
9
10
  description?: string;
10
11
  };
11
- export type EvaluateDcqlQuery = (credentialsSdJwt: [string, string][], query: DcqlQuery.Input) => {
12
+ export type EvaluateDcqlQuery = (credentialsSdJwt: [CryptoContext, string][], query: DcqlQuery.Input) => {
12
13
  id: string;
13
14
  vct: string;
14
15
  credential: string;
15
- keyTag: string;
16
+ cryptoContext: CryptoContext;
16
17
  requiredDisclosures: Disclosure[];
17
18
  purposes: CredentialPurpose[];
18
19
  }[];
19
20
  export type PrepareRemotePresentations = (credentials: {
20
21
  id: string;
21
22
  credential: string;
22
- keyTag: string;
23
+ cryptoContext: CryptoContext;
23
24
  requestedClaims: string[];
24
25
  }[], nonce: string, clientId: string) => Promise<RemotePresentation[]>;
25
26
  export declare const evaluateDcqlQuery: EvaluateDcqlQuery;
@@ -1 +1 @@
1
- {"version":3,"file":"07-evaluate-dcql-query.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/07-evaluate-dcql-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA8B,MAAM,MAAM,CAAC;AAG7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD;;GAEG;AACH,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAC9B,gBAAgB,EAAE,CAAC,MAAM,EAAe,MAAM,CAAkB,EAAE,EAClE,KAAK,EAAE,SAAS,CAAC,KAAK,KACnB;IACH,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,UAAU,EAAE,CAAC;IAClC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B,EAAE,CAAC;AAEJ,MAAM,MAAM,0BAA0B,GAAG,CACvC,WAAW,EAAE;IACX,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,EAAE,EACH,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,KACb,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;AAwEnC,eAAO,MAAM,iBAAiB,EAAE,iBAkE/B,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,0BAqBxC,CAAC"}
1
+ {"version":3,"file":"07-evaluate-dcql-query.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/07-evaluate-dcql-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA8B,MAAM,MAAM,CAAC;AAG7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE;;GAEG;AACH,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAC9B,gBAAgB,EAAE,CAAC,aAAa,EAAE,MAAM,CAAkB,EAAE,EAC5D,KAAK,EAAE,SAAS,CAAC,KAAK,KACnB;IACH,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,aAAa,CAAC;IAC7B,mBAAmB,EAAE,UAAU,EAAE,CAAC;IAClC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B,EAAE,CAAC;AAEJ,MAAM,MAAM,0BAA0B,GAAG,CACvC,WAAW,EAAE;IACX,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,aAAa,CAAC;IAC7B,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,EAAE,EACH,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,KACb,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;AAsEnC,eAAO,MAAM,iBAAiB,EAAE,iBAoE/B,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,0BAoBxC,CAAC"}
@@ -1,16 +1,20 @@
1
1
  import { InputDescriptor, type LegacyRemotePresentation } from "./types";
2
2
  import { SdJwt4VC, type DisclosureWithEncoded } from "../../sd-jwt/types";
3
+ import type { CryptoContext } from "@pagopa/io-react-native-jwt";
3
4
  export type EvaluatedDisclosures = {
4
5
  requiredDisclosures: DisclosureWithEncoded[];
5
6
  optionalDisclosures: DisclosureWithEncoded[];
6
7
  unrequestedDisclosures: DisclosureWithEncoded[];
7
8
  };
8
9
  export type EvaluateInputDescriptorSdJwt4VC = (inputDescriptor: InputDescriptor, payloadCredential: SdJwt4VC["payload"], disclosures: DisclosureWithEncoded[]) => EvaluatedDisclosures;
9
- export type EvaluateInputDescriptors = (descriptors: InputDescriptor[], credentialsSdJwt: [string, string][]) => Promise<{
10
+ export type EvaluateInputDescriptors = (descriptors: InputDescriptor[], credentialsSdJwt: [
11
+ CryptoContext,
12
+ string
13
+ ][]) => Promise<{
10
14
  evaluatedDisclosure: EvaluatedDisclosures;
11
15
  inputDescriptor: InputDescriptor;
12
16
  credential: string;
13
- keyTag: string;
17
+ cryptoContext: CryptoContext;
14
18
  }[]>;
15
19
  /**
16
20
  * @deprecated Use `prepareRemotePresentations` from DCQL
@@ -19,7 +23,7 @@ export type PrepareLegacyRemotePresentations = (credentialAndDescriptors: {
19
23
  requestedClaims: string[];
20
24
  inputDescriptor: InputDescriptor;
21
25
  credential: string;
22
- keyTag: string;
26
+ cryptoContext: CryptoContext;
23
27
  }[], nonce: string, client_id: string) => Promise<LegacyRemotePresentation[]>;
24
28
  /**
25
29
  * Evaluates an InputDescriptor for an SD-JWT-based verifiable credential.
@@ -41,7 +45,7 @@ export type PrepareLegacyRemotePresentations = (credentialAndDescriptors: {
41
45
  */
42
46
  export declare const evaluateInputDescriptorForSdJwt4VC: EvaluateInputDescriptorSdJwt4VC;
43
47
  type DecodedCredentialSdJwt = {
44
- keyTag: string;
48
+ cryptoContext: CryptoContext;
45
49
  credential: string;
46
50
  sdJwt: SdJwt4VC;
47
51
  disclosures: DisclosureWithEncoded[];
@@ -54,8 +58,8 @@ type DecodedCredentialSdJwt = {
54
58
  */
55
59
  export declare const findCredentialSdJwt: (inputDescriptor: InputDescriptor, decodedSdJwtCredentials: DecodedCredentialSdJwt[]) => {
56
60
  matchedEvaluation: EvaluatedDisclosures;
57
- matchedKeyTag: string;
58
61
  matchedCredential: string;
62
+ cryptoContext: CryptoContext;
59
63
  };
60
64
  /**
61
65
  * Evaluates multiple input descriptors against provided SD-JWT and MDOC credentials.