Intro

This tutorial will show the method of capturing a queried tag name and matching it to the steem database. We are using the call function provided by the dsteem library to pull tags from the steem blockchain. A simple HTML interface is used to both capture the string query as well as display the completed search.

1. Configure connection

Below we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint. There is a public/app.js file which holds the Javascript segment of this tutorial. In the first few lines we define the configured library and packages:

constdsteem=require('dsteem');letopts={};//connect to production serveropts.addressPrefix='STM';opts.chainId='0000000000000000000000000000000000000000000000000000000000000000';//connect to server which is connected to the network/productionconstclient=newdsteem.Client('https://api.steemit.com');

2. Search input

Collecting of the search criteria happens via an HTML input. The form can be found in the index.html file. The values are pulled from that screen with the below: