mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-08 21:18:14 -05:00
Merge pull request #1106 from tw-mosip/INJI-624-merge-to-develop
Merge Release 0.10.0 to develop
This commit is contained in:
4
.github/workflows/internal-build.yml
vendored
4
.github/workflows/internal-build.yml
vendored
@@ -86,7 +86,7 @@ jobs:
|
||||
uses: mosip/kattu/.github/workflows/android-publish.yml@master
|
||||
with:
|
||||
RELEASE: ${{ inputs.release }}
|
||||
NODE_VERSION: '16.x'
|
||||
NODE_VERSION: '18.x'
|
||||
RELEASE_KEYSTORE_ALIAS: androidreleasekey
|
||||
MIMOTO_HOST: ${{ inputs.mimotoBackendServiceUrl }}
|
||||
ESIGNET_HOST: ${{ inputs.esignetBackendServiceUrl }}
|
||||
@@ -111,7 +111,7 @@ jobs:
|
||||
uses: mosip/kattu/.github/workflows/android-publish.yml@master
|
||||
with:
|
||||
RELEASE: ${{ inputs.release }}
|
||||
NODE_VERSION: '16.x'
|
||||
NODE_VERSION: '18.x'
|
||||
RELEASE_KEYSTORE_ALIAS: androidreleasekey
|
||||
MIMOTO_HOST: ${{ inputs.mimotoBackendServiceUrl }}
|
||||
ESIGNET_HOST: ${{ inputs.esignetBackendServiceUrl }}
|
||||
|
||||
@@ -2,7 +2,7 @@ fileignoreconfig:
|
||||
- filename: package.json
|
||||
checksum: 984f91af6d696faf934f7e541801343e146aed1b58d7c950ba11ec02dbd60dda
|
||||
- filename: package-lock.json
|
||||
checksum: c16e22cf137c123d7f1b1b95758646fc839dc1fa16f7cf74dff3124174475e13
|
||||
checksum: baf08330efcaedd72275354d8e691f0004e0583d0f494a1e40b821fe7ec9046f
|
||||
- filename: lib/jsonld-signatures/suites/ed255192018/ed25519.ts
|
||||
checksum: 493b6e31144116cb612c24d98b97d8adcad5609c0a52c865a6847ced0a0ddc3a
|
||||
- filename: components/PasscodeVerify.tsx
|
||||
@@ -44,11 +44,11 @@ fileignoreconfig:
|
||||
- filename: screens/Issuers/IssuersScreen.tsx
|
||||
checksum: 9c53e3770dbefe26e0de67ee4b7d5cc9c52d9823cbb136a1a5104dcb0a101071
|
||||
- filename: ios/Podfile.lock
|
||||
checksum: edad9c2d11b0b3ed819cb0dcbfaf0515d31adb8116223c07f7b7b79e6689fe96
|
||||
checksum: c30eada0d288ef1705e0eeb03bb941863ca7e5663196baaa814cb24e8312655e
|
||||
- filename: screens/Home/IntroSlidersScreen.tsx
|
||||
checksum: 72ef913857448ef05763e52e32356faa2d1f3de8130a1c638d1897f44823031f
|
||||
- filename: shared/commonUtil.ts
|
||||
checksum: 01c3fdcd2f1c1757eae0c6a27fe04eb70c2aaf8660c604f3301997484592b66c
|
||||
checksum: b9ff87d627c74ba1cf2f1d0bfab6c11192573c45a4c581c3beadb3c612bfe1ab
|
||||
- filename: screens/Home/MyVcs/GetIdInputModal.tsx
|
||||
checksum: 5c736ed79a372d0ffa7c02eb33d0dc06edbbb08d120978ff287f5f06cd6c7746
|
||||
- filename: shared/openId4VCI/Utils.ts
|
||||
|
||||
394
LICENSE
394
LICENSE
@@ -1,373 +1,21 @@
|
||||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Modular Open Source Identity Platform
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<color name="splashscreen_background">#ffffff</color>
|
||||
<color name="splashscreen_background">#FFFFFF</color>
|
||||
<color name="iconBackground">#FFFFFF</color>
|
||||
<color name="colorPrimary">#023c69</color>
|
||||
<color name="colorPrimaryDark">#ffffff</color>
|
||||
|
||||
@@ -7,4 +7,4 @@ yes | sudo gem install bundler
|
||||
|
||||
yes | sudo fastlane install_plugins
|
||||
|
||||
bundle exec fastlane android_build_beta
|
||||
bundle exec fastlane android_build_beta
|
||||
@@ -7,4 +7,4 @@ yes | sudo gem install bundler
|
||||
|
||||
yes | sudo fastlane install_plugins
|
||||
|
||||
bundle exec fastlane android_build_internal
|
||||
bundle exec fastlane android_build_internal
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
icon: './assets/icon.png',
|
||||
splash: {
|
||||
image: './assets/splash.png',
|
||||
resizeMode: 'contain',
|
||||
resizeMode: 'cover',
|
||||
backgroundColor: '#ffffff',
|
||||
},
|
||||
updates: {
|
||||
|
||||
133
components/VcItemActivationStatus.tsx
Normal file
133
components/VcItemActivationStatus.tsx
Normal file
@@ -0,0 +1,133 @@
|
||||
import React from 'react';
|
||||
import {useTranslation} from 'react-i18next';
|
||||
import {Dimensions} from 'react-native';
|
||||
import {Icon} from 'react-native-elements';
|
||||
import {ActorRefFrom} from 'xstate';
|
||||
import {vcItemMachine} from '../machines/vcItem';
|
||||
import {VerifiableCredential} from '../types/vc';
|
||||
import {Row, Text} from './ui';
|
||||
import {Theme} from './ui/styleUtils';
|
||||
|
||||
const WalletUnverifiedIcon: React.FC = () => {
|
||||
return (
|
||||
<Icon
|
||||
name="shield-alert"
|
||||
color={Theme.Colors.Icon}
|
||||
size={28}
|
||||
type="material-community"
|
||||
containerStyle={{marginStart: 4, bottom: 1}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
const WalletVerifiedIcon: React.FC = () => {
|
||||
return (
|
||||
<Icon
|
||||
name="verified-user"
|
||||
color={Theme.Colors.VerifiedIcon}
|
||||
size={28}
|
||||
containerStyle={{marginStart: 4, bottom: 1}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
const WalletUnverifiedActivationDetails: React.FC<
|
||||
WalletUnVerifiedDetailsProps
|
||||
> = props => {
|
||||
const {t} = useTranslation('VcDetails');
|
||||
return (
|
||||
<Row
|
||||
width={Dimensions.get('screen').width * 0.8}
|
||||
align="space-between"
|
||||
crossAlign="center">
|
||||
<Row
|
||||
crossAlign="center"
|
||||
style={{
|
||||
flex: 1,
|
||||
}}>
|
||||
{props.verifiableCredential && <WalletUnverifiedIcon />}
|
||||
<Text
|
||||
color={Theme.Colors.Details}
|
||||
weight="semibold"
|
||||
size="small"
|
||||
margin="10 33 10 10"
|
||||
style={
|
||||
!props.verifiableCredential
|
||||
? Theme.Styles.loadingTitle
|
||||
: Theme.Styles.statusLabel
|
||||
}
|
||||
children={t('offlineAuthDisabledHeader')}></Text>
|
||||
</Row>
|
||||
</Row>
|
||||
);
|
||||
};
|
||||
|
||||
const WalletVerifiedActivationDetails: React.FC<
|
||||
WalletVerifiedDetailsProps
|
||||
> = props => {
|
||||
const {t} = useTranslation('VcDetails');
|
||||
return (
|
||||
<Row
|
||||
width={Dimensions.get('screen').width * 0.8}
|
||||
align="space-between"
|
||||
crossAlign="center">
|
||||
<Row
|
||||
crossAlign="center"
|
||||
style={{
|
||||
flex: 1,
|
||||
}}>
|
||||
<WalletVerifiedIcon />
|
||||
<Text
|
||||
color={Theme.Colors.statusLabel}
|
||||
weight="semibold"
|
||||
size="smaller"
|
||||
margin="10 10 10 10"
|
||||
style={
|
||||
!props.verifiableCredential
|
||||
? Theme.Styles.loadingTitle
|
||||
: Theme.Styles.subtitle
|
||||
}
|
||||
children={t('profileAuthenticated')}></Text>
|
||||
</Row>
|
||||
</Row>
|
||||
);
|
||||
};
|
||||
|
||||
export const VcItemActivationStatus: React.FC<
|
||||
VcItemActivationStatusProps
|
||||
> = props => {
|
||||
return (
|
||||
<Row>
|
||||
{props.emptyWalletBindingId ? (
|
||||
<WalletUnverifiedActivationDetails
|
||||
verifiableCredential={props.verifiableCredential}
|
||||
onPress={props.onPress}
|
||||
/>
|
||||
) : (
|
||||
<WalletVerifiedActivationDetails
|
||||
verifiableCredential={props.verifiableCredential}
|
||||
showOnlyBindedVc={props.showOnlyBindedVc}
|
||||
onPress={props.onPress}
|
||||
/>
|
||||
)}
|
||||
</Row>
|
||||
);
|
||||
};
|
||||
|
||||
interface VcItemActivationStatusProps {
|
||||
showOnlyBindedVc: boolean;
|
||||
onPress: (vcRef?: ActorRefFrom<typeof vcItemMachine>) => void;
|
||||
verifiableCredential: VerifiableCredential;
|
||||
emptyWalletBindingId: boolean;
|
||||
}
|
||||
|
||||
interface WalletVerifiedDetailsProps {
|
||||
showOnlyBindedVc: boolean;
|
||||
onPress: (vcRef?: ActorRefFrom<typeof vcItemMachine>) => void;
|
||||
verifiableCredential: VerifiableCredential;
|
||||
}
|
||||
|
||||
interface WalletUnVerifiedDetailsProps {
|
||||
onPress: (vcRef?: ActorRefFrom<typeof vcItemMachine>) => void;
|
||||
verifiableCredential: VerifiableCredential;
|
||||
}
|
||||
205
components/VcItemContent.tsx
Normal file
205
components/VcItemContent.tsx
Normal file
@@ -0,0 +1,205 @@
|
||||
import React from 'react';
|
||||
import {useTranslation} from 'react-i18next';
|
||||
import {Image, ImageBackground, View} from 'react-native';
|
||||
import {getLocalizedField} from '../i18n';
|
||||
import {VerifiableCredential} from '../types/vc';
|
||||
import {VcItemTags} from './VcItemTags';
|
||||
import VerifiedIcon from './VerifiedIcon';
|
||||
import {Column, Row, Text} from './ui';
|
||||
import {Theme} from './ui/styleUtils';
|
||||
import {CheckBox, Icon} from 'react-native-elements';
|
||||
|
||||
const getDetails = (arg1, arg2, verifiableCredential) => {
|
||||
if (arg1 === 'Status') {
|
||||
return (
|
||||
<Column>
|
||||
<Text
|
||||
weight="bold"
|
||||
size="smaller"
|
||||
color={
|
||||
!verifiableCredential
|
||||
? Theme.Colors.LoadingDetailsLabel
|
||||
: Theme.Colors.DetailsLabel
|
||||
}>
|
||||
{arg1}
|
||||
</Text>
|
||||
<Row>
|
||||
<Text
|
||||
numLines={1}
|
||||
color={Theme.Colors.Details}
|
||||
weight="bold"
|
||||
size="smaller"
|
||||
style={
|
||||
!verifiableCredential
|
||||
? Theme.Styles.loadingTitle
|
||||
: Theme.Styles.subtitle
|
||||
}>
|
||||
{!verifiableCredential ? '' : arg2}
|
||||
</Text>
|
||||
{!verifiableCredential ? null : <VerifiedIcon />}
|
||||
</Row>
|
||||
</Column>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<Column>
|
||||
<Text
|
||||
color={
|
||||
!verifiableCredential
|
||||
? Theme.Colors.LoadingDetailsLabel
|
||||
: Theme.Colors.DetailsLabel
|
||||
}
|
||||
size="smaller"
|
||||
weight={'bold'}
|
||||
style={Theme.Styles.vcItemLabelHeader}>
|
||||
{arg1}
|
||||
</Text>
|
||||
<Text
|
||||
numLines={4}
|
||||
color={Theme.Colors.Details}
|
||||
weight="bold"
|
||||
size="smaller"
|
||||
style={
|
||||
!verifiableCredential
|
||||
? Theme.Styles.loadingTitle
|
||||
: Theme.Styles.subtitle
|
||||
}>
|
||||
{!verifiableCredential ? '' : arg2}
|
||||
</Text>
|
||||
</Column>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export const VcItemContent: React.FC<VcItemContentProps> = props => {
|
||||
//Assigning the UIN and VID from the VC details to display the idtype label
|
||||
const uin = props.verifiableCredential?.credentialSubject.UIN;
|
||||
const vid = props.verifiableCredential?.credentialSubject.VID;
|
||||
const fullName = !props.verifiableCredential
|
||||
? ''
|
||||
: getLocalizedField(props.verifiableCredential.credentialSubject.fullName);
|
||||
const {t} = useTranslation('VcDetails');
|
||||
const isvalid = !props.verifiableCredential ? '' : t('valid');
|
||||
const selectableOrCheck = props.selectable ? (
|
||||
<CheckBox
|
||||
checked={props.selected}
|
||||
checkedIcon={<Icon name="radio-button-checked" />}
|
||||
uncheckedIcon={<Icon name="radio-button-unchecked" />}
|
||||
onPress={() => props.onPress()}
|
||||
/>
|
||||
) : null;
|
||||
|
||||
return (
|
||||
<ImageBackground
|
||||
source={!props.verifiableCredential ? null : Theme.CloseCard}
|
||||
resizeMode="stretch"
|
||||
borderRadius={4}
|
||||
style={
|
||||
!props.verifiableCredential
|
||||
? Theme.Styles.vertloadingContainer
|
||||
: Theme.Styles.backgroundImageContainer
|
||||
}>
|
||||
<Column>
|
||||
<Row align="space-between">
|
||||
<Row>
|
||||
<ImageBackground
|
||||
source={
|
||||
!props.verifiableCredential
|
||||
? Theme.ProfileIcon
|
||||
: {uri: props.context.credential.biometrics.face}
|
||||
}
|
||||
style={Theme.Styles.closeCardImage}>
|
||||
{props.iconName && (
|
||||
<Icon
|
||||
name={props.iconName}
|
||||
type={props.iconType}
|
||||
color={Theme.Colors.Icon}
|
||||
style={{marginLeft: -80}}
|
||||
/>
|
||||
)}
|
||||
</ImageBackground>
|
||||
<Column margin="0 0 0 10">
|
||||
{getDetails(t('fullName'), fullName, props.verifiableCredential)}
|
||||
|
||||
<Column margin="10 0 0 0">
|
||||
<Text
|
||||
color={
|
||||
!props.verifiableCredential
|
||||
? Theme.Colors.LoadingDetailsLabel
|
||||
: Theme.Colors.DetailsLabel
|
||||
}
|
||||
weight="semibold"
|
||||
size="smaller"
|
||||
align="left">
|
||||
{t('idType')}
|
||||
</Text>
|
||||
<Text
|
||||
weight="semibold"
|
||||
color={Theme.Colors.Details}
|
||||
size="smaller"
|
||||
style={
|
||||
!props.verifiableCredential
|
||||
? Theme.Styles.loadingTitle
|
||||
: Theme.Styles.subtitle
|
||||
}>
|
||||
{t('nationalCard')}
|
||||
</Text>
|
||||
</Column>
|
||||
</Column>
|
||||
</Row>
|
||||
|
||||
<Column>
|
||||
{props.verifiableCredential ? selectableOrCheck : null}
|
||||
</Column>
|
||||
</Row>
|
||||
|
||||
<Row
|
||||
align="space-between"
|
||||
margin="5 0 0 0"
|
||||
style={
|
||||
!props.verifiableCredential ? Theme.Styles.loadingContainer : null
|
||||
}>
|
||||
<Column>
|
||||
{uin ? getDetails(t('uin'), uin, props.verifiableCredential) : null}
|
||||
{vid ? getDetails(t('vid'), vid, props.verifiableCredential) : null}
|
||||
{!props.verifiableCredential
|
||||
? getDetails(t('id'), uin || vid, props.verifiableCredential)
|
||||
: null}
|
||||
{getDetails(
|
||||
t('generatedOn'),
|
||||
props.generatedOn,
|
||||
props.verifiableCredential,
|
||||
)}
|
||||
</Column>
|
||||
<Column>
|
||||
{props.verifiableCredential
|
||||
? getDetails(t('status'), isvalid, props.verifiableCredential)
|
||||
: null}
|
||||
</Column>
|
||||
<Column
|
||||
style={{display: props.verifiableCredential ? 'flex' : 'none'}}>
|
||||
<Image
|
||||
source={Theme.MosipLogo}
|
||||
style={Theme.Styles.logo}
|
||||
resizeMethod="auto"
|
||||
/>
|
||||
</Column>
|
||||
</Row>
|
||||
</Column>
|
||||
<VcItemTags tag={props.tag} />
|
||||
</ImageBackground>
|
||||
);
|
||||
};
|
||||
|
||||
interface VcItemContentProps {
|
||||
context: any;
|
||||
verifiableCredential: VerifiableCredential;
|
||||
generatedOn: string;
|
||||
tag: string;
|
||||
selectable: boolean;
|
||||
selected: boolean;
|
||||
iconName?: string;
|
||||
iconType?: string;
|
||||
service: any;
|
||||
onPress?: () => void;
|
||||
}
|
||||
@@ -6,7 +6,10 @@ PODS:
|
||||
- AppAuth/ExternalUserAgent (1.6.2):
|
||||
- AppAuth/Core
|
||||
- ASN1Decoder (1.8.0)
|
||||
- BiometricSdk (0.5.4):
|
||||
- biometric-sdk-react-native (0.2.4):
|
||||
- BiometricSdk (= 0.5.9)
|
||||
- React-Core
|
||||
- BiometricSdk (0.5.9):
|
||||
- TensorFlowLiteObjC (= 2.12.0)
|
||||
- boost (1.76.0)
|
||||
- BVLinearGradient (2.8.2):
|
||||
@@ -84,9 +87,6 @@ PODS:
|
||||
- MMKV (1.2.13):
|
||||
- MMKVCore (~> 1.2.13)
|
||||
- MMKVCore (1.2.16)
|
||||
- mosip-mobileid-sdk (0.1.0):
|
||||
- BiometricSdk (= 0.5.4)
|
||||
- React-Core
|
||||
- Permission-BluetoothPeripheral (3.8.4):
|
||||
- RNPermissions
|
||||
- Permission-Camera (3.8.4):
|
||||
@@ -373,7 +373,7 @@ PODS:
|
||||
- React-Core
|
||||
- react-native-spinkit (1.4.1):
|
||||
- React
|
||||
- react-native-tuvali (0.4.5):
|
||||
- react-native-tuvali (0.4.6):
|
||||
- CrcSwift (~> 0.0.3)
|
||||
- GzipSwift
|
||||
- React-Core
|
||||
@@ -504,6 +504,7 @@ PODS:
|
||||
- ZXingObjC/Core
|
||||
|
||||
DEPENDENCIES:
|
||||
- "biometric-sdk-react-native (from `../node_modules/@iriscan/biometric-sdk-react-native`)"
|
||||
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
|
||||
- BVLinearGradient (from `../node_modules/react-native-linear-gradient`)
|
||||
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
|
||||
@@ -531,7 +532,6 @@ DEPENDENCIES:
|
||||
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
|
||||
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
|
||||
- libevent (~> 2.1.12)
|
||||
- mosip-mobileid-sdk (from `../node_modules/mosip-mobileid-sdk`)
|
||||
- Permission-BluetoothPeripheral (from `../node_modules/react-native-permissions/ios/BluetoothPeripheral`)
|
||||
- Permission-Camera (from `../node_modules/react-native-permissions/ios/Camera`)
|
||||
- Permission-LocationAccuracy (from `../node_modules/react-native-permissions/ios/LocationAccuracy`)
|
||||
@@ -608,6 +608,8 @@ SPEC REPOS:
|
||||
- ZXingObjC
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
biometric-sdk-react-native:
|
||||
:path: "../node_modules/@iriscan/biometric-sdk-react-native"
|
||||
boost:
|
||||
:podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
|
||||
BVLinearGradient:
|
||||
@@ -660,8 +662,6 @@ EXTERNAL SOURCES:
|
||||
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
|
||||
hermes-engine:
|
||||
:podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec"
|
||||
mosip-mobileid-sdk:
|
||||
:path: "../node_modules/mosip-mobileid-sdk"
|
||||
Permission-BluetoothPeripheral:
|
||||
:path: "../node_modules/react-native-permissions/ios/BluetoothPeripheral"
|
||||
Permission-Camera:
|
||||
@@ -778,7 +778,8 @@ EXTERNAL SOURCES:
|
||||
SPEC CHECKSUMS:
|
||||
AppAuth: 3bb1d1cd9340bd09f5ed189fb00b1cc28e1e8570
|
||||
ASN1Decoder: 6110fdeacfdb41559b1481457a1645be716610aa
|
||||
BiometricSdk: 1d16c395413164d92a280b78006abba4307063e6
|
||||
biometric-sdk-react-native: 5d1207e0d9ee34788cb4ccb59cfc205022d7e3f1
|
||||
BiometricSdk: 303e7329404ea4d922dc14108449d10d21574f77
|
||||
boost: 57d2868c099736d80fcd648bf211b4431e51a558
|
||||
BVLinearGradient: 916632041121a658c704df89d99f04acb038de0f
|
||||
CatCrypto: a477899b6be4954e75be4897e732da098cc0a5a8
|
||||
@@ -812,7 +813,6 @@ SPEC CHECKSUMS:
|
||||
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
|
||||
MMKV: aac95d817a100479445633f2b3ed8961b4ac5043
|
||||
MMKVCore: 9cfef4c48c6c46f66226fc2e4634d78490206a48
|
||||
mosip-mobileid-sdk: 6b8182276896194fdcacdde148b02d5d2d16b02a
|
||||
Permission-BluetoothPeripheral: 2b88a131074edafd8a46a5cda4ba610ec986d2fb
|
||||
Permission-Camera: 7ec9ee99704766ff9b90198183387a7f5d82b0c1
|
||||
Permission-LocationAccuracy: a38ddb5c5d0b8e656f3c86e4a500f9bb88bc099d
|
||||
@@ -842,7 +842,7 @@ SPEC CHECKSUMS:
|
||||
react-native-secure-key-store: 910e6df6bc33cb790aba6ee24bc7818df1fe5898
|
||||
react-native-secure-keystore: d9e791a495d23c33db7711732f3a761533b882db
|
||||
react-native-spinkit: da294fd828216ad211fe36a5c14c1e09f09e62db
|
||||
react-native-tuvali: 22b5708e1511f84ace165605778ad94cf9a8f635
|
||||
react-native-tuvali: bd369208d58ff9e1528c2a76dce126f60d7fd35d
|
||||
React-perflogger: d21f182895de9d1b077f8a3cd00011095c8c9100
|
||||
React-RCTActionSheet: 0151f83ef92d2a7139bba7dfdbc8066632a6d47b
|
||||
React-RCTAnimation: 5ec9c0705bb2297549c120fe6473aa3e4a01e215
|
||||
|
||||
@@ -203,12 +203,6 @@
|
||||
},
|
||||
"AddVcModal": {
|
||||
"requestingCredential": "ರುಜುವಾತುಗಳನ್ನು ವಿನಂತಿಸಲಾಗುತ್ತಿದೆ...",
|
||||
"confirmationDialog": {
|
||||
"title": "ನೀವು ಡೌನ್ಲೋಡ್ ಮಾಡುವುದನ್ನು ರದ್ದುಗೊಳಿಸಲು ಬಯಸುವಿರಾ?",
|
||||
"message": "ಒಮ್ಮೆ ರದ್ದುಗೊಳಿಸಿದರೆ, ನಿಮ್ಮ ಕಾರ್ಡ್ ಡೌನ್ಲೋಡ್ ಆಗುವುದಿಲ್ಲ ಮತ್ತು ನೀವು ಡೌನ್ಲೋಡ್ ಅನ್ನು ಮರುಪ್ರಾರಂಭಿಸಬೇಕಾಗುತ್ತದೆ.",
|
||||
"wait": "ಇಲ್ಲ, ನಾನು ಕಾಯುತ್ತೇನೆ",
|
||||
"cancel": "ಹೌದು, ರದ್ದುಮಾಡಿ"
|
||||
},
|
||||
"errors": {
|
||||
"input": {
|
||||
"empty": "ಇನ್ಪುಟ್ ಖಾಲಿ ಇರುವಂತಿಲ್ಲ",
|
||||
|
||||
@@ -4,7 +4,7 @@ import {Linking} from 'react-native';
|
||||
import {assign, EventFrom, StateFrom} from 'xstate';
|
||||
import {createModel} from 'xstate/lib/model';
|
||||
|
||||
import {faceAuth} from 'mosip-mobileid-sdk';
|
||||
import {faceCompare} from '@iriscan/biometric-sdk-react-native';
|
||||
|
||||
const model = createModel(
|
||||
{
|
||||
@@ -220,7 +220,7 @@ export const createFaceScannerMachine = (vcImage: string) =>
|
||||
const rxDataURI =
|
||||
/data:(?<mime>[\w/\-.]+);(?<encoding>\w+),(?<data>.*)/;
|
||||
const matches = rxDataURI.exec(vcImage).groups;
|
||||
return faceAuth(context.capturedImage.base64, matches.data);
|
||||
return faceCompare(context.capturedImage.base64, matches.data);
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
43
package-lock.json
generated
43
package-lock.json
generated
@@ -16,6 +16,7 @@
|
||||
"@digitalcredentials/vc": "^1.1.2",
|
||||
"@expo-google-fonts/inter": "^0.2.3",
|
||||
"@expo/metro-config": "~0.10.0",
|
||||
"@iriscan/biometric-sdk-react-native": "^0.2.6",
|
||||
"@react-native-clipboard/clipboard": "^1.10.0",
|
||||
"@react-native-community/netinfo": "9.3.7",
|
||||
"@react-native-picker/picker": "2.4.8",
|
||||
@@ -39,7 +40,6 @@
|
||||
"i18next": "^21.6.16",
|
||||
"iso-639-3": "^3.0.1",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"mosip-mobileid-sdk": "git://github.com/mosip/mosip-mobileid-sdk.git#IrisScan",
|
||||
"node-forge": "^1.3.1",
|
||||
"node-jose": "^2.2.0",
|
||||
"patch-package": "^6.5.1",
|
||||
@@ -4524,6 +4524,18 @@
|
||||
"integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@iriscan/biometric-sdk-react-native": {
|
||||
"version": "0.2.6",
|
||||
"resolved": "https://registry.npmjs.org/@iriscan/biometric-sdk-react-native/-/biometric-sdk-react-native-0.2.6.tgz",
|
||||
"integrity": "sha512-aA9gQWJ/Nt0KGDlf1vC8oxld3Daw23LlWdBidXyVfxWywm4VApq0nrOP+l2y9TVEWuAQjqdAbKSZ89ZEhetPjQ==",
|
||||
"engines": {
|
||||
"node": ">= 16.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@istanbuljs/load-nyc-config": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
|
||||
@@ -22292,18 +22304,6 @@
|
||||
"mkdirp": "bin/cmd.js"
|
||||
}
|
||||
},
|
||||
"node_modules/mosip-mobileid-sdk": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "git+ssh://git@github.com/mosip/mosip-mobileid-sdk.git#ff4647a6c949b0acf8f36ae968dcbd407df7fb83",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 16.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"react-native": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
@@ -30996,7 +30996,7 @@
|
||||
"bs58": "^4.0.1",
|
||||
"crypto-ld": "^4.0.2",
|
||||
"esm": "^3.2.25",
|
||||
"node-forge": "~0.9.1",
|
||||
"node-forge": "^1.3.1",
|
||||
"semver": "^7.3.2",
|
||||
"sodium-native": "^3.1.1"
|
||||
},
|
||||
@@ -31337,7 +31337,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@expo/code-signing-certificates/-/code-signing-certificates-0.0.5.tgz",
|
||||
"integrity": "sha512-BNhXkY1bblxKZpltzAx98G2Egj9g1Q+JRcvR7E99DOj862FTCX+ZPsAUtPTr7aHxwtrL7+fL3r0JSmM9kBm+Bw==",
|
||||
"requires": {
|
||||
"node-forge": "^1.2.1",
|
||||
"node-forge": "^1.3.1",
|
||||
"nullthrows": "^1.1.1"
|
||||
}
|
||||
},
|
||||
@@ -32281,6 +32281,12 @@
|
||||
"integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",
|
||||
"dev": true
|
||||
},
|
||||
"@iriscan/biometric-sdk-react-native": {
|
||||
"version": "0.2.6",
|
||||
"resolved": "https://registry.npmjs.org/@iriscan/biometric-sdk-react-native/-/biometric-sdk-react-native-0.2.6.tgz",
|
||||
"integrity": "sha512-aA9gQWJ/Nt0KGDlf1vC8oxld3Daw23LlWdBidXyVfxWywm4VApq0nrOP+l2y9TVEWuAQjqdAbKSZ89ZEhetPjQ==",
|
||||
"requires": {}
|
||||
},
|
||||
"@istanbuljs/load-nyc-config": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
|
||||
@@ -45722,11 +45728,6 @@
|
||||
"minimist": "^1.2.6"
|
||||
}
|
||||
},
|
||||
"mosip-mobileid-sdk": {
|
||||
"version": "git+ssh://git@github.com/mosip/mosip-mobileid-sdk.git#ff4647a6c949b0acf8f36ae968dcbd407df7fb83",
|
||||
"from": "mosip-mobileid-sdk@git://github.com/mosip/mosip-mobileid-sdk.git#IrisScan",
|
||||
"requires": {}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
@@ -45914,7 +45915,7 @@
|
||||
"es6-promise": "^4.2.8",
|
||||
"lodash": "^4.17.21",
|
||||
"long": "^5.2.0",
|
||||
"node-forge": "^1.2.1",
|
||||
"node-forge": "^1.3.1",
|
||||
"pako": "^2.0.4",
|
||||
"process": "^0.11.10",
|
||||
"uuid": "^9.0.0"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"@react-navigation/native": "^6.0.8",
|
||||
"@react-navigation/native-stack": "^6.1.0",
|
||||
"@xstate/react": "^3.0.1",
|
||||
"@iriscan/biometric-sdk-react-native": "^0.2.6",
|
||||
"base64url-universal": "^1.1.0",
|
||||
"buffer": "^6.0.3",
|
||||
"date-fns": "^2.26.0",
|
||||
@@ -41,7 +42,6 @@
|
||||
"i18next": "^21.6.16",
|
||||
"iso-639-3": "^3.0.1",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"mosip-mobileid-sdk": "git://github.com/mosip/mosip-mobileid-sdk.git#IrisScan",
|
||||
"node-forge": "^1.3.1",
|
||||
"node-jose": "^2.2.0",
|
||||
"patch-package": "^6.5.1",
|
||||
|
||||
@@ -7,7 +7,6 @@ import {
|
||||
selectIsRequestingCredential,
|
||||
selectOtpError,
|
||||
selectIsAcceptingIdInput,
|
||||
selectIsCancellingDownload,
|
||||
} from './AddVcModalMachine';
|
||||
|
||||
export function useAddVcModal({service}: AddVcModalProps) {
|
||||
@@ -18,17 +17,12 @@ export function useAddVcModal({service}: AddVcModalProps) {
|
||||
|
||||
isAcceptingUinInput: useSelector(service, selectIsAcceptingIdInput),
|
||||
isAcceptingOtpInput: useSelector(service, selectIsAcceptingOtpInput),
|
||||
isDownloadCancelled: useSelector(service, selectIsCancellingDownload),
|
||||
|
||||
INPUT_OTP: (otp: string) => service.send(AddVcModalEvents.INPUT_OTP(otp)),
|
||||
|
||||
RESEND_OTP: () => service.send(AddVcModalEvents.RESEND_OTP()),
|
||||
|
||||
DISMISS: () => service.send(AddVcModalEvents.DISMISS()),
|
||||
|
||||
WAIT: () => service.send(AddVcModalEvents.WAIT()),
|
||||
|
||||
CANCEL: () => service.send(AddVcModalEvents.CANCEL()),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -55,3 +55,23 @@ export function logState(state: AnyState) {
|
||||
export const getMaskedText = (id: string): string => {
|
||||
return '*'.repeat(id.length - 4) + id.slice(-4);
|
||||
};
|
||||
|
||||
export const faceMatchConfig = (resp: string) => {
|
||||
return {
|
||||
withFace: {
|
||||
encoder: {
|
||||
tfModel: {
|
||||
path: resp + '/model.tflite',
|
||||
inputWidth: 160,
|
||||
inputHeight: 160,
|
||||
outputLength: 512,
|
||||
modelChecksum:
|
||||
'797b4d99794965749635352d55da38d4748c28c659ee1502338badee4614ed06',
|
||||
},
|
||||
},
|
||||
matcher: {
|
||||
threshold: 0.8,
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import {init} from 'mosip-mobileid-sdk';
|
||||
import {configure} from '@iriscan/biometric-sdk-react-native';
|
||||
import {changeCrendetialRegistry} from '../constants';
|
||||
import {CACHED_API} from '../api';
|
||||
import {faceMatchConfig} from '../commonUtil';
|
||||
|
||||
export const COMMON_PROPS_KEY: string =
|
||||
'CommonPropsKey-' + '6964d04a-9268-11ed-a1eb-0242ac120002';
|
||||
@@ -19,9 +20,11 @@ export async function downloadModel() {
|
||||
const maxRetryStr = injiProp.modelDownloadMaxRetry;
|
||||
const maxRetry = parseInt(maxRetryStr);
|
||||
const resp: string = injiProp != null ? injiProp.faceSdkModelUrl : null;
|
||||
|
||||
if (resp != null) {
|
||||
for (let counter = 0; counter < maxRetry; counter++) {
|
||||
var result = await init(resp + '/model.tflite', false);
|
||||
let config = faceMatchConfig(resp);
|
||||
var result = await configure(config);
|
||||
console.log('model download result is = ' + result);
|
||||
if (result) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user