Skip to content

Layer 2 service for anchoring batches of Ceramic commits into a single blockchain transaction.

License

Notifications You must be signed in to change notification settings

ceramicnetwork/ceramic-anchor-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ceramic Anchor Service

FOSSA Status

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

  1. Install node modules by running npm install
  2. Build source with npm run build
  3. Compile smart contracts
    1. Install foundry
    2. npm run installContractDeps
    3. npm run buildContract
  4. Run the tests: npm run test
  5. (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

@stephhuynh18

License

Apache-2.0 OR MIT

FOSSA Status

Team

Built with from the 3Box Labs team.