VC Verification Module
This is a common library created to be used in any Sunbird RC platform for VC verification.
Last updated
This is a common library created to be used in any Sunbird RC platform for VC verification.
Last updated
This NPM module is developed for scanning the QR(Quick Response) codes inside your Angular applications. This library is designed to be used in sunbird RC platforms.
Install the vc-verification npm package in your angular project. Using the below command
2. You need to install the @zxing/ngx-scanner npm module. Before installing this npm module you need to check your angular compatible version with this package version. You can check the details below too.
Run cmd -
Angular Version | Ngx-scanner version |
---|---|
For more detail about compatible version you can check this doc - https://www.npmpeer.dev/packages/@zxing/ngx-scanner/compatibility
3. Import vc-verification and @zxing/ngx-scanner library in your app.module.ts file
4.1 Anyone can use the Default Scan template using the sb-vc-verify selector or he/she can use only verify service too.
Add below code in your app.component.html file
4.2 If anyone wants to change labels and messages from template. You can pass it through item property.
app.component.html
App.component.ts : Change the value of key
4.3 If anyone wants to use their own he/she can implement their own UI and he/she can use service methods of vc-verification library.
App.component.ts: Import service file in your component where you want to call vc-verification library service method call.
List of service methods
The source code to install this example can be found at https://github.com/Sunbird-RC/vc-verification
Method Name | Parameter | Description |
---|---|---|
Angular 9.0.0 <10
v3.0.0, v3.0.1
Angular 10.1.5
v3.1.0, v3.1.1, v3.1.2, v3.1.3
Angular 11.2.11 || ^12.0.4
V3.2.0, v3.3.0
Angular 11.2.11 || ^12.0.4 || ^13.0.0
V3.4.2, v3.5.0
enableScanner()
-
To Hide/show scanner screen
scanSuccessHandler($event: any)
$event
This method used to verify scan data