@injistack/react-inji-verify-sdk 0.18.0-beta.2 → 0.18.0-beta.20

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.
@@ -1,18 +1,26 @@
1
1
  /// <reference types="react" />
2
- export type VerificationStatus = "valid" | "invalid" | "expired";
2
+ export type VerificationStatus = "SUCCESS" | "INVALID" | "EXPIRED" | "REVOKED";
3
3
  export interface VerificationResult {
4
4
  /**
5
-
6
- Verified credential data (structured per implementation).
7
- */
5
+
6
+ Verified credential data (structured per implementation).
7
+ */
8
8
  vc: Record<string, unknown>;
9
9
  /**
10
-
11
- The status of the verification.
12
- */
13
- vcStatus: VerificationStatus;
10
+
11
+ Full verification result, including per-check outcomes and optional claims.
12
+ */
13
+ verificationResponse: CredentialResult;
14
14
  }
15
15
  export type VerificationResults = VerificationResult[];
16
+ export interface VPVerificationSummaryVcResult {
17
+ vc: Record<string, unknown>;
18
+ vcStatus: VerificationStatus;
19
+ }
20
+ export interface VPVerificationSummaryResponse {
21
+ vcResults: VPVerificationSummaryVcResult[];
22
+ vpResultStatus: VerificationStatus;
23
+ }
16
24
  export interface VPRequestBody {
17
25
  clientId: string;
18
26
  nonce: string;
@@ -20,6 +28,13 @@ export interface VPRequestBody {
20
28
  presentationDefinitionId?: string;
21
29
  presentationDefinition?: PresentationDefinition;
22
30
  acceptVPWithoutHolderProof?: boolean;
31
+ /**
32
+ * When true, the verifier backend will generate a short-lived single-use `response_code`
33
+ * and return it via redirect for same-device web-wallet flows.
34
+ *
35
+ * Must be omitted/false for cross-device and same-device mobile-wallet (deeplink) flows.
36
+ */
37
+ responseCodeValidationRequired?: boolean;
23
38
  }
24
39
  type ExclusivePresentationDefinition =
25
40
  /**
@@ -126,14 +141,57 @@ export type OpenID4VPVerificationProps = ExclusivePresentationDefinition & Exclu
126
141
  When true, allows unsigned VPs (VPs without proof).
127
142
  */
128
143
  acceptVPWithoutHolderProof?: boolean;
144
+ /**
145
+ The base URL of the wallet.
146
+ */
147
+ webWalletBaseUrl?: string;
148
+ /**
149
+ * Configuration object used to control VP verification behaviour.
150
+ *
151
+ * Allows enabling/disabling specific verification checks such as:
152
+ * - Schema & signature validation
153
+ * - Expiry validation
154
+ * - Status checks (e.g., revocation)
155
+ */
156
+ vpVerificationV2Request?: VPVerificationV2Request;
129
157
  };
130
158
  export interface SessionState {
131
159
  requestId: string;
132
- transactionId: string;
133
160
  }
134
161
  export type AppError = {
135
162
  errorMessage: string;
136
163
  errorCode?: string;
137
164
  transactionId?: string | null;
138
165
  };
166
+ export interface VPVerificationV2Request {
167
+ skipStatusChecks?: boolean;
168
+ statusCheckFilters?: string[];
169
+ includeClaims?: boolean;
170
+ }
171
+ export interface VPVerificationV2Response {
172
+ transactionId: string;
173
+ allChecksSuccessful: boolean;
174
+ credentialResults: CredentialResult[];
175
+ }
176
+ export interface CredentialResult {
177
+ verifiableCredential: string | object;
178
+ allChecksSuccessful: boolean;
179
+ holderProofCheck?: {
180
+ valid: boolean;
181
+ error: any;
182
+ } | null;
183
+ schemaAndSignatureCheck?: {
184
+ valid: boolean;
185
+ error: any;
186
+ };
187
+ expiryCheck?: {
188
+ valid: boolean;
189
+ };
190
+ statusChecks?: {
191
+ purpose: string;
192
+ valid: boolean;
193
+ error: any;
194
+ }[];
195
+ claims?: Record<string, any>;
196
+ }
139
197
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { QRCodeVerificationProps } from "./QRCodeVerification.types";
3
3
  import "./QRCodeVerification.css";
4
4
  declare const QRCodeVerification: React.FC<QRCodeVerificationProps>;
@@ -81,25 +81,68 @@ export type QRCodeVerificationProps = ExclusiveCallbacks & {
81
81
  When true, allows unsigned VPs (VPs without proof).
82
82
  */
83
83
  acceptVPWithoutHolderProof?: boolean;
84
- };
85
- interface VerificationResult {
86
- /**
87
- * Verified credential data (structure depends on implementation).
88
- */
89
- vc: unknown;
90
84
  /**
91
- * The status of the verification (e.g., "valid", "invalid", "expired").
85
+ * Configuration object used to control VC verification behaviour.
86
+ *
87
+ * Allows enabling/disabling specific verification checks such as:
88
+ * - Schema & signature validation
89
+ * - Expiry validation
90
+ * - Status checks (e.g., revocation)
92
91
  */
93
- vcStatus: VcStatus;
94
- }
95
- export type VerificationResults = VerificationResult[];
96
- export type VcStatus = "SUCCESS" | "INVALID" | "EXPIRED";
92
+ vcVerificationV2Request?: VCVerificationV2Request;
93
+ };
94
+ export type VcStatus = "SUCCESS" | "INVALID" | "EXPIRED" | "REVOKED";
97
95
  export type scanResult = {
98
96
  data: any;
99
97
  error: Error | null;
100
98
  };
99
+ export interface ValidationCheck {
100
+ purpose?: string;
101
+ valid: boolean;
102
+ error?: {
103
+ errorCode?: string;
104
+ errorMessage?: string;
105
+ } | null;
106
+ }
107
+ export interface VCVerificationV2Request {
108
+ skipStatusChecks?: boolean;
109
+ statusCheckFilters?: string[];
110
+ includeClaims?: boolean;
111
+ }
112
+ export interface VCVerificationV2Response {
113
+ allChecksSuccessful: boolean;
114
+ schemaAndSignatureCheck: ValidationCheck;
115
+ expiryCheck: ValidationCheck;
116
+ statusCheck: ValidationCheck[];
117
+ claims?: Record<string, any>;
118
+ }
119
+ export type VerificationResults = {
120
+ vc: any;
121
+ verificationResponse: VCVerificationV2Response;
122
+ }[];
101
123
  export interface vcSubmissionBody {
102
124
  vc: any;
103
125
  transactionId?: string;
104
126
  }
127
+ export interface CredentialResult {
128
+ verifiableCredential: string | object;
129
+ allChecksSuccessful: boolean;
130
+ holderProofCheck?: {
131
+ valid: boolean;
132
+ error: any;
133
+ } | null;
134
+ schemaAndSignatureCheck?: {
135
+ valid: boolean;
136
+ error: any;
137
+ };
138
+ expiryCheck?: {
139
+ valid: boolean;
140
+ };
141
+ statusChecks?: {
142
+ purpose: string;
143
+ valid: boolean;
144
+ error: any;
145
+ }[];
146
+ claims?: Record<string, any>;
147
+ }
105
148
  export {};