mirror of
https://github.com/selfxyz/self.git
synced 2026-01-10 07:08:10 -05:00
* Add sdk-alpha package with MRZ helper * chore: add migration report script * Add lint config and MRZ tests to sdk-alpha * fix tests * fixes. wip * fixes * fix bundler tests * mrz improvements based on cr feedback * prettier * fix build errors * Document browser shim (#859) * Validate required adapters (#861) * Use sdkError for web scanner shim (#862) * Document new workspaces in AGENTS (#864) * Add client tests (#860) * Use deep merge for client config (#863) * Add config merge helper * format * Add SDK alpha CI workflow (#865) * rename * rename file * update workflow * coderabbit feedback and fixes * fix linter * fix import paths * wip fixes * updates * fix tests * formatting * update workflow * remove console mocks * rename folder and fixes * fix tests * save wip * auto format on save for all sdk package files * fixes * cr feedback * fix pipelines
2.0 KiB
2.0 KiB
AGENTS Instructions
This repository is a Yarn v4 monorepo with several workspaces:
app– mobile app (@selfxyz/mobile-app)circuits– zk-SNARK circuits (@selfxyz/circuits)common– shared utilities (@selfxyz/common)contracts– solidity contracts (@selfxyz/contracts)sdk/core– core TypeScript SDK (@selfxyz/core)sdk/qrcode– qrcode SDK (@selfxyz/qrcode)packages/mobile-sdk-alpha– alpha version of the SDK (@selfxyz/mobile-sdk-alpha)noir– noir circuits
Workflow
Setup
- Run
yarn installonce before running any other commands. This installs root dependencies and sets up husky hooks.
Commit Checks
Before committing, run the following commands:
# Fix linting and formatting issues automatically (for packages that support it)
yarn workspace @selfxyz/mobile-sdk-alpha nice
yarn workspace @selfxyz/common nice
yarn workspace @selfxyz/app nice
# Lint all packages in parallel
yarn lint
# Build all workspaces except `contracts`
yarn build
# Compile Solidity contracts (may occasionally throw a Hardhat config error)
yarn workspace @selfxyz/contracts build
# Run type-checking across the repo
yarn types
Tests
- Run unit tests where available:
yarn workspace @selfxyz/common testyarn workspace @selfxyz/circuits test# may fail if OpenSSL algorithms are missingyarn workspace @selfxyz/mobile-app testyarn workspace @selfxyz/mobile-sdk-alpha test- For Noir circuits, run
nargo test -p <crate>in eachnoir/crates/*directory. - Tests for
@selfxyz/contractsare currently disabled in CI and may be skipped.
Formatting
- Use Prettier configuration from
.prettierrcfiles. - Follow
.editorconfigfor line endings and indentation.
Commit Guidelines
- Write short, imperative commit messages (e.g.
Fix address validation). - The pull request body should summarize the changes and mention test results.
Scope
These instructions apply to the entire repository unless overridden by a nested AGENTS.md.