Coder Social home page Coder Social logo

cf-cardano-worker's Introduction

cf-cardano-worker

This worker server constantly checks for transactions on specific addresses on the Cardano blockchain, and stores them in a MongoDB database for later processing. The worker will check transactions for each address defined in a monitoring object (models/BlockachinMonitoring.js) and stores a corresponding transaction object (models/BlockachinTransaction.js) with a matching project key. The system will prioritize queries based on the recent activity on the address.

This server is also capable of processing transactions for a custodial CNFT staking system, the logic of which can be found in the stakingRewards.js file. The corresponding claim sessions (models/StakeClaim.js) are created by the Cardano Staking API server. This worker will process the incoming transactions and call the Cardano Node API to send back the tokens.

Requirements

The server requires a connection to a server running Cardano Node and DB Sync with PostgREST to query DB Sync data and Cardano Node API to submit transactions.

Environment variables

  • DATABASE_URL - MongoDB Connection String
  • CARDANO_API_SECRET - Shared secret with the Cardano Node API
  • CARDANO_API_URL - URL of the Cardano Node API
  • CARDANO_DB_URL - URL of the PostgREST API server

Running the system

Run the worker with node index.js

cf-cardano-worker's People

Contributors

steffenkeller avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.