import React, { useContext, useEffect, useRef } from "react"; import { getLayout } from "../src/layouts/AppLayout"; import UIContext from "../src/core/providers/UIProvider/context"; import { Heading, Text, Button, Stack, ButtonGroup, Spacer, UnorderedList, ListItem, Fade, chakra, useBoolean, Flex, IconButton, Tooltip, Accordion, AccordionItem, AccordionButton, AccordionPanel, AccordionIcon, Divider, } from "@chakra-ui/react"; import StepProgress from "../src/components/StepProgress"; import { ArrowLeftIcon, ArrowRightIcon } from "@chakra-ui/icons"; import Scrollable from "../src/components/Scrollable"; import NewSubscription from "../src/components/NewSubscription"; import StreamEntry from "../src/components/StreamEntry"; import SubscriptionsList from "../src/components/SubscriptionsList"; import { useSubscriptions } from "../src/core/hooks"; import router from "next/router"; import { FaFilter } from "react-icons/fa"; const Welcome = () => { const { subscriptionsCache } = useSubscriptions(); const ui = useContext(UIContext); const [showSubscriptionForm, setShowSubscriptionForm] = useBoolean(true); useEffect(() => { if (typeof window !== "undefined") { document.title = `Welcome to moonstream.to!`; } }, []); const progressButtonCallback = (index) => { ui.setOnboardingStep(index); }; const SubscriptonCreatedCallback = () => { setShowSubscriptionForm.off(); }; const scrollRef = useRef(); const handleNextClick = () => { if (ui.onboardingStep < ui.onboardingSteps.length - 1) { ui.setOnboardingStep(ui.onboardingStep + 1); scrollRef?.current?.scrollIntoView(); } else { ui.setOnboardingComplete(true); router.push("/stream"); } }; return ( {ui.onboardingStep === 0 && ( Greetings traveler! We are very excited to see you onboard! Moonstream is a product which helps anyone participate in decentralized finance. Moonstream is meant to give you critical insights you’ll need to succeed in your crypto quest!

How does Moonstream work?

We run nodes {" "} - Get precise and accurate data by querying our database. You’re getting the same data miners have access to and you don’t have to maintain your own node. We crawl data {" "} - We analyze millions of transactions, data, and smart contract code to link them together. We provide data - You can fetch data through our front end or through API. We analyze data - We find the most interesting information and highlight it

UI navigation basics

Use the sidebar on the left for navigation: Subscriptions Set up addresses you would like to monitor.{" "} NB: Without any subscriptions, Moonstream will feel quite empty! {" "} No worries, we will help you set up your subscriptions. NB: Without setting up subscriptions moonstream will have quite empty feel!{" "} {" "} No worries, we will help you to set up your subscriptions in the next steps! Stream {" "} This view is similar to a bank statement. You can define a date range and see what happened with your subscriptions during that time. You can also apply filters to it. Stream Entry {" "} - See a detailed view of stream cards with specific and essential data, like methods called in smart contracts etc Analytics {" "} - This section is under construction. Soon you will be able to create dashboards there. Right now you can fill out a form to tell us what analytical tools you’d want to see. We’d really appreciate that :)
)} {ui.onboardingStep === 1 && ( Subscriptions Subscriptions are an essential tool of Moonstream. We gather data for you based on addresses you have subscribed to.
Subscribe to any address you are interested in and it will become part of your stream.
Name of subscription (you can change it later). Color - you can set colors to easily identify a subscription in your stream Address - the address you subscribe to Label - we recommend using a human-readable name that represents the subscription Source - In Alpha we’re only supporting Ethereum blockchain, but more sources are coming soon!
{subscriptionsCache.data.subscriptions.length > 0 && !subscriptionsCache.isLoading && ( <> {" "} You already have some subscriptions set up )} {showSubscriptionForm && ( {`Let's add new subscription!`} )} {!showSubscriptionForm && ( )}
)} {ui.onboardingStep === 2 && ( Stream We are almost done!
{`Stream is where you can read data you've subscribed to. There are different cards for different subscription types.`}
If the card has some extra details, there will be an orange button on the right hand side inviting you to see more!
Below is a typical card for an Ethereum blockchain event. Useful information right on the card: Hash - Unique ID of the event From - Sender address. If it is one of your subscription addresses, it will appear in color with a label To - Receiver address. If it is one of your subscription addresses, it will appear in color with a label Nonce - Counter how many transaction addresses have been sent. It also determines the sequence of transactions! Gas Price - This is how much ether is being paid per gas unit Gas - Amount of gas this event consumes
} /> Applying filters You can apply various filters by clicking the filter menu button.
{`Right now you can use it to select addresses from and to, and we are adding more complex queries soon — stay tuned!`}
)}
); }; Welcome.getLayout = getLayout; export default Welcome;