{"_id":"@automata-network/automata-dcap-attestation","name":"@automata-network/automata-dcap-attestation","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"@automata-network/automata-dcap-attestation","version":"1.1.0","description":"Automata DCAP Attestation Solidity contracts for EVM chains","main":"index.js","scripts":{"prepublishOnly":"echo 'Publishing contracts only'"},"repository":{"type":"git","url":"git+https://github.com/automata-network/automata-dcap-attestation.git","directory":"evm"},"keywords":["solidity","dcap","attestation","automata","ethereum","smart-contracts"],"author":{"name":"Automata Network"},"license":"MIT","bugs":{"url":"https://github.com/automata-network/automata-dcap-attestation/issues"},"homepage":"https://github.com/automata-network/automata-dcap-attestation#readme","_id":"@automata-network/automata-dcap-attestation@1.1.0","gitHead":"6d26f871a1f373edbf0d9cf3543af19e9bf67087","_nodeVersion":"24.3.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-E6WqpSKchKcGlh1E8F655rADzZn3bzH5wH8E1BwxA5gb7BpEXYQaHYuXHlVTeIvQH9oUQu/vrVajWCpeibQYdw==","shasum":"35870b81e63cb0a49db395c802d47fd3c29dd3e8","tarball":"https://registry.npmjs.org/@automata-network/automata-dcap-attestation/-/automata-dcap-attestation-1.1.0.tgz","fileCount":28,"unpackedSize":160770,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFqE6uq+UAwGn+BJQ6dDhOs9zj3MrBgcUAXwgoaspGPwAiEA0LSC7aAM1vz9yVw0nUx7oZwNJjwvH38OdAz+VR994NA="}]},"_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/automata-dcap-attestation_1.1.0_1763118529229_0.21961946168313418"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-14T11:08:49.119Z","1.1.0":"2025-11-14T11:08:49.441Z","modified":"2025-11-14T11:08:49.846Z"},"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":"Automata DCAP Attestation Solidity contracts for EVM chains","homepage":"https://github.com/automata-network/automata-dcap-attestation#readme","keywords":["solidity","dcap","attestation","automata","ethereum","smart-contracts"],"repository":{"type":"git","url":"git+https://github.com/automata-network/automata-dcap-attestation.git","directory":"evm"},"author":{"name":"Automata Network"},"bugs":{"url":"https://github.com/automata-network/automata-dcap-attestation/issues"},"license":"MIT","readme":"# Automata DCAP Attestation on EVM Guide\n\n## Integration\n\nTo integrate your contract with Automata DCAP Attestation, you need to first install [Foundry](https://book.getfoundry.sh/getting-started/installation).\n\nAdd to your dependency, by running:\n\n```bash\n# submodules\nforge install automata-network/automata-dcap-attestation\n\n# NPM\nnpm install @automata-network/automata-dcap-attestation\n```\n\nThen, add the following to your `remappings.txt`\n\n```\n@automata-network/dcap-attestation/=lib/automata-dcap-attestation/contracts/\n```\n\n## Example\n\n```solidity\nimport \"@automata-network/dcap-attestation/AutomataDcapAttestationFee.sol\";\n\ncontract ExampleDcapContract {\n\n    AutomataDcapAttestationFee attest;\n\n    constructor(address _attest) {\n        attest = AutomataDcapAttestationFee(_attest);\n    }\n\n    // On-Chain Attestation example\n    function attestOnChain(bytes calldata quote) public {\n        (bool success, bytes memory output) = attest.verifyAndAttestOnChain(quote);\n\n        if (success) {\n            // ... implementation to handle successful attestations\n        } else {\n            string memory errorMessage = string(output);\n            // ... implementation to handle failed attestations\n        }\n    }\n\n    // SNARK Attestation example\n    // ZkCoProcessorType can either be RiscZero or Succinct\n    function attestWithSnark(\n        bytes calldata output,\n        ZkCoProcessorType zkvm,\n        bytes calldata proofBytes\n    ) public \n    {\n        (bool success, bytes memory output) = attest.verifyAndAttestWithZKProof(\n            output,\n            zkvm,\n            proofBytes\n        );\n\n        if (success) {\n            // ... implementation to handle successful attestations\n        } else {\n            string memory errorMessage = string(output);\n            // ... implementation to handle failed attestations\n        }\n    }\n\n}\n```\n\n---\n\n## BUIDL 🛠️\n\n### Getting Started\n\nClone this repo, by running the following command:\n\n```bash\ngit clone https://github.com/automata-network/automata-dcap-attestation.git --recurse-submodules\n```\n\n### Building With Foundry\n\nCompile the contracts:\n\n```bash\nforge build\n```\n\nTesting the contracts:\n\n```bash\nforge test\n```\n\nTo view gas report, pass the `--gas-report` flag.\n\nTo provide additional test cases, please include those in the `/forge-test` directory.\n\nTo provide additional scripts, please include those in the `/forge-script` directory.\n\n### Deployment Scripts\n\nBefore beginning with contract deployment, it is recommended that you store your wallet key as an encrypted keystore using [`cast wallet import`](https://book.getfoundry.sh/reference/cast/cast-wallet-import)\n\n```bash\ncast wallet import -k keystores dcap_prod --interactive\n```\n\nYou may also simply pass your wallet key to the `PRIVATE_KEY` environment variable, but we do not recommend doing this with production keys.\n\n#### Deploy the PCCS Router:\n\n```bash\nmake deploy-router RPC_URL=<rpc-url>\n```\n\n#### Deploy Automata DCAP Attestation Entrypoint:\n\n```bash\nmake deploy-attestation RPC_URL=<rpc-url>\n```\n\n### Automata DCAP Entrypoint zkVM Configuration\n\n```bash\nmake config-zk RPC_URL=<rpc-url> ZKVM_SELECTOR=<number> ZKVM_VERIFIER_ADDRESS=<address> ZKVM_PROGRAM_IDENTIFIER=<identifier>\n```\n\n#### Deploy Quote Verifiers For All Supported Versions:\n\n```bash\nmake deploy-all-verifiers RPC_URL=<rpc-url>\n```\nCurrently, we support V3, V4, and V5 quotes. Supported versions are defined in `verifier-versions.json`.\n\n#### Deploy Quote Verifier For A Specific Version\n\n```bash\nmake deploy-verifier RPC_URL=<rpc-url> QUOTE_VERIFIER_VERSION=<ver>\n```\n\n#### Deploy Across Multiple Chains (MULTICHAIN)\n\nTo deploy to multiple chains simultaneously, use `MULTICHAIN=true` and provide chain-specific RPC URLs:\n\n```bash\n# Deploy a specific verifier version across multiple chains\nMULTICHAIN=true make deploy-verifier QUOTE_VERIFIER_VERSION=5\n\n# Deploy all supported verifiers across multiple chains\nMULTICHAIN=true make deploy-all-verifiers\n```\n\n> ℹ️ **NOTE**: When using `MULTICHAIN=true`, you don't need to set `RPC_URL`.\n\n#### Add QuoteVerifier(s) to the Entrypoint contract:\n\n```bash\nmake config-verifier RPC_URL=<rpc-url> QUOTE_VERIFIER_VERSION=<ver>\n```\n\n> ℹ️ **NOTE**: This command automatically grants the Quote Verifier read access to the PCCS Router.\n\n\n#### Explicitly Granting or Revoking the access privilege for the specified caller address to the PCCS Router\n\n```bash\nmake config-router RPC_URL=<rpc-url> CALLER_ADDRESS=<address> AUTHORIZED=<true | false>\n```\n","readmeFilename":"README.md","_rev":"1-d1ff878bef9d72379dda88540aa6ab08"}