@pagopa/io-react-native-wallet 2.0.0-next.2 → 2.0.0-next.3
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.
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js +38 -24
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/05-authorize-access.js +6 -10
- package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
- package/lib/commonjs/credential/issuance/06-obtain-credential.js +43 -11
- package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +51 -48
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/README.md +34 -13
- package/lib/commonjs/credential/issuance/const.js +1 -1
- package/lib/commonjs/credential/issuance/types.js +16 -10
- package/lib/commonjs/credential/issuance/types.js.map +1 -1
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +4 -4
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +3 -3
- package/lib/commonjs/credential/status/README.md +0 -1
- package/lib/commonjs/sd-jwt/__test__/index.test.js +11 -15
- package/lib/commonjs/sd-jwt/__test__/index.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/types.test.js +5 -2
- package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/utils.test.js +37 -0
- package/lib/commonjs/sd-jwt/__test__/utils.test.js.map +1 -0
- package/lib/commonjs/sd-jwt/index.js +20 -0
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/sd-jwt/types.js +51 -4
- package/lib/commonjs/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/utils.js +64 -0
- package/lib/commonjs/sd-jwt/utils.js.map +1 -0
- package/lib/commonjs/trust/types.js +18 -13
- package/lib/commonjs/trust/types.js.map +1 -1
- package/lib/commonjs/utils/par.js +32 -22
- package/lib/commonjs/utils/par.js.map +1 -1
- package/lib/commonjs/utils/pop.js +1 -1
- package/lib/commonjs/utils/pop.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/types.js +5 -1
- package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
- package/lib/module/credential/issuance/03-start-user-authorization.js +38 -24
- package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/05-authorize-access.js +6 -10
- package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
- package/lib/module/credential/issuance/06-obtain-credential.js +44 -12
- package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js +51 -48
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/module/credential/issuance/README.md +34 -13
- package/lib/module/credential/issuance/const.js +1 -1
- package/lib/module/credential/issuance/types.js +12 -8
- package/lib/module/credential/issuance/types.js.map +1 -1
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js +4 -4
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +3 -3
- package/lib/module/credential/status/README.md +0 -1
- package/lib/module/sd-jwt/__test__/index.test.js +11 -16
- package/lib/module/sd-jwt/__test__/index.test.js.map +1 -1
- package/lib/module/sd-jwt/__test__/types.test.js +5 -2
- package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/module/sd-jwt/__test__/utils.test.js +35 -0
- package/lib/module/sd-jwt/__test__/utils.test.js.map +1 -0
- package/lib/module/sd-jwt/index.js +1 -0
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/sd-jwt/types.js +50 -3
- package/lib/module/sd-jwt/types.js.map +1 -1
- package/lib/module/sd-jwt/utils.js +57 -0
- package/lib/module/sd-jwt/utils.js.map +1 -0
- package/lib/module/trust/types.js +18 -13
- package/lib/module/trust/types.js.map +1 -1
- package/lib/module/utils/par.js +29 -20
- package/lib/module/utils/par.js.map +1 -1
- package/lib/module/utils/pop.js +1 -1
- package/lib/module/utils/pop.js.map +1 -1
- package/lib/module/wallet-instance-attestation/types.js +5 -1
- package/lib/module/wallet-instance-attestation/types.js.map +1 -1
- package/lib/typescript/client/generated/wallet-provider.d.ts +12 -12
- package/lib/typescript/credential/issuance/01-start-flow.d.ts +2 -2
- package/lib/typescript/credential/issuance/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +7 -6
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +10 -5
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +3 -2
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/const.d.ts +1 -1
- package/lib/typescript/credential/issuance/types.d.ts +46 -26
- package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
- package/lib/typescript/pid/sd-jwt/types.d.ts +7 -7
- package/lib/typescript/sd-jwt/__test__/utils.test.d.ts +2 -0
- package/lib/typescript/sd-jwt/__test__/utils.test.d.ts.map +1 -0
- package/lib/typescript/sd-jwt/index.d.ts +21 -8
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +194 -12
- package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/utils.d.ts +18 -0
- package/lib/typescript/sd-jwt/utils.d.ts.map +1 -0
- package/lib/typescript/trust/build-chain.d.ts +30 -14
- package/lib/typescript/trust/build-chain.d.ts.map +1 -1
- package/lib/typescript/trust/types.d.ts +322 -158
- package/lib/typescript/trust/types.d.ts.map +1 -1
- package/lib/typescript/utils/par.d.ts +29 -13
- package/lib/typescript/utils/par.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/types.d.ts +9 -9
- package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/credential/issuance/01-start-flow.ts +2 -2
- package/src/credential/issuance/03-start-user-authorization.ts +57 -38
- package/src/credential/issuance/05-authorize-access.ts +5 -11
- package/src/credential/issuance/06-obtain-credential.ts +53 -23
- package/src/credential/issuance/07-verify-and-parse-credential.ts +54 -62
- package/src/credential/issuance/README.md +34 -13
- package/src/credential/issuance/const.ts +1 -1
- package/src/credential/issuance/types.ts +18 -8
- package/src/credential/presentation/07-evaluate-dcql-query.ts +4 -4
- package/src/credential/presentation/07-evaluate-input-descriptor.ts +3 -3
- package/src/credential/status/README.md +0 -1
- package/src/sd-jwt/__test__/index.test.ts +8 -29
- package/src/sd-jwt/__test__/types.test.ts +6 -2
- package/src/sd-jwt/__test__/utils.test.ts +37 -0
- package/src/sd-jwt/index.ts +2 -0
- package/src/sd-jwt/types.ts +49 -2
- package/src/sd-jwt/utils.ts +73 -0
- package/src/trust/types.ts +23 -17
- package/src/utils/par.ts +37 -21
- package/src/utils/pop.ts +1 -1
- package/src/wallet-instance-attestation/types.ts +3 -1
@@ -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,
|
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,11 +34,15 @@ 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() // TODO: [SIW-2264] Make mandatory
|
41
44
|
})),
|
45
|
+
|
42
46
|
payload: z.intersection(Jwt.shape.payload, z.object({
|
43
47
|
sub: z.string(),
|
44
48
|
aal: 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;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,CAAC,CAACM,MAAM,CAAC;IAChBW,GAAG,EAAEjB,CAAC,CAACS,MAAM,CAAC,CAAC;IACfS,GAAG,EAAEjB,QAAQ;IACbkB,GAAG,EAAElB,QAAQ;IACbmB,GAAG,EAAEpB,CAAC,CAACM,MAAM,CAAC;MACZe,GAAG,EAAErB,CAAC,CAACsB,YAAY,CACjBvB,GAAG;MACH;MACAC,CAAC,CAACM,MAAM,CAAC;QAAEI,GAAG,EAAEV,CAAC,CAACS,MAAM,CAAC;MAAE,CAAC,CAC9B;IACF,CAAC;EACH,CAAC;AACH,CAAC,CAAC;AAKF,OAAO,MAAMc,mCAAmC,GAAGvB,CAAC,CAACM,MAAM,CAAC;EAC1DC,MAAM,EAAEP,CAAC,CAACsB,YAAY,CACpBjB,GAAG,CAACmB,KAAK,CAACjB,MAAM,EAChBP,CAAC,CAACM,MAAM,CAAC;IACPK,GAAG,EAAEX,CAAC,CAACyB,OAAO,CAAC,YAAY;EAC7B,CAAC,CACH,CAAC;EACDT,OAAO,EAAEhB,CAAC,CAACsB,YAAY,CACrBjB,GAAG,CAACmB,KAAK,CAACR,OAAO,EACjBhB,CAAC,CAACM,MAAM,CAAC;IACPoB,GAAG,EAAE1B,CAAC,CAACS,MAAM,CAAC,CAAC;IACfkB,KAAK,EAAE3B,CAAC,CAACS,MAAM,CAAC,CAAC;IACjBmB,kBAAkB,EAAE5B,CAAC,CAACS,MAAM,CAAC,CAAC;IAC9BoB,mBAAmB,EAAE7B,CAAC,CAACS,MAAM,CAAC,CAAC;IAC/BqB,gBAAgB,EAAE9B,CAAC,CAACS,MAAM,CAAC;EAC7B,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,CAAC,CAACM,MAAM,CAAC;IAChBW,GAAG,EAAEjB,CAAC,CAACS,MAAM,CAAC,CAAC;IACfS,GAAG,EAAEjB,QAAQ;IACbkB,GAAG,EAAElB,QAAQ;IACbmB,GAAG,EAAEpB,CAAC,CAACM,MAAM,CAAC;MACZe,GAAG,EAAErB,CAAC,CAACsB,YAAY,CACjBvB,GAAG;MACH;MACAC,CAAC,CAACM,MAAM,CAAC;QAAEI,GAAG,EAAEV,CAAC,CAACS,MAAM,CAAC;MAAE,CAAC,CAC9B;IACF,CAAC;EACH,CAAC;AACH,CAAC,CAAC;AAKF,OAAO,MAAMc,mCAAmC,GAAGvB,CAAC,CAACM,MAAM,CAAC;EAC1DC,MAAM,EAAEP,CAAC,CAACsB,YAAY,CACpBjB,GAAG,CAACmB,KAAK,CAACjB,MAAM,EAChBP,CAAC,CAACM,MAAM,CAAC;IACPK,GAAG,EAAEX,CAAC,CAACyB,OAAO,CAAC,YAAY;EAC7B,CAAC,CACH,CAAC;EACDT,OAAO,EAAEhB,CAAC,CAACsB,YAAY,CACrBjB,GAAG,CAACmB,KAAK,CAACR,OAAO,EACjBhB,CAAC,CAACM,MAAM,CAAC;IACPoB,GAAG,EAAE1B,CAAC,CAACS,MAAM,CAAC,CAAC;IACfkB,KAAK,EAAE3B,CAAC,CAACS,MAAM,CAAC,CAAC;IACjBmB,kBAAkB,EAAE5B,CAAC,CAACS,MAAM,CAAC,CAAC;IAC9BoB,mBAAmB,EAAE7B,CAAC,CAACS,MAAM,CAAC,CAAC;IAC/BqB,gBAAgB,EAAE9B,CAAC,CAACS,MAAM,CAAC;EAC7B,CAAC,CACH;AACF,CAAC,CAAC;;AAEF;AACA;AAIA,OAAO,MAAMsB,4BAA4B,GAAG/B,CAAC,CAACM,MAAM,CAAC;EACnDC,MAAM,EAAEP,CAAC,CAACsB,YAAY,CACpBjB,GAAG,CAACmB,KAAK,CAACjB,MAAM,EAChBP,CAAC,CAACM,MAAM,CAAC;IACPK,GAAG,EAAEX,CAAC,CAACyB,OAAO,CAAC,8BAA8B,CAAC;IAC9CV,WAAW,EAAEf,CAAC,CAACa,KAAK,CAACb,CAAC,CAACS,MAAM,CAAC,CAAC,CAAC,CAACK,QAAQ,CAAC,CAAC,CAAE;EAC/C,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" | "
|
24
|
+
format: "dc+sd-jwt" | "jwt";
|
25
25
|
wallet_attestation: string;
|
26
26
|
}, {
|
27
|
-
format: "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" | "
|
32
|
+
format: "dc+sd-jwt" | "jwt";
|
33
33
|
wallet_attestation: string;
|
34
34
|
}[];
|
35
35
|
}, {
|
36
36
|
wallet_attestations: {
|
37
|
-
format: "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" | "
|
224
|
+
format: "dc+sd-jwt" | "jwt";
|
225
225
|
wallet_attestation: string;
|
226
226
|
}, {
|
227
|
-
format: "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" | "
|
232
|
+
format: "dc+sd-jwt" | "jwt";
|
233
233
|
wallet_attestation: string;
|
234
234
|
}[];
|
235
235
|
}, {
|
236
236
|
wallet_attestations: {
|
237
|
-
format: "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" | "
|
490
|
+
format: "dc+sd-jwt" | "jwt";
|
491
491
|
wallet_attestation: string;
|
492
492
|
}, {
|
493
|
-
format: "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" | "
|
498
|
+
format: "dc+sd-jwt" | "jwt";
|
499
499
|
wallet_attestation: string;
|
500
500
|
}[];
|
501
501
|
}, {
|
502
502
|
wallet_attestations: {
|
503
|
-
format: "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
|
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
|
-
|
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,
|
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"],
|
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
|
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;
|
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"}
|
@@ -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;
|
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
|
-
|
7
|
-
|
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<
|
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
|
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;
|
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;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAErD,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
|
-
|
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
|
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,
|
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<"
|
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,75 @@
|
|
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;
|
5
19
|
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
20
|
type: z.ZodLiteral<"openid_credential">;
|
21
|
+
credential_configuration_id: z.ZodString;
|
22
|
+
credential_identifiers: z.ZodArray<z.ZodString, "many">;
|
9
23
|
}, "strip", z.ZodTypeAny, {
|
10
24
|
type: "openid_credential";
|
11
|
-
format: "vc+sd-jwt" | "vc+mdoc-cbor";
|
12
25
|
credential_configuration_id: string;
|
26
|
+
credential_identifiers: string[];
|
13
27
|
}, {
|
14
28
|
type: "openid_credential";
|
15
|
-
format: "vc+sd-jwt" | "vc+mdoc-cbor";
|
16
29
|
credential_configuration_id: string;
|
30
|
+
credential_identifiers: string[];
|
17
31
|
}>, "many">;
|
18
|
-
c_nonce: z.ZodString;
|
19
|
-
c_nonce_expires_in: z.ZodNumber;
|
20
32
|
expires_in: z.ZodNumber;
|
21
33
|
token_type: z.ZodString;
|
22
34
|
}, "strip", z.ZodTypeAny, {
|
35
|
+
access_token: string;
|
23
36
|
authorization_details: {
|
24
37
|
type: "openid_credential";
|
25
|
-
format: "vc+sd-jwt" | "vc+mdoc-cbor";
|
26
38
|
credential_configuration_id: string;
|
39
|
+
credential_identifiers: string[];
|
27
40
|
}[];
|
28
|
-
access_token: string;
|
29
|
-
c_nonce: string;
|
30
|
-
c_nonce_expires_in: number;
|
31
41
|
expires_in: number;
|
32
42
|
token_type: string;
|
33
43
|
}, {
|
44
|
+
access_token: string;
|
34
45
|
authorization_details: {
|
35
46
|
type: "openid_credential";
|
36
|
-
format: "vc+sd-jwt" | "vc+mdoc-cbor";
|
37
47
|
credential_configuration_id: string;
|
48
|
+
credential_identifiers: string[];
|
38
49
|
}[];
|
39
|
-
access_token: string;
|
40
|
-
c_nonce: string;
|
41
|
-
c_nonce_expires_in: number;
|
42
50
|
expires_in: number;
|
43
51
|
token_type: string;
|
44
52
|
}>;
|
45
53
|
export type CredentialResponse = z.infer<typeof CredentialResponse>;
|
46
54
|
export declare const CredentialResponse: z.ZodObject<{
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
55
|
+
credentials: z.ZodArray<z.ZodObject<{
|
56
|
+
credential: z.ZodString;
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
58
|
+
credential: string;
|
59
|
+
}, {
|
60
|
+
credential: string;
|
61
|
+
}>, "many">;
|
62
|
+
notification_id: z.ZodOptional<z.ZodString>;
|
51
63
|
}, "strip", z.ZodTypeAny, {
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
64
|
+
credentials: {
|
65
|
+
credential: string;
|
66
|
+
}[];
|
67
|
+
notification_id?: string | undefined;
|
56
68
|
}, {
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
69
|
+
credentials: {
|
70
|
+
credential: string;
|
71
|
+
}[];
|
72
|
+
notification_id?: string | undefined;
|
61
73
|
}>;
|
62
74
|
/**
|
63
75
|
* Shape from parsing a response given by a request uri during the EAA credential issuance flow with response mode "form_post.jwt".
|
@@ -70,4 +82,12 @@ export declare const ResponseUriResultShape: z.ZodObject<{
|
|
70
82
|
redirect_uri: string;
|
71
83
|
}>;
|
72
84
|
export type ResponseMode = "query" | "form_post.jwt";
|
85
|
+
export type NonceResponse = z.infer<typeof NonceResponse>;
|
86
|
+
export declare const NonceResponse: z.ZodObject<{
|
87
|
+
c_nonce: z.ZodString;
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
89
|
+
c_nonce: string;
|
90
|
+
}, {
|
91
|
+
c_nonce: string;
|
92
|
+
}>;
|
73
93
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/types.ts"],"names":[],"mappings":"
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKxB,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"}
|
@@ -67,8 +67,6 @@ export declare const PID: z.ZodObject<{
|
|
67
67
|
};
|
68
68
|
}>, "many">;
|
69
69
|
}, "strip", z.ZodTypeAny, {
|
70
|
-
trustFramework: "eidas";
|
71
|
-
assuranceLevel: string;
|
72
70
|
evidence: {
|
73
71
|
type: string;
|
74
72
|
record: {
|
@@ -80,9 +78,9 @@ export declare const PID: z.ZodObject<{
|
|
80
78
|
};
|
81
79
|
};
|
82
80
|
}[];
|
83
|
-
}, {
|
84
81
|
trustFramework: "eidas";
|
85
82
|
assuranceLevel: string;
|
83
|
+
}, {
|
86
84
|
evidence: {
|
87
85
|
type: string;
|
88
86
|
record: {
|
@@ -94,6 +92,8 @@ export declare const PID: z.ZodObject<{
|
|
94
92
|
};
|
95
93
|
};
|
96
94
|
}[];
|
95
|
+
trustFramework: "eidas";
|
96
|
+
assuranceLevel: string;
|
97
97
|
}>>;
|
98
98
|
claims: z.ZodObject<{
|
99
99
|
uniqueId: z.ZodString;
|
@@ -148,8 +148,6 @@ export declare const PID: z.ZodObject<{
|
|
148
148
|
expiration: Date;
|
149
149
|
issuedAt: Date;
|
150
150
|
verification?: {
|
151
|
-
trustFramework: "eidas";
|
152
|
-
assuranceLevel: string;
|
153
151
|
evidence: {
|
154
152
|
type: string;
|
155
153
|
record: {
|
@@ -161,6 +159,8 @@ export declare const PID: z.ZodObject<{
|
|
161
159
|
};
|
162
160
|
};
|
163
161
|
}[];
|
162
|
+
trustFramework: "eidas";
|
163
|
+
assuranceLevel: string;
|
164
164
|
} | undefined;
|
165
165
|
}, {
|
166
166
|
claims: {
|
@@ -178,8 +178,6 @@ export declare const PID: z.ZodObject<{
|
|
178
178
|
expiration: Date;
|
179
179
|
issuedAt: Date;
|
180
180
|
verification?: {
|
181
|
-
trustFramework: "eidas";
|
182
|
-
assuranceLevel: string;
|
183
181
|
evidence: {
|
184
182
|
type: string;
|
185
183
|
record: {
|
@@ -191,6 +189,8 @@ export declare const PID: z.ZodObject<{
|
|
191
189
|
};
|
192
190
|
};
|
193
191
|
}[];
|
192
|
+
trustFramework: "eidas";
|
193
|
+
assuranceLevel: string;
|
194
194
|
} | undefined;
|
195
195
|
}>;
|
196
196
|
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../../../../src/sd-jwt/__test__/utils.test.ts"],"names":[],"mappings":""}
|
@@ -3,6 +3,7 @@ import { Disclosure, SdJwt4VC, type DisclosureWithEncoded } from "./types";
|
|
3
3
|
import type { JWK } from "../utils/jwk";
|
4
4
|
import * as Errors from "./errors";
|
5
5
|
import { type Presentation } from "../credential/presentation/types";
|
6
|
+
export * from "./utils";
|
6
7
|
/**
|
7
8
|
* Decode a given SD-JWT with Disclosures to get the parsed SD-JWT object they define.
|
8
9
|
* It ensures provided data is in a valid shape.
|
@@ -20,13 +21,13 @@ import { type Presentation } from "../credential/presentation/types";
|
|
20
21
|
export declare const decode: <S extends z.ZodType<{
|
21
22
|
header: {
|
22
23
|
alg: string;
|
23
|
-
typ: "
|
24
|
+
typ: "dc+sd-jwt";
|
24
25
|
kid?: string | undefined;
|
25
26
|
};
|
26
27
|
payload: {
|
27
28
|
iss: string;
|
28
29
|
status: {
|
29
|
-
|
30
|
+
status_assertion: {
|
30
31
|
credential_hash_alg: "sha-256";
|
31
32
|
};
|
32
33
|
};
|
@@ -60,6 +61,9 @@ export declare const decode: <S extends z.ZodType<{
|
|
60
61
|
};
|
61
62
|
};
|
62
63
|
vct: string;
|
64
|
+
"vct#integrity": string;
|
65
|
+
issuing_authority: string;
|
66
|
+
issuing_country: string;
|
63
67
|
iat?: number | undefined;
|
64
68
|
} & {
|
65
69
|
_sd: string[];
|
@@ -67,13 +71,13 @@ export declare const decode: <S extends z.ZodType<{
|
|
67
71
|
}, z.ZodTypeDef, {
|
68
72
|
header: {
|
69
73
|
alg: string;
|
70
|
-
typ: "
|
74
|
+
typ: "dc+sd-jwt";
|
71
75
|
kid?: string | undefined;
|
72
76
|
};
|
73
77
|
payload: {
|
74
78
|
iss: string;
|
75
79
|
status: {
|
76
|
-
|
80
|
+
status_assertion: {
|
77
81
|
credential_hash_alg: "sha-256";
|
78
82
|
};
|
79
83
|
};
|
@@ -107,6 +111,9 @@ export declare const decode: <S extends z.ZodType<{
|
|
107
111
|
};
|
108
112
|
};
|
109
113
|
vct: string;
|
114
|
+
"vct#integrity": string;
|
115
|
+
issuing_authority: string;
|
116
|
+
issuing_country: string;
|
110
117
|
iat?: number | undefined;
|
111
118
|
} & {
|
112
119
|
_sd: string[];
|
@@ -154,13 +161,13 @@ export declare const disclose: (token: string, claims: string[]) => Promise<{
|
|
154
161
|
export declare const verify: <S extends z.ZodType<{
|
155
162
|
header: {
|
156
163
|
alg: string;
|
157
|
-
typ: "
|
164
|
+
typ: "dc+sd-jwt";
|
158
165
|
kid?: string | undefined;
|
159
166
|
};
|
160
167
|
payload: {
|
161
168
|
iss: string;
|
162
169
|
status: {
|
163
|
-
|
170
|
+
status_assertion: {
|
164
171
|
credential_hash_alg: "sha-256";
|
165
172
|
};
|
166
173
|
};
|
@@ -194,6 +201,9 @@ export declare const verify: <S extends z.ZodType<{
|
|
194
201
|
};
|
195
202
|
};
|
196
203
|
vct: string;
|
204
|
+
"vct#integrity": string;
|
205
|
+
issuing_authority: string;
|
206
|
+
issuing_country: string;
|
197
207
|
iat?: number | undefined;
|
198
208
|
} & {
|
199
209
|
_sd: string[];
|
@@ -201,13 +211,13 @@ export declare const verify: <S extends z.ZodType<{
|
|
201
211
|
}, z.ZodTypeDef, {
|
202
212
|
header: {
|
203
213
|
alg: string;
|
204
|
-
typ: "
|
214
|
+
typ: "dc+sd-jwt";
|
205
215
|
kid?: string | undefined;
|
206
216
|
};
|
207
217
|
payload: {
|
208
218
|
iss: string;
|
209
219
|
status: {
|
210
|
-
|
220
|
+
status_assertion: {
|
211
221
|
credential_hash_alg: "sha-256";
|
212
222
|
};
|
213
223
|
};
|
@@ -241,6 +251,9 @@ export declare const verify: <S extends z.ZodType<{
|
|
241
251
|
};
|
242
252
|
};
|
243
253
|
vct: string;
|
254
|
+
"vct#integrity": string;
|
255
|
+
issuing_authority: string;
|
256
|
+
issuing_country: string;
|
244
257
|
iat?: number | undefined;
|
245
258
|
} & {
|
246
259
|
_sd: string[];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAE3E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAE3E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE,cAAc,SAAS,CAAC;AAQxB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WACV,MAAM;;iBAIA,qBAAqB,EAAE;CA0BrC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,UACZ,MAAM,UACL,MAAM,EAAE;WACE,MAAM;WAAS;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE;EAwCnE,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WACV,MAAM,aACF,GAAG,GAAG,GAAG,EAAE;;iBAEqB,UAAU,EAAE;EAqBxD,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,UAClB,MAAM,aACF,MAAM;cAGP,MAAM;EAyBjB,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC"}
|