@pagopa/io-react-native-wallet 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. package/README.md +57 -24
  2. package/lib/commonjs/index.js +13 -0
  3. package/lib/commonjs/index.js.map +1 -1
  4. package/lib/commonjs/rp/__test__/index.test.js +8 -1
  5. package/lib/commonjs/rp/__test__/index.test.js.map +1 -1
  6. package/lib/commonjs/rp/index.js +5 -14
  7. package/lib/commonjs/rp/index.js.map +1 -1
  8. package/lib/commonjs/rp/types.js +7 -27
  9. package/lib/commonjs/rp/types.js.map +1 -1
  10. package/lib/commonjs/trust/chain.js +94 -0
  11. package/lib/commonjs/trust/chain.js.map +1 -0
  12. package/lib/commonjs/trust/index.js +44 -0
  13. package/lib/commonjs/trust/index.js.map +1 -0
  14. package/lib/commonjs/trust/types.js +64 -0
  15. package/lib/commonjs/trust/types.js.map +1 -0
  16. package/lib/commonjs/wallet-instance-attestation/issuing.js +4 -4
  17. package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
  18. package/lib/commonjs/wallet-instance-attestation/types.js +6 -9
  19. package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
  20. package/lib/module/index.js +2 -1
  21. package/lib/module/index.js.map +1 -1
  22. package/lib/module/rp/__test__/index.test.js +8 -1
  23. package/lib/module/rp/__test__/index.test.js.map +1 -1
  24. package/lib/module/rp/index.js +5 -14
  25. package/lib/module/rp/index.js.map +1 -1
  26. package/lib/module/rp/types.js +7 -27
  27. package/lib/module/rp/types.js.map +1 -1
  28. package/lib/module/trust/chain.js +86 -0
  29. package/lib/module/trust/chain.js.map +1 -0
  30. package/lib/module/trust/index.js +34 -0
  31. package/lib/module/trust/index.js.map +1 -0
  32. package/lib/module/trust/types.js +52 -0
  33. package/lib/module/trust/types.js.map +1 -0
  34. package/lib/module/wallet-instance-attestation/issuing.js +4 -4
  35. package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
  36. package/lib/module/wallet-instance-attestation/types.js +6 -9
  37. package/lib/module/wallet-instance-attestation/types.js.map +1 -1
  38. package/lib/typescript/index.d.ts +2 -1
  39. package/lib/typescript/index.d.ts.map +1 -1
  40. package/lib/typescript/rp/index.d.ts.map +1 -1
  41. package/lib/typescript/rp/types.d.ts +232 -145
  42. package/lib/typescript/rp/types.d.ts.map +1 -1
  43. package/lib/typescript/trust/chain.d.ts +17 -0
  44. package/lib/typescript/trust/chain.d.ts.map +1 -0
  45. package/lib/typescript/trust/index.d.ts +16 -0
  46. package/lib/typescript/trust/index.d.ts.map +1 -0
  47. package/lib/typescript/trust/types.d.ts +1041 -0
  48. package/lib/typescript/trust/types.d.ts.map +1 -0
  49. package/lib/typescript/wallet-instance-attestation/types.d.ts +30 -50
  50. package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
  51. package/package.json +1 -1
  52. package/src/index.ts +3 -0
  53. package/src/rp/__test__/index.test.ts +8 -1
  54. package/src/rp/index.ts +5 -20
  55. package/src/rp/types.ts +17 -34
  56. package/src/trust/chain.ts +109 -0
  57. package/src/trust/index.ts +43 -0
  58. package/src/trust/types.ts +56 -0
  59. package/src/wallet-instance-attestation/issuing.ts +4 -4
  60. package/src/wallet-instance-attestation/types.ts +6 -9
@@ -14,7 +14,6 @@ const Jwt = z.object({
14
14
  }),
15
15
  payload: z.object({
16
16
  iss: z.string(),
17
- sub: z.string(),
18
17
  iat: UnixTime,
19
18
  exp: UnixTime,
20
19
  cnf: z.object({
@@ -34,14 +33,15 @@ export const WalletInstanceAttestationRequestJwt = z.object({
34
33
  header: z.intersection(
35
34
  Jwt.shape.header,
36
35
  z.object({
37
- typ: z.literal("var+jwt"),
36
+ typ: z.literal("wiar+jwt"),
38
37
  })
39
38
  ),
40
39
  payload: z.intersection(
41
40
  Jwt.shape.payload,
42
41
  z.object({
42
+ aud: z.string(),
43
43
  jti: z.string(),
44
- type: z.literal("WalletInstanceAttestationRequest"),
44
+ nonce: z.string(),
45
45
  })
46
46
  ),
47
47
  });
@@ -53,17 +53,14 @@ export const WalletInstanceAttestationJwt = z.object({
53
53
  header: z.intersection(
54
54
  Jwt.shape.header,
55
55
  z.object({
56
- typ: z.literal("va+jwt"),
56
+ typ: z.literal("wallet-attestation+jwt"),
57
57
  })
58
58
  ),
59
59
  payload: z.intersection(
60
60
  Jwt.shape.payload,
61
61
  z.object({
62
- type: z.literal("WalletInstanceAttestation"),
63
- policy_uri: z.string().url(),
64
- tos_uri: z.string().url(),
65
- logo_uri: z.string().url(),
66
- asc: z.string(),
62
+ sub: z.string(),
63
+ attested_security_context: z.string(),
67
64
  authorization_endpoint: z.string(),
68
65
  response_types_supported: z.array(z.string()),
69
66
  vp_formats_supported: z.object({