Ceramic Anchor Service
Ceramic Anchor Service is a proof of concept implementation of an anchor service according to the Ceramic specification.
This implementation currently uses the Ethereum blockchain but is built in order to be blockchain agnostic. It is fairly easy to add more modules to support other blockchains as well.
Usage (Docker)
Docker
Build the CAS image:
docker build . --target base -t cas
Build the runner image (optional):
The runner is only useful if running CAS with ECS. It sends updates on the start and exit status of the container to Discord webhooks.
docker build . --target runner -t cas-runner
docker run cas-runner
# Test the runner with Discord by using test
# webhooks instead of the actual alert channels.
docker run -e DISCORD_WEBHOOK_URL_INFO_CAS="<test_webhook_url>" -e DISCORD_WEBHOOK_URL_ALERTS="<test_webhook_url>" cas-runner
Docker Compose
Docker compose will run two instances of CAS--the api in "server" mode and the anchor worker in "anchor" mode.
docker compose up
docker compose down
Usage (Node.js)
In order to run the simulation you need to install Node.js. Only major version 16 of Node.js is supported.
Configuration file is located under ./config
directory.
In order to run the application, you need to start the IPFS, Ganache, Postgres nodes locally.
You could do that by running:
docker-compose up ipfs ganache database
Then run the following commands in a new terminal:
npm run build
npm run start
Testing
- Install node modules by running
npm install
- Compile smart contracts
- Install foundry
npm run installContractDeps
npm run buildContract
- Run the tests:
npm run test
- (Optional) Run tests with coverage:
npm run coverage
Contributing
Config
Values in the config files get their types auto-generated by node-config-ts when running npm run postinstall
.
Maintainers
License
Apache-2.0 OR MIT
Team
Built with from the 3Box Labs team.