@mosip/react-inji-verify-sdk 0.15.0-beta.21 → 0.15.0-beta.23
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/Readme.md +5 -0
- package/dist/components/openid4vp-verification/OpenID4VPVerification.d.ts +1 -0
- package/dist/components/openid4vp-verification/OpenID4VPVerification.types.d.ts +4 -5
- package/dist/components/qrcode-verification/QRCodeVerification.types.d.ts +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/Readme.md
CHANGED
|
@@ -31,6 +31,7 @@ function MyApp() {
|
|
|
31
31
|
console.log("Something went wrong:", error);
|
|
32
32
|
}}
|
|
33
33
|
triggerElement={<button>📷 Scan ID Document</button>}
|
|
34
|
+
clientId="CLIENT_ID"
|
|
34
35
|
/>
|
|
35
36
|
);
|
|
36
37
|
}
|
|
@@ -50,6 +51,7 @@ function MyApp() {
|
|
|
50
51
|
onQrCodeExpired={() => alert("QR code expired, please try again")}
|
|
51
52
|
onError={(error) => console.log("Error:", error)}
|
|
52
53
|
triggerElement={<button>📱 Verify with Digital Wallet</button>}
|
|
54
|
+
clientId="CLIENT_ID"
|
|
53
55
|
/>
|
|
54
56
|
);
|
|
55
57
|
}
|
|
@@ -106,6 +108,7 @@ https://your-backend.com
|
|
|
106
108
|
onVCProcessed={(result) => handleResult(result)}
|
|
107
109
|
onError={(error) => handleError(error)}
|
|
108
110
|
triggerElement={<button>Start Verification</button>}
|
|
111
|
+
clientId="CLIENT_ID"
|
|
109
112
|
/>
|
|
110
113
|
```
|
|
111
114
|
|
|
@@ -116,6 +119,7 @@ https://your-backend.com
|
|
|
116
119
|
verifyServiceUrl="https://your-backend.com"
|
|
117
120
|
onVCProcessed={(result) => console.log(result)} // OR use onVCReceived
|
|
118
121
|
onError={(error) => console.log(error)}
|
|
122
|
+
clientId="CLIENT_ID"
|
|
119
123
|
|
|
120
124
|
// Optional
|
|
121
125
|
triggerElement={<button>Custom Trigger</button>}
|
|
@@ -205,6 +209,7 @@ presentationDefinition={{
|
|
|
205
209
|
| `onError` | function | ✅ | What to do when something goes wrong |
|
|
206
210
|
| `triggerElement` | React element | ❌ | Custom button/element to start verification |
|
|
207
211
|
| `transactionId` | string | ❌ | Your own tracking ID |
|
|
212
|
+
| `clientId` | string | ✅ | Your own client ID |
|
|
208
213
|
|
|
209
214
|
### QRCodeVerification Specific
|
|
210
215
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { OpenID4VPVerificationProps } from "./OpenID4VPVerification.types";
|
|
3
3
|
import "./OpenID4VPVerification.css";
|
|
4
|
+
export declare const isMobileDevice: () => boolean;
|
|
4
5
|
declare const OpenID4VPVerification: React.FC<OpenID4VPVerificationProps>;
|
|
5
6
|
export default OpenID4VPVerification;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export type OpenID4VPError = {
|
|
3
|
-
message: string;
|
|
4
|
-
code?: string;
|
|
5
|
-
details?: unknown;
|
|
6
|
-
};
|
|
7
2
|
export type VerificationStatus = "valid" | "invalid" | "expired";
|
|
8
3
|
export interface VerificationResult {
|
|
9
4
|
/**
|
|
@@ -149,6 +144,10 @@ export type OpenID4VPVerificationProps = ExclusivePresentationDefinition & Exclu
|
|
|
149
144
|
*/
|
|
150
145
|
onError: (error: AppError) => void;
|
|
151
146
|
};
|
|
147
|
+
export interface SessionState {
|
|
148
|
+
requestId: string;
|
|
149
|
+
transactionId: string;
|
|
150
|
+
}
|
|
152
151
|
export type AppError = {
|
|
153
152
|
errorMessage: string;
|
|
154
153
|
errorCode?: string;
|