{"_rev":"4-d46a22f28315ee4f9402a02e5da478f0","time":{"created":"2025-11-17T02:47:33.587Z","modified":"2025-11-17T02:47:34.304Z","1.1.0":"2025-11-14T05:14:24.955Z","1.1.1":"2025-11-17T02:47:33.872Z"},"_id":"@automata-network/on-chain-pccs","name":"@automata-network/on-chain-pccs","dist-tags":{"latest":"1.1.1"},"versions":{"1.1.1":{"name":"@automata-network/on-chain-pccs","version":"1.1.1","description":"On-chain PCCS for Intel DCAP attestation - Solidity smart contracts","author":{"name":"Automata Network"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/automata-network/automata-on-chain-pccs.git"},"keywords":["solidity","smart-contracts","attestation","dcap","intel","sgx","tdx","pccs"],"peerDependencies":{"@openzeppelin/contracts":"5.0.2","solady":"0.0.160"},"_id":"@automata-network/on-chain-pccs@1.1.1","gitHead":"6b8cdb01a7424c8f002e3a661a8fa4da2bfb6839","bugs":{"url":"https://github.com/automata-network/automata-on-chain-pccs/issues"},"homepage":"https://github.com/automata-network/automata-on-chain-pccs#readme","_nodeVersion":"24.3.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-d/DCAQQm1pkiMfyGAvql4QonDFbvXIX892yrPPHp2WEZvr7/CMOX2wuLWQCLI9/ewwDBawEPRpdmETV0lToIGw==","shasum":"e2b28aa51fcef8ee2be2a9f29b8448f0163c34c7","tarball":"https://registry.npmjs.org/@automata-network/on-chain-pccs/-/on-chain-pccs-1.1.1.tgz","fileCount":37,"unpackedSize":209271,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHSVLwglwmx3tNxJ8vbuK2UwXQJE313jCZF/PJn60tGnAiEA5bp7X4dS8AvKHZZjVbRjKuwks1XmPySk+5bZ7PmEj/4="}]},"_npmUser":{"name":"xatadev","email":"cryptolazieyes@protonmail.com"},"directories":{},"maintainers":[{"name":"297951292","email":"csdxf297951292@gmail.com"},{"name":"linyao7","email":"lin_yhong@hotmail.com"},{"name":"arvianto.dwi","email":"arvi@ata.network"},{"name":"goldfinger87","email":"E478@me.com"},{"name":"jojotyty","email":"teye@ata.network"},{"name":"xatadev","email":"cryptolazieyes@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/on-chain-pccs_1.1.1_1763347653668_0.6024822385683939"},"_hasShrinkwrap":false}},"maintainers":[{"name":"297951292","email":"csdxf297951292@gmail.com"},{"name":"linyao7","email":"lin_yhong@hotmail.com"},{"name":"arvianto.dwi","email":"arvi@ata.network"},{"name":"goldfinger87","email":"E478@me.com"},{"name":"jojotyty","email":"teye@ata.network"},{"name":"xatadev","email":"cryptolazieyes@protonmail.com"}],"description":"On-chain PCCS for Intel DCAP attestation - Solidity smart contracts","homepage":"https://github.com/automata-network/automata-on-chain-pccs#readme","keywords":["solidity","smart-contracts","attestation","dcap","intel","sgx","tdx","pccs"],"repository":{"type":"git","url":"git+https://github.com/automata-network/automata-on-chain-pccs.git"},"author":{"name":"Automata Network"},"bugs":{"url":"https://github.com/automata-network/automata-on-chain-pccs/issues"},"license":"MIT","readme":"<div align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/automata-network/automata-brand-kit/main/PNG/ATA_White%20Text%20with%20Color%20Logo.png\">\n    <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/automata-network/automata-brand-kit/main/PNG/ATA_Black%20Text%20with%20Color%20Logo.png\">\n    <img src=\"https://raw.githubusercontent.com/automata-network/automata-brand-kit/main/PNG/ATA_White%20Text%20with%20Color%20Logo.png\" width=\"50%\">\n  </picture>\n</div>\n\n# Automata On Chain PCCS\n[![Automata On Chain PCCS](https://img.shields.io/badge/Power%20By-Automata-orange.svg)](https://github.com/automata-network)\n\n## Summary\n\nThis repo consists of Solidity implementation for an on-chain PCCS (Provisioning Certificate Caching Service) used in Intel DCAP (Data Center Attestation Primitives).\n\nOn-chain PCCS provides an open and permissionless service where users can freely contribute and be given easy access to collaterals for quote verification.\n\n---\n\n## Contracts\n\nThere are two sets of contracts, i.e. the **Helper** and **Base**.\n\n### Helper Contracts\n\nThe Helper contracts provide APIs for parsing collaterals and converting into Solidity structs, i.e. QEIdentity.json, TCBInfo.json, basic DER-decoder for PCK X509 leaf certificate and extensions and X509 CRLs.\n\n### Base libraries and Automata DAO contracts\n\nThe base contracts are libraries that provide the Data Access Object (DAO) APIs with similar designs inspired from the [Design Guide for Intel SGX PCCS](https://download.01.org/intel-sgx/sgx-dcap/1.21/linux/docs/SGX_DCAP_Caching_Service_Design_Guide.pdf).\n\nBase contracts are dependent on Helper contracts to parse collaterals, and contains implementation of basic collateral authenticity check functions for upserts. Smart contract developers are encouraged to extend the base contracts to build their own custom implementation of on-chain PCCS.\n\nOur DAO implementation can be found in the [`automata_pccs`](./src/automata_pccs/) directory.\n\n### Deployment Info\n\nThis list contains the deployment info for the versions that we are currently supporting.\n\n- [Current](./releases/next/NOTE.md)\n- [v1.0.0](./releases/v1.0.0/NOTE.md)\n\n--- \n\n### Integration\n\nTo install the Automata Onchain PCCS contracts as a dependency for your project, you can either run:\n\n```bash\nforge install automata-network/automata-on-chain-pccs\n```\nOR\n\n```bash\nnpm install @automata-network/on-chain-pccs\n```\n\nIf you are using Foundry, make sure to include the following to your remappings:\n\n```text\n# Foundry Submodule:\nautomata-network/on-chain-pccs/=lib/automata-on-chain-pccs/src/\n\n# NPM\nautomata-network/on-chain-pccs/=node_modules/@automata-network/on-chain-pccs/src/\n```\n\n---\n\n### #BUIDL 🛠️\n\n1. Install [Foundry](https://getfoundry.sh/introduction/installation/)\n\n2. Install the dependencies\n\n```bash\nforge install\n```\n\n3. Compile the contracts\n\n```bash\nforge build\n```\n\n4. Run tests\n\n```bash\nforge test\n```\n\nTo view gas report, pass the `--gas-report` flag.\n\n### Deployment\n\nBefore you begin, it is HIGHLY recommended that you store and encrypt wallet keys using [Cast](https://getfoundry.sh/cast/reference/wallet/import#cast-wallet-import).\n\n```bash\ncast wallet import --keystore-dir ./keystore dcap_prod --interactive\n```\n\nIf you had [**decided against taking the .env pledge**](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/5), you can (but shouldn't) pass your wallet key to the `PRIVATE_KEY` environmental variable.\n\nOnce you have set up your wallet, you may run the following script to deploy the PCCS Contracts.\n\n```bash\nmake deploy-all RPC_URL=<rpc-url>\n```\n\nYou may also pass `SIMULATE=true` at the end of the command to run the script without broadcasting the transactions.\n\nAfter deploying the contracts, run the commands below to verify contracts on the explorer.\n\nEtherscan:\n```bash\nmake verify-all RPC_URL=<rpc-url> ETHERSCAN_API_KEY=<etherscan-api-key>\n```\n\nBlockscout:\n```bash\nmake verify-all RPC_URL=<rpc-url> VERIFIER=blockscout VERIFIER_URL=<explorer-api-url>\n```\n\nTo see all available commands, run:\n\n```bash\nmake help\n```\n","readmeFilename":"README.md"}