Commit Graph

2421 Commits

Author SHA1 Message Date
Justin Hernandez
60bfe4387c Apply BUSL v1.1 license headers to app (#665)
* Add BSL license headers to app sources

* prettier

* fix license reference - https://spdx.org/licenses/BUSL-1.1.html
2025-06-23 13:44:01 -07:00
Kevin Lin
b3e4d13402 Update get verification config visibility (#664)
* Update deployment module for Identity Verification Hub V2 to correct file paths and module name for deployment commands.

* Add troubleshooting documentation for verification issues in deployHubV2.ts. Include manual verification steps and common failure reasons to assist users during deployment.

* Change visibility of getVerificationConfigV2 function from internal to public in IdentityVerificationHubImplV2 contract to allow external access.
2025-06-23 18:10:59 +02:00
turnoffthiscomputer
aa0cb509e6 update import 2025-06-23 15:56:04 +02:00
Nesopie
42eff712b3 Update npm-publish workflow and bump core package version to 1.0.0 (#661) 2025-06-23 14:34:53 +02:00
Nesopie
72a7f8177d Fix/sdk (#652)
* fix: sdk build configs

* chore: SelfBackendVerifier (WIP)

* feat: add custom verification

* feat: consider destination chain in user defined data

* chore: export attestation id

* chore: export attestation id

* chore: export config storage

* chore: don't throw an error if the proof is not valid

* chore: trim abi and rm typechain types

* refactor

* chore: rm unnecessary exports

* 📝 Add docstrings to `fix/sdk` (#653)

Docstrings generation was requested by @remicolin.

* https://github.com/selfxyz/self/pull/652#issuecomment-2992046545

The following files were modified:

* `sdk/core/src/utils/hash.ts`
* `sdk/core/src/utils/proof.ts`
* `sdk/core/src/utils/utils.ts`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* review fixes

* chore: fix package.json cjs types

* chore: add minor changes to checks

* feat: add InMemoryConfigStore, allIds constant and verificationResult type

* chore: export Verification config

* feat: change the verification config types

* fix: throw issues early if verification config is null

* fix: update yarn.lock file

* chore: lint

* fix: rm ts expect error directive

* fix: contract tests

* use excluded countries instead forbidden countries list

* chore: change types in constnats

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-23 14:25:36 +02:00
Kevin Lin
02a0ee349b Hotfix contract compile error (#660)
* Fix previous rebase error

* Refactor deployment module for Identity Verification Hub V2.
2025-06-23 13:02:26 +02:00
turnoffthiscomputer
0468719f9f App/eu id updates (#638)
* fix build issues

* generate disclosure proof with euids

* generate disclosure proof with euids

* Eu id updates 2 (#648)

* update vc_and_disclose_id test (dev branch) (#641)

* fix: vc_and_disclose_id test

* chore: yarn prettier

* Show modal on NFC scan error (#642)

* Add help button and error modal actions

* fix the screen management

* yarn nice

* Bump build v2.5.4: ios 132; android 71 (#631)

* bump version and build numbers

* remove tamagui/toast

* fix marketing version

* fix: update TD1 and TD3 checks (#643)

* bum yarn.lock

* add version and user defined data

---------

Co-authored-by: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com>
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
Co-authored-by: Seshanth.S🐺 <35675963+seshanthS@users.noreply.github.com>

* remove the mock user define data

* get the useridentifier as a hash from the user defined data

* chore: add version and userDefinedData

* feat: use the version in register / dsc proofs as well

* update calculateUserIdentifierHash

* yarn nice

* refactor: consolidate user context data handling and update payload structure

* fix typing issues on sha1

* remove console.log(sha1)

* fix sha1 import

* refactor: streamline userDefinedData handling and adjust payload type for circuit

* refactor: update sha1 usage and enhance logging in calculateUserIdentifierHash

* yarn nice

* yarn lint common

* use ts-ignore for sha1 import

* fix app ci tests

* fix typing issue

* remove unused ts-ignore

* cast uuid before calling generateinputs

* bump qrcode version

* add tsup on the qrcode sdk

* fix: exports on selfxyz/qrcode

* update how we define config.version

* fix yarn imports

* yarn format

---------

Co-authored-by: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com>
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
Co-authored-by: Seshanth.S🐺 <35675963+seshanthS@users.noreply.github.com>
Co-authored-by: Ayman <aymanshaik1015@gmail.com>
2025-06-23 13:01:23 +02:00
Ayman
be83be997f merge main 2025-06-23 14:56:30 +05:30
nicoshark
d79563c104 publish npm-package (#651) 2025-06-23 10:21:49 +02:00
Kevin Lin
f769680674 Update deployment module for Identity Verification Hub V2 with detailed documentation and library linkage for CustomVerifier. Update initialization process to reflect changes in V2 implementation, ensuring proper setup for proxy deployment. (#658) 2025-06-23 10:21:18 +02:00
Nesopie
a193278a72 audit fixes (#645)
* merge dev branch into main (#624)

* remove sdk/tests (#622)

* remove sdk/tests

* chore: update yarn.lock

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>

* fix: add range check on paddedInLength of shaBytesDynamic (#623)

* fix ci (#626)

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>
Co-authored-by: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com>

* update contracts (#628)

* remove sdk/tests (#622)

* remove sdk/tests

* chore: update yarn.lock

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>

* fix: add range check on paddedInLength of shaBytesDynamic (#623)

* fix ci (#626)

* 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>

* prettier (#629)

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>
Co-authored-by: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com>
Co-authored-by: nicoshark <i.am.nicoshark@gmail.com>
Co-authored-by: Nesopie <87437291+Nesopie@users.noreply.github.com>

* fix: vc_and_disclose_id test (#640)

* fix: vc_and_disclose_id test

* chore: yarn prettier

* fix: check if a config id exists

* chore: change the function where the config not set verification is happening

* fix: add await

* feat: add getConfigId function in SelfVerificationRoot (#650)

* feat: add getConfigId function in SelfVerificationRoot

* update comment

---------

Co-authored-by: motemotech <i.am.nicoshark@gmail.com>

* chore: fix ofac end index in eu id cards

* chore: fix tests

* fix: example contracts and tests

---------

Co-authored-by: turnoffthiscomputer <98749896+remicolin@users.noreply.github.com>
Co-authored-by: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com>
Co-authored-by: nicoshark <i.am.nicoshark@gmail.com>
2025-06-22 19:03:30 +02:00
turnoffthiscomputer
ddcaac9392 block non-dev pr to main branch 2025-06-22 18:28:50 +02:00
kevinsslin
2607dac0b0 cherry pick commit from add-test-self-verification... 2025-06-22 18:18:23 +02:00
Kevin Lin
df13f4edb1 Update example contracts to include EUID usage (#656)
* refactor: update HappyBirthday contract to V2 with support for E-Passport and EUID cards, introduce bonus multipliers, and enhance verification logic

* refactor: update Airdrop contract to V2 with support for E-Passport and EU ID Card attestations

* refactor: remove BASIS_POINTS constant from Airdrop contract

* feat: introduce SelfIdentityERC721 contract for issuing NFTs based on verified identity credentials, replacing SelfPassportERC721

* fix: update verification functions in Airdrop, HappyBirthday, and SelfIdentityERC721 contracts to use customVerificationHook
2025-06-22 17:30:27 +02:00
Justin Hernandez
ae0dca3c38 Bump build: ios 133; android 72 and build fixes (#654)
* update gesture version and bump android build

* bump and fix ios build

* update lock files

* fixes

* fix fotoapparat library source
2025-06-21 09:55:50 -07:00
Nesopie
a9f6207227 feat: add getConfigId function in SelfVerificationRoot (#650)
* feat: add getConfigId function in SelfVerificationRoot

* update comment

---------

Co-authored-by: motemotech <i.am.nicoshark@gmail.com>
2025-06-20 21:35:33 +09:00
turnoffthiscomputer
63b21a1929 bum yarn.lock 2025-06-19 16:27:18 +02:00
Seshanth.S🐺
d89d202f28 fix: update TD1 and TD3 checks (#643) 2025-06-19 10:22:00 +02:00
Justin Hernandez
e4541a831a Bump build v2.5.4: ios 132; android 71 (#631)
* bump version and build numbers

* remove tamagui/toast

* fix marketing version
2025-06-18 07:52:38 -07:00
turnoffthiscomputer
93312c0d5e Show modal on NFC scan error (#642)
* Add help button and error modal actions

* fix the screen management

* yarn nice
2025-06-18 16:45:09 +02:00
Vishalkulkarni45
bf8cf6c0bc fix: vc_and_disclose_id test (#640)
* fix: vc_and_disclose_id test

* chore: yarn prettier
2025-06-18 13:03:50 +02:00
Vishalkulkarni45
27990f0201 update vc_and_disclose_id test (dev branch) (#641)
* fix: vc_and_disclose_id test

* chore: yarn prettier
2025-06-18 13:03:23 +02:00
turnoffthiscomputer
f00b21d455 add build smt function to common sdk 2025-06-17 15:29:16 +02:00
turnoffthiscomputer
08c1ead315 Simplify dev mode gesture (#635)
* Simplify developer mode gesture

* Enable dev mode on MockData screen with five taps
2025-06-17 15:24:50 +02:00
turnoffthiscomputer
cfed790593 update common package version 2025-06-17 11:40:59 +02:00
turnoffthiscomputer
40edfd7e44 replace yarn publish by npm publish 2025-06-16 23:21:21 +02:00
turnoffthiscomputer
2d53b89ff2 bump common sdk version 2025-06-16 23:14:21 +02:00
turnoffthiscomputer
4e57997b96 publish npm package when merging on dev 2025-06-16 23:13:24 +02:00
turnoffthiscomputer
f3f7028c86 bump sdk version (#633) 2025-06-16 23:01:37 +02:00
turnoffthiscomputer
6750848529 add npm auth token env (#632) 2025-06-16 21:54:10 +02:00
Seshanth.S🐺
e99e4736bc feat: add MRZ correction method to NFCMethodSelectionScreen (#627) 2025-06-16 16:35:12 +02:00
Seshanth.S🐺
498b89caae CAN auth - android (#613)
* add missed files

* add NFCMethodSelectionScreen

* bump android build

---------

Co-authored-by: Justin Hernandez <transphorm@gmail.com>
2025-06-16 16:34:45 +02:00
turnoffthiscomputer
4f18c75041 update contracts (#628)
* remove sdk/tests (#622)

* remove sdk/tests

* chore: update yarn.lock

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>

* fix: add range check on paddedInLength of shaBytesDynamic (#623)

* fix ci (#626)

* 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>

* prettier (#629)

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>
Co-authored-by: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com>
Co-authored-by: nicoshark <i.am.nicoshark@gmail.com>
Co-authored-by: Nesopie <87437291+Nesopie@users.noreply.github.com>
2025-06-16 15:52:02 +02:00
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
turnoffthiscomputer
de4bf207ee merge dev branch into main (#624)
* remove sdk/tests (#622)

* remove sdk/tests

* chore: update yarn.lock

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>

* fix: add range check on paddedInLength of shaBytesDynamic (#623)

* fix ci (#626)

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>
Co-authored-by: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com>
2025-06-16 12:14:19 +02:00
turnoffthiscomputer
9efe1b0902 fix ci (#626) 2025-06-16 11:31:11 +02:00
Vishalkulkarni45
095ceebcc5 fix: add range check on paddedInLength of shaBytesDynamic (#623) 2025-06-15 23:02:24 +02:00
turnoffthiscomputer
cfd2058cc2 remove sdk/tests (#622)
* remove sdk/tests

* chore: update yarn.lock

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>
2025-06-13 16:58:02 +02:00
Nesopie
f4f5903b40 fix: circuit tests and tsconfigs (#621)
* fix: circuit tests and tsconfigs

* fix-ci: downgrade typescript version

* fix: yarn.lock

* fix: linting in common
2025-06-13 14:16:23 +02:00
emmmm
2a6c00f6bd ci: bump setup-node to v4 (#606)
* Update action.yml

* Update circuits.yml

* Update contracts.yml

* Update npm-publish.yml
2025-06-12 14:01:00 -07:00
turnoffthiscomputer
7a85d8734c clean passport.ts (#604) 2025-06-12 11:45:26 -07:00
Aaron DeRuvo
d7871cd091 remove tamagui toast as we dont use and remove burnt as it was just a peer dep of toast (#610) 2025-06-12 11:13:37 -07:00
turnoffthiscomputer
81afb0b9d0 Revert "fix: added missing range checks in ShaBytesDynamic (#579)" (#617)
This reverts commit 0c8c87362b.
2025-06-12 18:12:49 +02:00
turnoffthiscomputer
e814b2fccf feat: add mixpanel events for registration flow (#616) 2025-06-12 17:05:55 +02:00
Justin Hernandez
5b6a2535bf Bump version 2.5.3: build ios 129; android 69 (#609)
* bump builds

* update lock

* bump version

* commit lock

* bump build

* bump ios build
2025-06-11 15:09:51 -07:00
Seshanth.S🐺
e4d5b62fdb Add TD1 support - android (#603)
* feat: add TD1 support - android

* fix: missing logs

* update JMRTD and add CAN

* add yarn.lock
2025-06-11 13:20:58 -07:00
turnoffthiscomputer
7a8678b72d add euid support in app (#559)
* add euid support in app

* yarn nice

* add euid support to proving machine

* update provingMachine and add id endpoints

* fix circuitsDNSmapping

* fix proving

* fix validateDocument

* add todo comment

* add the skip PCR0 option

* set multiple passportData types

* allow storing different id documents

* fix wording

* use goback on the passportOboardingScreen

* update tamagui version

* update yarn.lock

* remove logs in mockdata screen

* remove SKIP_PRC0_CHECK const

* refactor passport data keychain storage

* update project.pbxproj

* yarn nice

* yarn nice

* fix imports

* yarn nice

* add ManageDocuments screen to tests

* update name of the ManageDocument screen in the settings

* run linter in common repo

* clean mrz before doing the length check on android
2025-06-11 13:19:49 -07:00
turnoffthiscomputer
15e2f88265 add euid support ot format mrz function (#607) 2025-06-11 13:08:49 +02:00
Justin Hernandez
65b5f8a389 Bump build ios 128 android 67 (#601)
* bump build

* update clean commands

* add notification tracking provider, and update provider paths

* request permission for firebase cloud messaging

* since the app asks for permissions, let's enable this after configuring the APN

* remove monorepo building as it doesn't affect app build success

* add flags to expose build issues

* fix hermes path

* fix hermes path for emulator and bundle build
2025-06-07 07:36:06 -07:00