Resources for Javascript Developers Wanting to Build on the Hive Blockchain in 2023

in HiveDevs2 years ago (edited)

DALL·E 2022-11-02 09.17.34 - hive ecosystem, digital art.png

My self-imposed break from Hive has allowed me to come back into the community energised and with a new perspective. One of those things is assessing the ecosystem and where one would start if one wanted to build on the Hive blockchain in 2023.

What impresses me about Hive that many other blockchains would struggle to lay claim to is just how little you need to build something. You'll notice this list is quite small, showing how easy it is to perform actions on Hive and build functional decentralised applications.

Dhive

If you are building a Hive application in the browser or using Node.js (perhaps both), Dhive is an official client SDK for interacting with the Hive blockchain. You can use Dhive to stream the Hive blockchain, broadcast transactions, subscribe to multiple API nodes and more.

If you use TypeScript like many other developers, Dhive comes with TypeScript definitions meaning you get autocomplete and parameter and return types. It greatly reduces the need to continually reference documentation to understand what arguments a function takes or whether it's asynchronous.

Hive Stream

Full disclosure: Hive Stream is a library that I maintain.

A Node.js-based application that streams the blockchain keeps track of transactions in a database and allows you to react to custom JSON accordingly. Hive Stream aims to give developers the power to build Hive applications with structure. Think of it as a framework and less as a library.

As you can see, Hive Stream ships with three contracts out of the box. They are aimed at blockchain-based games (Dice, Coin Flip, etc.). The Dice one is a great example of building a dice game on Hive.

Hive Stream also supports time-based actions, also known as cron jobs. It also supports adapters, allowing you to work with different databases and ships with a couple out of the box that requires no database configuration; File and SQLite (a file-based database).

Hive Keychain

While Hive Keychain is not a library or framework, it's an invaluable browser extension that makes life easier for performing actions that require user signing (active, private). Built and maintained by @stoodkev—it's safe to assume that a large portion of the Hive ecosystem use Hive Keychain because it works similarly to other cryptocurrency browser wallets like Metamask.

You'll need to interact with the API methods the extension makes available to support Hive Keychain in your applications. You can do this manually or leverage a package that does this for you, like the @hiveio keychain package on Npm. Regardless of what you do, adding support for Keychain is important (even if not everyone uses it).

Hivesigner

Similarly to Hive Keychain, Hivesigner allows you to safely perform Hive blockchain operations, from verifying someone's identity to performing transfers and other transactions. Hivesigner is like Hive Keychain, except you don't install anything, and it's all handled in the browser through links.

Like Keychain, if you're building an application on Hive, you will also want to ensure you've added in Hivesigner support. It's another choice people have, especially those who don't trust browser extensions. You might have noticed Hive applications offer multiple ways of logging in to their apps, Keychain and Hivesigner being the two main ones.

HiveSQL

I have been a huge supporter of @arcange and his work on @hivesql for years, way back when it was a free service, then became paid when it became too expensive to operate for free (it was still cheap even when it was paid).

If you're unfamiliar with HiveSQL, it's a Microsoft SQL database replicating the Hive blockchain. It differs from a client like Dhive because you can query past and present data. If you want to do anything analytical or data-intensive, you'll struggle without a real database like HiveSQL offers.

Please note that you cannot leverage HiveSQL in a client-side application. This is due to the need to connect to the remote database and perform queries. However, in Node.js (or whatever backend), you can.

Some great applications for HiveSQL are data-led operations. If you want to perform calculations and run algorithmic operations over Hive data, this will be your friend. Say you're charting upvote/downvote ratios, content quality or trend things over time, you need the historical data and means of performing these queries (which SQL offers).

This tool is incredibly valuable and essential for serious dApp development. You never know when you're going to need this. So, if you made it this far, please make sure you continue to support the proposal to keep HiveSQL free.

Hive Blocks

Hive Blocks is an online tool that allows you to observe the Hive blockchain. But, it goes beyond just being a stream of Hive consciousness. Hive Blocks also lets you inspect specific transaction ids and users. If you're building a dApp on Hive using custom JSON, it'll let you inspect and ensure your transactions are valid. Hive Blocks also lets you inspect specific transaction ids and users.

I tend to use Hive Blocks from a debugging perspective. If I am performing test transactions I'll go and confirm that Hive Blocks shows them as valid transactions and subsequently, what those transactions contain (invaluable for custom JSON operations).

Hive Developer Portal

Not a library, framework or tool, the Hive Developer Portal provides documentation for APIs and working with the Hive blockchain. While many of the aforementioned libraries will get you quite far, the official documentation will guide you through running your own Hive nodes and working with Hive. Well worth a read. (thanks to @asgarth for the suggestion)

Want to collaborate?

If you want to build an application on Hive and are unsure where to start, or perhaps you're already building and looking for additional help. Reach out to me because I love building on Hive and would love to help (if the project aligns) in a front-end development capacity.

Feel free to reach out on Discord: Beggars#4504 — if you want to chat.

Conclusion

An apology to any other invaluable tools and services that may have been missed on this list. I am only newly returned to the ecosystem, so it's possible something great went under the radar. Don't be shy in the comments if you maintain a tool or know something else to add.

The Hive ecosystem is incredible. Nothing else is as fast, secure, battle-tested, supported and easy to build on as Hive. Even without smart contracts support, you can achieve the same things in code, as Splinterlands, Hive Engine and other apps have shown.

Sort:  


The rewards earned on this comment will go directly to the people( @macchiata ) sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.

Nice list, maybe it can be useful to drop a link to the official documentation (https://developers.hive.io/) somewhere in the post :)

Haha, yes. That's a great suggestion. I'll edit the post and throw in a link. And, I'll check out Hive Hub too. Thank you.

Oh, and maybe check out https://hivehub.dev/ as a possible alternative to hiveblocks ;)

🍕 PIZZA !
@beggars! The Hive.Pizza team manually upvoted your post.

Please vote for pizza.witness!

This post has been manually curated by @steemflow from Indiaunited community. Join us on our Discord Server.

Do you know that you can earn a passive income by delegating to @indiaunited. We share 100 % of the curation rewards with the delegators.

Here are some handy links for delegations: 100HP, 250HP, 500HP, 1000HP.

Read our latest announcement post to get more information.

image.png

Please contribute to the community by upvoting this comment and posts made by @indiaunited.

Awesome post.
I am looking for some help with the front-end / hive connections on our latest Dapp.

Let's chat!

Sounds great. My Discord handle is Beggars#4504