cmdatahub-anchor-service
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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

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

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

Readme

Keywords

Package Sidebar

Install

npm i cmdatahub-anchor-service

Weekly Downloads

0

Version

0.0.1

License

(Apache-2.0 OR MIT)

Unpacked Size

2.87 MB

Total Files

156

Last publish

Collaborators

  • zhuguanjiakeshuixi