dab

所属分类:其他
开发工具:Haskell
文件大小:0KB
下载次数:0
上传日期:2022-06-07 08:59:23
上 传 者sh-1993
说明:  Cardano.的去中心化应用程序后端。,
(Decentralized applicaton backend for Cardano.,)

文件列表:
.envrc (8, 2022-06-07)
.stylish-haskell.yaml (12936, 2022-06-07)
CODE_OF_CONDUCT.md (5228, 2022-06-07)
CONTRIBUTING.md (2407, 2022-06-07)
LICENSE (11357, 2022-06-07)
blockfrost-freer-client/ (0, 2022-06-07)
blockfrost-freer-client/CHANGELOG.md (217, 2022-06-07)
blockfrost-freer-client/LICENSE (554, 2022-06-07)
blockfrost-freer-client/Setup.hs (46, 2022-06-07)
blockfrost-freer-client/blockfrost-freer-client.cabal (2461, 2022-06-07)
blockfrost-freer-client/example/ (0, 2022-06-07)
blockfrost-freer-client/example/Main.hs (1635, 2022-06-07)
blockfrost-freer-client/src/ (0, 2022-06-07)
blockfrost-freer-client/src/Blockfrost/ (0, 2022-06-07)
blockfrost-freer-client/src/Blockfrost/Freer/ (0, 2022-06-07)
blockfrost-freer-client/src/Blockfrost/Freer/Client.hs (2060, 2022-06-07)
cabal.project (979, 2022-06-07)
chain-watcher/ (0, 2022-06-07)
chain-watcher/CHANGELOG.md (217, 2022-06-07)
chain-watcher/LICENSE (554, 2022-06-07)
chain-watcher/Setup.hs (46, 2022-06-07)
chain-watcher/app/ (0, 2022-06-07)
chain-watcher/app/Main.hs (75, 2022-06-07)
chain-watcher/chain-watcher.cabal (4207, 2022-06-07)
chain-watcher/src/ (0, 2022-06-07)
chain-watcher/src/ChainWatcher.hs (12966, 2022-06-07)
chain-watcher/src/ChainWatcher/ (0, 2022-06-07)
chain-watcher/src/ChainWatcher/Api.hs (1171, 2022-06-07)
chain-watcher/src/ChainWatcher/Lens.hs (203, 2022-06-07)
chain-watcher/src/ChainWatcher/OpenApi.hs (2726, 2022-06-07)
chain-watcher/src/ChainWatcher/OpenApi/ (0, 2022-06-07)
chain-watcher/src/ChainWatcher/OpenApi/Util.hs (1798, 2022-06-07)
... ...

# dab [![GitHub Actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fcardano-foundation%2Fdab%2Fbadge&style=flat-square)](https://github.com/cardano-foundation/dab/actions/workflows/ci.yaml)

Decentralized application backend for Cardano.

About Installation Usage Contributing


# About 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. # Community 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. # Installation ## Building with Nix Nix is the prefered way to build the chain-watcher and its components. ```command nix-build -A chain-watcher.components.exes.chain-watcher-blockfrost ``` ## Building with Docker Please see docs/Docker.md. # Usage ## Running the application backend demo To run the application backend demo :zap:, do the following: ```command nix-shell export BLOCKFROST_TOKEN_PATH=~/.blockfrost.testnet.token cabal run chain-watcher-blockfrost ``` View the demo on http://localhost:8282/demo/index.html ## Demo of demo ## Client API ### Register new client To register a new client on the chain-watcher. ```command cid="$( curl -q -X POST -v localhost:8282/clients/new | jq -r)" ``` ### Remove client To remove an exising client on the chain-watcher. ```command curl -X POST -v localhost:8282/clients/remove/${cid} ``` ### Subscribe to event To subscribe your client to a specific event on the chain-watcher. ```command curl \ -X POST \ -H "Content-Type: application/json" \ -v localhost:8282/clients/request/${cid} \ --data '{"contents":"1075a1c98dbdf3486ec8f5050c84da30a057cb79ae0ce6d03d157c719c559332","tag":"TransactionStatusRequest"}' ``` ### Recurring request To subscribe your client to a reoccuring specific event on the chain-watcher. ```command curl -X POST --data '{"contents":{"tag":"Ping"},"tag":"Recurring"}' -H "Content-Type: application/json" -v localhost:8282/clients/request/${cid} ``` ### Address change request To change your address event watching. ```command curl -X POST --data '{"contents":"addr_test1wpzjtlyp6v4qx6gzjm4zc7lsdufw597507y060qhk84vpjsjd625n","tag":"AddressFundsRequest"}' -H "Content-Type: application/json" -v localhost:8282/clients/request/${cid} ``` ### Follow server-sent event stream To follow on the even stream from the chain-watcher. ```command curl -v -N --http2 -H "Accept:text/event-stream" localhost:8282/sse/${cid} ``` # Contributing We are looking forward to your contributions! :bulb: See Contributing and Code of conduct for more information about how to contribute your code.

近期下载者

相关文件


收藏者