Decentralized application backend for Cardano.
About • Installation • Usage • Contributing
Decentralized application backend (dab) is a toolset that help developers interact with the Cardano blockchain and its smart validators.
At its core, the component called chain-watcher
is following the chain looking for specific events expected by the application backend. It supports different providers to access the Cardano network.
Decentralized application backend (dab) is a community project. We are releasing this minimal viable product in a modular form (at the moment it supports Blockfrost as a provider), we hope that it will gather developer community momentum and we will see many more different providers such as Oura, Koios or Ogmios emerge from the development community.
We strongly encourage community members to apply for Project Catalyst funding to make this project their own and better.
Nix is the prefered way to build the chain-watcher and its components.
nix-build -A chain-watcher.components.exes.chain-watcher-blockfrost
Please see docs/Docker.md.
To run the application backend demo ⚡, do the following:
nix-shell
export BLOCKFROST_TOKEN_PATH=~/.blockfrost.testnet.token
cabal run chain-watcher-blockfrost
View the demo on http://localhost:8282/demo/index.html
To register a new client on the chain-watcher.
cid="$( curl -q -X POST -v localhost:8282/clients/new | jq -r)"
To remove an exising client on the chain-watcher.
curl -X POST -v localhost:8282/clients/remove/${cid}
To subscribe your client to a specific event on the chain-watcher.
curl \
-X POST \
-H "Content-Type: application/json" \
-v localhost:8282/clients/request/${cid} \
--data '{"contents":"1075a1c98dbdf3486ec8f5050c84da30a057cb79ae0ce6d03d157c719c559332","tag":"TransactionStatusRequest"}'
To subscribe your client to a reoccuring specific event on the chain-watcher.
curl -X POST --data '{"contents":{"tag":"Ping"},"tag":"Recurring"}' -H "Content-Type: application/json" -v localhost:8282/clients/request/${cid}
To change your address event watching.
curl -X POST --data '{"contents":"addr_test1wpzjtlyp6v4qx6gzjm4zc7lsdufw597507y060qhk84vpjsjd625n","tag":"AddressFundsRequest"}' -H "Content-Type: application/json" -v localhost:8282/clients/request/${cid}
To follow on the even stream from the chain-watcher.
curl -v -N --http2 -H "Accept:text/event-stream" localhost:8282/sse/${cid}
We are looking forward to your contributions!
💡 See Contributing and Code of conduct for more information about how to contribute your code.