@pagopa/io-react-native-wallet 3.8.2 → 3.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +3 -3
  2. package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -1
  3. package/lib/commonjs/credential/presentation/common/utils/dcql.js +3 -3
  4. package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js +3 -4
  5. package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js.map +1 -1
  6. package/lib/commonjs/credential/status/v1.4.6/01-status-list.js +2 -2
  7. package/lib/commonjs/credential/status/v1.4.6/01-status-list.js.map +1 -1
  8. package/lib/commonjs/credential/status/v1.4.6/03-get-status.js +3 -2
  9. package/lib/commonjs/credential/status/v1.4.6/03-get-status.js.map +1 -1
  10. package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js +1 -0
  11. package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -1
  12. package/lib/commonjs/credentials-catalogue/v1.4.6/mappers.js +1 -0
  13. package/lib/commonjs/credentials-catalogue/v1.4.6/mappers.js.map +1 -1
  14. package/lib/commonjs/key-attestation/v1.4.6/issuing.js +14 -1
  15. package/lib/commonjs/key-attestation/v1.4.6/issuing.js.map +1 -1
  16. package/lib/commonjs/sd-jwt/index.js +4 -5
  17. package/lib/commonjs/sd-jwt/index.js.map +1 -1
  18. package/lib/commonjs/sd-jwt/utils.js +4 -4
  19. package/lib/commonjs/sd-jwt/utils.js.map +1 -1
  20. package/lib/commonjs/utils/callbacks.js +7 -6
  21. package/lib/commonjs/utils/callbacks.js.map +1 -1
  22. package/lib/commonjs/utils/credentials.js +3 -3
  23. package/lib/commonjs/utils/credentials.js.map +1 -1
  24. package/lib/commonjs/utils/error-codes.js +5 -1
  25. package/lib/commonjs/utils/error-codes.js.map +1 -1
  26. package/lib/commonjs/wallet-instance-attestation/common/errors.js +32 -0
  27. package/lib/commonjs/wallet-instance-attestation/common/errors.js.map +1 -0
  28. package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js +2 -21
  29. package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -1
  30. package/lib/commonjs/wallet-instance-attestation/v1.4.6/issuing.js +2 -1
  31. package/lib/commonjs/wallet-instance-attestation/v1.4.6/issuing.js.map +1 -1
  32. package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +3 -3
  33. package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -1
  34. package/lib/module/credential/presentation/common/utils/dcql.js +3 -3
  35. package/lib/module/credential/presentation/common/utils/sd-jwt.js +4 -5
  36. package/lib/module/credential/presentation/common/utils/sd-jwt.js.map +1 -1
  37. package/lib/module/credential/status/v1.4.6/01-status-list.js +1 -1
  38. package/lib/module/credential/status/v1.4.6/01-status-list.js.map +1 -1
  39. package/lib/module/credential/status/v1.4.6/03-get-status.js +3 -2
  40. package/lib/module/credential/status/v1.4.6/03-get-status.js.map +1 -1
  41. package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js +1 -0
  42. package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -1
  43. package/lib/module/credentials-catalogue/v1.4.6/mappers.js +1 -0
  44. package/lib/module/credentials-catalogue/v1.4.6/mappers.js.map +1 -1
  45. package/lib/module/key-attestation/v1.4.6/issuing.js +15 -2
  46. package/lib/module/key-attestation/v1.4.6/issuing.js.map +1 -1
  47. package/lib/module/sd-jwt/index.js +4 -5
  48. package/lib/module/sd-jwt/index.js.map +1 -1
  49. package/lib/module/sd-jwt/utils.js +4 -4
  50. package/lib/module/sd-jwt/utils.js.map +1 -1
  51. package/lib/module/utils/callbacks.js +4 -3
  52. package/lib/module/utils/callbacks.js.map +1 -1
  53. package/lib/module/utils/credentials.js +3 -3
  54. package/lib/module/utils/credentials.js.map +1 -1
  55. package/lib/module/utils/error-codes.js +5 -1
  56. package/lib/module/utils/error-codes.js.map +1 -1
  57. package/lib/module/wallet-instance-attestation/common/errors.js +28 -0
  58. package/lib/module/wallet-instance-attestation/common/errors.js.map +1 -0
  59. package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js +1 -20
  60. package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -1
  61. package/lib/module/wallet-instance-attestation/v1.4.6/issuing.js +2 -1
  62. package/lib/module/wallet-instance-attestation/v1.4.6/issuing.js.map +1 -1
  63. package/lib/typescript/commonjs/credential/presentation/common/utils/dcql.d.ts +4 -28
  64. package/lib/typescript/commonjs/credential/presentation/common/utils/dcql.d.ts.map +1 -1
  65. package/lib/typescript/commonjs/credential/presentation/common/utils/sd-jwt.d.ts.map +1 -1
  66. package/lib/typescript/commonjs/credential/status/v1.4.6/03-get-status.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts +3 -0
  68. package/lib/typescript/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/credentials-catalogue/v1.0.0/mappers.d.ts +1 -0
  70. package/lib/typescript/commonjs/credentials-catalogue/v1.0.0/mappers.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/credentials-catalogue/v1.4.6/mappers.d.ts +1 -0
  72. package/lib/typescript/commonjs/credentials-catalogue/v1.4.6/mappers.d.ts.map +1 -1
  73. package/lib/typescript/commonjs/key-attestation/v1.4.6/issuing.d.ts.map +1 -1
  74. package/lib/typescript/commonjs/sd-jwt/index.d.ts.map +1 -1
  75. package/lib/typescript/commonjs/utils/callbacks.d.ts.map +1 -1
  76. package/lib/typescript/commonjs/utils/error-codes.d.ts +5 -1
  77. package/lib/typescript/commonjs/utils/error-codes.d.ts.map +1 -1
  78. package/lib/typescript/commonjs/wallet-instance-attestation/common/errors.d.ts +5 -0
  79. package/lib/typescript/commonjs/wallet-instance-attestation/common/errors.d.ts.map +1 -0
  80. package/lib/typescript/commonjs/wallet-instance-attestation/v1.0.0/issuing.d.ts.map +1 -1
  81. package/lib/typescript/commonjs/wallet-instance-attestation/v1.4.6/issuing.d.ts.map +1 -1
  82. package/lib/typescript/module/credential/presentation/common/utils/dcql.d.ts +4 -28
  83. package/lib/typescript/module/credential/presentation/common/utils/dcql.d.ts.map +1 -1
  84. package/lib/typescript/module/credential/presentation/common/utils/sd-jwt.d.ts.map +1 -1
  85. package/lib/typescript/module/credential/status/v1.4.6/03-get-status.d.ts.map +1 -1
  86. package/lib/typescript/module/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts +3 -0
  87. package/lib/typescript/module/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts.map +1 -1
  88. package/lib/typescript/module/credentials-catalogue/v1.0.0/mappers.d.ts +1 -0
  89. package/lib/typescript/module/credentials-catalogue/v1.0.0/mappers.d.ts.map +1 -1
  90. package/lib/typescript/module/credentials-catalogue/v1.4.6/mappers.d.ts +1 -0
  91. package/lib/typescript/module/credentials-catalogue/v1.4.6/mappers.d.ts.map +1 -1
  92. package/lib/typescript/module/key-attestation/v1.4.6/issuing.d.ts.map +1 -1
  93. package/lib/typescript/module/sd-jwt/index.d.ts.map +1 -1
  94. package/lib/typescript/module/utils/callbacks.d.ts.map +1 -1
  95. package/lib/typescript/module/utils/error-codes.d.ts +5 -1
  96. package/lib/typescript/module/utils/error-codes.d.ts.map +1 -1
  97. package/lib/typescript/module/wallet-instance-attestation/common/errors.d.ts +5 -0
  98. package/lib/typescript/module/wallet-instance-attestation/common/errors.d.ts.map +1 -0
  99. package/lib/typescript/module/wallet-instance-attestation/v1.0.0/issuing.d.ts.map +1 -1
  100. package/lib/typescript/module/wallet-instance-attestation/v1.4.6/issuing.d.ts.map +1 -1
  101. package/package.json +14 -17
  102. package/src/credential/issuance/common/06-verify-and-parse-credential.sdjwt.ts +4 -4
  103. package/src/credential/presentation/common/utils/dcql.ts +3 -3
  104. package/src/credential/presentation/common/utils/sd-jwt.ts +4 -5
  105. package/src/credential/status/v1.4.6/01-status-list.ts +3 -3
  106. package/src/credential/status/v1.4.6/03-get-status.ts +5 -3
  107. package/src/credentials-catalogue/api/DigitalCredentialsCatalogue.ts +1 -0
  108. package/src/credentials-catalogue/v1.4.6/mappers.ts +1 -0
  109. package/src/key-attestation/v1.4.6/issuing.ts +31 -2
  110. package/src/sd-jwt/index.ts +4 -5
  111. package/src/sd-jwt/utils.ts +4 -4
  112. package/src/utils/callbacks.ts +5 -4
  113. package/src/utils/credentials.ts +3 -3
  114. package/src/utils/error-codes.ts +5 -1
  115. package/src/wallet-instance-attestation/common/errors.ts +41 -0
  116. package/src/wallet-instance-attestation/v1.0.0/issuing.ts +1 -37
  117. package/src/wallet-instance-attestation/v1.4.6/issuing.ts +3 -1
@@ -205,6 +205,7 @@ export declare const mapToCredentialsCatalogue: (input: [{
205
205
  id: string;
206
206
  organization_country: string;
207
207
  organization_type: string;
208
+ background_color?: string | undefined;
208
209
  contacts?: {
209
210
  type: string;
210
211
  value: string;
@@ -1 +1 @@
1
- {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../../src/credentials-catalogue/v1.4.6/mappers.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiGrC,CAAC"}
1
+ {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../../src/credentials-catalogue/v1.4.6/mappers.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGrC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"issuing.d.ts","sourceRoot":"","sources":["../../../../../src/key-attestation/v1.4.6/issuing.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAQ,CAAC;AAwDzD,eAAO,MAAM,cAAc,EAAE,0BAA0B,CAAC,gBAAgB,CA8FrE,CAAC"}
1
+ {"version":3,"file":"issuing.d.ts","sourceRoot":"","sources":["../../../../../src/key-attestation/v1.4.6/issuing.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAQ,CAAC;AA6DzD,eAAO,MAAM,cAAc,EAAE,0BAA0B,CAAC,gBAAgB,CA+FrE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sd-jwt/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAA4B,CAAC;AAK/D,cAAc,YAAS,CAAC;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,GAAI,OAAO,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYnC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,MAAM,EACb,WAAW,MAAM,EACjB,0DAA0D,YAAY,KACrE,OAAO,CAAC;IACT,QAAQ,EAAE,MAAM,CAAC;CAClB,CA2BA,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sd-jwt/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAA4B,CAAC;AAK/D,cAAc,YAAS,CAAC;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,GAAI,OAAO,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYnC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,MAAM,EACb,WAAW,MAAM,EACjB,0DAA0D,YAAY,KACrE,OAAO,CAAC;IACT,QAAQ,EAAE,MAAM,CAAC;CAClB,CA2BA,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"callbacks.d.ts","sourceRoot":"","sources":["../../../../src/utils/callbacks.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAInB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,0BAA0B,CAAC;AAIhF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAO,CAAC;AAYjC,KAAK,sBAAsB,GAAG,IAAI,CAChC,eAAe,EACf,sBAAsB,GAAG,SAAS,CACnC,CAAC;AAyBF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,sBAoC9B,CAAC;AAIF;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,GAClC,MAAM,GAAG,EAAE,KACV,eAAe,CAAC,WAAW,CAS3B,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,GACzC,eAAe,aAAa,KAC3B,eAAe,CAAC,SAAS,CAYzB,CAAC"}
1
+ {"version":3,"file":"callbacks.d.ts","sourceRoot":"","sources":["../../../../src/utils/callbacks.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAInB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,0BAA0B,CAAC;AAGhF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAO,CAAC;AAajC,KAAK,sBAAsB,GAAG,IAAI,CAChC,eAAe,EACf,sBAAsB,GAAG,SAAS,CACnC,CAAC;AAyBF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,sBAoC9B,CAAC;AAIF;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,GAClC,MAAM,GAAG,EAAE,KACV,eAAe,CAAC,WAAW,CAS3B,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,GACzC,eAAe,aAAa,KAC3B,eAAe,CAAC,SAAS,CAYzB,CAAC"}
@@ -23,7 +23,11 @@ export declare const IssuerResponseErrorCodes: {
23
23
  };
24
24
  export declare const WalletProviderResponseErrorCodes: {
25
25
  /**
26
- * An error code thrown when validation fail
26
+ * An error code thrown when an error occurs during the key attestation issuance.
27
+ */
28
+ readonly KeyAttestationIssuingFailed: "ERR_IO_KEY_ATTESTATION_ISSUING_FAILED";
29
+ /**
30
+ * An error code thrown when an error occurs during the wallet attestation issuance.
27
31
  */
28
32
  readonly WalletInstanceAttestationIssuingFailed: "ERR_IO_WALLET_INSTANCE_ATTESTATION_ISSUING_FAILED";
29
33
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../../../src/utils/error-codes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB;IACnC;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;IAGH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AAEX,eAAO,MAAM,gCAAgC;IAC3C;;OAEG;;IAGH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;CAGK,CAAC;AAEX,eAAO,MAAM,8BAA8B;IACzC;;OAEG;;;CAGK,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE3E,MAAM,MAAM,6BAA6B,GACvC,CAAC,OAAO,8BAA8B,CAAC,CAAC,MAAM,OAAO,8BAA8B,CAAC,CAAC;AAEvF,MAAM,MAAM,+BAA+B,GACzC,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,OAAO,gCAAgC,CAAC,CAAC"}
1
+ {"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../../../src/utils/error-codes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB;IACnC;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;IAGH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AAEX,eAAO,MAAM,gCAAgC;IAC3C;;OAEG;;IAEH;;OAEG;;IAGH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;CAGK,CAAC;AAEX,eAAO,MAAM,8BAA8B;IACzC;;OAEG;;;CAGK,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE3E,MAAM,MAAM,6BAA6B,GACvC,CAAC,OAAO,8BAA8B,CAAC,CAAC,MAAM,OAAO,8BAA8B,CAAC,CAAC;AAEvF,MAAM,MAAM,+BAA+B,GACzC,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,OAAO,gCAAgC,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Shared handler for errors that occur during Wallet Instance Attestation issuance.
3
+ */
4
+ export declare const handleAttestationCreationError: (e: unknown) => never;
5
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../../src/wallet-instance-attestation/common/errors.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,eAAO,MAAM,8BAA8B,GAAI,GAAG,OAAO,UA8BxD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"issuing.d.ts","sourceRoot":"","sources":["../../../../../src/wallet-instance-attestation/v1.0.0/issuing.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iBAAQ,CAAC;AAiE3D,eAAO,MAAM,cAAc,EAAE,4BAA4B,CAAC,gBAAgB,CAiDvE,CAAC"}
1
+ {"version":3,"file":"issuing.d.ts","sourceRoot":"","sources":["../../../../../src/wallet-instance-attestation/v1.0.0/issuing.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iBAAQ,CAAC;AA6D3D,eAAO,MAAM,cAAc,EAAE,4BAA4B,CAAC,gBAAgB,CAiDvE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"issuing.d.ts","sourceRoot":"","sources":["../../../../../src/wallet-instance-attestation/v1.4.6/issuing.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iBAAQ,CAAC;AAwD3D,eAAO,MAAM,cAAc,EAAE,4BAA4B,CAAC,gBAAgB,CAgDvE,CAAC"}
1
+ {"version":3,"file":"issuing.d.ts","sourceRoot":"","sources":["../../../../../src/wallet-instance-attestation/v1.4.6/issuing.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iBAAQ,CAAC;AAyD3D,eAAO,MAAM,cAAc,EAAE,4BAA4B,CAAC,gBAAgB,CAiDvE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagopa/io-react-native-wallet",
3
- "version": "3.8.2",
3
+ "version": "3.8.4",
4
4
  "description": "Provide data structures, helpers and API for IO Wallet",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "module": "./lib/module/index.js",
@@ -61,29 +61,26 @@
61
61
  "react-native-quick-crypto": "*"
62
62
  },
63
63
  "dependencies": {
64
+ "@owf/crypto": "^0.4.2",
65
+ "@owf/token-status-list": "^0.4.2",
64
66
  "@pagopa/io-wallet-oauth2": "1.5.8",
65
67
  "@pagopa/io-wallet-oid-federation": "1.5.8",
66
68
  "@pagopa/io-wallet-oid4vci": "1.5.8",
67
69
  "@pagopa/io-wallet-oid4vp": "1.5.8",
68
70
  "@pagopa/io-wallet-utils": "1.5.8",
69
- "@sd-jwt/core": "^0.19.0",
70
- "@sd-jwt/crypto-nodejs": "^0.19.0",
71
- "@sd-jwt/decode": "0.19.0",
72
- "@sd-jwt/jwt-status-list": "^0.19.0",
73
- "@sd-jwt/present": "0.19.0",
74
- "@sd-jwt/types": "^0.19.0",
75
- "dcql": "^3.0.0",
76
- "js-base64": "^3.7.8",
77
- "js-sha256": "^0.11.1",
78
- "jsrsasign": "^11.1.0",
79
- "parse-url": "^10.0.3",
80
- "react-native-url-polyfill": "^2.0.0",
81
- "uuid": "^11.0.3",
82
- "valibot": "1.2.0",
83
- "zod": "^4.3.6"
71
+ "@sd-jwt/core": "^0.22.0",
72
+ "dcql": "^4.0.0",
73
+ "js-base64": "^3.9.4",
74
+ "js-sha256": "^1.0.0",
75
+ "jsrsasign": "^11.1.5",
76
+ "parse-url": "^11.1.0",
77
+ "react-native-url-polyfill": "^4.0.0",
78
+ "uuid": "^14.0.2",
79
+ "valibot": "1.5.0",
80
+ "zod": "4.3.6"
84
81
  },
85
82
  "devDependencies": {
86
- "@pagopa/io-react-native-iso18013": "^0.7.0",
83
+ "@pagopa/io-react-native-iso18013": "^0.8.5",
87
84
  "@types/jsrsasign": "^10.5.15",
88
85
  "auto-changelog": "^2.6.0",
89
86
  "react-native-builder-bob": "^0.43.0",
@@ -1,11 +1,11 @@
1
- import type { Verifier } from "@sd-jwt/types";
1
+ import type { Verifier } from "@sd-jwt/core";
2
2
 
3
+ import { hasher } from "@owf/crypto";
3
4
  import {
4
5
  type CryptoContext,
5
6
  verify as verifyJwt,
6
7
  } from "@pagopa/io-react-native-jwt";
7
8
  import { type SDJwt, SDJwtInstance, type VerifierOptions } from "@sd-jwt/core";
8
- import { digest } from "@sd-jwt/crypto-nodejs";
9
9
 
10
10
  import type { SdJwt4VCBase } from "../../../sd-jwt/types";
11
11
  import type { IssuanceApi, IssuerConfig, ParsedCredential } from "../api";
@@ -212,7 +212,7 @@ async function verifyCredentialSdJwt(
212
212
  holderBindingContext: CryptoContext,
213
213
  ): Promise<SDJwt> {
214
214
  const sdJwtInstance = new SDJwtInstance({
215
- hasher: digest,
215
+ hasher,
216
216
  verifier: sdJwtInstanceVerifier,
217
217
  });
218
218
 
@@ -277,7 +277,7 @@ export const verifyAndParseCredentialSdJwt: IssuanceApi["verifyAndParseCredentia
277
277
  throw new IoWalletError("Credential type not supported by the issuer");
278
278
  }
279
279
 
280
- const parsedCredentialRaw = (await decoded.getClaims(digest)) as Record<
280
+ const parsedCredentialRaw = (await decoded.getClaims(hasher)) as Record<
281
281
  string,
282
282
  unknown
283
283
  >;
@@ -93,10 +93,10 @@ export const getClaimsFromDcqlMatch = (
93
93
  );
94
94
 
95
95
  /**
96
- * Recursively convert a claim path to a {@link PresentationFrame} for `@sd-jwt/present`
96
+ * Recursively convert a claim path to a {@link PresentationFrame} for `@sd-jwt/core`
97
97
  * @param path The claim path array
98
98
  * @param claim The decoded claim
99
- * @returns A presentation frame compatible with `@sd-jwt/present`
99
+ * @returns A presentation frame compatible with `@sd-jwt/core`
100
100
  */
101
101
  export const pathToPresentationFrame = (
102
102
  path: (null | number | string)[],
@@ -132,7 +132,7 @@ export const pathToPresentationFrame = (
132
132
  * Build a presentation frame from the `dcql` result to use for disclosing the requested claims.
133
133
  * @param match The DCQL query match
134
134
  * @param originalQuery The original DCQL query
135
- * @returns A presentation frame compatible with `@sd-jwt/present`
135
+ * @returns A presentation frame compatible with `@sd-jwt/core`
136
136
  */
137
137
  export const getPresentationFrameFromDcqlMatch = (
138
138
  match: DcqlQueryResult.CredentialMatch,
@@ -1,8 +1,7 @@
1
1
  import type { DcqlSdJwtVcCredential } from "dcql";
2
2
 
3
- import { type SDJwt, SDJwtInstance } from "@sd-jwt/core";
4
- import { digest } from "@sd-jwt/crypto-nodejs";
5
- import { getClaims } from "@sd-jwt/decode";
3
+ import { hasher } from "@owf/crypto";
4
+ import { getClaims, type SDJwt, SDJwtInstance } from "@sd-jwt/core";
6
5
 
7
6
  import type { Credential4Dcql } from "../../api";
8
7
 
@@ -30,7 +29,7 @@ const getClaimsFromDecodedSdJwt = async (decodedRawSdJwt: SDJwt) => {
30
29
  const claims = await getClaims<DcqlSdJwtVcCredential["claims"]>(
31
30
  decodedRawSdJwt.jwt.payload,
32
31
  decodedRawSdJwt.disclosures ?? [],
33
- digest,
32
+ hasher,
34
33
  );
35
34
 
36
35
  return Object.fromEntries(
@@ -50,7 +49,7 @@ export const mapCredentialsToObj = async (
50
49
  credentials: Credential4Dcql[],
51
50
  ): Promise<CustomDcqlSdJwtVcCredential[]> => {
52
51
  const sdJwt = new SDJwtInstance({
53
- hasher: digest,
52
+ hasher,
54
53
  });
55
54
 
56
55
  return Promise.all(
@@ -1,9 +1,9 @@
1
- import { CBOR } from "@pagopa/io-react-native-iso18013";
2
- import { decode as decodeJwt } from "@pagopa/io-react-native-jwt";
3
1
  import {
4
2
  getStatusListFromJWT,
5
3
  type StatusListEntry,
6
- } from "@sd-jwt/jwt-status-list";
4
+ } from "@owf/token-status-list";
5
+ import { CBOR } from "@pagopa/io-react-native-iso18013";
6
+ import { decode as decodeJwt } from "@pagopa/io-react-native-jwt";
7
7
 
8
8
  import type { StatusListApi } from "../api/status-list";
9
9
 
@@ -1,4 +1,5 @@
1
- import { StatusList as JwtStatusList } from "@sd-jwt/jwt-status-list";
1
+ import { StatusList as JwtStatusList } from "@owf/token-status-list";
2
+ import { toUint8Array } from "js-base64";
2
3
 
3
4
  import type { StatusListApi } from "../api/status-list";
4
5
 
@@ -22,9 +23,10 @@ const formatStatusBit = (statusBit: number) =>
22
23
  `0x${statusBit.toString(16).padStart(2, "0").toUpperCase()}`;
23
24
 
24
25
  export const getStatus: StatusListApi["getStatus"] = (statusList, idx) => {
25
- const decodedStatusList = JwtStatusList.decompressStatusList(
26
- statusList.lst,
26
+ const decodedStatusList = JwtStatusList.decompressStatusListFromBytes(
27
+ toUint8Array(statusList.lst),
27
28
  statusList.bits,
29
+ statusList.aggregation_uri,
28
30
  );
29
31
  const statusBit = decodedStatusList.getStatus(idx) as CredentialStatusBit;
30
32
  const status = CredentialStatusMap[statusBit];
@@ -54,6 +54,7 @@ const CredentialIssuer = z.object({
54
54
  });
55
55
 
56
56
  const AuthenticSource = z.object({
57
+ background_color: z.string().optional(),
57
58
  contacts: z
58
59
  .array(z.object({ type: z.string(), value: z.string() }))
59
60
  .optional(),
@@ -55,6 +55,7 @@ export const mapToCredentialsCatalogue = createMapper<
55
55
  (dc) => dc.dataset_id === dataset_id,
56
56
  );
57
57
  return {
58
+ background_color: dataCapability?.background_color,
58
59
  contacts: dataCapability?.contacts,
59
60
  data_origin_l10n_id: dataCapability?.data_origin_l10n_id,
60
61
  id,
@@ -5,7 +5,12 @@ import type { KeyAttestationCryptoContext } from "../../utils/crypto";
5
5
  import type { KeyAttestationSupportedApi } from "../api";
6
6
 
7
7
  import { getWalletProviderClient } from "../../client";
8
- import { IoWalletError } from "../../utils/errors";
8
+ import {
9
+ IoWalletError,
10
+ ResponseErrorBuilder,
11
+ WalletProviderResponseError,
12
+ WalletProviderResponseErrorCodes,
13
+ } from "../../utils/errors";
9
14
  import { fixBase64EncodingOnKey, JWK } from "../../utils/jwk";
10
15
  import { Logger, LogLevel } from "../../utils/logging";
11
16
  import { KeyAttestationResponse } from "./types";
@@ -141,7 +146,8 @@ export const getAttestation: KeyAttestationSupportedApi["getAttestation"] =
141
146
  "Content-Type": "text/plain",
142
147
  },
143
148
  })
144
- .then(KeyAttestationResponse.parse);
149
+ .then(KeyAttestationResponse.parse)
150
+ .catch(handleKeyAttestationCreationError);
145
151
 
146
152
  Logger.log(
147
153
  LogLevel.DEBUG,
@@ -153,3 +159,26 @@ export const getAttestation: KeyAttestationSupportedApi["getAttestation"] =
153
159
  format: "jwt",
154
160
  };
155
161
  };
162
+
163
+ const handleKeyAttestationCreationError = (e: unknown) => {
164
+ Logger.log(
165
+ LogLevel.ERROR,
166
+ `An error occurred while calling the Key Attestation endpoint: ${e}`,
167
+ );
168
+
169
+ if (!(e instanceof WalletProviderResponseError)) {
170
+ throw e;
171
+ }
172
+
173
+ throw new ResponseErrorBuilder(WalletProviderResponseError)
174
+ .handle(409, {
175
+ code: WalletProviderResponseErrorCodes.WalletInstanceIntegrityFailed,
176
+ message:
177
+ "Unable to get a key attestation for a Wallet Instance that failed the integrity check",
178
+ })
179
+ .handle("*", {
180
+ code: WalletProviderResponseErrorCodes.KeyAttestationIssuingFailed,
181
+ message: "Unable to obtain key attestation",
182
+ })
183
+ .buildFrom(e);
184
+ };
@@ -1,7 +1,6 @@
1
+ import { hasher } from "@owf/crypto";
1
2
  import { sha256ToBase64, SignJWT } from "@pagopa/io-react-native-jwt";
2
- import { digest } from "@sd-jwt/crypto-nodejs";
3
- import { decodeSdJwtSync } from "@sd-jwt/decode";
4
- import { present } from "@sd-jwt/present";
3
+ import { decodeSdJwtSync, present } from "@sd-jwt/core";
5
4
 
6
5
  import type { Presentation } from "../credential/presentation";
7
6
 
@@ -20,7 +19,7 @@ export * from "./utils";
20
19
  * @returns The parsed SD-JWT token and the parsed disclosures
21
20
  */
22
21
  export const decode = (token: string) => {
23
- const decoded = decodeSdJwtSync(fixLegacyCredentialSdJwt(token), digest);
22
+ const decoded = decodeSdJwtSync(fixLegacyCredentialSdJwt(token), hasher);
24
23
 
25
24
  const sdJwt = SdJwt4VCBase.parse({
26
25
  header: decoded.jwt.header,
@@ -59,7 +58,7 @@ export const prepareVpToken = async (
59
58
  const vp = await present(
60
59
  fixLegacyCredentialSdJwt(verifiableCredential),
61
60
  presentationFrame,
62
- digest,
61
+ hasher,
63
62
  );
64
63
 
65
64
  // <Issuer-signed JWT>~<Disclosure 1>~<Disclosure N>~
@@ -1,6 +1,6 @@
1
+ import { hasher } from "@owf/crypto";
1
2
  import { sha256ToBase64 } from "@pagopa/io-react-native-jwt";
2
- import { digest } from "@sd-jwt/crypto-nodejs";
3
- import { decodeSdJwtSync, getClaimsSync } from "@sd-jwt/decode";
3
+ import { decodeSdJwtSync, getClaimsSync } from "@sd-jwt/core";
4
4
 
5
5
  import { fixLegacyCredentialSdJwt } from "../utils/credentials";
6
6
  import {
@@ -70,13 +70,13 @@ export const getVerification = (
70
70
  ): undefined | Verification => {
71
71
  const decoded = decodeSdJwtSync(
72
72
  fixLegacyCredentialSdJwt(credentialSdJwt),
73
- digest,
73
+ hasher,
74
74
  );
75
75
 
76
76
  const claims = getClaimsSync<Record<string, unknown>>(
77
77
  decoded.jwt.payload,
78
78
  decoded.disclosures,
79
- digest,
79
+ hasher,
80
80
  );
81
81
 
82
82
  return claims.verification
@@ -1,3 +1,4 @@
1
+ import { hasher } from "@owf/crypto";
1
2
  import {
2
3
  type CryptoContext,
3
4
  EncryptJwe,
@@ -6,7 +7,6 @@ import {
6
7
  } from "@pagopa/io-react-native-jwt";
7
8
  import { verify } from "@pagopa/io-react-native-jwt";
8
9
  import { type CallbackContext, type JwtSigner } from "@pagopa/io-wallet-oauth2";
9
- import { digest } from "@sd-jwt/crypto-nodejs";
10
10
  import { X509 } from "jsrsasign";
11
11
 
12
12
  import type { JWK } from "./jwk";
@@ -15,8 +15,9 @@ import { getJwkFromCertificateChain, getJwkFromTrustChain } from "./crypto";
15
15
  import { IoWalletError } from "./errors";
16
16
  import { assert, generateRandomBytes } from "./misc";
17
17
 
18
- // Fix incompatibility between ArrayBuffer types
19
- type DigestFixed = (
18
+ // Fix incompatibility between ArrayBuffer types: the hasher accepts Uint8Array
19
+ // from the `hash` callback despite its narrower input types.
20
+ type HasherFixed = (
20
21
  data: ArrayBuffer | ArrayBufferView | string,
21
22
  algorithm?: string,
22
23
  ) => Uint8Array;
@@ -80,7 +81,7 @@ export const partialCallbacks: PartialCallbackContext = {
80
81
 
81
82
  return { sanDnsNames, sanUriNames };
82
83
  },
83
- hash: digest as DigestFixed,
84
+ hash: hasher as HasherFixed,
84
85
  verifyJwt: async (jwtSigner, jwt) => {
85
86
  try {
86
87
  const signerJwk = await getJwkFromSigner(jwtSigner);
@@ -1,6 +1,6 @@
1
+ import { hasher } from "@owf/crypto";
1
2
  import { thumbprint } from "@pagopa/io-react-native-jwt";
2
- import { digest } from "@sd-jwt/crypto-nodejs";
3
- import { decodeSdJwtSync } from "@sd-jwt/decode";
3
+ import { decodeSdJwtSync } from "@sd-jwt/core";
4
4
 
5
5
  import type { CredentialFormat } from "../credential/issuance";
6
6
  import type { JWK } from "./jwk";
@@ -28,7 +28,7 @@ export const extractJwkFromCredential = async (
28
28
  // 1. SD-JWT case
29
29
  const decoded = decodeSdJwtSync(
30
30
  fixLegacyCredentialSdJwt(credential),
31
- digest,
31
+ hasher,
32
32
  );
33
33
  const { cnf } = decoded.jwt.payload as SdJwt4VCBase["payload"];
34
34
  if (cnf.jwk) {
@@ -24,7 +24,11 @@ export const IssuerResponseErrorCodes = {
24
24
 
25
25
  export const WalletProviderResponseErrorCodes = {
26
26
  /**
27
- * An error code thrown when validation fail
27
+ * An error code thrown when an error occurs during the key attestation issuance.
28
+ */
29
+ KeyAttestationIssuingFailed: "ERR_IO_KEY_ATTESTATION_ISSUING_FAILED",
30
+ /**
31
+ * An error code thrown when an error occurs during the wallet attestation issuance.
28
32
  */
29
33
  WalletInstanceAttestationIssuingFailed:
30
34
  "ERR_IO_WALLET_INSTANCE_ATTESTATION_ISSUING_FAILED",
@@ -0,0 +1,41 @@
1
+ import {
2
+ ResponseErrorBuilder,
3
+ WalletProviderResponseError,
4
+ WalletProviderResponseErrorCodes,
5
+ } from "../../utils/errors";
6
+ import { Logger, LogLevel } from "../../utils/logging";
7
+
8
+ /**
9
+ * Shared handler for errors that occur during Wallet Instance Attestation issuance.
10
+ */
11
+ export const handleAttestationCreationError = (e: unknown) => {
12
+ Logger.log(
13
+ LogLevel.ERROR,
14
+ `An error occurred while calling the Wallet Attestation endpoint: ${e}`,
15
+ );
16
+
17
+ if (!(e instanceof WalletProviderResponseError)) {
18
+ throw e;
19
+ }
20
+
21
+ throw new ResponseErrorBuilder(WalletProviderResponseError)
22
+ .handle(403, {
23
+ code: WalletProviderResponseErrorCodes.WalletInstanceRevoked,
24
+ message: "Unable to get an attestation for a revoked Wallet Instance",
25
+ })
26
+ .handle(404, {
27
+ code: WalletProviderResponseErrorCodes.WalletInstanceNotFound,
28
+ message:
29
+ "Unable to get an attestation for a Wallet Instance that does not exist",
30
+ })
31
+ .handle(409, {
32
+ code: WalletProviderResponseErrorCodes.WalletInstanceIntegrityFailed,
33
+ message:
34
+ "Unable to get an attestation for a Wallet Instance that failed the integrity check",
35
+ })
36
+ .handle("*", {
37
+ code: WalletProviderResponseErrorCodes.WalletInstanceAttestationIssuingFailed,
38
+ message: "Unable to obtain wallet instance attestation",
39
+ })
40
+ .buildFrom(e);
41
+ };
@@ -8,13 +8,9 @@ import type { IntegrityContext } from "../../utils/integrity";
8
8
  import type { WalletInstanceAttestationApi } from "../api";
9
9
 
10
10
  import { getWalletProviderClient } from "../../client";
11
- import {
12
- ResponseErrorBuilder,
13
- WalletProviderResponseError,
14
- WalletProviderResponseErrorCodes,
15
- } from "../../utils/errors";
16
11
  import { fixBase64EncodingOnKey, JWK } from "../../utils/jwk";
17
12
  import { Logger, LogLevel } from "../../utils/logging";
13
+ import { handleAttestationCreationError } from "../common/errors";
18
14
  import { mapToWalletAttestations } from "./mappers";
19
15
  import { WalletAttestationResponse } from "./types";
20
16
 
@@ -120,35 +116,3 @@ export const getAttestation: WalletInstanceAttestationApi["getAttestation"] =
120
116
 
121
117
  return mapToWalletAttestations(response);
122
118
  };
123
-
124
- const handleAttestationCreationError = (e: unknown) => {
125
- Logger.log(
126
- LogLevel.ERROR,
127
- `An error occurred while calling /wallet-attestation endpoint: ${e}`,
128
- );
129
-
130
- if (!(e instanceof WalletProviderResponseError)) {
131
- throw e;
132
- }
133
-
134
- throw new ResponseErrorBuilder(WalletProviderResponseError)
135
- .handle(403, {
136
- code: WalletProviderResponseErrorCodes.WalletInstanceRevoked,
137
- message: "Unable to get an attestation for a revoked Wallet Instance",
138
- })
139
- .handle(404, {
140
- code: WalletProviderResponseErrorCodes.WalletInstanceNotFound,
141
- message:
142
- "Unable to get an attestation for a Wallet Instance that does not exist",
143
- })
144
- .handle(409, {
145
- code: WalletProviderResponseErrorCodes.WalletInstanceIntegrityFailed,
146
- message:
147
- "Unable to get an attestation for a Wallet Instance that failed the integrity check",
148
- })
149
- .handle("*", {
150
- code: WalletProviderResponseErrorCodes.WalletInstanceAttestationIssuingFailed,
151
- message: "Unable to obtain wallet instance attestation",
152
- })
153
- .buildFrom(e);
154
- };
@@ -12,6 +12,7 @@ import type { WalletAttestationRequestParams } from "../api/types";
12
12
  import { getWalletProviderClient } from "../../client";
13
13
  import { fixBase64EncodingOnKey, JWK } from "../../utils/jwk";
14
14
  import { Logger, LogLevel } from "../../utils/logging";
15
+ import { handleAttestationCreationError } from "../common/errors";
15
16
  import { WalletInstanceAttestationResponse } from "./types";
16
17
 
17
18
  async function getAttestationRequest(
@@ -97,7 +98,8 @@ export const getAttestation: WalletInstanceAttestationApi["getAttestation"] =
97
98
  "Content-Type": "text/plain",
98
99
  },
99
100
  })
100
- .then(WalletInstanceAttestationResponse.parse);
101
+ .then(WalletInstanceAttestationResponse.parse)
102
+ .catch(handleAttestationCreationError);
101
103
 
102
104
  Logger.log(
103
105
  LogLevel.DEBUG,