The most simple html page to access the steem blockchain ... and some explanations ....

in #tutorial8 years ago (edited)

What you see below is the content of an html page. But what's amazing about it, is that with these few lines, you will be able to access the steem blockchain.

<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>SteemJS</title>
</head>
<body>
<pre id="json"></pre>
<script src="http://my-steemit.com:8080/steem.min.js"></script>
<script>
    steem.getAccounts(['artakan'], function(err, response){
        document.getElementById("json").innerHTML = JSON.stringify(response, undefined, 2);
    });
</script>

</body>
</html>

Dou you want to make the expermiment with me ?

Simply copy paste the code in the grey rectangle above.

Open a simple text editor (notepad will do), and paste the code inside. Save the file on your desktop, with the html extension. Double-click on it... and boom, you are connected to the steem blockchain, it's as easy as that ....

And if you are a beginner and that your are lost with my explanations you can have a look at my little video.

Have fun !

There a whole lot more you can do. You will find the list of the functions you can call here
https://github.com/adcpm/steem/blob/master/lib/steem.js

And if you know a little bit more, you can just download the file steem.min.js locally, and you will not depend on anyone else ... (even make it point to your own node, but that's another story)

Sort:  

Commenting on for later use. Thanks for the work!

OK this is just PERFECT. The more people get involved with coding, and blockchain tech, the better for Steemit, and humanity in general.
Uptucked.

Nice, this is way more accessible than existing libraries like steem-rpc ... Thanks!

I'll try it tomorrow, I'm so excited to see this :)

It's cool of you that you included a video on how-to, It's way easier to follow.

Just a note. The code above no longer works and the github link is also MIA. Would have been a nice post.

Keep up the great work @artakan
Upvoted

I have updated the site, it's down for the moment, still trying to figure out what is going on ....

Maybe host it somewhere else?

it's back, I am my own host, I was just updating things .... but you should download the file locally and you'll be fine ...

Coin Marketplace

STEEM 0.17
TRX 0.16
JST 0.029
BTC 62213.63
ETH 2420.81
USDT 1.00
SBD 2.59