@mosip/react-inji-verify-sdk 0.16.0-beta.9 → 0.17.0-beta.10

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.
@@ -129,6 +129,8 @@ https://your-backend.com
129
129
  isEnableUpload={true} // Allow file uploads
130
130
  isEnableScan={true} // Allow camera scanning
131
131
  isEnableZoom={true} // Allow camera zoom
132
+ isVPSubmissionSupported={false} // This attribute indicates whether VP submission is supported in Inji OVP VC sharing flow. By default, it is false which means that VP token will be directly sent in response. If set to true, then VP token will be submitted to the VP_SUBMISSION_ URL.
133
+ acceptVPWithoutHolderProof={false} // This attribute controls whether unsigned Verifiable Presentations (VPs without proof) are allowed in the Inji OVP VC sharing flow. By default, it is set to false, meaning unsigned VP tokens are not supported and an error is thrown if an unsigned VP is received. If set to true, VP tokens without a signature (proof) are allowed and can be verified. For data-share it is set to true by default.
132
134
  />
133
135
  ```
134
136
 
@@ -205,24 +207,26 @@ presentationDefinition={{
205
207
 
206
208
  ### Common Props (Both Components)
207
209
 
208
- | Property | Type | Required | Description |
209
- |--------------------|---------------|----------|---------------------------------------------|
210
- | `verifyServiceUrl` | string | ✅ | Your backend verification URL |
211
- | `onError` | function | ✅ | What to do when something goes wrong |
212
- | `triggerElement` | React element | ❌ | Custom button/element to start verification |
213
- | `transactionId` | string | ❌ | Your own tracking ID |
214
- | `clientId` | string | ✅ | Your own client ID |
210
+ | Property | Type | Required | Description |
211
+ |----------------------------------|---------------|----------|---------------------------------------------|
212
+ | `verifyServiceUrl` | string | ✅ | Backend verification URL |
213
+ | `onError` | function | ✅ | Callback invoked when an error occurs |
214
+ | `triggerElement` | React element | ❌ | Custom button/element to start verification |
215
+ | `transactionId` | string | ❌ | Optional client-side tracking ID |
216
+ | `clientId` | string | ✅ | Client identifier |
217
+ | `acceptVPWithoutHolderProof` | boolean | ❌ | Allow unsigned Verifiable Presentations |
215
218
 
216
219
  ### QRCodeVerification Specific
217
220
 
218
- | Property | Type | Default | Description |
219
- |---------------------|----------|---------|------------------------------|
220
- | `onVCProcessed` | function | - | Get full results immediately |
221
- | `onVCReceived` | function | - | Get transaction ID only |
222
- | `isEnableUpload` | boolean | true | Allow file uploads |
223
- | `isEnableScan` | boolean | true | Allow camera scanning |
224
- | `isEnableZoom` | boolean | true | Allow camera zoom |
225
- | `uploadButtonStyle` | object | - | Custom upload button styling |
221
+ | Property | Type | Default | Description |
222
+ |---------------------------|----------|---------|------------------------------|
223
+ | `onVCProcessed` | function | - | Get full results immediately |
224
+ | `onVCReceived` | function | - | Get transaction ID only |
225
+ | `isEnableUpload` | boolean | true | Allow file uploads |
226
+ | `isEnableScan` | boolean | true | Allow camera scanning |
227
+ | `isEnableZoom` | boolean | true | Allow camera zoom |
228
+ | `uploadButtonStyle` | object | - | Custom upload button styling |
229
+ | `isVPSubmissionSupported` | Boolean | false | Toggle VP submission support |
226
230
 
227
231
  ### OpenID4VPVerification Specific
228
232
 
@@ -13,28 +13,13 @@ export interface VerificationResult {
13
13
  vcStatus: VerificationStatus;
14
14
  }
15
15
  export type VerificationResults = VerificationResult[];
16
- export interface QrData {
17
- transactionId: string;
18
- requestId: string;
19
- authorizationDetails?: {
20
- responseType: string;
21
- responseMode: string;
22
- clientId: string;
23
- presentationDefinition: Record<string, unknown>;
24
- presentationDefinitionUri?: string;
25
- responseUri: string;
26
- nonce: string;
27
- iat: number;
28
- };
29
- expiresAt: number;
30
- requestUri?: string;
31
- }
32
16
  export interface VPRequestBody {
33
17
  clientId: string;
34
18
  nonce: string;
35
19
  transactionId?: string;
36
20
  presentationDefinitionId?: string;
37
21
  presentationDefinition?: PresentationDefinition;
22
+ acceptVPWithoutHolderProof?: boolean;
38
23
  }
39
24
  type ExclusivePresentationDefinition =
40
25
  /**
@@ -91,41 +76,34 @@ export interface PresentationDefinition {
91
76
  }
92
77
  export type OpenID4VPVerificationProps = ExclusivePresentationDefinition & ExclusiveCallbacks & {
93
78
  /**
94
-
95
- React element that triggers the verification process (e.g., a button).
96
-
97
- If not provided, the component may automatically start the process.
98
- */
79
+ React element that triggers the verification process (e.g., a button).
80
+ If not provided, the component may automatically start the process.
81
+ */
99
82
  triggerElement?: React.ReactNode;
100
83
  /**
101
-
102
- The backend service URL where the verification request will be sent.
103
- */
84
+ The backend service URL where the verification request will be sent.
85
+ */
104
86
  verifyServiceUrl: string;
105
87
  /**
106
-
107
- The client identifier for relaying party.
108
- */
88
+ The client identifier for relaying party.
89
+ */
109
90
  clientId: string;
110
91
  /**
111
-
112
- The protocol being used for verification (e.g., OpenID4VP).
113
- */
92
+ The protocol being used for verification (e.g., OpenID4VP).
93
+ */
114
94
  protocol?: string;
115
95
  /**
116
-
117
- A unique identifier for the transaction.
118
- */
96
+ A unique identifier for the transaction.
97
+ */
119
98
  transactionId?: string;
120
99
  /**
121
- Indicates whether the same device flow is enabled.
122
- Defaults to true, allowing verification on the same device.
123
- */
100
+ Indicates whether the same device flow is enabled.
101
+ Defaults to true, allowing verification on the same device.
102
+ */
124
103
  isSameDeviceFlowEnabled?: boolean;
125
104
  /**
126
-
127
- Styling options for the QR code.
128
- */
105
+ Styling options for the QR code.
106
+ */
129
107
  qrCodeStyles?: {
130
108
  size?: number;
131
109
  level?: "L" | "M" | "Q" | "H";
@@ -143,6 +121,11 @@ export type OpenID4VPVerificationProps = ExclusivePresentationDefinition & Exclu
143
121
  * This is a required field to ensure proper error handling.
144
122
  */
145
123
  onError: (error: AppError) => void;
124
+ /**
125
+ Indicates whether to accept VP submissions without holder proof.
126
+ When true, allows unsigned VPs (VPs without proof).
127
+ */
128
+ acceptVPWithoutHolderProof?: boolean;
146
129
  };
147
130
  export interface SessionState {
148
131
  requestId: string;
@@ -71,6 +71,16 @@ export type QRCodeVerificationProps = ExclusiveCallbacks & {
71
71
  * Used in the OVP redirect flow.
72
72
  */
73
73
  clientId: string;
74
+ /**
75
+ * Enable Data share VP Supported functionality.
76
+ * Defaults to false.
77
+ */
78
+ isVPSubmissionSupported?: boolean;
79
+ /**
80
+ Indicates whether to accept VP submissions without holder proof.
81
+ When true, allows unsigned VPs (VPs without proof).
82
+ */
83
+ acceptVPWithoutHolderProof?: boolean;
74
84
  };
75
85
  interface VerificationResult {
76
86
  /**
@@ -92,20 +102,4 @@ export interface vcSubmissionBody {
92
102
  vc: any;
93
103
  transactionId?: string;
94
104
  }
95
- export interface QrData {
96
- transactionId: string;
97
- requestId: string;
98
- authorizationDetails?: {
99
- responseType: string;
100
- responseMode: string;
101
- clientId: string;
102
- presentationDefinition: Record<string, unknown>;
103
- presentationDefinitionUri?: string;
104
- responseUri: string;
105
- nonce: string;
106
- iat: number;
107
- };
108
- expiresAt: number;
109
- requestUri?: string;
110
- }
111
105
  export {};