@pagopa/io-wallet-oid4vci 1.5.5 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +5 -13
- package/dist/index.d.ts +5 -13
- package/dist/index.js +5 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -32114,14 +32114,14 @@ declare class WalletProvider {
|
|
|
32114
32114
|
* Version Differences:
|
|
32115
32115
|
* - v1.0: Uses only `trust_chain` in header (federation method); no `status` claim
|
|
32116
32116
|
* - v1.3: Requires `x5c` in header, optional `trust_chain`; supports optional `nbf` and `status` claims
|
|
32117
|
-
* - v1.4: Requires `x5c` in header, optional `trust_chain`; `
|
|
32118
|
-
*
|
|
32117
|
+
* - v1.4: Requires `x5c` in header, optional `trust_chain`; `wallet_link` and `wallet_name` are
|
|
32118
|
+
* **required**; no `status` claim; sets `sub` to the DPoP JWK thumbprint
|
|
32119
32119
|
*
|
|
32120
32120
|
* @public
|
|
32121
32121
|
* @param {WalletAttestationOptions} options - The necessary parameters to build the attestation.
|
|
32122
32122
|
* @returns {Promise<string>} A promise that resolves to the signed wallet attestation JWT as a string.
|
|
32123
32123
|
* @throws {WalletProviderError} When the provided options do not match the configured IT-Wallet
|
|
32124
|
-
* specification version, or when v1.4 options are missing `walletLink
|
|
32124
|
+
* specification version, or when v1.4 options are missing `walletLink` or `walletName`.
|
|
32125
32125
|
* @throws {ValidationError} When the generated wallet attestation JWT fails validation.
|
|
32126
32126
|
* @throws {ClientAttestationError} When wallet attestation JWT creation fails unexpectedly,
|
|
32127
32127
|
* including signing errors from the configured `signJwt` callback.
|
|
@@ -32153,7 +32153,7 @@ declare class WalletProvider {
|
|
|
32153
32153
|
* status: { status_list: { idx: 2, uri: "https://status.example.com" } } // Optional
|
|
32154
32154
|
* });
|
|
32155
32155
|
*
|
|
32156
|
-
* @example v1.4 - Wallet attestation with required
|
|
32156
|
+
* @example v1.4 - Wallet attestation with required wallet_link and wallet_name
|
|
32157
32157
|
* const jwt = await provider.createItWalletAttestationJwt({
|
|
32158
32158
|
* callbacks: { hash: myHashCallback, signJwt: mySignJwtCallback },
|
|
32159
32159
|
* dpopJwkPublic: myJwk,
|
|
@@ -32165,17 +32165,9 @@ declare class WalletProvider {
|
|
|
32165
32165
|
* x5c: ["cert1-base64", "cert2-base64"],
|
|
32166
32166
|
* trustChain: ["trust-anchor-jwt"] // Optional
|
|
32167
32167
|
* },
|
|
32168
|
-
* status: { status_list: { idx: 2, uri: "https://status.example.com" } }, // Required
|
|
32169
32168
|
* walletLink: "https://wallet.example.com", // Required
|
|
32170
32169
|
* walletName: "My Wallet", // Required
|
|
32171
|
-
*
|
|
32172
|
-
* general_info: {
|
|
32173
|
-
* wallet_provider_name: "PagoPA",
|
|
32174
|
-
* wallet_solution_certification_information: "certification-ref",
|
|
32175
|
-
* wallet_solution_id: "wallet-solution-id",
|
|
32176
|
-
* wallet_solution_version: "1.0.0"
|
|
32177
|
-
* }
|
|
32178
|
-
* }
|
|
32170
|
+
* nbf: new Date('2025-01-01') // Optional
|
|
32179
32171
|
* });
|
|
32180
32172
|
*/
|
|
32181
32173
|
createItWalletAttestationJwt(options: WalletAttestationOptions): Promise<string>;
|
package/dist/index.d.ts
CHANGED
|
@@ -32114,14 +32114,14 @@ declare class WalletProvider {
|
|
|
32114
32114
|
* Version Differences:
|
|
32115
32115
|
* - v1.0: Uses only `trust_chain` in header (federation method); no `status` claim
|
|
32116
32116
|
* - v1.3: Requires `x5c` in header, optional `trust_chain`; supports optional `nbf` and `status` claims
|
|
32117
|
-
* - v1.4: Requires `x5c` in header, optional `trust_chain`; `
|
|
32118
|
-
*
|
|
32117
|
+
* - v1.4: Requires `x5c` in header, optional `trust_chain`; `wallet_link` and `wallet_name` are
|
|
32118
|
+
* **required**; no `status` claim; sets `sub` to the DPoP JWK thumbprint
|
|
32119
32119
|
*
|
|
32120
32120
|
* @public
|
|
32121
32121
|
* @param {WalletAttestationOptions} options - The necessary parameters to build the attestation.
|
|
32122
32122
|
* @returns {Promise<string>} A promise that resolves to the signed wallet attestation JWT as a string.
|
|
32123
32123
|
* @throws {WalletProviderError} When the provided options do not match the configured IT-Wallet
|
|
32124
|
-
* specification version, or when v1.4 options are missing `walletLink
|
|
32124
|
+
* specification version, or when v1.4 options are missing `walletLink` or `walletName`.
|
|
32125
32125
|
* @throws {ValidationError} When the generated wallet attestation JWT fails validation.
|
|
32126
32126
|
* @throws {ClientAttestationError} When wallet attestation JWT creation fails unexpectedly,
|
|
32127
32127
|
* including signing errors from the configured `signJwt` callback.
|
|
@@ -32153,7 +32153,7 @@ declare class WalletProvider {
|
|
|
32153
32153
|
* status: { status_list: { idx: 2, uri: "https://status.example.com" } } // Optional
|
|
32154
32154
|
* });
|
|
32155
32155
|
*
|
|
32156
|
-
* @example v1.4 - Wallet attestation with required
|
|
32156
|
+
* @example v1.4 - Wallet attestation with required wallet_link and wallet_name
|
|
32157
32157
|
* const jwt = await provider.createItWalletAttestationJwt({
|
|
32158
32158
|
* callbacks: { hash: myHashCallback, signJwt: mySignJwtCallback },
|
|
32159
32159
|
* dpopJwkPublic: myJwk,
|
|
@@ -32165,17 +32165,9 @@ declare class WalletProvider {
|
|
|
32165
32165
|
* x5c: ["cert1-base64", "cert2-base64"],
|
|
32166
32166
|
* trustChain: ["trust-anchor-jwt"] // Optional
|
|
32167
32167
|
* },
|
|
32168
|
-
* status: { status_list: { idx: 2, uri: "https://status.example.com" } }, // Required
|
|
32169
32168
|
* walletLink: "https://wallet.example.com", // Required
|
|
32170
32169
|
* walletName: "My Wallet", // Required
|
|
32171
|
-
*
|
|
32172
|
-
* general_info: {
|
|
32173
|
-
* wallet_provider_name: "PagoPA",
|
|
32174
|
-
* wallet_solution_certification_information: "certification-ref",
|
|
32175
|
-
* wallet_solution_id: "wallet-solution-id",
|
|
32176
|
-
* wallet_solution_version: "1.0.0"
|
|
32177
|
-
* }
|
|
32178
|
-
* }
|
|
32170
|
+
* nbf: new Date('2025-01-01') // Optional
|
|
32179
32171
|
* });
|
|
32180
32172
|
*/
|
|
32181
32173
|
createItWalletAttestationJwt(options: WalletAttestationOptions): Promise<string>;
|
package/dist/index.js
CHANGED
|
@@ -1788,11 +1788,6 @@ function assertV1_4Options(options) {
|
|
|
1788
1788
|
`Version mismatch: provider is configured for v1.4 but 'walletName' is required and missing`
|
|
1789
1789
|
);
|
|
1790
1790
|
}
|
|
1791
|
-
if (!("status" in options) || !options.status) {
|
|
1792
|
-
throw new WalletProviderError(
|
|
1793
|
-
`Version mismatch: provider is configured for v1.4 but 'status' is required and missing`
|
|
1794
|
-
);
|
|
1795
|
-
}
|
|
1796
1791
|
}
|
|
1797
1792
|
var WalletProvider = class {
|
|
1798
1793
|
specVersion;
|
|
@@ -1856,14 +1851,14 @@ var WalletProvider = class {
|
|
|
1856
1851
|
* Version Differences:
|
|
1857
1852
|
* - v1.0: Uses only `trust_chain` in header (federation method); no `status` claim
|
|
1858
1853
|
* - v1.3: Requires `x5c` in header, optional `trust_chain`; supports optional `nbf` and `status` claims
|
|
1859
|
-
* - v1.4: Requires `x5c` in header, optional `trust_chain`; `
|
|
1860
|
-
*
|
|
1854
|
+
* - v1.4: Requires `x5c` in header, optional `trust_chain`; `wallet_link` and `wallet_name` are
|
|
1855
|
+
* **required**; no `status` claim; sets `sub` to the DPoP JWK thumbprint
|
|
1861
1856
|
*
|
|
1862
1857
|
* @public
|
|
1863
1858
|
* @param {WalletAttestationOptions} options - The necessary parameters to build the attestation.
|
|
1864
1859
|
* @returns {Promise<string>} A promise that resolves to the signed wallet attestation JWT as a string.
|
|
1865
1860
|
* @throws {WalletProviderError} When the provided options do not match the configured IT-Wallet
|
|
1866
|
-
* specification version, or when v1.4 options are missing `walletLink
|
|
1861
|
+
* specification version, or when v1.4 options are missing `walletLink` or `walletName`.
|
|
1867
1862
|
* @throws {ValidationError} When the generated wallet attestation JWT fails validation.
|
|
1868
1863
|
* @throws {ClientAttestationError} When wallet attestation JWT creation fails unexpectedly,
|
|
1869
1864
|
* including signing errors from the configured `signJwt` callback.
|
|
@@ -1895,7 +1890,7 @@ var WalletProvider = class {
|
|
|
1895
1890
|
* status: { status_list: { idx: 2, uri: "https://status.example.com" } } // Optional
|
|
1896
1891
|
* });
|
|
1897
1892
|
*
|
|
1898
|
-
* @example v1.4 - Wallet attestation with required
|
|
1893
|
+
* @example v1.4 - Wallet attestation with required wallet_link and wallet_name
|
|
1899
1894
|
* const jwt = await provider.createItWalletAttestationJwt({
|
|
1900
1895
|
* callbacks: { hash: myHashCallback, signJwt: mySignJwtCallback },
|
|
1901
1896
|
* dpopJwkPublic: myJwk,
|
|
@@ -1907,17 +1902,9 @@ var WalletProvider = class {
|
|
|
1907
1902
|
* x5c: ["cert1-base64", "cert2-base64"],
|
|
1908
1903
|
* trustChain: ["trust-anchor-jwt"] // Optional
|
|
1909
1904
|
* },
|
|
1910
|
-
* status: { status_list: { idx: 2, uri: "https://status.example.com" } }, // Required
|
|
1911
1905
|
* walletLink: "https://wallet.example.com", // Required
|
|
1912
1906
|
* walletName: "My Wallet", // Required
|
|
1913
|
-
*
|
|
1914
|
-
* general_info: {
|
|
1915
|
-
* wallet_provider_name: "PagoPA",
|
|
1916
|
-
* wallet_solution_certification_information: "certification-ref",
|
|
1917
|
-
* wallet_solution_id: "wallet-solution-id",
|
|
1918
|
-
* wallet_solution_version: "1.0.0"
|
|
1919
|
-
* }
|
|
1920
|
-
* }
|
|
1907
|
+
* nbf: new Date('2025-01-01') // Optional
|
|
1921
1908
|
* });
|
|
1922
1909
|
*/
|
|
1923
1910
|
async createItWalletAttestationJwt(options) {
|
|
@@ -1954,11 +1941,9 @@ var WalletProvider = class {
|
|
|
1954
1941
|
return (0, import_io_wallet_oauth29.createWalletAttestationJwtV1_4)({
|
|
1955
1942
|
callbacks: options.callbacks,
|
|
1956
1943
|
dpopJwkPublic: options.dpopJwkPublic,
|
|
1957
|
-
eudiWalletInfo: options.eudiWalletInfo,
|
|
1958
1944
|
expiresAt: options.expiresAt,
|
|
1959
1945
|
issuer: options.issuer,
|
|
1960
1946
|
signer: options.signer,
|
|
1961
|
-
status: options.status,
|
|
1962
1947
|
walletLink: options.walletLink,
|
|
1963
1948
|
walletName: options.walletName
|
|
1964
1949
|
});
|