@pagopa/io-react-native-wallet 0.15.2 → 0.15.3
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/client/generated/wallet-provider.js +4 -2
- package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/issuing.js +4 -4
- package/lib/commonjs/wallet-instance-attestation/issuing.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/client/generated/wallet-provider.js +4 -2
- package/lib/module/client/generated/wallet-provider.js.map +1 -1
- package/lib/module/wallet-instance-attestation/issuing.js +4 -4
- package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/module/wallet-instance-attestation/types.js +3 -0
- package/lib/module/wallet-instance-attestation/types.js.map +1 -1
- package/lib/typescript/client/generated/wallet-provider.d.ts +21 -3
- package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/types.d.ts +8 -0
- package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client/generated/wallet-provider.ts +4 -2
- package/src/wallet-instance-attestation/issuing.ts +4 -4
- package/src/wallet-instance-attestation/types.ts +5 -0
@@ -12,7 +12,9 @@ const NonceDetailView = _zod.default.object({
|
|
12
12
|
nonce: _zod.default.string()
|
13
13
|
});
|
14
14
|
exports.NonceDetailView = NonceDetailView;
|
15
|
-
const WalletAttestationView = _zod.default.
|
15
|
+
const WalletAttestationView = _zod.default.object({
|
16
|
+
wallet_attestation: _zod.default.string()
|
17
|
+
});
|
16
18
|
exports.WalletAttestationView = WalletAttestationView;
|
17
19
|
const CreateWalletInstanceBody = _zod.default.object({
|
18
20
|
challenge: _zod.default.string(),
|
@@ -59,7 +61,7 @@ const post_CreateWalletAttestation = {
|
|
59
61
|
parameters: _zod.default.object({
|
60
62
|
body: CreateWalletAttestationBody
|
61
63
|
}),
|
62
|
-
response:
|
64
|
+
response: WalletAttestationView
|
63
65
|
};
|
64
66
|
|
65
67
|
// <EndpointByMethod>
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_zod","_interopRequireDefault","require","obj","__esModule","default","NonceDetailView","z","object","nonce","string","exports","WalletAttestationView","CreateWalletInstanceBody","challenge","key_attestation","hardware_key_tag","CreateWalletAttestationBody","grant_type","literal","assertion","ProblemDetail","type","optional","title","status","number","detail","instance","FiscalCode","Id","get_GetNonce","method","path","parameters","never","response","post_CreateWalletInstance","body","unknown","post_CreateWalletAttestation","EndpointByMethod","get","post","ApiClient","baseUrl","constructor","fetcher","setBaseUrl","arguments","length","undefined","createApiClient"],"sourceRoot":"../../../../src","sources":["client/generated/wallet-provider.ts"],"mappings":";;;;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoB,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAGb,MAAMG,eAAe,GAAGC,YAAC,CAACC,MAAM,CAAC;EACtCC,KAAK,EAAEF,YAAC,CAACG,MAAM,CAAC;AAClB,CAAC,CAAC;AAACC,OAAA,CAAAL,eAAA,GAAAA,eAAA;AAGI,MAAMM,qBAAqB,GAAGL,YAAC,CAACG,MAAM,CAAC,CAAC;AAACC,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;
|
1
|
+
{"version":3,"names":["_zod","_interopRequireDefault","require","obj","__esModule","default","NonceDetailView","z","object","nonce","string","exports","WalletAttestationView","wallet_attestation","CreateWalletInstanceBody","challenge","key_attestation","hardware_key_tag","CreateWalletAttestationBody","grant_type","literal","assertion","ProblemDetail","type","optional","title","status","number","detail","instance","FiscalCode","Id","get_GetNonce","method","path","parameters","never","response","post_CreateWalletInstance","body","unknown","post_CreateWalletAttestation","EndpointByMethod","get","post","ApiClient","baseUrl","constructor","fetcher","setBaseUrl","arguments","length","undefined","createApiClient"],"sourceRoot":"../../../../src","sources":["client/generated/wallet-provider.ts"],"mappings":";;;;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoB,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAGb,MAAMG,eAAe,GAAGC,YAAC,CAACC,MAAM,CAAC;EACtCC,KAAK,EAAEF,YAAC,CAACG,MAAM,CAAC;AAClB,CAAC,CAAC;AAACC,OAAA,CAAAL,eAAA,GAAAA,eAAA;AAGI,MAAMM,qBAAqB,GAAGL,YAAC,CAACC,MAAM,CAAC;EAC5CK,kBAAkB,EAAEN,YAAC,CAACG,MAAM,CAAC;AAC/B,CAAC,CAAC;AAACC,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAGI,MAAME,wBAAwB,GAAGP,YAAC,CAACC,MAAM,CAAC;EAC/CO,SAAS,EAAER,YAAC,CAACG,MAAM,CAAC,CAAC;EACrBM,eAAe,EAAET,YAAC,CAACG,MAAM,CAAC,CAAC;EAC3BO,gBAAgB,EAAEV,YAAC,CAACG,MAAM,CAAC;AAC7B,CAAC,CAAC;AAACC,OAAA,CAAAG,wBAAA,GAAAA,wBAAA;AAGI,MAAMI,2BAA2B,GAAGX,YAAC,CAACC,MAAM,CAAC;EAClDW,UAAU,EAAEZ,YAAC,CAACa,OAAO,CAAC,6CAA6C,CAAC;EACpEC,SAAS,EAAEd,YAAC,CAACG,MAAM,CAAC;AACtB,CAAC,CAAC;AAACC,OAAA,CAAAO,2BAAA,GAAAA,2BAAA;AAGI,MAAMI,aAAa,GAAGf,YAAC,CAACC,MAAM,CAAC;EACpCe,IAAI,EAAEhB,YAAC,CAACG,MAAM,CAAC,CAAC,CAACc,QAAQ,CAAC,CAAC;EAC3BC,KAAK,EAAElB,YAAC,CAACG,MAAM,CAAC,CAAC,CAACc,QAAQ,CAAC,CA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C;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA"}
|
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.getAttestation = void 0;
|
7
7
|
exports.getAttestationRequest = getAttestationRequest;
|
8
8
|
var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
|
9
|
-
var _zod = require("zod");
|
10
9
|
var _jwk = require("../utils/jwk");
|
11
10
|
var _client = require("../client");
|
12
11
|
var _errors = require("../utils/errors");
|
12
|
+
var _types = require("./types");
|
13
13
|
/**
|
14
14
|
* Getter for an attestation request. The attestation request is a JWT that will be sent to the Wallet Provider to request a Wallet Instance Attestation.
|
15
15
|
*
|
@@ -81,13 +81,13 @@ const getAttestation = async _ref => {
|
|
81
81
|
const signedAttestationRequest = await getAttestationRequest(challenge, wiaCryptoContext, integrityContext, walletProviderBaseUrl);
|
82
82
|
|
83
83
|
// 3. Request WIA
|
84
|
-
const
|
84
|
+
const tokenResponse = await api.post("/token", {
|
85
85
|
body: {
|
86
86
|
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
87
87
|
assertion: signedAttestationRequest
|
88
88
|
}
|
89
|
-
}).then(result =>
|
90
|
-
return
|
89
|
+
}).then(result => _types.TokenResponse.parse(result)).catch(handleAttestationCreationError);
|
90
|
+
return tokenResponse.wallet_attestation;
|
91
91
|
};
|
92
92
|
exports.getAttestation = getAttestation;
|
93
93
|
const handleAttestationCreationError = e => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_ioReactNativeJwt","require","
|
1
|
+
{"version":3,"names":["_ioReactNativeJwt","require","_jwk","_client","_errors","_types","getAttestationRequest","challenge","wiaCryptoContext","integrityContext","walletProviderBaseUrl","jwk","getPublicKey","parsedJwk","JWK","parse","keyThumbprint","thumbprint","publicKey","kid","clientData","jwk_thumbprint","hardwareKeyTag","getHardwareKeyTag","signature","authenticatorData","getHardwareSignatureWithAuthData","JSON","stringify","SignJWT","setPayload","iss","sub","hardware_signature","integrity_assertion","hardware_key_tag","cnf","fixBase64EncodingOnKey","setProtectedHeader","typ","setIssuedAt","setExpirationTime","sign","getAttestation","_ref","appFetch","fetch","api","getWalletProviderClient","get","then","response","nonce","signedAttestationRequest","tokenResponse","post","body","grant_type","assertion","result","TokenResponse","catch","handleAttestationCreationError","wallet_attestation","exports","e","WalletProviderResponseError","statusCode","WalletInstanceRevokedError","claim","reason","WalletInstanceNotFoundError","WalletInstanceAttestationIssuingError"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/issuing.ts"],"mappings":";;;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AAMA,IAAAI,MAAA,GAAAJ,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeK,qBAAqBA,CACzCC,SAAiB,EACjBC,gBAA+B,EAC/BC,gBAAkC,EAClCC,qBAA6B,EACZ;EACjB,MAAMC,GAAG,GAAG,MAAMH,gBAAgB,CAACI,YAAY,CAAC,CAAC;EACjD,MAAMC,SAAS,GAAGC,QAAG,CAACC,KAAK,CAACJ,GAAG,CAAC;EAChC,MAAMK,aAAa,GAAG,MAAM,IAAAC,4BAAU,EAACJ,SAAS,CAAC;EACjD,MAAMK,SAAS,GAAG;IAAE,GAAGL,SAAS;IAAEM,GAAG,EAAEH;EAAc,CAAC;EAEtD,MAAMI,UAAU,GAAG;IACjBb,SAAS;IACTc,cAAc,EAAEL;EAClB,CAAC;EAED,MAAMM,cAAc,GAAGb,gBAAgB,CAACc,iBAAiB,CAAC,CAAC;EAC3D,MAAM;IAAEC,SAAS;IAAEC;EAAkB,CAAC,GACpC,MAAMhB,gBAAgB,CAACiB,gCAAgC,CACrDC,IAAI,CAACC,SAAS,CAACR,UAAU,CAC3B,CAAC;EAEH,OAAO,IAAIS,yBAAO,CA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AK,CAAC4C,MAAM,CAAC,CAAC,CAC7CE,KAAK,CAACC,8BAA8B,CAAC;EAExC,OAAOR,aAAa,CAACS,kBAAkB;AACzC,CAAC;AAACC,OAAA,CAAArB,cAAA,GAAAA,cAAA;AAEF,MAAMmB,8BAA8B,GAAIG,CAAU,IAAK;EACrD,IAAI,EAAEA,CAAC,YAAYC,mCAA2B,CAAC,EAAE;IAC/C,MAAMD,CAAC;EACT;EAEA,IAAIA,CAAC,CAACE,UAAU,KAAK,GAAG,EAAE;IACxB,MAAM,IAAIC,kCAA0B,CAClC,4DAA4D,EAC5DH,CAAC,CAACI,KAAK,EACPJ,CAAC,CAACK,MACJ,CAAC;EACH;EAEA,IAAIL,CAAC,CAACE,UAAU,KAAK,GAAG,EAAE;IACxB,MAAM,IAAII,mCAA2B,CACnC,wEAAwE,EACxEN,CAAC,CAACI,KAAK,EACPJ,CAAC,CAACK,MACJ,CAAC;EACH;EAEA,MAAM,IAAIE,6CAAqC,CAC5C,uEAAsEP,CAAC,CAACE,UAAW,GAAE,EACtFF,CAAC,CAACI,KAAK,EACPJ,CAAC,CAACK,MACJ,CAAC;AACH,CAAC"}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.WalletInstanceAttestationRequestJwt = exports.WalletInstanceAttestationJwt = void 0;
|
6
|
+
exports.WalletInstanceAttestationRequestJwt = exports.WalletInstanceAttestationJwt = exports.TokenResponse = void 0;
|
7
7
|
var _jwk = require("../utils/jwk");
|
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); }
|
@@ -63,4 +63,8 @@ const WalletInstanceAttestationJwt = z.object({
|
|
63
63
|
}))
|
64
64
|
});
|
65
65
|
exports.WalletInstanceAttestationJwt = WalletInstanceAttestationJwt;
|
66
|
+
const TokenResponse = z.object({
|
67
|
+
wallet_attestation: z.string()
|
68
|
+
});
|
69
|
+
exports.TokenResponse = TokenResponse;
|
66
70
|
//# sourceMappingURL=types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_jwk","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","UnixTime","number","min","max","Jwt","object","header","alg","string","kid","typ","x5c","array","optional","trust_chain","payload","iss","iat","exp","cnf","jwk","intersection","JWK","WalletInstanceAttestationRequestJwt","shape","literal","aud","jti","nonce","exports","WalletInstanceAttestationJwt","sub","aal","authorization_endpoint","response_types_supported","vp_formats_supported","request_object_signing_alg_values_supported","presentation_definition_uri_supported","boolean"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/types.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAyB,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,SAAAF,wBAAAM,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,GAA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;EACzC,CAAC,CACH,CAAC;EACDV,OAAO,EAAEvC,CAAC,CAAC6C,YAAY,CACrBjB,GAAG,CAACoB,KAAK,CAACT,OAAO,EACjBvC,CAAC,CAAC6B,MAAM,CAAC;IACP0B,GAAG,EAAEvD,CAAC,CAACgC,MAAM,CAAC,CAAC;IACfwB,GAAG,EAAExD,CAAC,CAACgC,MAAM,CAAC,CAAC;IACfyB,sBAAsB,EAAEzD,CAAC,CAACgC,MAAM,CAAC,CAAC;IAClC0B,wBAAwB,EAAE1D,CAAC,CAACoC,KAAK,CAACpC,CAAC,CAACgC,MAAM,CAAC,CAAC,CAAC;IAC7C2B,oBAAoB,EAAE3D,CAAC,CAAC6B,MAAM,CAAC;MAC7B,WAAW,EAAE7B,CAAC,CACX6B,MAAM,CAAC;QACN,mBAAmB,EAAE7B,CAAC,CAACoC,KAAK,CAACpC,CAAC,CAACgC,MAAM,CAAC,CAAC;MACzC,CAAC,CAAC,CACDK,QAAQ,CAAC,CAAC;MACb,WAAW,EAAErC,CAAC,CACX6B,MAAM,CAAC;QACN,mBAAmB,EAAE7B,CAAC,CAACoC,KAAK,CAACpC,CAAC,CAACgC,MAAM,CAAC,CAAC;MACzC,CAAC,CAAC,CACDK,QAAQ,CAAC;IACd,CAAC,CAAC;IACFuB,2CAA2C,EAAE5D,CAAC,CAACoC,KAAK,CAACpC,CAAC,CAACgC,MAAM,CAAC,CAAC,CAAC;IAChE6B,qCAAqC,EAAE7D,CAAC,CAAC8D,OAAO,CAAC;EACnD,CAAC,CACH;AACF,CAAC,CAAC;AAACT,OAAA,CAAAC,4BAAA,GAAAA,4BAAA"}
|
1
|
+
{"version":3,"names":["_jwk","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","UnixTime","number","min","max","Jwt","object","header","alg","string","kid","typ","x5c","array","optional","trust_chain","payload","iss","iat","exp","cnf","jwk","intersection","JWK","WalletInstanceAttestationRequestJwt","shape","literal","aud","jti","nonce","exports","WalletInstanceAttestationJwt","sub","aal","authorization_endpoint","response_types_supported","vp_formats_supported","request_object_signing_alg_values_supported","presentation_definition_uri_supported","boolean","TokenResponse","wallet_attestation"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/types.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAyB,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,SAAAF,wBAAAM,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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C6B,MAAM,CAAC;MAC7B,WAAW,EAAE7B,CAAC,CACX6B,MAAM,CAAC;QACN,mBAAmB,EAAE7B,CAAC,CAACoC,KAAK,CAACpC,CAAC,CAACgC,MAAM,CAAC,CAAC;MACzC,CAAC,CAAC,CACDK,QAAQ,CAAC,CAAC;MACb,WAAW,EAAErC,CAAC,CACX6B,MAAM,CAAC;QACN,mBAAmB,EAAE7B,CAAC,CAACoC,KAAK,CAACpC,CAAC,CAACgC,MAAM,CAAC,CAAC;MACzC,CAAC,CAAC,CACDK,QAAQ,CAAC;IACd,CAAC,CAAC;IACFuB,2CAA2C,EAAE5D,CAAC,CAACoC,KAAK,CAACpC,CAAC,CAACgC,MAAM,CAAC,CAAC,CAAC;IAChE6B,qCAAqC,EAAE7D,CAAC,CAAC8D,OAAO,CAAC;EACnD,CAAC,CACH;AACF,CAAC,CAAC;AAACT,OAAA,CAAAC,4BAAA,GAAAA,4BAAA;AAGI,MAAMS,aAAa,GAAG/D,CAAC,CAAC6B,MAAM,CAAC;EACpCmC,kBAAkB,EAAEhE,CAAC,CAACgC,MAAM,CAAC;AAC/B,CAAC,CAAC;AAACqB,OAAA,CAAAU,aAAA,GAAAA,aAAA"}
|
@@ -2,7 +2,9 @@ import z from "zod";
|
|
2
2
|
export const NonceDetailView = z.object({
|
3
3
|
nonce: z.string()
|
4
4
|
});
|
5
|
-
export const WalletAttestationView = z.
|
5
|
+
export const WalletAttestationView = z.object({
|
6
|
+
wallet_attestation: z.string()
|
7
|
+
});
|
6
8
|
export const CreateWalletInstanceBody = z.object({
|
7
9
|
challenge: z.string(),
|
8
10
|
key_attestation: z.string(),
|
@@ -41,7 +43,7 @@ export const post_CreateWalletAttestation = {
|
|
41
43
|
parameters: z.object({
|
42
44
|
body: CreateWalletAttestationBody
|
43
45
|
}),
|
44
|
-
response:
|
46
|
+
response: WalletAttestationView
|
45
47
|
};
|
46
48
|
|
47
49
|
// <EndpointByMethod>
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["z","NonceDetailView","object","nonce","string","WalletAttestationView","CreateWalletInstanceBody","challenge","key_attestation","hardware_key_tag","CreateWalletAttestationBody","grant_type","literal","assertion","ProblemDetail","type","optional","title","status","number","detail","instance","FiscalCode","Id","get_GetNonce","method","path","parameters","never","response","post_CreateWalletInstance","body","unknown","post_CreateWalletAttestation","EndpointByMethod","get","post","ApiClient","baseUrl","constructor","fetcher","setBaseUrl","arguments","length","undefined","createApiClient"],"sourceRoot":"../../../../src","sources":["client/generated/wallet-provider.ts"],"mappings":"AAAA,OAAOA,CAAC,MAAM,KAAK;AAGnB,OAAO,MAAMC,eAAe,GAAGD,CAAC,CAACE,MAAM,CAAC;EACtCC,KAAK,EAAEH,CAAC,CAACI,MAAM,CAAC;AAClB,CAAC,CAAC;AAGF,OAAO,MAAMC,qBAAqB,GAAGL,CAAC,
|
1
|
+
{"version":3,"names":["z","NonceDetailView","object","nonce","string","WalletAttestationView","wallet_attestation","CreateWalletInstanceBody","challenge","key_attestation","hardware_key_tag","CreateWalletAttestationBody","grant_type","literal","assertion","ProblemDetail","type","optional","title","status","number","detail","instance","FiscalCode","Id","get_GetNonce","method","path","parameters","never","response","post_CreateWalletInstance","body","unknown","post_CreateWalletAttestation","EndpointByMethod","get","post","ApiClient","baseUrl","constructor","fetcher","setBaseUrl","arguments","length","undefined","createApiClient"],"sourceRoot":"../../../../src","sources":["client/generated/wallet-provider.ts"],"mappings":"AAAA,OAAOA,CAAC,MAAM,KAAK;AAGnB,OAAO,MAAMC,eAAe,GAAGD,CAAC,CAACE,MAAM,CAAC;EACtCC,KAAK,EAAEH,CAAC,CAACI,MAAM,CAAC;AAClB,CAAC,CAAC;AAGF,OAAO,MAAMC,qBAAqB,GAAGL,CAAC,CAACE,MAAM,CAAC;EAC5CI,kBAAkB,EAAEN,CAAC,CAACI,MAAM,CAAC;AAC/B,CAAC,CAAC;AAGF,OAAO,MAAMG,wBAAwB,GAAGP,CAAC,CAACE,MAAM,CAAC;EAC/CM,SAAS,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IAAI,CAACF,OAAO,GAAGZ,IAAI,EAAAgB,SAAA,CAAAC,MAAA,QAAAC,SAAA,GAAAF,SAAA,GAAW,CAAC;EAC7D;EACA;AACF;;AAEA,OAAO,SAASG,eAAeA,CAACL,OAAgB,EAAEF,OAAgB,EAAE;EAClE,OAAO,IAAID,SAAS,CAACG,OAAO,CAAC,CAACC,UAAU,CAACH,OAAO,IAAI,EAAE,CAAC;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { SignJWT, thumbprint } from "@pagopa/io-react-native-jwt";
|
2
|
-
import { z } from "zod";
|
3
2
|
import { JWK, fixBase64EncodingOnKey } from "../utils/jwk";
|
4
3
|
import { getWalletProviderClient } from "../client";
|
5
4
|
import { WalletProviderResponseError, WalletInstanceRevokedError, WalletInstanceNotFoundError, WalletInstanceAttestationIssuingError } from "../utils/errors";
|
5
|
+
import { TokenResponse } from "./types";
|
6
6
|
|
7
7
|
/**
|
8
8
|
* Getter for an attestation request. The attestation request is a JWT that will be sent to the Wallet Provider to request a Wallet Instance Attestation.
|
@@ -75,13 +75,13 @@ export const getAttestation = async _ref => {
|
|
75
75
|
const signedAttestationRequest = await getAttestationRequest(challenge, wiaCryptoContext, integrityContext, walletProviderBaseUrl);
|
76
76
|
|
77
77
|
// 3. Request WIA
|
78
|
-
const
|
78
|
+
const tokenResponse = await api.post("/token", {
|
79
79
|
body: {
|
80
80
|
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
81
81
|
assertion: signedAttestationRequest
|
82
82
|
}
|
83
|
-
}).then(result =>
|
84
|
-
return
|
83
|
+
}).then(result => TokenResponse.parse(result)).catch(handleAttestationCreationError);
|
84
|
+
return tokenResponse.wallet_attestation;
|
85
85
|
};
|
86
86
|
const handleAttestationCreationError = e => {
|
87
87
|
if (!(e instanceof WalletProviderResponseError)) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["SignJWT","thumbprint","
|
1
|
+
{"version":3,"names":["SignJWT","thumbprint","JWK","fixBase64EncodingOnKey","getWalletProviderClient","WalletProviderResponseError","WalletInstanceRevokedError","WalletInstanceNotFoundError","WalletInstanceAttestationIssuingError","TokenResponse","getAttestationRequest","challenge","wiaCryptoContext","integrityContext","walletProviderBaseUrl","jwk","getPublicKey","parsedJwk","parse","keyThumbprint","publicKey","kid","clientData","jwk_thumbprint","hardwareKeyTag","getHardwareKeyTag","signature","authenticatorData","getHardwareSignatureWithAuthData","JSON","stringify","setPayload","iss","sub","hardware_signature","integrity_assertion","hardware_key_tag","cnf","setProtectedHeader","typ","setIssuedAt","setExpirationTime","sign","getAttestation","_ref","appFetch","fetch","api","get","then","response","nonce","signedAttestationRequest","tokenResponse","post","body","grant_type","assertion","result","catch","handleAttestationCreationError","wallet_attestation","e","statusCode","claim","reason"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/issuing.ts"],"mappings":"AACA,SAASA,OAAO,EAAEC,UAAU,QAAQ,6BAA6B;AACjE,SAASC,GAAG,EAAEC,sBAAsB,QAAQ,cAAc;AAC1D,SAASC,uBAAuB,QAAQ,WAAW;AAEnD,SACEC,2BAA2B,EAC3BC,0BAA0B,EAC1BC,2BAA2B,EAC3BC,qCAAqC,QAChC,iBAAiB;AACxB,SAASC,aAAa,QAAQ,SAAS;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,qBAAqBA,CACzCC,SAAiB,EACjBC,gBAA+B,EAC/BC,gBAAkC,EAClCC,qBAA6B,EACZ;EACjB,MAAMC,GAAG,GAAG,MAAMH,gBAAgB,CAACI,YAAY,CAAC,CAAC;EACjD,MAAMC,SAAS,GAAGf,GAAG,CAACgB,KAAK,CAACH,GAAG,CAAC;EAChC,MAAMI,aAAa,GAAG,MAAMlB,UAAU,CAACgB,SAAS,CAAC;EACjD,MAAMG,SAAS,GAAG;IAAE,GAAGH,SAAS;IAAEI,GAAG,EAAEF;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,MAAM1C,qBAAqB,CAC1DC,SAAS,EACTC,gBAAgB,EAChBC,gBAAgB,EAChBC,qBACF,CAAC;;EAED;EACA,MAAMuC,aAAa,GAAG,MAAMN,GAAG,CAC5BO,IAAI,CAAC,QAAQ,EAAE;IACdC,IAAI,EAAE;MACJC,UAAU,EAAE,6CAA6C;MACzDC,SAAS,EAAEL;IACb;EACF,CAAC,CAAC,CACDH,IAAI,CAAES,MAAM,IAAKjD,aAAa,CAACS,KAAK,CAACwC,MAAM,CAAC,CAAC,CAC7CC,KAAK,CAACC,8BAA8B,CAAC;EAExC,OAAOP,aAAa,CAACQ,kBAAkB;AACzC,CAAC;AAED,MAAMD,8BAA8B,GAAIE,CAAU,IAAK;EACrD,IAAI,EAAEA,CAAC,YAAYzD,2BAA2B,CAAC,EAAE;IAC/C,MAAMyD,CAAC;EACT;EAEA,IAAIA,CAAC,CAACC,UAAU,KAAK,GAAG,EAAE;IACxB,MAAM,IAAIzD,0BAA0B,CAClC,4DAA4D,EAC5DwD,CAAC,CAACE,KAAK,EACPF,CAAC,CAACG,MACJ,CAAC;EACH;EAEA,IAAIH,CAAC,CAACC,UAAU,KAAK,GAAG,EAAE;IACxB,MAAM,IAAIxD,2BAA2B,CACnC,wEAAwE,EACxEuD,CAAC,CAACE,KAAK,EACPF,CAAC,CAACG,MACJ,CAAC;EACH;EAEA,MAAM,IAAIzD,qCAAqC,CAC5C,uEAAsEsD,CAAC,CAACC,UAAW,GAAE,EACtFD,CAAC,CAACE,KAAK,EACPF,CAAC,CAACG,MACJ,CAAC;AACH,CAAC"}
|
@@ -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","jti","nonce","WalletInstanceAttestationJwt","sub","aal","authorization_endpoint","response_types_supported","vp_formats_supported","request_object_signing_alg_values_supported","presentation_definition_uri_supported","boolean"],"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,C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,WAAW,EAAEd,CAAC,CACXM,MAAM,CAAC;QACN,mBAAmB,EAAEN,CAAC,CAACa,KAAK,CAACb,CAAC,CAACS,MAAM,CAAC,CAAC;MACzC,CAAC,CAAC,CACDK,QAAQ,CAAC;IACd,CAAC,CAAC;IACFqB,2CAA2C,EAAEnC,CAAC,CAACa,KAAK,CAACb,CAAC,CAACS,MAAM,CAAC,CAAC,CAAC;IAChE2B,qCAAqC,EAAEpC,CAAC,CAACqC,OAAO,CAAC;EACnD,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","jti","nonce","WalletInstanceAttestationJwt","sub","aal","authorization_endpoint","response_types_supported","vp_formats_supported","request_object_signing_alg_values_supported","presentation_definition_uri_supported","boolean","TokenResponse","wallet_attestation"],"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,CA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B;EACzC,CAAC,CACH,CAAC;EACDT,OAAO,EAAEhB,CAAC,CAACsB,YAAY,CACrBjB,GAAG,CAACmB,KAAK,CAACR,OAAO,EACjBhB,CAAC,CAACM,MAAM,CAAC;IACPwB,GAAG,EAAE9B,CAAC,CAACS,MAAM,CAAC,CAAC;IACfsB,GAAG,EAAE/B,CAAC,CAACS,MAAM,CAAC,CAAC;IACfuB,sBAAsB,EAAEhC,CAAC,CAACS,MAAM,CAAC,CAAC;IAClCwB,wBAAwB,EAAEjC,CAAC,CAACa,KAAK,CAACb,CAAC,CAACS,MAAM,CAAC,CAAC,CAAC;IAC7CyB,oBAAoB,EAAElC,CAAC,CAACM,MAAM,CAAC;MAC7B,WAAW,EAAEN,CAAC,CACXM,MAAM,CAAC;QACN,mBAAmB,EAAEN,CAAC,CAACa,KAAK,CAACb,CAAC,CAACS,MAAM,CAAC,CAAC;MACzC,CAAC,CAAC,CACDK,QAAQ,CAAC,CAAC;MACb,WAAW,EAAEd,CAAC,CACXM,MAAM,CAAC;QACN,mBAAmB,EAAEN,CAAC,CAACa,KAAK,CAACb,CAAC,CAACS,MAAM,CAAC,CAAC;MACzC,CAAC,CAAC,CACDK,QAAQ,CAAC;IACd,CAAC,CAAC;IACFqB,2CAA2C,EAAEnC,CAAC,CAACa,KAAK,CAACb,CAAC,CAACS,MAAM,CAAC,CAAC,CAAC;IAChE2B,qCAAqC,EAAEpC,CAAC,CAACqC,OAAO,CAAC;EACnD,CAAC,CACH;AACF,CAAC,CAAC;AAGF,OAAO,MAAMC,aAAa,GAAGtC,CAAC,CAACM,MAAM,CAAC;EACpCiC,kBAAkB,EAAEvC,CAAC,CAACS,MAAM,CAAC;AAC/B,CAAC,CAAC"}
|
@@ -8,7 +8,13 @@ export declare const NonceDetailView: z.ZodObject<{
|
|
8
8
|
nonce: string;
|
9
9
|
}>;
|
10
10
|
export type WalletAttestationView = z.infer<typeof WalletAttestationView>;
|
11
|
-
export declare const WalletAttestationView: z.
|
11
|
+
export declare const WalletAttestationView: z.ZodObject<{
|
12
|
+
wallet_attestation: z.ZodString;
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
14
|
+
wallet_attestation: string;
|
15
|
+
}, {
|
16
|
+
wallet_attestation: string;
|
17
|
+
}>;
|
12
18
|
export type CreateWalletInstanceBody = z.infer<typeof CreateWalletInstanceBody>;
|
13
19
|
export declare const CreateWalletInstanceBody: z.ZodObject<{
|
14
20
|
challenge: z.ZodString;
|
@@ -130,7 +136,13 @@ export declare const post_CreateWalletAttestation: {
|
|
130
136
|
assertion: string;
|
131
137
|
};
|
132
138
|
}>;
|
133
|
-
response: z.
|
139
|
+
response: z.ZodObject<{
|
140
|
+
wallet_attestation: z.ZodString;
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
142
|
+
wallet_attestation: string;
|
143
|
+
}, {
|
144
|
+
wallet_attestation: string;
|
145
|
+
}>;
|
134
146
|
};
|
135
147
|
export declare const EndpointByMethod: {
|
136
148
|
get: {
|
@@ -205,7 +217,13 @@ export declare const EndpointByMethod: {
|
|
205
217
|
assertion: string;
|
206
218
|
};
|
207
219
|
}>;
|
208
|
-
response: z.
|
220
|
+
response: z.ZodObject<{
|
221
|
+
wallet_attestation: z.ZodString;
|
222
|
+
}, "strip", z.ZodTypeAny, {
|
223
|
+
wallet_attestation: string;
|
224
|
+
}, {
|
225
|
+
wallet_attestation: string;
|
226
|
+
}>;
|
209
227
|
};
|
210
228
|
};
|
211
229
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"wallet-provider.d.ts","sourceRoot":"","sources":["../../../../src/client/generated/wallet-provider.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC9D,eAAO,MAAM,eAAe;;;;;;EAE1B,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO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,IAAI,CAAC,IAAI,SAAS,MAAM,aAAa,EAAE,SAAS,SAAS,aAAa,CAAC,IAAI,CAAC,EAC1E,IAAI,EAAE,IAAI,EACV,GAAG,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,GAC5D,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;CAI3C;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,aAEjE;;AAED;;;;;;;;EAQE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"issuing.d.ts","sourceRoot":"","sources":["../../../src/wallet-instance-attestation/issuing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;
|
1
|
+
{"version":3,"file":"issuing.d.ts","sourceRoot":"","sources":["../../../src/wallet-instance-attestation/issuing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAIjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC;AAS3C;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,aAAa,EAC/B,gBAAgB,EAAE,gBAAgB,EAClC,qBAAqB,EAAE,MAAM,GAC5B,OAAO,CAAC,MAAM,CAAC,CAoCjB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;sBAMP,aAAa;sBACb,gBAAgB;2BACX,MAAM;;;;;MAE3B,QAAQ,MAAM,CA6BjB,CAAC"}
|
@@ -746,4 +746,12 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
|
|
746
746
|
presentation_definition_uri_supported: boolean;
|
747
747
|
};
|
748
748
|
}>;
|
749
|
+
export type TokenResponse = z.infer<typeof TokenResponse>;
|
750
|
+
export declare const TokenResponse: z.ZodObject<{
|
751
|
+
wallet_attestation: z.ZodString;
|
752
|
+
}, "strip", z.ZodTypeAny, {
|
753
|
+
wallet_attestation: string;
|
754
|
+
}, {
|
755
|
+
wallet_attestation: string;
|
756
|
+
}>;
|
749
757
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/wallet-instance-attestation/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AA2BzB,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAC;AACF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe9C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAC;AACF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BvC,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,eAAO,MAAM,aAAa;;;;;;EAExB,CAAC"}
|
package/package.json
CHANGED
@@ -6,7 +6,9 @@ export const NonceDetailView = z.object({
|
|
6
6
|
});
|
7
7
|
|
8
8
|
export type WalletAttestationView = z.infer<typeof WalletAttestationView>;
|
9
|
-
export const WalletAttestationView = z.
|
9
|
+
export const WalletAttestationView = z.object({
|
10
|
+
wallet_attestation: z.string(),
|
11
|
+
});
|
10
12
|
|
11
13
|
export type CreateWalletInstanceBody = z.infer<typeof CreateWalletInstanceBody>;
|
12
14
|
export const CreateWalletInstanceBody = z.object({
|
@@ -61,7 +63,7 @@ export const post_CreateWalletAttestation = {
|
|
61
63
|
parameters: z.object({
|
62
64
|
body: CreateWalletAttestationBody,
|
63
65
|
}),
|
64
|
-
response:
|
66
|
+
response: WalletAttestationView,
|
65
67
|
};
|
66
68
|
|
67
69
|
// <EndpointByMethod>
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { type CryptoContext } from "@pagopa/io-react-native-jwt";
|
2
2
|
import { SignJWT, thumbprint } from "@pagopa/io-react-native-jwt";
|
3
|
-
import { z } from "zod";
|
4
3
|
import { JWK, fixBase64EncodingOnKey } from "../utils/jwk";
|
5
4
|
import { getWalletProviderClient } from "../client";
|
6
5
|
import type { IntegrityContext } from "..";
|
@@ -10,6 +9,7 @@ import {
|
|
10
9
|
WalletInstanceNotFoundError,
|
11
10
|
WalletInstanceAttestationIssuingError,
|
12
11
|
} from "../utils/errors";
|
12
|
+
import { TokenResponse } from "./types";
|
13
13
|
|
14
14
|
/**
|
15
15
|
* Getter for an attestation request. The attestation request is a JWT that will be sent to the Wallet Provider to request a Wallet Instance Attestation.
|
@@ -101,17 +101,17 @@ export const getAttestation = async ({
|
|
101
101
|
);
|
102
102
|
|
103
103
|
// 3. Request WIA
|
104
|
-
const
|
104
|
+
const tokenResponse = await api
|
105
105
|
.post("/token", {
|
106
106
|
body: {
|
107
107
|
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
108
108
|
assertion: signedAttestationRequest,
|
109
109
|
},
|
110
110
|
})
|
111
|
-
.then((result) =>
|
111
|
+
.then((result) => TokenResponse.parse(result))
|
112
112
|
.catch(handleAttestationCreationError);
|
113
113
|
|
114
|
-
return
|
114
|
+
return tokenResponse.wallet_attestation;
|
115
115
|
};
|
116
116
|
|
117
117
|
const handleAttestationCreationError = (e: unknown) => {
|