@injistack/react-inji-verify-sdk 0.19.0-beta.6 → 0.19.0-beta.8

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.
@@ -21,12 +21,89 @@ export interface VpSummarisedVerificationResponse {
21
21
  }[];
22
22
  vpResultStatus: OverallVPStatus;
23
23
  }
24
+ /**
25
+ * A single claim requested from a credential.
26
+ */
27
+ export interface DcqlClaimQuery {
28
+ /** Required if claim_sets is used. Used to reference the claim in claim_sets. */
29
+ id?: string;
30
+ /** Path pointer to navigate the credential structure (JSON pointer segments). */
31
+ path: string[];
32
+ /** Array of allowed values. Claim is returned only if its value matches one of these. */
33
+ values?: unknown[];
34
+ }
35
+ /**
36
+ * Trusted authority filter for credential issuers.
37
+ */
38
+ export interface DcqlTrustedAuthority {
39
+ /** Authority filter type (e.g. aki, etsi_tl, openid_federation; extensible per DCQL). */
40
+ type: string;
41
+ values: string[];
42
+ }
43
+ /**
44
+ * Format-specific metadata constraints for a credential query.
45
+ */
46
+ export interface DcqlCredentialMeta {
47
+ /** SD-JWT VC: allowed credential type identifiers. */
48
+ vct_values?: string[];
49
+ /** W3C VC (JSON-LD): expanded type values. */
50
+ type_values?: string[][];
51
+ }
52
+ /**
53
+ * A single credential query describing what the Verifier is requesting.
54
+ */
55
+ export interface DcqlCredentialQuery {
56
+ /** Unique identifier for this credential within the request and response. */
57
+ id: string;
58
+ /** Credential format (e.g., "dc+sd-jwt", "vc+sd-jwt"). */
59
+ format: string;
60
+ /** Whether multiple credentials of this type can be returned. Defaults to false. */
61
+ multiple?: boolean;
62
+ /** Format-specific constraints (required, can be empty). */
63
+ meta: DcqlCredentialMeta;
64
+ /** Trusted issuer authorities filter. */
65
+ trusted_authorities?: DcqlTrustedAuthority[];
66
+ /** Whether proof of possession is required. Defaults to true. */
67
+ require_cryptographic_holder_binding?: boolean;
68
+ /** Individual data points requested from the credential. */
69
+ claims?: DcqlClaimQuery[];
70
+ /**
71
+ * Acceptable combinations of claims (arrays of claim ids).
72
+ * Each inner array represents one valid combination.
73
+ * Wallet evaluates in order and returns the first satisfiable set.
74
+ */
75
+ claim_sets?: string[][];
76
+ }
77
+ /**
78
+ * Credential set query defining logical combinations of requested credentials.
79
+ */
80
+ export interface DcqlCredentialSetQuery {
81
+ /**
82
+ * Array of arrays of credential ids.
83
+ * Each inner array = one valid combination (AND within, OR across).
84
+ */
85
+ options: string[][];
86
+ /** Whether this set is required. Defaults to true. */
87
+ required?: boolean;
88
+ }
89
+ /**
90
+ * Top-level DCQL (Digital Credentials Query Language) query object.
91
+ * Used by a Verifier to request specific credentials from a Wallet.
92
+ */
93
+ export interface DcqlQuery {
94
+ /** List of credential queries describing what is being requested. */
95
+ credentials: DcqlCredentialQuery[];
96
+ /**
97
+ * Rules about acceptable credential combinations.
98
+ * If omitted, all credentials in the `credentials` array are required.
99
+ */
100
+ credential_sets?: DcqlCredentialSetQuery[];
101
+ }
24
102
  export interface VPRequestBody {
25
103
  clientId: string;
26
104
  nonce: string;
27
105
  transactionId?: string;
28
- presentationDefinition: PresentationDefinition;
29
- acceptVPWithoutHolderProof?: boolean;
106
+ dcqlQuery: DcqlQuery;
30
107
  /**
31
108
  * When true, the verifier backend will generate a short-lived single-use `response_code`
32
109
  * and return it via redirect for same-device web-wallet flows.
@@ -52,30 +129,12 @@ type ExclusiveCallbacks =
52
129
  onVPProcessed: (VPResult: VerificationResults) => void;
53
130
  onVPReceived?: never;
54
131
  };
55
- interface InputDescriptor {
56
- id: string;
57
- format?: {
58
- ldp_vc: {
59
- proof_type: string[];
60
- };
61
- };
62
- constraints?: {};
63
- }
64
- export interface PresentationDefinition {
65
- id?: string;
66
- purpose: string;
67
- format?: {
68
- ldp_vc: {
69
- proof_type: string[];
70
- };
71
- };
72
- input_descriptors: InputDescriptor[];
73
- }
74
132
  export type OpenID4VPVerificationProps = ExclusiveCallbacks & {
75
133
  /**
76
- * The presentation definition object used for verification.
134
+ * DCQL query object sent to the verifier backend for OpenID4VP 1.0.
135
+ * Must contain a `credentials` array describing the requested credentials.
77
136
  */
78
- presentationDefinition: PresentationDefinition;
137
+ dcqlQuery: DcqlQuery;
79
138
  /**
80
139
  React element that triggers the verification process (e.g., a button).
81
140
  If not provided, the component may automatically start the process.
@@ -122,11 +181,6 @@ export type OpenID4VPVerificationProps = ExclusiveCallbacks & {
122
181
  * This is a required field to ensure proper error handling.
123
182
  */
124
183
  onError: (error: AppError) => void;
125
- /**
126
- Indicates whether to accept VP submissions without holder proof.
127
- When true, allows unsigned VPs (VPs without proof).
128
- */
129
- acceptVPWithoutHolderProof?: boolean;
130
184
  /**
131
185
  The base URL of the wallet.
132
186
  */
@@ -78,11 +78,6 @@ export type QRCodeVerificationProps = ExclusiveCallbacks & {
78
78
  * Defaults to false.
79
79
  */
80
80
  isVPSubmissionSupported?: boolean;
81
- /**
82
- Indicates whether to accept VP submissions without holder proof.
83
- When true, allows unsigned VPs (VPs without proof).
84
- */
85
- acceptVPWithoutHolderProof?: boolean;
86
81
  /**
87
82
  * Configuration object used to control VC verification behaviour.
88
83
  *
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export { default as OpenID4VPVerification } from '././components/openid4vp-verification/OpenID4VPVerification';
2
2
  export { default as QRCodeVerification } from '././components/qrcode-verification/QRCodeVerification';
3
+ export type { DcqlQuery, DcqlCredentialQuery, DcqlCredentialSetQuery, DcqlClaimQuery, DcqlCredentialMeta, DcqlTrustedAuthority, } from './components/openid4vp-verification/OpenID4VPVerification.types';