merge with main repo

This commit is contained in:
Rémi Colin
2024-01-14 17:53:17 +01:00
4 changed files with 88 additions and 7 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
app/android/android-passport-reader/app/google-services.json

View File

@@ -107,6 +107,3 @@ We are actively looking for contributors. Please check the [open issues](https:/
Contact me @FlorentTavernier on telegram for any feedback.
Thanks to [Youssef](https://github.com/yssf-io), [Aayush](https://twitter.com/yush_g), [Andy](https://twitter.com/viv_boop), [Vivek](https://twitter.com/viv_boop), [Marcus](https://github.com/base0010) and [Andrew](https://github.com/AndrewCLu) for contributing ideas and helping build this technology, and to [EF PSE](https://pse.dev/) for supporting this work through grants!
//check

View File

@@ -65,8 +65,12 @@ import axios from 'axios';
import groth16ExportSolidityCallData from './utils/snarkjs';
import contractAddresses from "./deployments/addresses.json"
import proofOfPassportArtefact from "./deployments/ProofOfPassport.json";
<<<<<<< HEAD
import CustomTextInput from './src/components/CustomTextInput';
import EnterDetailsScreen from './src/screens/EnterDetailsScreen';
=======
>>>>>>> upstream/main
console.log('DEFAULT_PNUMBER', DEFAULT_PNUMBER);
const SKIP_SCAN = false;
@@ -109,6 +113,7 @@ function App(): JSX.Element {
gender: false,
expiry_date: false,
});
<<<<<<< HEAD
const startCameraScan = () => {
NativeModules.CameraActivityModule.startCameraActivity()
@@ -131,6 +136,8 @@ function App(): JSX.Element {
});
};
=======
>>>>>>> upstream/main
const handleDisclosureChange = (field: keyof typeof disclosure) => {
setDisclosure(
@@ -140,6 +147,7 @@ function App(): JSX.Element {
};
const backgroundStyle = {
<<<<<<< HEAD
backgroundColor: Colors.white,
flex:1
};
@@ -152,6 +160,11 @@ function App(): JSX.Element {
// Include any other styles you want to apply to the input component
});
=======
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
};
>>>>>>> upstream/main
useEffect(() => {
const logEventListener = DeviceEventEmitter.addListener('LOG_EVENT', e => {
console.log(e);
@@ -391,11 +404,16 @@ function App(): JSX.Element {
<SafeAreaView style={backgroundStyle}>
<StatusBar
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
<<<<<<< HEAD
backgroundColor={Colors.red}
=======
backgroundColor={backgroundStyle.backgroundColor}
>>>>>>> upstream/main
/>
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={{
<<<<<<< HEAD
backgroundColor: isDarkMode ? Colors.black : Colors.black,
}}
contentContainerStyle={{ flexGrow: 1 }}
@@ -412,6 +430,64 @@ function App(): JSX.Element {
onScanPress={scan}
onStartCameraScan={startCameraScan}
/>
=======
backgroundColor: isDarkMode ? Colors.black : Colors.white,
}}
>
<View>
{step === 'enterDetails' ? (
<View style={styles.sectionContainer}>
<Text style={styles.header}>Welcome to Proof of Passport</Text>
<Text style={{textAlign: "center", fontSize: 20, marginTop: 20, marginBottom: 20}}>Enter Your Passport Details</Text>
<Text>Passport Number</Text>
<Input
variant="outline"
size="md"
marginBottom={10}
marginTop={4}
>
<InputField
value={passportNumber}
onChangeText={setPassportNumber}
placeholder={"Passport Number"}
/>
</Input>
<Text>Date of Birth</Text>
<Input
variant="outline"
size="md"
marginBottom={10}
marginTop={4}
>
<InputField
value={dateOfBirth}
onChangeText={setDateOfBirth}
placeholder={"YYMMDD"}
/>
</Input>
<Text>Date of Expiry</Text>
<Input
variant="outline"
size="md"
marginBottom={10}
marginTop={4}
>
<InputField
value={dateOfExpiry}
onChangeText={setDateOfExpiry}
placeholder={"YYMMDD"}
/>
</Input>
<Button
onPress={scan}
marginTop={10}
>
<ButtonText>Scan Passport with NFC</ButtonText>
{/* <ButtonIcon as={AddIcon} /> */}
</Button>
</View>
>>>>>>> upstream/main
) : null}
{step === 'scanning' ? (
<View style={styles.sectionContainer}>
@@ -534,7 +610,11 @@ function App(): JSX.Element {
</View>
) : null}
</View>
<<<<<<< HEAD
<View style={{...styles.sectionContainer, ...styles.testSection, marginTop: 20}}>
=======
<View style={{...styles.sectionContainer, ...styles.testSection, marginTop: 80}}>
>>>>>>> upstream/main
<Text style={{...styles.sectionDescription, textAlign: "center"}}>Test functions</Text>
<Button
@@ -564,9 +644,12 @@ function App(): JSX.Element {
}
const styles = StyleSheet.create({
<<<<<<< HEAD
view: {
flex: 1,
},
=======
>>>>>>> upstream/main
sectionContainer: {
marginTop: 32,
paddingHorizontal: 24,

View File

@@ -37,10 +37,10 @@ contract Groth16Verifier {
uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781;
uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531;
uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930;
uint256 constant deltax1 = 3209380006197917323277329582098228339371163660926962295801164826214856517947;
uint256 constant deltax2 = 6646670050526259801819251758958211452540005804223688493722226090330926439262;
uint256 constant deltay1 = 5902942920401026834003595450475380413196841721810355915757638362939360983954;
uint256 constant deltay2 = 806822447775191833164489432648121152502993279435744441275443418978021481943;
uint256 constant deltax1 = 5158657673473810045925629964893931934396421913559601447267267658396071743665;
uint256 constant deltax2 = 8286629771124207111815437373369130047259708345487751914706319082298992258648;
uint256 constant deltay1 = 14545436190214639873248337492095744803903195053244079026886824280836378774783;
uint256 constant deltay2 = 14499178695372120851688441035289532294041310913789284405303366635503099586282;
uint256 constant IC0x = 4897812530436581420070048815704719785256466787655503857610889333796081821201;