ceramic-anchor-service
ceramic-anchor-service copied to clipboard
Layer 2 service for anchoring batches of Ceramic commits into a single blockchain transaction.
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
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
- Build source with
npm run build
- 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.