* refactor: use singular ETHERSCAN_API_KEY in .env
Etherscan has unified all keys of associated explorers like Celoscan into a singular key rather than different keys for different networks.
* refactor: use one .env instead of separate .env.test + .env files
* refactor: deploy contracts with runs of 1000 instead of 200
Decreases gas cost of function calls on deployed contracts
* clean: remove duplicate/redundant deploy modules + scripts
* clean: cleanup empty script file
* refactor: cleanup default network of scripts
Read network from .env instead of using defaults of alfajores (outdated) or staging
* clean: remove references to Alfajores, replace with Sepolia
* chore: add default .env variables
* chore: update build-all script to include aardhaar circuit
* chore: update broken Powers of Tau download link (use iden3)
* chore: remove duplicate script
* fix: use stable version 18 for disclose circuits
* test: update test import paths to allow for .ts version of generateProof
* test: fix broken tests
* test: uncomment critical code for registration, change error names to updated names, fix broken import paths, update disclose tests for new scope generation/handling
* fix: broken import path
* test: fix Airdrop tests to use V2 logic
* docs: update docs for necessary prerequisite programs
* chore: yarn prettier formatting
* fix: CI errors occuring when deploying contracts as can't read .env
Using a dummy key for CI builds
* chore: yarn prettier
* refactor: change runs to 100000
* refactor: generate scope for SelfVerificationRoot upon deploment
Utilise Poseidon to generate the scope for the deploying contract instead of relying on utilizing the Scope Generator tool on the frontend and calling a function that inherits the _setScope function
* style: use explicit import for PoseidonT3
* fix: link Poseidon library in TestSelfVerificationRoot deployments
* fix: Use same logic in SelfVerificationRoot as in hashEndpointWithScope
* refactor: use hardcoded PoseidonT3 addresses for Celo Mainnet + Sepolia
Also allowed functionality for testing environments which have a fresh deploy each time they are spun up, and which now utilize the testSetScope function for tests relying on TestSelfVerificationRoot
* style: change setTestScope to setGenerateScope for clarity
* refactor: Move logic out of SelfVerificationRoot into util files
* chore: update version
* fix: sepolia chain id
* fmt
---------
Co-authored-by: ayman <aymanshaik1015@gmail.com>
* retrieve the ofac trees from the api
* remove the ofac trees from the common repo
* fix ofac test
* yarn nice
* yarn nice
* yarn nice
* refactor ofac fetching
* Add Prettier check for code formatting in contracts workflow
* Update contracts workflow: remove unused checkout action and fix build step name
* Run formatter
* Run lint fix
* 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)
* CAN auth - android (#613)
* add missed files
* add NFCMethodSelectionScreen
* bump android build
---------
Co-authored-by: Justin Hernandez <transphorm@gmail.com>
* feat: add MRZ correction method to NFCMethodSelectionScreen (#627)
* add npm auth token env (#632)
* bump sdk version (#633)
* publish npm package when merging on dev
* bump common sdk version
* replace yarn publish by npm publish
* update common package version
* Simplify dev mode gesture (#635)
* Simplify developer mode gesture
* Enable dev mode on MockData screen with five taps
* add build smt function to common sdk
* 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
* 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
* 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
* cherry pick commit from add-test-self-verification...
* block non-dev pr to main branch
* 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>
* 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)
* publish npm-package (#651)
* 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>
* Hotfix contract compile error (#660)
* Fix previous rebase error
* Refactor deployment module for Identity Verification Hub V2.
* 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>
* Update npm-publish workflow and bump core package version to 1.0.0 (#661)
* update import
* 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.
* 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
* bump build: android 73 (#659)
* Contracts/deploy staging (#668)
* update scripts
* deploy vc and disclose id
* fix the deployment scripts on staging
* update yarn.lock
* bump ios build and version (#669)
* configure coderabbitai (#670)
* tweak coderabbit
* bump
* more thorough test spec
* Apply BSL to app codebase (#639)
* Clean up root license wording
* Simplify SPDX header
* simplify license and rename BSL to BUSL
* fix merge issues
* fix missing method
---------
Co-authored-by: Justin Hernandez <transphorm@gmail.com>
* SEL-423 apply xcode build suggestions (#671)
* apply recommended app settings from xcode
* stick to portrait orientation and update target settings
* remove app clip references
* Circuit audit fixes (#644)
* feat: add range checks before use of LessEqThan and SelectSubArray
* fix: Num2Bits_strict to constrain virtualKey
* bump core version
* bump core version and fix ci
* chore: use npm_auth_token in yarnrc
* chroe: rm yarnrc changes
* chore: update npm publish
* chore: run npm publish manually
* chore: change hub contract address (#675)
* Update npm-publish.yml
---------
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>
Co-authored-by: Seshanth.S🐺 <35675963+seshanthS@users.noreply.github.com>
Co-authored-by: Justin Hernandez <transphorm@gmail.com>
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
Co-authored-by: Kevin Lin <86810837+kevinsslin@users.noreply.github.com>
Co-authored-by: kevinsslin <kk123750964@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Eric Nakagawa <ericnakagawa@gmail.com>
* 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.
* 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>
* 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>
* 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>
* 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>
* 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