Files
self/contracts/package.json
Javier Cortejoso 522ced4f20 chore: NPM publish using Trusted Publishing (#1729)
* chore: simplify npm publish workflow by removing NPM token checks

- Removed redundant checks for NPM_TOKEN before publishing packages to npm.
- Updated publish result messages to reflect the use of Trusted Publishers (OIDC) for package publishing.
- Streamlined the workflow for better clarity and efficiency.

* chore: update npm publish workflow to use ubuntu-slim

- Changed the runner from 'ubuntu-latest' to 'ubuntu-slim' for improved efficiency and reduced resource usage during the npm publish process.

* chore: enhance npm publish workflow with dry run option

- Added a 'dry_run' input to the npm publish workflow to validate authentication and Trusted Publishers without uploading packages.
- Updated publish result messages to indicate when a dry run is completed, improving feedback during the publishing process.

* chore: refine npm publish workflow by removing strict mode input

- Eliminated the 'strict_mode' input from the npm publish workflow to simplify the process.
- Removed associated error handling comments and environment variable for stricter publish mode.
- Streamlined the workflow for improved clarity and efficiency during package publishing.

* chore: update npm publish workflow to use npx for publishing

- Replaced `yarn npm publish` with `npx npm@latest publish` to ensure the latest npm CLI is used for package publishing.
- Removed unnecessary `yarn config set npmPublishAccess` commands to streamline the workflow.
- Maintained the existing dry run functionality for testing without actual publishing.

* chore: enhance npm publish workflow to include version tagging

- Updated the npm publish workflow to dynamically determine the package version and apply a beta tag for pre-release versions.
- This change ensures that the correct versioning is maintained during the publishing process, improving clarity for users regarding package stability.
- Retained existing dry run functionality for testing without actual publishing.

* chore: remove npm publish command from package.json files

- Eliminated the `publish` script from multiple package.json files across contracts, sdk/core, sdk/qrcode, and sdk/qrcode-angular.
- This change streamlines the package management process by removing unnecessary publish commands, ensuring a cleaner configuration for future development.

* Temporary bump versions for check package publishing

* Revert "Temporary bump versions for check package publishing"

This reverts commit 180f5d538a.

* chore: add version check before npm publishing

- Implemented a version check in the npm publish workflow to prevent publishing of already published package versions.
- This enhancement ensures that developers are notified to bump the version in package.json if the version is already published, improving the publishing process and reducing errors.

* chore: improve npm publish workflow with enhanced outcome handling

- Updated the npm publish workflow to include detailed outcome handling for publish results, including checks for version publication status and improved messaging for skipped or failed publishes.
- This enhancement provides clearer feedback to developers regarding the publishing process, ensuring they are informed about the status of their package versions and necessary actions to take.

* chore: update npm publish workflow to include yarn packing for workspace resolution

- Added steps to pack each workspace using `yarn pack` before publishing to npm, ensuring that the correct package is published from each directory.
- This change resolves issues related to workspace protocol and improves the reliability of the publishing process across multiple packages.

* chore: simplify npm publish workflow by removing version check step

- Removed the version check for publish-msdk, as it did not work for private packages.
- Updated outcome handling to ensure clear messaging for skipped publishes without the version check dependency, improving overall workflow clarity.
2026-02-15 21:04:17 -08:00

141 lines
8.9 KiB
JSON

{
"name": "@selfxyz/contracts",
"version": "1.2.3",
"repository": {
"type": "git",
"url": "https://github.com/selfxyz/self"
},
"license": "MIT",
"author": "motemotech <i.am.nicoshark@gmail.com>",
"type": "commonjs",
"files": [
"contracts/interfaces/ISelfVerificationRoot.sol",
"contracts/libraries/Formatter.sol",
"contracts/abstract/SelfVerificationRoot.sol",
"contracts/libraries/SelfStructs.sol",
"contracts/interfaces/IIdentityVerificationHubV2.sol",
"contracts/constants/AttestationId.sol",
"contracts/constants/CircuitConstantsV2.sol",
"contracts/interfaces/IRegisterCircuitVerifier.sol",
"contracts/interfaces/IDscCircuitVerifier.sol",
"contracts/libraries/SelfUtils.sol",
"contracts/libraries/CountryCode.sol",
"contracts/interfaces/IPoseidonT3.sol"
],
"scripts": {
"build": "yarn hardhat clean && yarn hardhat compile",
"deploy:all": "npm run deploy:verifiers:all && npm run deploy:registry && npm run deploy:registry:idcard && npm run deploy:hub:v2",
"deploy:hub": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/hub/deployHub.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"deploy:hub:v2": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/hub/deployHubV2.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"deploy:pcr0": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/utils/deployPCR0.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"deploy:registry": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/registry/deployRegistry.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"deploy:registry:idcard": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/registry/deployIdCardRegistry.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"deploy:test:selfverificationroot": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/deployTestSelfVerificationRoot.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"deploy:verifier:idcard": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/verifiers/deployIdCardVerifier.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"deploy:verifiers:all": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/verifiers/deployAllVerifiers.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"export-prod": "bash ./scripts/prod.sh",
"find:error": "npx tsx scripts/findErrorSelectors.ts",
"format": "yarn prettier:write",
"prettier:check": "prettier --plugin-search-dir . --list-different '**/*.{json,md,yml,sol,ts}'",
"prettier:write": "prettier --plugin-search-dir . --write '**/*.{json,md,yml,sol,ts}'",
"set:hub:v2": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK} npx tsx scripts/setHubV2.ts'",
"set:registry": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK} npx tsx scripts/setRegistry.ts'",
"set:registry:hub:v2": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/scripts/updateRegistryHubV2.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"set:registry:idcard": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK} npx tsx scripts/setRegistryId.ts'",
"set:verifiers:v2": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK} npx tsx scripts/setVerifiersV2.ts'",
"show:registry": "npx tsx scripts/showRegistryAddresses.ts",
"test": "yarn hardhat test",
"test:airdrop": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/example/airdrop.test.ts'",
"test:attribute": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/unit/CircuitAttributeHandler.test.ts'",
"test:coverage": "yarn hardhat coverage",
"test:coverage:local": "TEST_ENV=local yarn hardhat coverage",
"test:disclose": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} yarn hardhat test test/integration/vcAndDisclose.test.ts'",
"test:endtoend": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} yarn hardhat test test/Integration/endToEnd.test.ts'",
"test:example": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} yarn hardhat test test/example/*'",
"test:formatter": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} yarn hardhat test test/unit/formatter.test.ts'",
"test:hub": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} yarn hardhat test test/unit/IdentityVerificationHub.test.ts'",
"test:integration": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} yarn hardhat test test/integration/*'",
"test:local": "TEST_ENV=local yarn hardhat test",
"test:pcr": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} yarn hardhat test test/unit/PCR0Manager.test.ts'",
"test:register": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} yarn hardhat test test/integration/commitmentRegistration.test.ts'",
"test:registry": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} yarn hardhat test test/unit/IdentityRegistry.test.ts'",
"test:sdkcore": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} yarn hardhat test test/sdk/sdkCore.test.ts --network localhost'",
"test:unit": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} yarn hardhat test test/unit/*'",
"test:v2": "npx hardhat test test/v2/selfVerificationFlow.test.ts --network localhost",
"test:verifyall": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} yarn hardhat test test/integration/verifyAll.test.ts'",
"test:view": "yarn hardhat test test/view.ts",
"types": "tsc -noEmit",
"update:cscaroot": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/scripts/updateRegistryCscaRoot.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"update:hub": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK} npx tsx scripts/setRegistry.ts'",
"update:ofacroot": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK} npx tsx scripts/updateRegistryOfacRoot.ts'",
"update:pcr0": "npx dotenv-cli -- bash -c 'PCR0_ACTION=${PCR0_ACTION:-add} PCR0_KEY=${PCR0_KEY} yarn hardhat ignition deploy ignition/modules/scripts/updatePCR0.ts --network ${NETWORK:-localhost} --reset'",
"upgrade": "npx dotenv-cli -- bash -c 'yarn hardhat upgrade --network ${NETWORK:-localhost}'",
"upgrade:history": "yarn hardhat upgrade:history",
"upgrade:hub": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/upgrade/deployNewHubAndUpgrade.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"upgrade:registry": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/upgrade/deployNewRegistryAndUpgrade.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'",
"upgrade:status": "npx dotenv-cli -- bash -c 'yarn hardhat upgrade:status --network ${NETWORK:-localhost}'"
},
"dependencies": {
"@ashpect/smt": "https://github.com/ashpect/smt#main",
"@eth-optimism/hardhat-ovm": "^0.2.4",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@openpassport/zk-kit-lean-imt": "^0.0.6",
"@openpassport/zk-kit-smt": "^0.0.1",
"@openzeppelin/contracts": "5.4.0",
"@openzeppelin/contracts-upgradeable": "5.4.0",
"@safe-global/api-kit": "^4.0.1",
"@safe-global/protocol-kit": "^6.1.2",
"@safe-global/safe-core-sdk-types": "^5.1.0",
"@selfxyz/common": "workspace:^",
"@zk-kit/baby-jubjub": "^1.0.3",
"@zk-kit/imt": "^2.0.0-beta.4",
"@zk-kit/imt.sol": "^2.0.0-beta.12",
"@zk-kit/lean-imt": "^2.0.1",
"axios": "^1.6.2",
"circomlibjs": "^0.1.7",
"dotenv": "^16.3.1",
"hardhat-contract-sizer": "^2.10.0",
"node-forge": "^1.3.1",
"poseidon-lite": "^0.3.0",
"poseidon-solidity": "^0.0.5",
"snarkjs": "^0.7.4"
},
"devDependencies": {
"@nomicfoundation/hardhat-chai-matchers": "^2.0.6",
"@nomicfoundation/hardhat-ethers": "^3.0.5",
"@nomicfoundation/hardhat-ignition": "^0.15.12",
"@nomicfoundation/hardhat-ignition-ethers": "^0.15.12",
"@nomicfoundation/hardhat-network-helpers": "^1.0.10",
"@nomicfoundation/hardhat-toolbox": "^3.0.0",
"@nomicfoundation/hardhat-verify": "^2.0.6",
"@nomicfoundation/ignition-core": "^0.15.12",
"@openzeppelin/hardhat-upgrades": "^3.9.1",
"@typechain/ethers-v6": "^0.4.3",
"@typechain/hardhat": "^8.0.3",
"@types/chai": "^4.3.16",
"@types/circomlibjs": "^0.1.6",
"@types/jest": "^29.5.14",
"@types/mocha": "^10.0.6",
"@types/node": "^22.18.3",
"@types/snarkjs": "^0.7.7",
"chai": "^4.4.1",
"dotenv-cli": "^7.4.2",
"ethers": "^6.12.1",
"hardhat": "^2.22.6",
"hardhat-gas-reporter": "^1.0.10",
"mocha": "^10.7.3",
"mochawesome": "^7.1.3",
"prettier": "3.5.3",
"prettier-plugin-solidity": "^2.1.0",
"solidity-coverage": "^0.8.14",
"ts-node": "^10.9.2",
"tsup": "^8.5.0",
"typechain": "^8.3.2",
"typescript": "^5.9.2"
},
"packageManager": "yarn@4.12.0",
"engines": {
"node": ">=22 <23"
}
}