A plugin for verifying DCAP attestation on-chain built based on the automata-dcap-attestation.
This plugin provides the following features:
- Generate DCAP attestation on TDX using the
remoteAttestationProvider
provided by the plugin-tee. - Generate DCAP attestation on SGX using the
sgxAttestationProvider
provided by the plugin-sgx. - Submit and verify DCAP attestation on-chain.
- Support to verify DCAP attestation on more EVM networks.
- Support to verify DCAP attestation on Solana.
- Support to verify DCAP attestation using ZKVM and verify the zk proof on-chain.
- Support to topup the wallet before submitting the DCAP attestation on testnets.
pnpm install @elizaos-plugins/plugin-dcap
- Set up your environment variables:
EVM_PRIVATE_KEY=your-private-key-here
DCAP_MODE=PLUGIN-SGX|PLUGIN-TEE|MOCK
The EVM_PRIVATE_KEY used to submit the DCAP attestation on evm networks, please make sure it has enough balance to pay for the transaction fee.
The DCAP_MODE is used to specify the mode of generating DCAP attestation, it can be:
- PLUGIN-SGX: Use the
sgxAttestationProvider
inplugin-sgx
to generate the DCAP attestation. - PLUGIN-TEE: Use the
remoteAttestationProvider
inplugin-tee
to generate the DCAP attestation. - MOCK: Use a predefined attestation, this option is only for testing purposes.
Check the docs of plugin-sgx
and plugin-tee
for how to run your agent in TEE before using the SGX or TDX mode.
- Register the plugin in your Eliza configuration:
import { dcapPlugin } from "@elizaos/plugin-dcap";
// In your Eliza configuration
plugins: [
dcapPlugin,
// ... other plugins
];
The plugin provides an action dcapOnChainVerifyAction
which will be triggered by natural languages like:
"Verify the DCAP attestation on-chain"
"Generate a DCAP attestation and verify it on-chain"
"DCAP_ON_CHAIN" # The keyword will also trigger the action
- Clone the repository
- Install dependencies:
pnpm install
- Build the plugin:
pnpm run build
- Run tests:
pnpm test
We are welcom to any feedback and contributions!
- Automata Network: Provided the on-chain DCAP verification, enabling the decentralized verification of TEE attestations.
- Phala Network: Provided support for running agents in TDX environment and contributed the
plugin-tee
for generating DCAP attestation on TDX. - Gramine: Provided support for running agents in SGX environment.
This plugin is part of the Eliza project. See the main project repository for license information.