@openid4vc/openid4vci 0.4.1-alpha-20251203074447 → 0.4.1
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 +12 -15
- package/dist/index.mjs +1 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContentType, Fetch, FetchHeaders, HttpMethod, InferOutputUnion, Oid4vcTsConfig, OrPromise, StringWithAutoCompletion, getGlobalConfig, setGlobalConfig } from "@openid4vc/utils";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _openid4vc_oauth20 from "@openid4vc/oauth2";
|
|
3
3
|
import { AuthorizationCodeGrantIdentifier, AuthorizationServerMetadata, CallbackContext, CreateAuthorizationRequestUrlOptions, CreateClientAttestationJwtOptions, CreatePkceReturn, DecodeJwtResult, Jwk, JwtSigner, JwtSignerWithJwk, PreAuthorizedCodeGrantIdentifier, RequestDpopOptions, ResourceRequestResponseNotOk, ResourceRequestResponseOk, RetrieveAuthorizationCodeAccessTokenOptions, RetrievePreAuthorizedCodeAccessTokenOptions, authorizationCodeGrantIdentifier, preAuthorizedCodeGrantIdentifier } from "@openid4vc/oauth2";
|
|
4
4
|
import * as zod0 from "zod";
|
|
5
5
|
import z from "zod";
|
|
@@ -1833,7 +1833,6 @@ declare const zCredentialRequestDraft15: z.ZodUnion<readonly [z.ZodIntersection<
|
|
|
1833
1833
|
}, z.core.$loose>, z.ZodObject<{
|
|
1834
1834
|
credential_identifier: z.ZodString;
|
|
1835
1835
|
credential_configuration_id: z.ZodOptional<z.ZodNever>;
|
|
1836
|
-
format: z.ZodOptional<z.ZodNever>;
|
|
1837
1836
|
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1838
1837
|
proof: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
1839
1838
|
proof_type: z.ZodString;
|
|
@@ -1883,7 +1882,6 @@ declare const zCredentialRequestDraft15: z.ZodUnion<readonly [z.ZodIntersection<
|
|
|
1883
1882
|
}, z.core.$loose>>;
|
|
1884
1883
|
}, z.core.$loose>, z.ZodObject<{
|
|
1885
1884
|
credential_configuration_id: z.ZodString;
|
|
1886
|
-
format: z.ZodOptional<z.ZodNever>;
|
|
1887
1885
|
credential_identifier: z.ZodOptional<z.ZodNever>;
|
|
1888
1886
|
}, z.core.$strip>>]>;
|
|
1889
1887
|
declare const zCredentialRequestDraft14: z.ZodUnion<readonly [z.ZodPipe<z.ZodIntersection<z.ZodObject<{
|
|
@@ -2101,7 +2099,6 @@ declare const zCredentialRequestDraft14: z.ZodUnion<readonly [z.ZodPipe<z.ZodInt
|
|
|
2101
2099
|
}, z.core.$loose>, z.ZodObject<{
|
|
2102
2100
|
credential_identifier: z.ZodString;
|
|
2103
2101
|
credential_configuration_id: z.ZodOptional<z.ZodNever>;
|
|
2104
|
-
format: z.ZodOptional<z.ZodNever>;
|
|
2105
2102
|
}, z.core.$strip>>]>;
|
|
2106
2103
|
declare const zDeferredCredentialRequest: z.ZodObject<{
|
|
2107
2104
|
transaction_id: z.ZodString;
|
|
@@ -2643,7 +2640,7 @@ interface ParseKeyAttestationJwtOptions {
|
|
|
2643
2640
|
declare function parseKeyAttestationJwt({
|
|
2644
2641
|
keyAttestationJwt,
|
|
2645
2642
|
use
|
|
2646
|
-
}: ParseKeyAttestationJwtOptions):
|
|
2643
|
+
}: ParseKeyAttestationJwtOptions): _openid4vc_oauth20.DecodeJwtResult<zod0.ZodObject<{
|
|
2647
2644
|
typ: zod0.ZodUnion<[zod0.ZodLiteral<"keyattestation+jwt">, zod0.ZodLiteral<"key-attestation+jwt">]>;
|
|
2648
2645
|
alg: zod0.ZodString;
|
|
2649
2646
|
kid: zod0.ZodOptional<zod0.ZodString>;
|
|
@@ -2917,7 +2914,7 @@ declare function verifyKeyAttestationJwt(options: VerifyKeyAttestationJwtOptions
|
|
|
2917
2914
|
status?: Record<string, any> | undefined;
|
|
2918
2915
|
trust_chain?: [string, ...string[]] | undefined;
|
|
2919
2916
|
};
|
|
2920
|
-
signer:
|
|
2917
|
+
signer: _openid4vc_oauth20.JwtSignerWithJwk;
|
|
2921
2918
|
}>;
|
|
2922
2919
|
//#endregion
|
|
2923
2920
|
//#region src/metadata/credential-issuer/credential-configurations.d.ts
|
|
@@ -3081,7 +3078,7 @@ declare class Openid4vciClient {
|
|
|
3081
3078
|
};
|
|
3082
3079
|
dpop: {
|
|
3083
3080
|
nonce: string | undefined;
|
|
3084
|
-
signer:
|
|
3081
|
+
signer: _openid4vc_oauth20.JwtSignerJwk;
|
|
3085
3082
|
} | undefined;
|
|
3086
3083
|
}>;
|
|
3087
3084
|
/**
|
|
@@ -3140,7 +3137,7 @@ declare class Openid4vciClient {
|
|
|
3140
3137
|
issuerMetadata: IssuerMetadataResult;
|
|
3141
3138
|
}): Promise<{
|
|
3142
3139
|
authorizationServer: string;
|
|
3143
|
-
accessTokenResponse:
|
|
3140
|
+
accessTokenResponse: _openid4vc_oauth20.AccessTokenResponse;
|
|
3144
3141
|
dpop?: RequestDpopOptions;
|
|
3145
3142
|
}>;
|
|
3146
3143
|
/**
|
|
@@ -3160,7 +3157,7 @@ declare class Openid4vciClient {
|
|
|
3160
3157
|
issuerMetadata: IssuerMetadataResult;
|
|
3161
3158
|
}): Promise<{
|
|
3162
3159
|
authorizationServer: string;
|
|
3163
|
-
accessTokenResponse:
|
|
3160
|
+
accessTokenResponse: _openid4vc_oauth20.AccessTokenResponse;
|
|
3164
3161
|
dpop?: RequestDpopOptions;
|
|
3165
3162
|
}>;
|
|
3166
3163
|
/**
|
|
@@ -3215,7 +3212,7 @@ declare class Openid4vciClient {
|
|
|
3215
3212
|
additionalRequestPayload,
|
|
3216
3213
|
accessToken,
|
|
3217
3214
|
dpop
|
|
3218
|
-
}: Pick<SendNotificationOptions, 'accessToken' | 'additionalRequestPayload' | 'issuerMetadata' | 'dpop' | 'notification'>): Promise<
|
|
3215
|
+
}: Pick<SendNotificationOptions, 'accessToken' | 'additionalRequestPayload' | 'issuerMetadata' | 'dpop' | 'notification'>): Promise<_openid4vc_oauth20.ResourceRequestResponseOk>;
|
|
3219
3216
|
}
|
|
3220
3217
|
//#endregion
|
|
3221
3218
|
//#region ../oauth2/src/common/jwk/z-jwk.d.ts
|
|
@@ -3901,7 +3898,7 @@ declare class Openid4vciIssuer {
|
|
|
3901
3898
|
status?: Record<string, any> | undefined;
|
|
3902
3899
|
trust_chain?: [string, ...string[]] | undefined;
|
|
3903
3900
|
};
|
|
3904
|
-
signer:
|
|
3901
|
+
signer: _openid4vc_oauth20.JwtSignerWithJwk;
|
|
3905
3902
|
keyAttestation: {
|
|
3906
3903
|
header: {
|
|
3907
3904
|
[x: string]: unknown;
|
|
@@ -4024,7 +4021,7 @@ declare class Openid4vciIssuer {
|
|
|
4024
4021
|
status?: Record<string, any> | undefined;
|
|
4025
4022
|
trust_chain?: [string, ...string[]] | undefined;
|
|
4026
4023
|
};
|
|
4027
|
-
signer:
|
|
4024
|
+
signer: _openid4vc_oauth20.JwtSignerWithJwk;
|
|
4028
4025
|
} | undefined;
|
|
4029
4026
|
}>;
|
|
4030
4027
|
/**
|
|
@@ -4155,7 +4152,7 @@ declare class Openid4vciIssuer {
|
|
|
4155
4152
|
status?: Record<string, any> | undefined;
|
|
4156
4153
|
trust_chain?: [string, ...string[]] | undefined;
|
|
4157
4154
|
};
|
|
4158
|
-
signer:
|
|
4155
|
+
signer: _openid4vc_oauth20.JwtSignerWithJwk;
|
|
4159
4156
|
}>;
|
|
4160
4157
|
/**
|
|
4161
4158
|
* @throws Oauth2ServerErrorResponseError - when validation of the credential request fails
|
|
@@ -4291,7 +4288,7 @@ declare class Openid4vciIssuer {
|
|
|
4291
4288
|
status?: Record<string, any> | undefined;
|
|
4292
4289
|
trust_chain?: [string, ...string[]] | undefined;
|
|
4293
4290
|
};
|
|
4294
|
-
signer:
|
|
4291
|
+
signer: _openid4vc_oauth20.JwtSignerWithJwk;
|
|
4295
4292
|
};
|
|
4296
4293
|
clientAttestationPop: {
|
|
4297
4294
|
header: {
|
|
@@ -4381,7 +4378,7 @@ declare class Openid4vciIssuer {
|
|
|
4381
4378
|
status?: Record<string, any> | undefined;
|
|
4382
4379
|
trust_chain?: [string, ...string[]] | undefined;
|
|
4383
4380
|
};
|
|
4384
|
-
signer:
|
|
4381
|
+
signer: _openid4vc_oauth20.JwtSignerWithJwk;
|
|
4385
4382
|
};
|
|
4386
4383
|
}>;
|
|
4387
4384
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1074,13 +1074,11 @@ const allCredentialRequestFormats = [
|
|
|
1074
1074
|
const allCredentialRequestFormatIdentifiers = allCredentialRequestFormats.map((format) => format.shape.format.value);
|
|
1075
1075
|
const zCredentialRequestCredentialConfigurationId = z.object({
|
|
1076
1076
|
credential_configuration_id: z.string(),
|
|
1077
|
-
format: z.never({ message: "'format' cannot be defined when 'credential_configuration_id' is set." }).optional(),
|
|
1078
1077
|
credential_identifier: z.never({ message: "'credential_identifier' cannot be defined when 'credential_configuration_id' is set." }).optional()
|
|
1079
1078
|
});
|
|
1080
1079
|
const zAuthorizationDetailsCredentialRequest = z.object({
|
|
1081
1080
|
credential_identifier: z.string(),
|
|
1082
|
-
credential_configuration_id: z.never({ message: "'credential_configuration_id' cannot be defined when 'credential_identifier' is set." }).optional()
|
|
1083
|
-
format: z.never({ message: "'format' cannot be defined when 'credential_identifier' is set." }).optional()
|
|
1081
|
+
credential_configuration_id: z.never({ message: "'credential_configuration_id' cannot be defined when 'credential_identifier' is set." }).optional()
|
|
1084
1082
|
});
|
|
1085
1083
|
const zCredentialRequestFormat = z.object({
|
|
1086
1084
|
format: z.string(),
|