@pagopa/io-react-native-wallet 0.7.4 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +49 -31
- package/lib/commonjs/credential/index.js +13 -0
- package/lib/commonjs/credential/index.js.map +1 -0
- package/lib/commonjs/credential/issuance/01-start-flow.js +2 -0
- package/lib/commonjs/credential/issuance/01-start-flow.js.map +1 -0
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +26 -0
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js +119 -0
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +6 -0
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/05-authorize-access.js +63 -0
- package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -0
- package/lib/commonjs/credential/issuance/06-obtain-credential.js +128 -0
- package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -0
- package/lib/commonjs/credential/issuance/07-confirm-credential.js +6 -0
- package/lib/commonjs/credential/issuance/07-confirm-credential.js.map +1 -0
- package/lib/commonjs/credential/issuance/const.js +9 -0
- package/lib/commonjs/credential/issuance/const.js.map +1 -0
- package/lib/commonjs/credential/issuance/index.js +34 -0
- package/lib/commonjs/credential/issuance/index.js.map +1 -0
- package/lib/commonjs/credential/presentation/01-start-flow.js +55 -0
- package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -0
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js +32 -0
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js.map +1 -0
- package/lib/commonjs/credential/presentation/03-get-request-object.js +68 -0
- package/lib/commonjs/credential/presentation/03-get-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/04-send-authorization-response.js +139 -0
- package/lib/commonjs/credential/presentation/04-send-authorization-response.js.map +1 -0
- package/lib/commonjs/credential/presentation/index.js +34 -0
- package/lib/commonjs/credential/presentation/index.js.map +1 -0
- package/lib/commonjs/{rp → credential/presentation}/types.js +17 -34
- package/lib/commonjs/credential/presentation/types.js.map +1 -0
- package/lib/commonjs/index.js +10 -61
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/pid/index.js +1 -3
- package/lib/commonjs/pid/index.js.map +1 -1
- package/lib/commonjs/sd-jwt/index.js +1 -1
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/sd-jwt/types.js +1 -1
- package/lib/commonjs/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/trust/chain.js +32 -4
- package/lib/commonjs/trust/chain.js.map +1 -1
- package/lib/commonjs/trust/index.js +105 -20
- package/lib/commonjs/trust/index.js.map +1 -1
- package/lib/commonjs/trust/types.js +54 -35
- package/lib/commonjs/trust/types.js.map +1 -1
- package/lib/commonjs/utils/crypto.js +5 -18
- package/lib/commonjs/utils/crypto.js.map +1 -1
- package/lib/commonjs/utils/misc.js +23 -0
- package/lib/commonjs/utils/misc.js.map +1 -0
- package/lib/commonjs/utils/par.js +86 -0
- package/lib/commonjs/utils/par.js.map +1 -0
- package/lib/module/credential/index.js +4 -0
- package/lib/module/credential/index.js.map +1 -0
- package/lib/module/credential/issuance/01-start-flow.js +2 -0
- package/lib/module/credential/issuance/01-start-flow.js.map +1 -0
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +19 -0
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
- package/lib/module/credential/issuance/03-start-user-authorization.js +109 -0
- package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/04-complete-user-authorization.js +2 -0
- package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/05-authorize-access.js +55 -0
- package/lib/module/credential/issuance/05-authorize-access.js.map +1 -0
- package/lib/module/credential/issuance/06-obtain-credential.js +117 -0
- package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -0
- package/lib/module/credential/issuance/07-confirm-credential.js +2 -0
- package/lib/module/credential/issuance/07-confirm-credential.js.map +1 -0
- package/lib/module/credential/issuance/const.js +2 -0
- package/lib/module/credential/issuance/const.js.map +1 -0
- package/lib/module/credential/issuance/index.js +6 -0
- package/lib/module/credential/issuance/index.js.map +1 -0
- package/lib/module/credential/presentation/01-start-flow.js +46 -0
- package/lib/module/credential/presentation/01-start-flow.js.map +1 -0
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js +25 -0
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +1 -0
- package/lib/module/credential/presentation/03-get-request-object.js +60 -0
- package/lib/module/credential/presentation/03-get-request-object.js.map +1 -0
- package/lib/module/credential/presentation/04-send-authorization-response.js +128 -0
- package/lib/module/credential/presentation/04-send-authorization-response.js.map +1 -0
- package/lib/module/credential/presentation/index.js +6 -0
- package/lib/module/credential/presentation/index.js.map +1 -0
- package/lib/module/credential/presentation/types.js +21 -0
- package/lib/module/credential/presentation/types.js.map +1 -0
- package/lib/module/index.js +4 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/pid/index.js +1 -2
- package/lib/module/pid/index.js.map +1 -1
- package/lib/module/sd-jwt/index.js +1 -1
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/sd-jwt/types.js +1 -1
- package/lib/module/sd-jwt/types.js.map +1 -1
- package/lib/module/trust/chain.js +30 -3
- package/lib/module/trust/chain.js.map +1 -1
- package/lib/module/trust/index.js +99 -16
- package/lib/module/trust/index.js.map +1 -1
- package/lib/module/trust/types.js +50 -31
- package/lib/module/trust/types.js.map +1 -1
- package/lib/module/utils/crypto.js +2 -15
- package/lib/module/utils/crypto.js.map +1 -1
- package/lib/module/utils/misc.js +17 -0
- package/lib/module/utils/misc.js.map +1 -0
- package/lib/module/utils/par.js +74 -0
- package/lib/module/utils/par.js.map +1 -0
- package/lib/typescript/credential/index.d.ts +4 -0
- package/lib/typescript/credential/index.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/01-start-flow.d.ts +11 -0
- package/lib/typescript/credential/issuance/01-start-flow.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +18 -0
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +31 -0
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +16 -0
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts +26 -0
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +32 -0
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/07-confirm-credential.d.ts +11 -0
- package/lib/typescript/credential/issuance/07-confirm-credential.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/const.d.ts +2 -0
- package/lib/typescript/credential/issuance/const.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/index.d.ts +10 -0
- package/lib/typescript/credential/issuance/index.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/01-start-flow.d.ts +20 -0
- package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +18 -0
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts +25 -0
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/04-send-authorization-response.d.ts +34 -0
- package/lib/typescript/credential/presentation/04-send-authorization-response.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/index.d.ts +7 -0
- package/lib/typescript/credential/presentation/index.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/types.d.ts +49 -0
- package/lib/typescript/credential/presentation/types.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +4 -5
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/pid/index.d.ts +1 -2
- package/lib/typescript/pid/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/index.d.ts +2 -2
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +5 -5
- package/lib/typescript/trust/chain.d.ts +12 -3
- package/lib/typescript/trust/chain.d.ts.map +1 -1
- package/lib/typescript/trust/index.d.ts +198 -24
- package/lib/typescript/trust/index.d.ts.map +1 -1
- package/lib/typescript/trust/types.d.ts +1299 -623
- package/lib/typescript/trust/types.d.ts.map +1 -1
- package/lib/typescript/utils/crypto.d.ts +1 -1
- package/lib/typescript/utils/crypto.d.ts.map +1 -1
- package/lib/typescript/utils/dpop.d.ts +2 -2
- package/lib/typescript/utils/misc.d.ts +8 -0
- package/lib/typescript/utils/misc.d.ts.map +1 -0
- package/lib/typescript/utils/par.d.ts +68 -0
- package/lib/typescript/utils/par.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/credential/index.ts +4 -0
- package/src/credential/issuance/01-start-flow.ts +10 -0
- package/src/credential/issuance/02-evaluate-issuer-trust.ts +31 -0
- package/src/credential/issuance/03-start-user-authorization.ts +138 -0
- package/src/credential/issuance/04-complete-user-authorization.ts +17 -0
- package/src/credential/issuance/05-authorize-access.ts +92 -0
- package/src/credential/issuance/06-obtain-credential.ts +179 -0
- package/src/credential/issuance/07-confirm-credential.ts +14 -0
- package/src/credential/issuance/const.ts +2 -0
- package/src/credential/issuance/index.ts +32 -0
- package/src/credential/presentation/01-start-flow.ts +51 -0
- package/src/credential/presentation/02-evaluate-rp-trust.ts +33 -0
- package/src/credential/presentation/03-get-request-object.ts +85 -0
- package/src/credential/presentation/04-send-authorization-response.ts +168 -0
- package/src/credential/presentation/index.ts +26 -0
- package/src/credential/presentation/types.ts +27 -0
- package/src/index.ts +7 -28
- package/src/pid/index.ts +1 -2
- package/src/sd-jwt/index.ts +2 -2
- package/src/sd-jwt/types.ts +1 -1
- package/src/trust/chain.ts +45 -3
- package/src/trust/index.ts +136 -19
- package/src/trust/types.ts +57 -35
- package/src/utils/crypto.ts +2 -20
- package/src/utils/misc.ts +23 -0
- package/src/utils/par.ts +103 -0
- package/lib/commonjs/pid/issuing.js +0 -276
- package/lib/commonjs/pid/issuing.js.map +0 -1
- package/lib/commonjs/rp/__test__/index.test.js +0 -172
- package/lib/commonjs/rp/__test__/index.test.js.map +0 -1
- package/lib/commonjs/rp/index.js +0 -239
- package/lib/commonjs/rp/index.js.map +0 -1
- package/lib/commonjs/rp/types.js.map +0 -1
- package/lib/module/pid/issuing.js +0 -266
- package/lib/module/pid/issuing.js.map +0 -1
- package/lib/module/rp/__test__/index.test.js +0 -168
- package/lib/module/rp/__test__/index.test.js.map +0 -1
- package/lib/module/rp/index.js +0 -228
- package/lib/module/rp/index.js.map +0 -1
- package/lib/module/rp/types.js +0 -36
- package/lib/module/rp/types.js.map +0 -1
- package/lib/typescript/pid/issuing.d.ts +0 -57
- package/lib/typescript/pid/issuing.d.ts.map +0 -1
- package/lib/typescript/rp/__test__/index.test.d.ts +0 -2
- package/lib/typescript/rp/__test__/index.test.d.ts.map +0 -1
- package/lib/typescript/rp/index.d.ts +0 -43
- package/lib/typescript/rp/index.d.ts.map +0 -1
- package/lib/typescript/rp/types.d.ts +0 -122
- package/lib/typescript/rp/types.d.ts.map +0 -1
- package/src/pid/issuing.ts +0 -405
- package/src/rp/__test__/index.test.ts +0 -250
- package/src/rp/index.ts +0 -287
- package/src/rp/types.ts +0 -42
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["z","_interopRequireWildcard","require","_ioReactNativeJwt","_errors","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","QRCodePayload","object","protocol","string","resource","clientId","requestURI","startFlowFromQR","qrcode","decoded","decodeBase64","decodedUrl","URL","hostname","searchParams","result","safeParse","success","data","AuthRequestDecodeError","error","message","exports"],"sourceRoot":"../../../../src","sources":["credential/presentation/01-start-flow.ts"],"mappings":";;;;;;AAAA,IAAAA,CAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAA4D,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EA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G,GAAEV,UAAW,EAAC,CAAC;EACzE;AACF,CAAC;AAACW,OAAA,CAAAf,eAAA,GAAAA,eAAA"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.evaluateRelyingPartyTrust = void 0;
|
7
|
+
var _trust = require("../../trust");
|
8
|
+
/**
|
9
|
+
* The Relying Party trust evaluation phase.
|
10
|
+
* Fetch the Relying Party's configuration and verify trust.
|
11
|
+
*
|
12
|
+
* @param rpUrl The base url of the Issuer
|
13
|
+
* @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
|
14
|
+
* @returns The Relying Party's configuration
|
15
|
+
*/
|
16
|
+
const evaluateRelyingPartyTrust = async function (rpUrl) {
|
17
|
+
let {
|
18
|
+
appFetch = fetch
|
19
|
+
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
20
|
+
const {
|
21
|
+
payload: {
|
22
|
+
metadata: rpConf
|
23
|
+
}
|
24
|
+
} = await (0, _trust.getRelyingPartyEntityConfiguration)(rpUrl, {
|
25
|
+
appFetch
|
26
|
+
});
|
27
|
+
return {
|
28
|
+
rpConf
|
29
|
+
};
|
30
|
+
};
|
31
|
+
exports.evaluateRelyingPartyTrust = evaluateRelyingPartyTrust;
|
32
|
+
//# sourceMappingURL=02-evaluate-rp-trust.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_trust","require","evaluateRelyingPartyTrust","rpUrl","appFetch","fetch","arguments","length","undefined","payload","metadata","rpConf","getRelyingPartyEntityConfiguration","exports"],"sourceRoot":"../../../../src","sources":["credential/presentation/02-evaluate-rp-trust.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,yBAAoD,GAAG,eAAAA,CAClEC,KAAK,EAEF;EAAA,IADH;IAAEC,QAAQ,GAAGC;EAAM,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAEzB,MAAM;IACJG,OAAO,EAAE;MAAEC,QAAQ,EAAEC;IAAO;EAC9B,CAAC,GAAG,MAAM,IAAAC,yCAAkC,EAACT,KAAK,EAAE;IAClDC;EACF,CAAC,CAAC;EACF,OAAO;IAAEO;EAAO,CAAC;AACnB,CAAC;AAACE,OAAA,CAAAX,yBAAA,GAAAA,yBAAA"}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.getRequestObject = void 0;
|
7
|
+
var _reactNativeUuid = _interopRequireDefault(require("react-native-uuid"));
|
8
|
+
var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
|
9
|
+
var _dpop = require("../../utils/dpop");
|
10
|
+
var _errors = require("../../utils/errors");
|
11
|
+
var _misc = require("../../utils/misc");
|
12
|
+
var _types = require("./types");
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14
|
+
/**
|
15
|
+
* Obtain the Request Object for RP authentication
|
16
|
+
* @see https://italia.github.io/eudi-wallet-it-docs/versione-corrente/en/relying-party-solution.html
|
17
|
+
*
|
18
|
+
* @param requestUri The url for the Relying Party to connect with
|
19
|
+
* @param rpConf The Relying Party's configuration
|
20
|
+
* @param context.wiaCryptoContext The context to access the key associated with the Wallet Instance Attestation
|
21
|
+
* @param context.walletInstanceAttestation The Wallet Instance Attestation token
|
22
|
+
* @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
|
23
|
+
* @returns The Request Object that describes the presentation
|
24
|
+
*/
|
25
|
+
const getRequestObject = async (requestUri, rpConf, _ref) => {
|
26
|
+
let {
|
27
|
+
wiaCryptoContext,
|
28
|
+
appFetch = fetch,
|
29
|
+
walletInstanceAttestation
|
30
|
+
} = _ref;
|
31
|
+
const signedWalletInstanceDPoP = await (0, _dpop.createDPopToken)({
|
32
|
+
jti: `${_reactNativeUuid.default.v4()}`,
|
33
|
+
htm: "GET",
|
34
|
+
htu: requestUri,
|
35
|
+
ath: await (0, _ioReactNativeJwt.sha256ToBase64)(walletInstanceAttestation)
|
36
|
+
}, wiaCryptoContext);
|
37
|
+
const responseEncodedJwt = await appFetch(requestUri, {
|
38
|
+
method: "GET",
|
39
|
+
headers: {
|
40
|
+
Authorization: `DPoP ${walletInstanceAttestation}`,
|
41
|
+
DPoP: signedWalletInstanceDPoP
|
42
|
+
}
|
43
|
+
}).then((0, _misc.hasStatus)(200)).then(res => res.json()).then(responseJson => responseJson.response);
|
44
|
+
const responseJwt = (0, _ioReactNativeJwt.decode)(responseEncodedJwt);
|
45
|
+
|
46
|
+
// verify token signature according to RP's entity configuration
|
47
|
+
// to ensure the request object is authentic
|
48
|
+
{
|
49
|
+
const pubKey = rpConf.wallet_relying_party.jwks.keys.find(_ref2 => {
|
50
|
+
let {
|
51
|
+
kid
|
52
|
+
} = _ref2;
|
53
|
+
return kid === responseJwt.protectedHeader.kid;
|
54
|
+
});
|
55
|
+
if (!pubKey) {
|
56
|
+
throw new _errors.NoSuitableKeysFoundInEntityConfiguration("Request Object signature verification");
|
57
|
+
}
|
58
|
+
await (0, _ioReactNativeJwt.verify)(responseEncodedJwt, pubKey);
|
59
|
+
}
|
60
|
+
|
61
|
+
// Ensure that the request object conforms to the expected specification.
|
62
|
+
const requestObject = _types.RequestObject.parse(responseJwt.payload);
|
63
|
+
return {
|
64
|
+
requestObject
|
65
|
+
};
|
66
|
+
};
|
67
|
+
exports.getRequestObject = getRequestObject;
|
68
|
+
//# sourceMappingURL=03-get-request-object.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_reactNativeUuid","_interopRequireDefault","require","_ioReactNativeJwt","_dpop","_errors","_misc","_types","obj","__esModule","default","getRequestObject","requestUri","rpConf","_ref","wiaCryptoContext","appFetch","fetch","walletInstanceAttestation","signedWalletInstanceDPoP","createDPopToken","jti","uuid","v4","htm","htu","ath","sha256ToBase64","responseEncodedJwt","method","headers","Authorization","DPoP","then","hasStatus","res","json","responseJson","response","responseJwt","decodeJwt","pubKey","wallet_relying_party","jwks","keys","find","_ref2","kid","protectedHeader","NoSuitableKeysFoundInEntityConfiguration","verify","requestObject","RequestObject","parse","payload","exports"],"sourceRoot":"../../../../src","sources":["credential/presentation/03-get-request-object.ts"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAAwC,SAAAD,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAYxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,gBAAkC,GAAG,MAAAA,CAChDC,UAAU,EACVC,MAAM,EAAAC,IAAA,KAEH;EAAA,IADH;IAAEC,gBAAgB;IAAEC,QAAQ,GAAGC,KAAK;IAAEC;EAA0B,CAAC,GAAAJ,IAAA;EAEjE,MAAMK,wBAAwB,GAAG,MAAM,IAAAC,qBAAe,EACpD;IACEC,GAAG,EAAG,GAAEC,wBAAI,CAACC,EAAE,CAAC,CAAE,EAAC;IACnBC,GAAG,EAAE,KAAK;IACVC,GAAG,EAAEb,UAAU;IACfc,GAAG,EAAE,MAAM,IAAAC,gCAAc,EAACT,yBAAyB;EACrD,CAAC,EACDH,gBACF,CAAC;EAED,MAAMa,kBAAkB,GAAG,MAAMZ,QAAQ,CAACJ,UAAU,EAAE;IACpDiB,MAAM,EAAE,KAAK;IACbC,OAAO,EAAE;MACPC,aAAa,EAAG,QAAOb,yBAA0B,EAAC;MAClDc,IAAI,EAAEb;IACR;EACF,CAAC,CAAC,CACCc,IAAI,CAAC,IAAAC,eAAS,EAAC,GAAG,CAAC,CAAC,CACpBD,IAAI,CAAEE,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC,CACzBH,IAAI,CAAEI,YAAY,IAAKA,YAAY,CAACC,QAAQ,CAAC;EAEhD,MAAMC,WAAW,GAAG,IAAAC,wBAAS,EAACZ,kBAAkB,CAAC;;EAEjD;EACA;EACA;IACE,MAAMa,MAAM,GAAG5B,MAAM,CAAC6B,oBAAoB,CAACC,IAAI,CAACC,IAAI,CAACC,IAAI,CACvDC,KAAA;MAAA,IAAC;QAAEC;MAAI,CAAC,GAAAD,KAAA;MAAA,OAAKC,GAAG,KAAKR,WAAW,CAACS,eAAe,CAACD,GAAG;IAAA,CACtD,CAAC;IACD,IAAI,CAACN,MAAM,EAAE;MACX,MAAM,IAAIQ,gDAAwC,CAChD,uCACF,CAAC;IACH;IACA,MAAM,IAAAC,wBAAM,EAACtB,kBAAkB,EAAEa,MAAM,CAAC;EAC1C;;EAEA;EACA,MAAMU,aAAa,GAAGC,oBAAa,CAACC,KAAK,CAACd,WAAW,CAACe,OAAO,CAAC;EAE9D,OAAO;IACLH;EACF,CAAC;AACH,CAAC;AAACI,OAAA,CAAA5C,gBAAA,GAAAA,gBAAA"}
|
@@ -0,0 +1,139 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.sendAuthorizationResponse = exports.AuthorizationResponse = void 0;
|
7
|
+
var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
|
8
|
+
var _reactNativeUuid = _interopRequireDefault(require("react-native-uuid"));
|
9
|
+
var WalletInstanceAttestation = _interopRequireWildcard(require("../../wallet-instance-attestation"));
|
10
|
+
var _errors = require("../../utils/errors");
|
11
|
+
var _misc = require("../../utils/misc");
|
12
|
+
var _sdJwt = require("../../sd-jwt");
|
13
|
+
var z = _interopRequireWildcard(require("zod"));
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
|
+
const AuthorizationResponse = z.object({
|
18
|
+
status: z.string(),
|
19
|
+
response_code: z.string() /**
|
20
|
+
FIXME: [SIW-627] we expect this value from every RP implementation
|
21
|
+
Actually some RP does not return the value
|
22
|
+
We make it optional to not break the flow.
|
23
|
+
*/.optional()
|
24
|
+
});
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Choose an RSA public key from those offered by the RP for encryption.
|
28
|
+
*
|
29
|
+
* @param entity The RP entity configuration
|
30
|
+
* @returns A suitable public key with its compatible encryption algorithm
|
31
|
+
* @throws {NoSuitableKeysFoundInEntityConfiguration} If entity do not contain any public key suitable for encrypting
|
32
|
+
*/
|
33
|
+
exports.AuthorizationResponse = AuthorizationResponse;
|
34
|
+
const chooseRSAPublicKeyToEncrypt = entity => {
|
35
|
+
const [usingRsa256] = entity.wallet_relying_party.jwks.keys.filter(jwk => jwk.use === "enc" && jwk.kty === "RSA");
|
36
|
+
if (usingRsa256) {
|
37
|
+
return usingRsa256;
|
38
|
+
}
|
39
|
+
|
40
|
+
// No suitable key has been found
|
41
|
+
throw new _errors.NoSuitableKeysFoundInEntityConfiguration("Encrypt with RP public key");
|
42
|
+
};
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Generate a Verified Presentation token for a received request object within the context of an authorization request flow.
|
46
|
+
* The presentation is created by revealing data from the provided credentials based on the requested claims.
|
47
|
+
* Each Verified Credential is accompanied by the claims that the user consents to disclose from it.
|
48
|
+
*
|
49
|
+
* @todo: Allow for handling more than one Verified Credential.
|
50
|
+
*/
|
51
|
+
const prepareVpToken = async (requestObject, walletInstanceAttestation, _ref) => {
|
52
|
+
let [vc, claims, cryptoCtx] = _ref;
|
53
|
+
// this throws if vc cannot satisfy all the requested claims
|
54
|
+
const {
|
55
|
+
token: vp,
|
56
|
+
paths
|
57
|
+
} = await (0, _sdJwt.disclose)(vc, claims);
|
58
|
+
|
59
|
+
// obtain issuer from Wallet Instance
|
60
|
+
const {
|
61
|
+
payload: {
|
62
|
+
iss
|
63
|
+
}
|
64
|
+
} = WalletInstanceAttestation.decode(walletInstanceAttestation);
|
65
|
+
const pidKid = await cryptoCtx.getPublicKey().then(_ => _.kid);
|
66
|
+
|
67
|
+
// TODO: [SIW-359] check all requeste claims of the requestedObj are satisfied
|
68
|
+
const vp_token = await new _ioReactNativeJwt.SignJWT(cryptoCtx).setProtectedHeader({
|
69
|
+
typ: "JWT",
|
70
|
+
kid: pidKid
|
71
|
+
}).setPayload({
|
72
|
+
vp: vp,
|
73
|
+
jti: `${_reactNativeUuid.default.v4()}`,
|
74
|
+
iss,
|
75
|
+
nonce: requestObject.nonce
|
76
|
+
}).setAudience(requestObject.response_uri).setIssuedAt().setExpirationTime("1h").sign();
|
77
|
+
const vc_scope = requestObject.scope;
|
78
|
+
const presentation_submission = {
|
79
|
+
definition_id: `${_reactNativeUuid.default.v4()}`,
|
80
|
+
id: `${_reactNativeUuid.default.v4()}`,
|
81
|
+
descriptor_map: paths.map(p => ({
|
82
|
+
id: vc_scope,
|
83
|
+
path: `$.vp_token.${p.path}`,
|
84
|
+
format: "vc+sd-jwt"
|
85
|
+
}))
|
86
|
+
};
|
87
|
+
return {
|
88
|
+
vp_token,
|
89
|
+
presentation_submission
|
90
|
+
};
|
91
|
+
};
|
92
|
+
/**
|
93
|
+
* Complete the presentation flow by sending the authorization response to the Relying Party
|
94
|
+
*
|
95
|
+
* @param requestObject The Request Object that describes the presentation
|
96
|
+
* @param rpConf The Relying Party's configuration
|
97
|
+
* @param presentation The presentation tuple consisting in the signed credential,
|
98
|
+
* the list of claims to be disclosed, and the context to access the key that proves the holder binding
|
99
|
+
* @param context.walletInstanceAttestation The Wallet Instance Attestation token
|
100
|
+
* @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
|
101
|
+
* @returns The result of the presentation flow
|
102
|
+
*/
|
103
|
+
const sendAuthorizationResponse = async (requestObject, rpConf, presentation, _ref2) => {
|
104
|
+
let {
|
105
|
+
appFetch = fetch,
|
106
|
+
walletInstanceAttestation
|
107
|
+
} = _ref2;
|
108
|
+
// the request is an unsigned jws without iss, aud, exp
|
109
|
+
// https://openid.net/specs/openid-4-verifiable-presentations-1_0.html#name-signed-and-encrypted-respon
|
110
|
+
const rsaPublicJwk = chooseRSAPublicKeyToEncrypt(rpConf);
|
111
|
+
const {
|
112
|
+
vp_token,
|
113
|
+
presentation_submission
|
114
|
+
} = await prepareVpToken(requestObject, walletInstanceAttestation, presentation);
|
115
|
+
const authzResponsePayload = JSON.stringify({
|
116
|
+
state: requestObject.state,
|
117
|
+
presentation_submission,
|
118
|
+
nonce: requestObject.nonce,
|
119
|
+
vp_token
|
120
|
+
});
|
121
|
+
const encrypted = await new _ioReactNativeJwt.EncryptJwe(authzResponsePayload, {
|
122
|
+
alg: "RSA-OAEP-256",
|
123
|
+
enc: "A256CBC-HS512",
|
124
|
+
kid: rsaPublicJwk.kid
|
125
|
+
}).encrypt(rsaPublicJwk);
|
126
|
+
const formBody = new URLSearchParams({
|
127
|
+
response: encrypted
|
128
|
+
});
|
129
|
+
const body = formBody.toString();
|
130
|
+
return appFetch(requestObject.response_uri, {
|
131
|
+
method: "POST",
|
132
|
+
headers: {
|
133
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
134
|
+
},
|
135
|
+
body
|
136
|
+
}).then((0, _misc.hasStatus)(200)).then(res => res.json()).then(AuthorizationResponse.parse);
|
137
|
+
};
|
138
|
+
exports.sendAuthorizationResponse = sendAuthorizationResponse;
|
139
|
+
//# sourceMappingURL=04-send-authorization-response.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_ioReactNativeJwt","require","_reactNativeUuid","_interopRequireDefault","WalletInstanceAttestation","_interopRequireWildcard","_errors","_misc","_sdJwt","z","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","AuthorizationResponse","object","status","string","response_code","optional","exports","chooseRSAPublicKeyToEncrypt","entity","usingRsa256","wallet_relying_party","jwks","keys","filter","jwk","use","kty","NoSuitableKeysFoundInEntityConfiguration","prepareVpToken","requestObject","walletInstanceAttestation","_ref","vc","claims","cryptoCtx","token","vp","paths","disclose","payload","iss","decode","pidKid","getPublicKey","then","_","kid","vp_token","SignJWT","setProtectedHeader","typ","setPayload","jti","uuid","v4","nonce","setAudience","response_uri","setIssuedAt","setExpirationTime","sign","vc_scope","scope","presentation_submission","definition_id","id","descriptor_map","map","p","path","format","sendAuthorizationResponse","rpConf","presentation","_ref2","appFetch","fetch","rsaPublicJwk","authzResponsePayload","JSON","stringify","state","encrypted","EncryptJwe","alg","enc","encrypt","formBody","URLSearchParams","response","body","toString","method","headers","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,CAACuF,KAAK,CAAC;AACtC,CAAC;AAACjF,OAAA,CAAAuD,yBAAA,GAAAA,yBAAA"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(exports, "evaluateRelyingPartyTrust", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function () {
|
9
|
+
return _evaluateRpTrust.evaluateRelyingPartyTrust;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
Object.defineProperty(exports, "getRequestObject", {
|
13
|
+
enumerable: true,
|
14
|
+
get: function () {
|
15
|
+
return _getRequestObject.getRequestObject;
|
16
|
+
}
|
17
|
+
});
|
18
|
+
Object.defineProperty(exports, "sendAuthorizationResponse", {
|
19
|
+
enumerable: true,
|
20
|
+
get: function () {
|
21
|
+
return _sendAuthorizationResponse.sendAuthorizationResponse;
|
22
|
+
}
|
23
|
+
});
|
24
|
+
Object.defineProperty(exports, "startFlowFromQR", {
|
25
|
+
enumerable: true,
|
26
|
+
get: function () {
|
27
|
+
return _startFlow.startFlowFromQR;
|
28
|
+
}
|
29
|
+
});
|
30
|
+
var _startFlow = require("./01-start-flow");
|
31
|
+
var _evaluateRpTrust = require("./02-evaluate-rp-trust");
|
32
|
+
var _getRequestObject = require("./03-get-request-object");
|
33
|
+
var _sendAuthorizationResponse = require("./04-send-authorization-response");
|
34
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_startFlow","require","_evaluateRpTrust","_getRequestObject","_sendAuthorizationResponse"],"sourceRoot":"../../../../src","sources":["credential/presentation/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAIA,IAAAE,iBAAA,GAAAF,OAAA;AAIA,IAAAG,0BAAA,GAAAH,OAAA"}
|
@@ -3,44 +3,27 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.RequestObject =
|
7
|
-
var _types = require("
|
6
|
+
exports.RequestObject = void 0;
|
7
|
+
var _types = require("../../sd-jwt/types");
|
8
8
|
var z = _interopRequireWildcard(require("zod"));
|
9
9
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
10
10
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
11
|
-
const RequestObject = z.object({
|
12
|
-
header: z.object({
|
13
|
-
// FIXME: SIW-421 type field must be either required or omitted, optional isn't useful
|
14
|
-
typ: z.literal("JWT").optional(),
|
15
|
-
alg: z.string(),
|
16
|
-
kid: z.string(),
|
17
|
-
trust_chain: z.array(z.string())
|
18
|
-
}),
|
19
|
-
payload: z.object({
|
20
|
-
iss: z.string(),
|
21
|
-
iat: _types.UnixTime,
|
22
|
-
exp: _types.UnixTime,
|
23
|
-
state: z.string(),
|
24
|
-
nonce: z.string(),
|
25
|
-
response_uri: z.string(),
|
26
|
-
response_type: z.literal("vp_token"),
|
27
|
-
response_mode: z.literal("direct_post.jwt"),
|
28
|
-
client_id: z.string(),
|
29
|
-
client_id_scheme: z.literal("entity_id"),
|
30
|
-
scope: z.string()
|
31
|
-
})
|
32
|
-
});
|
33
|
-
exports.RequestObject = RequestObject;
|
34
|
-
const QRCodePayload = z.object({
|
35
|
-
protocol: z.string(),
|
36
|
-
resource: z.string(),
|
37
|
-
// TODO: refine to known paths using literals
|
38
|
-
clientId: z.string(),
|
39
|
-
requestURI: z.string()
|
40
|
-
});
|
41
|
-
|
42
11
|
/**
|
43
12
|
* A pair that associate a tokenized Verified Credential with the claims presented or requested to present.
|
44
13
|
*/
|
45
|
-
|
14
|
+
|
15
|
+
const RequestObject = z.object({
|
16
|
+
iss: z.string(),
|
17
|
+
iat: _types.UnixTime,
|
18
|
+
exp: _types.UnixTime,
|
19
|
+
state: z.string(),
|
20
|
+
nonce: z.string(),
|
21
|
+
response_uri: z.string(),
|
22
|
+
response_type: z.literal("vp_token"),
|
23
|
+
response_mode: z.literal("direct_post.jwt"),
|
24
|
+
client_id: z.string(),
|
25
|
+
client_id_scheme: z.literal("entity_id"),
|
26
|
+
scope: z.string()
|
27
|
+
});
|
28
|
+
exports.RequestObject = RequestObject;
|
46
29
|
//# sourceMappingURL=types.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_types","require","z","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","RequestObject","object","iss","string","iat","UnixTime","exp","state","nonce","response_uri","response_type","literal","response_mode","client_id","client_id_scheme","scope","exports"],"sourceRoot":"../../../../src","sources":["credential/presentation/types.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAyB,SAAAG,yBAAAC,WAAA,eAAAC,OAAA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E,KAAK,EAAE/B,CAAC,CAAC2B,MAAM,CAAC,CAAC;EACjBK,KAAK,EAAEhC,CAAC,CAAC2B,MAAM,CAAC,CAAC;EACjBM,YAAY,EAAEjC,CAAC,CAAC2B,MAAM,CAAC,CAAC;EACxBO,aAAa,EAAElC,CAAC,CAACmC,OAAO,CAAC,UAAU,CAAC;EACpCC,aAAa,EAAEpC,CAAC,CAACmC,OAAO,CAAC,iBAAiB,CAAC;EAC3CE,SAAS,EAAErC,CAAC,CAAC2B,MAAM,CAAC,CAAC;EACrBW,gBAAgB,EAAEtC,CAAC,CAACmC,OAAO,CAAC,WAAW,CAAC;EACxCI,KAAK,EAAEvC,CAAC,CAAC2B,MAAM,CAAC;AAClB,CAAC,CAAC;AAACa,OAAA,CAAAhB,aAAA,GAAAA,aAAA"}
|
package/lib/commonjs/index.js
CHANGED
@@ -3,88 +3,37 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
Object.defineProperty(exports, "
|
6
|
+
Object.defineProperty(exports, "AuthorizationDetail", {
|
7
7
|
enumerable: true,
|
8
8
|
get: function () {
|
9
|
-
return
|
9
|
+
return _par.AuthorizationDetail;
|
10
10
|
}
|
11
11
|
});
|
12
|
-
|
13
|
-
Object.defineProperty(exports, "RelyingPartyEntityConfiguration", {
|
12
|
+
Object.defineProperty(exports, "AuthorizationDetails", {
|
14
13
|
enumerable: true,
|
15
14
|
get: function () {
|
16
|
-
return
|
17
|
-
}
|
18
|
-
});
|
19
|
-
exports.RelyingPartySolution = void 0;
|
20
|
-
Object.defineProperty(exports, "TrustAnchorEntityConfiguration", {
|
21
|
-
enumerable: true,
|
22
|
-
get: function () {
|
23
|
-
return _types.TrustAnchorEntityConfiguration;
|
24
|
-
}
|
25
|
-
});
|
26
|
-
exports.WalletInstanceAttestation = void 0;
|
27
|
-
Object.defineProperty(exports, "WalletProviderEntityConfiguration", {
|
28
|
-
enumerable: true,
|
29
|
-
get: function () {
|
30
|
-
return _types.WalletProviderEntityConfiguration;
|
15
|
+
return _par.AuthorizationDetails;
|
31
16
|
}
|
32
17
|
});
|
18
|
+
exports.WalletInstanceAttestation = exports.Trust = exports.PID = exports.Errors = exports.Credential = void 0;
|
33
19
|
Object.defineProperty(exports, "createCryptoContextFor", {
|
34
20
|
enumerable: true,
|
35
21
|
get: function () {
|
36
22
|
return _crypto.createCryptoContextFor;
|
37
23
|
}
|
38
24
|
});
|
39
|
-
Object.defineProperty(exports, "getCredentialIssuerEntityConfiguration", {
|
40
|
-
enumerable: true,
|
41
|
-
get: function () {
|
42
|
-
return _trust.getCredentialIssuerEntityConfiguration;
|
43
|
-
}
|
44
|
-
});
|
45
|
-
Object.defineProperty(exports, "getEntityConfiguration", {
|
46
|
-
enumerable: true,
|
47
|
-
get: function () {
|
48
|
-
return _trust.getEntityConfiguration;
|
49
|
-
}
|
50
|
-
});
|
51
|
-
Object.defineProperty(exports, "getRelyingPartyEntityConfiguration", {
|
52
|
-
enumerable: true,
|
53
|
-
get: function () {
|
54
|
-
return _trust.getRelyingPartyEntityConfiguration;
|
55
|
-
}
|
56
|
-
});
|
57
|
-
Object.defineProperty(exports, "getTrustAnchorEntityConfiguration", {
|
58
|
-
enumerable: true,
|
59
|
-
get: function () {
|
60
|
-
return _trust.getTrustAnchorEntityConfiguration;
|
61
|
-
}
|
62
|
-
});
|
63
|
-
Object.defineProperty(exports, "getWalletProviderEntityConfiguration", {
|
64
|
-
enumerable: true,
|
65
|
-
get: function () {
|
66
|
-
return _trust.getWalletProviderEntityConfiguration;
|
67
|
-
}
|
68
|
-
});
|
69
|
-
Object.defineProperty(exports, "verifyTrustChain", {
|
70
|
-
enumerable: true,
|
71
|
-
get: function () {
|
72
|
-
return _trust.verifyTrustChain;
|
73
|
-
}
|
74
|
-
});
|
75
25
|
require("react-native-url-polyfill/auto");
|
26
|
+
var Credential = _interopRequireWildcard(require("./credential"));
|
27
|
+
exports.Credential = Credential;
|
76
28
|
var PID = _interopRequireWildcard(require("./pid"));
|
77
29
|
exports.PID = PID;
|
78
|
-
var RP = _interopRequireWildcard(require("./rp"));
|
79
|
-
var RelyingPartySolution = RP;
|
80
|
-
exports.RP = RP;
|
81
|
-
exports.RelyingPartySolution = RP;
|
82
30
|
var Errors = _interopRequireWildcard(require("./utils/errors"));
|
83
31
|
exports.Errors = Errors;
|
84
32
|
var WalletInstanceAttestation = _interopRequireWildcard(require("./wallet-instance-attestation"));
|
85
33
|
exports.WalletInstanceAttestation = WalletInstanceAttestation;
|
86
|
-
var
|
87
|
-
|
34
|
+
var Trust = _interopRequireWildcard(require("./trust"));
|
35
|
+
exports.Trust = Trust;
|
36
|
+
var _par = require("./utils/par");
|
88
37
|
var _crypto = require("./utils/crypto");
|
89
38
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
90
39
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["require","
|
1
|
+
{"version":3,"names":["require","Credential","_interopRequireWildcard","exports","PID","Errors","WalletInstanceAttestation","Trust","_par","_crypto","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEAA,OAAA;AAEA,IAAAC,UAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA2CG,OAAA,CAAAF,UAAA,GAAAA,UAAA;AAC3C,IAAAG,GAAA,GAAAF,uBAAA,CAAAF,OAAA;AAA6BG,OAAA,CAAAC,GAAA,GAAAA,GAAA;AAC7B,IAAAC,MAAA,GAAAH,uBAAA,CAAAF,OAAA;AAAyCG,OAAA,CAAAE,MAAA,GAAAA,MAAA;AACzC,IAAAC,yBAAA,GAAAJ,uBAAA,CAAAF,OAAA;AAA2EG,OAAA,CAAAG,yBAAA,GAAAA,yBAAA;AAC3E,IAAAC,KAAA,GAAAL,uBAAA,CAAAF,OAAA;AAAiCG,OAAA,CAAAI,KAAA,GAAAA,KAAA;AACjC,IAAAC,IAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AAAwD,SAAAU,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAT,wBAAAa,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA"}
|
@@ -3,11 +3,9 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.SdJwt =
|
6
|
+
exports.SdJwt = void 0;
|
7
7
|
var SdJwt = _interopRequireWildcard(require("./sd-jwt"));
|
8
8
|
exports.SdJwt = SdJwt;
|
9
|
-
var Issuing = _interopRequireWildcard(require("./issuing"));
|
10
|
-
exports.Issuing = Issuing;
|
11
9
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
12
10
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
13
11
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["SdJwt","_interopRequireWildcard","require","exports","
|
1
|
+
{"version":3,"names":["SdJwt","_interopRequireWildcard","require","exports","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sourceRoot":"../../../src","sources":["pid/index.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAkCC,OAAA,CAAAH,KAAA,GAAAA,KAAA;AAAA,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA"}
|
@@ -133,7 +133,7 @@ const disclose = async (token, claims) => {
|
|
133
133
|
*
|
134
134
|
*
|
135
135
|
* @param token The encoded token that represents a valid sd-jwt for verifiable credentials
|
136
|
-
* @param publicKey The public key to validate the signature
|
136
|
+
* @param publicKey The single public key or an array of public keys to validate the signature.
|
137
137
|
* @param schema Schema to use to parse the SD-JWT
|
138
138
|
*
|
139
139
|
* @returns The parsed SD-JWT token and the parsed disclosures
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_ioReactNativeJwt","require","_types","_verifier","_errors","decodeDisclosure","encoded","decoded","Disclosure","parse","JSON","decodeBase64","decode","token","schema","slice","rawSdJwt","rawDisclosures","split","decodedJwt","decodeJwt","sdJwt","header","protectedHeader","payload","disclosures","map","exports","disclose","claims","SdJwt4VC","paths","Promise","all","claim","disclosure","find","_ref","name","ClaimsNotFoundBetweenDislosures","hash","sha256ToBase64","verified_claims","_sd","includes","index","indexOf","path","verification","ClaimsNotFoundInToken","filteredDisclosures","filter","d","disclosedToken","join","verify","publicKey","verifyJwt","verifyDisclosure"],"sourceRoot":"../../../src","sources":["sd-jwt/index.ts"],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,OAAO;QAAEN,KAAK;QAAEa,IAAI,EAAG,oCAAmCF,KAAM;MAAG,CAAC;IACtE;IAEA,MAAM,IAAII,6BAAqB,CAACf,KAAK,CAAC;EACxC,CAAC,CACH,CAAC;EAED,MAAMgB,mBAAmB,GAAGjC,cAAc,CAACkC,MAAM,CAAEC,CAAC,IAAK;IACvD,MAAM;MACJ7C,OAAO,EAAE,GAAG+B,IAAI;IAClB,CAAC,GAAGjC,gBAAgB,CAAC+C,CAAC,CAAC;IACvB,OAAOvB,MAAM,CAACe,QAAQ,CAACN,IAAI,CAAC;EAC9B,CAAC,CAAC;;EAEF;EACA,MAAMe,cAAc,GAAG,CAACrC,QAAQ,EAAE,GAAGkC,mBAAmB,CAAC,CAACI,IAAI,CAAC,GAAG,CAAC;EAEnE,OAAO;IAAEzC,KAAK,EAAEwC,cAAc;IAAEtB;EAAM,CAAC;AACzC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfAJ,OAAA,CAAAC,QAAA,GAAAA,QAAA;AAgBO,MAAM2B,MAAM,GAAG,MAAAA,CACpB1C,KAAa,EACb2C,
|
1
|
+
{"version":3,"names":["_ioReactNativeJwt","require","_types","_verifier","_errors","decodeDisclosure","encoded","decoded","Disclosure","parse","JSON","decodeBase64","decode","token","schema","slice","rawSdJwt","rawDisclosures","split","decodedJwt","decodeJwt","sdJwt","header","protectedHeader","payload","disclosures","map","exports","disclose","claims","SdJwt4VC","paths","Promise","all","claim","disclosure","find","_ref","name","ClaimsNotFoundBetweenDislosures","hash","sha256ToBase64","verified_claims","_sd","includes","index","indexOf","path","verification","ClaimsNotFoundInToken","filteredDisclosures","filter","d","disclosedToken","join","verify","publicKey","verifyJwt","verifyDisclosure"],"sourceRoot":"../../../src","sources":["sd-jwt/index.ts"],"mappings":";;;;;;AAEA,IAAAA,iBAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAA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EN,MAAM,CACjE,CACF,CAAC;EAED,OAAO;IACLR,KAAK,EAAEd,OAAO,CAACc,KAAK;IACpBI,WAAW,EAAElB,OAAO,CAACkB,WAAW,CAACC,GAAG,CAAE0B,CAAC,IAAKA,CAAC,CAAC7C,OAAO;EACvD,CAAC;AACH,CAAC;AAACoB,OAAA,CAAA4B,MAAA,GAAAA,MAAA"}
|
@@ -47,7 +47,7 @@ const SdJwt4VC = _zod.z.object({
|
|
47
47
|
cnf: _zod.z.object({
|
48
48
|
jwk: _jwk.JWK
|
49
49
|
}),
|
50
|
-
type: _zod.z.
|
50
|
+
type: _zod.z.string(),
|
51
51
|
verified_claims: _zod.z.object({
|
52
52
|
verification: _zod.z.intersection(_zod.z.object({
|
53
53
|
trust_framework: _zod.z.literal("eidas"),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_jwk","require","_zod","UnixTime","z","number","min","max","exports","ObfuscatedDisclosures","object","_sd","array","string","Disclosure","tuple","unknown","SdJwt4VC","header","typ","literal","alg","kid","optional","trust_chain","payload","iss","sub","jti","iat","exp","status","cnf","jwk","JWK","type","verified_claims","verification","intersection","trust_framework","assurance_level","claims","_sd_alg"],"sourceRoot":"../../../src","sources":["sd-jwt/types.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AAEO,MAAME,QAAQ,GAAGC,MAAC,CAACC,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,aAAa,CAAC;AAACC,OAAA,CAAAL,QAAA,GAAAA,QAAA;AAItD,MAAMM,qBAAqB,GAAGL,MAAC,CAACM,MAAM,CAAC;EAAEC,GAAG,EAAEP,MAAC,CAACQ,KAAK,CAACR,MAAC,CAACS,MAAM,CAAC,CAAC;AAAE,CAAC,CAAC;;AAE3E;AACA;AACA;AACA;AACA;AACA;AALAL,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAOO,MAAMK,UAAU,GAAGV,MAAC,CAACW,KAAK,CAAC,CAChC,UAAWX,MAAC,CAACS,MAAM,CAAC,CAAC,EACrB,gBAAiBT,MAAC,CAACS,MAAM,CAAC,CAAC,EAC3B,iBAAkBT,MAAC,CAACY,OAAO,CAAC,CAAC,CAC9B,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPAR,OAAA,CAAAM,UAAA,GAAAA,UAAA;AAcO,MAAMG,QAAQ,GAAGb,MAAC,CAACM,MAAM,CAAC;EAC/BQ,MAAM,EAAEd,MAAC,CAACM,MAAM,CAAC;IACfS,GAAG,EAAEf,MAAC,CAACgB,OAAO,CAAC,WAAW,CAAC;IAC3BC,GAAG,EAAEjB,MAAC,CAACS,MAAM,CAAC,CAAC;IACfS,GAAG,EAAElB,MAAC,CAACS,MAAM,CAAC,CAAC,CAACU,QAAQ,CAAC,CAAC;IAC1BC,WAAW,EAAEpB,MAAC,CAACQ,KAAK,CAACR,MAAC,CAACS,MAAM,CAAC,CAAC;EACjC,CAAC,CAAC;EACFY,OAAO,EAAErB,MAAC,CAACM,MAAM,CAAC;IAChBgB,GAAG,EAAEtB,MAAC,CAACS,MAAM,CAAC,CAAC;IACfc,GAAG,EAAEvB,MAAC,CAACS,MAAM,CAAC,CAAC;IACfe,GAAG,EAAExB,MAAC,CAACS,MAAM,CAAC,CAAC;IACfgB,GAAG,EAAE1B,QAAQ;IACb2B,GAAG,EAAE3B,QAAQ;IACb4B,MAAM,EAAE3B,MAAC,CAACS,MAAM,CAAC,CAAC;IAClBmB,GAAG,EAAE5B,MAAC,CAACM,MAAM,CAAC;MACZuB,GAAG,EAAEC;IACP,CAAC,CAAC;IACFC,IAAI,EAAE/B,MAAC,
|
1
|
+
{"version":3,"names":["_jwk","require","_zod","UnixTime","z","number","min","max","exports","ObfuscatedDisclosures","object","_sd","array","string","Disclosure","tuple","unknown","SdJwt4VC","header","typ","literal","alg","kid","optional","trust_chain","payload","iss","sub","jti","iat","exp","status","cnf","jwk","JWK","type","verified_claims","verification","intersection","trust_framework","assurance_level","claims","_sd_alg"],"sourceRoot":"../../../src","sources":["sd-jwt/types.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AAEO,MAAME,QAAQ,GAAGC,MAAC,CAACC,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,aAAa,CAAC;AAACC,OAAA,CAAAL,QAAA,GAAAA,QAAA;AAItD,MAAMM,qBAAqB,GAAGL,MAAC,CAACM,MAAM,CAAC;EAAEC,GAAG,EAAEP,MAAC,CAACQ,KAAK,CAACR,MAAC,CAACS,MAAM,CAAC,CAAC;AAAE,CAAC,CAAC;;AAE3E;AACA;AACA;AACA;AACA;AACA;AALAL,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAOO,MAAMK,UAAU,GAAGV,MAAC,CAACW,KAAK,CAAC,CAChC,UAAWX,MAAC,CAACS,MAAM,CAAC,CAAC,EACrB,gBAAiBT,MAAC,CAACS,MAAM,CAAC,CAAC,EAC3B,iBAAkBT,MAAC,CAACY,OAAO,CAAC,CAAC,CAC9B,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPAR,OAAA,CAAAM,UAAA,GAAAA,UAAA;AAcO,MAAMG,QAAQ,GAAGb,MAAC,CAACM,MAAM,CAAC;EAC/BQ,MAAM,EAAEd,MAAC,CAACM,MAAM,CAAC;IACfS,GAAG,EAAEf,MAAC,CAACgB,OAAO,CAAC,WAAW,CAAC;IAC3BC,GAAG,EAAEjB,MAAC,CAACS,MAAM,CAAC,CAAC;IACfS,GAAG,EAAElB,MAAC,CAACS,MAAM,CAAC,CAAC,CAACU,QAAQ,CAAC,CAAC;IAC1BC,WAAW,EAAEpB,MAAC,CAACQ,KAAK,CAACR,MAAC,CAACS,MAAM,CAAC,CAAC;EACjC,CAAC,CAAC;EACFY,OAAO,EAAErB,MAAC,CA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