@injistack/react-inji-verify-sdk 0.17.0-beta.12
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 +247 -0
- package/dist/components/openid4vp-verification/OpenID4VPVerification.d.ts +6 -0
- package/dist/components/openid4vp-verification/OpenID4VPVerification.types.d.ts +139 -0
- package/dist/components/qrcode-verification/QRCodeVerification.d.ts +5 -0
- package/dist/components/qrcode-verification/QRCodeVerification.types.d.ts +105 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.LICENSE.txt +41 -0
- package/dist/types/OVPSchemeQrData.d.ts +16 -0
- package/dist/utils/api.d.ts +7 -0
- package/dist/utils/constants.d.ts +20 -0
- package/dist/utils/dataProcessor.d.ts +2 -0
- package/dist/utils/themeUtils.d.ts +4 -0
- package/dist/utils/uploadQRCodeUtils.d.ts +5 -0
- package/dist/utils/utils.d.ts +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
|
|
3
|
+
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
4
|
+
<http://stuartk.com/jszip>
|
|
5
|
+
|
|
6
|
+
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
|
7
|
+
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
|
|
8
|
+
|
|
9
|
+
JSZip uses the library pako released under the MIT license :
|
|
10
|
+
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @license React
|
|
15
|
+
* react-is.production.js
|
|
16
|
+
*
|
|
17
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the MIT license found in the
|
|
20
|
+
* LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @license React
|
|
25
|
+
* react-jsx-runtime.production.min.js
|
|
26
|
+
*
|
|
27
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the MIT license found in the
|
|
30
|
+
* LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @license qrcode.react
|
|
35
|
+
* Copyright (c) Paul O'Shannessy
|
|
36
|
+
* SPDX-License-Identifier: ISC
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/** */
|
|
40
|
+
|
|
41
|
+
/** */
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface QrData {
|
|
2
|
+
transactionId: string;
|
|
3
|
+
requestId: string;
|
|
4
|
+
authorizationDetails?: {
|
|
5
|
+
responseType: string;
|
|
6
|
+
responseMode: string;
|
|
7
|
+
clientId: string;
|
|
8
|
+
presentationDefinition: Record<string, unknown>;
|
|
9
|
+
presentationDefinitionUri?: string;
|
|
10
|
+
responseUri: string;
|
|
11
|
+
nonce: string;
|
|
12
|
+
iat: number;
|
|
13
|
+
};
|
|
14
|
+
expiresAt: number;
|
|
15
|
+
requestUri?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PresentationDefinition } from "../components/openid4vp-verification/OpenID4VPVerification.types";
|
|
2
|
+
import { QrData } from "../types/OVPSchemeQrData";
|
|
3
|
+
export declare const vcVerification: (credential: unknown, url: string) => Promise<any>;
|
|
4
|
+
export declare const vcSubmission: (credential: unknown, url: string, txnId?: string) => Promise<any>;
|
|
5
|
+
export declare const vpRequest: (url: string, clientId: string, txnId?: string, presentationDefinitionId?: string, presentationDefinition?: PresentationDefinition, acceptVPWithoutHolderProof?: boolean) => Promise<QrData>;
|
|
6
|
+
export declare const vpRequestStatus: (url: string, reqId: string) => Promise<any>;
|
|
7
|
+
export declare const vpResult: (url: string, txnId: string) => Promise<any>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const SupportedFileTypes: string[];
|
|
2
|
+
export declare const UploadFileSizeLimits: {
|
|
3
|
+
min: number;
|
|
4
|
+
max: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const FRAME_PROCESS_INTERVAL_MS = 100;
|
|
7
|
+
export declare const THROTTLE_FRAMES_PER_SEC = 500;
|
|
8
|
+
export declare const ZOOM_STEP = 2.5;
|
|
9
|
+
export declare const INITIAL_ZOOM_LEVEL = 0;
|
|
10
|
+
export declare const CONSTRAINTS_IDEAL_WIDTH = 2560;
|
|
11
|
+
export declare const CONSTRAINTS_IDEAL_HEIGHT = 1440;
|
|
12
|
+
export declare const CONSTRAINTS_IDEAL_FRAME_RATE = 30;
|
|
13
|
+
export declare const HEADER_DELIMITER = "";
|
|
14
|
+
export declare const SUPPORTED_QR_HEADERS: string[];
|
|
15
|
+
export declare const ZIP_HEADER = "PK";
|
|
16
|
+
export declare const ScanSessionExpiryTime = 60000;
|
|
17
|
+
export declare const OvpQrHeader = "INJI_OVP://";
|
|
18
|
+
export declare const BASE64_PADDING = "==";
|
|
19
|
+
export declare const acceptedFileTypes: string;
|
|
20
|
+
export declare const VALID_SD_JWT_TYPES: Set<string>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const FilterLinesIcon: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
3
|
+
export declare const SearchIcon: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
4
|
+
export declare const TickIcon: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { scanResult } from "../components/qrcode-verification/QRCodeVerification.types";
|
|
2
|
+
export declare const extractRedirectUrlFromQrData: (qrData: string) => string | null;
|
|
3
|
+
export declare const readQRcodeFromImageFile: (file: File, format: string, isPDF?: boolean) => Promise<string | undefined>;
|
|
4
|
+
export declare const scanFilesForQr: (selectedFile: File) => Promise<scanResult>;
|
|
5
|
+
export declare const doFileChecks: (file: File | null) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isSdJwt: (vpToken: string) => boolean;
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@injistack/react-inji-verify-sdk",
|
|
3
|
+
"version": "0.17.0-beta.12",
|
|
4
|
+
"description": "A react component library to perform Inji verify tasks, such as OpenId4VP sharing, Reading VC QR codes",
|
|
5
|
+
"sideEffects": [
|
|
6
|
+
"*.css"
|
|
7
|
+
],
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"module": "dist/index.js",
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "webpack --config webpack.config.js && tsc --declaration --emitDeclarationOnly --outDir dist",
|
|
16
|
+
"test": "jest test --coverage",
|
|
17
|
+
"verify": "npm run build",
|
|
18
|
+
"localPublish": "npm version patch && npm run build && npm publish --access public --registry http://localhost:4873"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/inji/inji-verify.git"
|
|
23
|
+
},
|
|
24
|
+
"author": "INJI",
|
|
25
|
+
"license": "MPL-2.0",
|
|
26
|
+
"keywords": [
|
|
27
|
+
"react",
|
|
28
|
+
"react-component",
|
|
29
|
+
"openid4VP",
|
|
30
|
+
"mosip",
|
|
31
|
+
"inji",
|
|
32
|
+
"inji verify"
|
|
33
|
+
],
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@babel/preset-env": "^7.26.9",
|
|
36
|
+
"@babel/preset-react": "^7.26.3",
|
|
37
|
+
"@babel/preset-typescript": "^7.27.0",
|
|
38
|
+
"@svgr/webpack": "^8.1.0",
|
|
39
|
+
"@testing-library/dom": "^10.4.0",
|
|
40
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
41
|
+
"@testing-library/react": "^16.3.0",
|
|
42
|
+
"@types/babel__generator": "^7.27.0",
|
|
43
|
+
"@types/babel__template": "^7.4.4",
|
|
44
|
+
"@types/node": "^22.14.1",
|
|
45
|
+
"@types/react": "^18.2.73",
|
|
46
|
+
"@types/react-dom": "^18.2.23",
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^8.30.1",
|
|
48
|
+
"@typescript-eslint/parser": "^8.30.1",
|
|
49
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
50
|
+
"cross-env": "^7.0.3",
|
|
51
|
+
"css-loader": "^7.1.2",
|
|
52
|
+
"eslint": "^9.24.0",
|
|
53
|
+
"jest": "^29.7.0",
|
|
54
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
55
|
+
"jsdom": "^26.1.0",
|
|
56
|
+
"mini-css-extract-plugin": "^2.9.2",
|
|
57
|
+
"style-loader": "^4.0.0",
|
|
58
|
+
"ts-loader": "^9.5.2",
|
|
59
|
+
"typescript": "^4.9.5",
|
|
60
|
+
"webpack": "^5.99.5",
|
|
61
|
+
"webpack-cli": "^6.0.1"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"react": "^18.2.0",
|
|
65
|
+
"react-dom": "^18.2.0"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"@ant-design/icons": "^6.0.0",
|
|
69
|
+
"@emotion/react": "^11.14.0",
|
|
70
|
+
"@emotion/styled": "^11.14.0",
|
|
71
|
+
"@injistack/pixelpass": "^0.8.0-RC1",
|
|
72
|
+
"@mui/material": "^7.1.0",
|
|
73
|
+
"ajv": "^8.17.1",
|
|
74
|
+
"pdfjs-dist": "5.2.133",
|
|
75
|
+
"qrcode.react": "^4.1.0",
|
|
76
|
+
"react-icons": "^5.5.0",
|
|
77
|
+
"zxing-wasm": "^2.1.2"
|
|
78
|
+
}
|
|
79
|
+
}
|