hackbg / datastreams-demo

Demo dApp using Chainlink Data Streams.

Home Page:https://datastreams-demo.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chainlink Data Streams Demo dApp

Note

This demo represents an educational example to use a Chainlink system, product, or service and is provided to demonstrate how to interact with Chainlink’s systems, products, and services to integrate them into your own. This template is provided “AS IS” and “AS AVAILABLE” without warranties of any kind, it has not been audited, and it may be missing key checks or error handling to make the usage of the system, product or service more clear. Do not use the code in this example in a production environment without completing your own audits and application of best practices. Neither Chainlink Labs, the Chainlink Foundation, nor Chainlink node operators are responsible for unintended outputs that are generated due to errors in code.

This project demonstrates how to use Chainlink Data Streams - part of Chainlink’s family of low-latency, hybrid price feed solutions in a full-stack implementation.

Architecture overview

Architecture Overview

Frontend

This directory is a Next.js project bootstrapped with create-next-app.

It contains the frontend for the data feeds demo dApp.

Quick Start

Install all dependencies:

npm install

Set environment variables by copying .env.example to .env and filling in the values:

  • NEXT_PUBLIC_ALCHEMY_API_KEY for the network you want to use. You can get one from Alchemy.
  • NEXT_PUBLIC_WALLET_CONNECT_ID for the wallet connector. You can get one from WalletConnect.

For connecting to Chainlink's Low Latency feeds you need to also fill in the following .env variables:

  • CHAINLINK_CLIENT_ID - The ID is provided to you by Chainlink.
  • CHAINLINK_CLIENT_SECRET - The secret is provided to you by Chainlink.
  • CHAINLINK_API_URL api url for consuming the feeds via REST. No http/https prefixes should be used. Example: api.chain.link
  • CHAINLINK_WEBSOCKET_URL optional for consuming feeds via websocket. No http/https prefixes should be used. Example: ws.chain.link

You can get those from your Chainlink platform coordinator.

Run npm run dev in your terminal, and then open localhost:3000 in your browser.

Tech Stack

Questions?

You can open an issue or drop us a line on Discord.

About

Demo dApp using Chainlink Data Streams.

https://datastreams-demo.app/

License:MIT License


Languages

Language:TypeScript 97.4%Language:CSS 2.2%Language:JavaScript 0.4%