Commit Graph

224 Commits

Author SHA1 Message Date
nicoshark
aca1474c2f prettier (#629) 2025-06-16 21:49:51 +09:00
nicoshark
7cab29dd91 implement self uups upgradeable (#592)
* implement self uups upgradeable

* small changes in identityVerificationHubImplV2

* delete aderyn.toml

* chore: add custom verifier

* chnage return output

* feat: use self structs and a Generic output struct

* feat: add userIdentifier, nullifier, forbiddencountries to returned output

* add root view functions from registry

* fix: build and compilation errors

* add userDefined data into selfVerificationRoot

* "resolve conflicts"

* fix compilation problem

* fix how to register verification config

* test: CustomVerifier

* fix verification root and hub integration

* add scope check in hub impl

* replace poseidon hash to ripemd+sha256

* add todo list

* feat: refactor and add test cases for generic formatter

* add performUserIdentifierCheck in basicVerification

* change how to handle additionalData and fix stack too deep

* start adding test codes

* fix dependency problems in monorepo

* fix: forbidden countries (#612)

LGTM!

* able to run test code

* pass happy path

* delete unused codes

* change error code name, add caller address validation and add scripts to run test and build in monorepo

* add all test cases in vcAndDisclose flow

* remove comment out

* chore: use actual user identifier outputs

* success in registration tests

* cover all cases

* pass contractVersion instead of circuitVersion

* fix disclose test

* chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter

* change val name and remove unused lines

* add val name change

* remove userIdentifier from return data

* feat: use GenericDiscloseOutput struct in verfication hook  fix test cases for user identifier

* chore: change the function order for Hub Impl V2 (#625)

* fix nat specs

* add nat spec in SelfStructs

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>
Co-authored-by: Nesopie <87437291+Nesopie@users.noreply.github.com>
2025-06-16 14:44:44 +02:00
Justin Hernandez
6d27b365c7 Bump build to test PACE polling (ios 127; android 66) (#591)
* bump builds

* update env.sample with new env vars, and add _NFC to mixpanel nfc var

* remove NDEF so we can keep target sdk version at 15

* add sort package json command

* sort all project package.json files

* enable hermes

* disable hermes

* revert disabling

* remove hermes
2025-06-06 07:29:26 -07:00
Aaron DeRuvo
0e9c59c0fb SEL-56: Setup Yarn Workspaces (#584) 2025-06-04 11:37:32 +02:00
nicoshark
668732a57b Chore/refactor contracts (#582)
* add eu id support

* add ofac and disclosure euid support

* add contract support for euid cards

* update contracts

* add comment out to remember the interface what we need to implement

* prettier

* get combine verifyVcAndDisclose function and get bytes data

* unified library and clean constant V2

* fix verifyVcAndDisclose interface

* add prettier and run prettier except .sol files

* prettier

* circuit compilation for local environment

* add register id circuit in the contracts dir

* clean up ignition deploy scritps

* refactor deploy scripts

* prettier

* update serialized dsc tree

* fix ofac check

* fix passport attestation id

---------

Co-authored-by: turnoffthiscomputer <colin.remi07@gmail.com>
2025-06-03 14:58:41 +09:00
Kevin Lin
1bcd6c7f4d Feature/implement self verification root based on identity verification hub v2 (#587)
* Run prettier

* Update yarn.lock

* Refactor SelfVerificationRoot contract to support bytes-based proof verification and update related interfaces. Introduce contract versioning and enhance event emissions for verification success. Update Airdrop, HappyBirthday, and SelfPassportERC721 contracts to align with new SelfVerificationRoot structure and improve attestation ID handling.
2025-06-02 17:18:58 +09:00
nicoshark
ab6534aa89 contracts: feat/bytes inputs (#573)
* add eu id support

* add ofac and disclosure euid support

* add contract support for euid cards

* update contracts

* add comment out to remember the interface what we need to implement

* prettier

* get combine verifyVcAndDisclose function and get bytes data

* unified library and clean constant V2

* fix verifyVcAndDisclose interface

* add prettier and run prettier except .sol files

* prettier

---------

Co-authored-by: turnoffthiscomputer <colin.remi07@gmail.com>
2025-05-31 05:22:40 +09:00
nicoshark
9d2fadfba6 Eu id/contract prettier (#574)
* add eu id support

* add ofac and disclosure euid support

* add contract support for euid cards

* update contracts

* add comment out to remember the interface what we need to implement

* add prettier and run prettier except .sol files

* prettier

---------

Co-authored-by: turnoffthiscomputer <colin.remi07@gmail.com>
2025-05-31 05:16:33 +09:00
nicoshark
fb99534de8 Feat/eu id contracts (#555)
* add eu id support

* add ofac and disclosure euid support

* add contract support for euid cards

* update contracts

* add comment out to remember the interface what we need to implement

---------

Co-authored-by: turnoffthiscomputer <colin.remi07@gmail.com>
2025-05-31 05:00:49 +09:00
turnoffthiscomputer
5d01e29bf4 add eu id support (#527)
* add eu id support

* add ofac and disclosure euid support

* add contract support for euid cards

---------

Co-authored-by: motemotech <i.am.nicoshark@gmail.com>
2025-05-30 18:24:11 +02:00
Kevin Lin
2e6138fbbf Feature/enhance self verification root (#569)
* Add SelfVerificationConsumer contract for self-verification logic

- Introduced an abstract contract, SelfVerificationConsumer, that extends SelfVerificationRoot.
- Implemented nullifier tracking, verification success events, and customizable validation and update methods for nullifiers.
- Added error handling for nullifier check failures and hooks for derived contracts to implement custom logic after successful verification.

* Add SelfHappyBirthday contract example using SelfVerificationConsumer

- Introduced SelfHappyBirthday contract that allows users to claim USDC on their birthday.
- Integrated SelfVerificationConsumer for handling verification and nullifier tracking.
- Added functions to set claimable amount and window, along with event emissions for state changes.
- Implemented logic to check if the claim is within the user's birthday window and transfer USDC accordingly.

* Refactor imports in HappyBirthday contract for better organization

- Updated import statements in HappyBirthday.sol to use relative paths for ISelfVerificationRoot, SelfCircuitLibrary, and SelfVerificationConsumer.
- Improved code readability and maintainability by organizing imports more logically.

* Refactor Airdrop contract to use SelfVerificationConsumer for registration logic

- Updated Airdrop contract to inherit from SelfVerificationConsumer instead of SelfVerificationRoot.
- Refactored mappings for user identifiers and nullifiers for improved clarity and functionality.
- Enhanced error handling and updated function parameters for consistency.
- Implemented new validation and update methods for nullifiers, streamlining the registration process.
- Removed deprecated verifySelfProof function and integrated logic into new methods.

* Add events and refactor SelfVerificationRoot and related contracts

- Introduced new events in SelfVerificationRoot for verification configuration updates, scope changes, and attestation ID management.
- Updated Airdrop contract to remove deprecated events and added a new event for Merkle root updates.
- Refactored SelfPassportERC721 to inherit from SelfVerificationConsumer, enhancing verification logic and event handling.
- Improved function parameters for consistency and clarity across contracts.

* Refactor contracts to use SelfVerificationRoot and enhance verification logic

- Removed SelfVerificationConsumer contract and updated related contracts to inherit from SelfVerificationRoot.
- Refactored mappings and event emissions in Airdrop, HappyBirthday, and SelfPassportERC721 for improved clarity and functionality.
- Enhanced verification success hooks to include user identifiers and nullifiers for better tracking.
- Updated constructor parameters for consistency across contracts and improved error handling for user registration and claims.

* Refactor constructor in SelfPassportERC721 for improved readability

* Refactor function parameters in SelfVerificationRoot and related contracts

* Refactor constructor parameter names in IdentityVerificationHub, Airdrop, IdentityRegistry, and ProxyRoot contracts for improved clarity and consistency
2025-05-27 05:18:40 +08:00
Kevin Lin
5a3bd28e7b Feature/add prettier formatter (#568)
* Add Prettier configuration and ignore files for code formatting

- Created .prettierignore to exclude specific directories and files from formatting.
- Added .prettierrc.yml with custom settings for print width and trailing commas.
- Updated package.json to include Prettier and its Solidity plugin as dependencies, along with scripts for formatting and checking code.

* Run prettier formatting
2025-05-23 15:52:59 +09:00
nicoshark
3db25aa469 Push notification (#536)
* add push notification feature

* merge new app impl

* change dsc key

* import

* reverse mock dsc

* worked in the ios

* checked in android

* update url and delete console

* delete small changes

* lint

* add yarn.lock

* fix warning message

* add mock notification service for test code

* fix path for the mock implementation

* add mock deeplink to the test code

* nice notificationServiceMock.js

* delete unused firebase related implementation

* fix wording and UI related to notification service

* hotfix on mockdatascreen

---------

Co-authored-by: turnoffthiscomputer <colin.remi07@gmail.com>
2025-05-15 23:46:21 +02:00
turnoffthiscomputer
cc169061bd add common sdk (#537)
* add common sdk

* remove sdk backend api

* remove registry

* regenerate sha256 rsa dsc each time

* download ski-pem dynamically on staging, refactor initpassportDataParsing

* add state machine for button on prove screen, improve ux on splash screen

* fetch ski-pem in production

* fix linter issues

* fix prove screen button bugs

* update podfile.lock and yarn.lock

* run linter in circuits repo

* bump build

* bump version for sentry debugging

* bump ios to version 118

---------

Co-authored-by: Justin Hernandez <transphorm@gmail.com>
2025-05-07 11:45:21 +02:00
nicoshark
2d8c780698 add delete scripts (#542) 2025-04-29 20:55:22 +02:00
nicoshark
b2a5ef0346 forgot to include package update (#521) 2025-04-18 00:17:58 +09:00
turnoffthiscomputer
5904234d2e Feat/simpler contract sdk (#519)
* make contract sdk simpler

* reduce root inputs

* delete convert function

* summarize our library

* update npm package

* update package version

* update attestation id

* add util function to get revealed data

---------

Co-authored-by: motemotech <i.am.nicoshark@gmail.com>
2025-04-17 16:06:49 +02:00
nicoshark
624d0e568d Feat/forbidden countries utils (#504)
* add forbidden countries util function

* remove casting
2025-04-04 18:58:30 +05:30
nicoshark
d266cf2ced Feat/add new verifiers (#488)
* update verifiers

* update and deploy new verifiers
2025-03-30 19:22:15 +02:00
nicoshark
acd3329f31 Feat/proof conversion (#491)
* export castFromScope

* export proof conversion
2025-03-28 17:13:45 +01:00
Seshanth.S🐺
b6fc6bd9eb Add new ECDSA verifier for brainpoolP512r1 (#455) 2025-03-19 13:09:53 +01:00
nicoshark
9d8c475de0 Docs/contracts (#467)
* add new columns in contracts readme

* update contracts readme
2025-03-18 13:08:43 +01:00
turnoffthiscomputer
9203f08bc9 Merge pull request #427 from selfxyz/feat/deployed-informations
Feat/deployed informations
2025-03-12 04:36:02 -04:00
motemotech
e847709601 delete .dbg files 2025-03-12 12:06:57 +09:00
motemotech
5c03638c43 add deployed informations 2025-03-12 12:01:20 +09:00
motemotech
c253877d91 Merge branch 'main' into feat/download-n-update-verifiers 2025-03-12 11:39:41 +09:00
0xturboblitz
880ea03b82 writing solidity error codes in comment 2025-03-07 23:33:17 -08:00
nicoshark
f63ee37118 Perf/contract test (#224) 2025-03-04 16:03:03 -08:00
motemotech
fd0ea1bc8c add production verifiers 2025-02-26 03:16:20 -07:00
motemotech
03019eee49 download and update verifiers 2025-02-24 15:10:32 -08:00
nicoshark
80a88f2a38 add contract upgrade scripts (#205) 2025-02-23 00:16:37 +01:00
nicoshark
01ceaa9f44 add example contract how to integrate self verifier (#198) 2025-02-23 00:15:53 +01:00
nicoshark
83f3f53702 add error code finding scripts (#195) 2025-02-20 22:20:02 -08:00
turnoffthiscomputer
c220d58d9d Update verifiers (#184) 2025-02-21 00:09:00 +01:00
nicoshark
e09a5e8349 Update/sdk addresses (#188) 2025-02-21 00:08:34 +01:00
nicoshark
4c2cc041b7 add set dsc key commitment (#167) 2025-02-20 06:08:45 +01:00
turnoffthiscomputer
a7dbd5c788 Increase forbidden country list size (#175)
Co-authored-by: nicoshark <i.am.nicoshark@gmail.com>
2025-02-20 05:34:43 +01:00
nicoshark
074b1cc947 Chore/get custom error (#173) 2025-02-20 02:51:58 +01:00
nicoshark
43d968e8d6 add error code in the return value (#171) 2025-02-20 00:21:16 +01:00
nicoshark
7d0e83a727 Feat/clean sdk code (#155)
Co-authored-by: turnoffthiscomputer <98749896+remicolin@users.noreply.github.com>
2025-02-19 05:51:37 +01:00
nicoshark
94de78d1d4 Feat/verifier update scripts (#157) 2025-02-19 05:51:20 +01:00
nicoshark
e13c64ba10 Add verifier ids (#139) 2025-02-19 05:48:07 +01:00
turnoffthiscomputer
3f889c1c9a add PCR0 contract management (#134)
Co-authored-by: 0xturboblitz <florent.tavernier@gmail.com>
2025-02-18 23:07:12 +01:00
turboblitz
7f9889307b new verifiers for deployment on celo (#129) 2025-02-17 04:21:12 +01:00
turboblitz
fd74ffa156 New backend verification sdk (#131)
Co-authored-by: motemotech <i.am.nicoshark@gmail.com>
2025-02-16 18:33:54 -08:00
turboblitz
c6db61b2c0 Use secret from keychain (#108) 2025-02-14 14:30:14 +01:00
turboblitz
6d4c211c51 New OFAC updates (#47)
Co-authored-by: nicoshark <i.am.nicoshark@gmail.com>
2025-02-12 22:21:01 +01:00
nicoshark
762708d326 Fix/contract improvements (#75) 2025-02-12 15:57:55 +01:00
turnoffthiscomputer
8eb64171d2 Feat/backend api (#78)
Co-authored-by: motemotech <i.am.nicoshark@gmail.com>
2025-02-12 13:09:50 +01:00
Justin Hernandez
73421f6a9a Improve UX and DX (#66)
Co-authored-by: Nicolas Brugneaux <nicolas.brugneaux@gmail.com>
2025-02-11 10:08:07 +01:00