Published 8 July 2019

Examples: JS: Boilerplate


To further demonstrate the use of the Credits API, create a HTML template.

<!DOCTYPE html>

<html lang="en">


   <meta charset="UTF-8">

   <meta name="viewport" content="initial-scale=1.0">

   <meta http-equiv="X-UA-Compatible" content="ie=edge">

   <script src="thrift.js"></script>

   <script src="nacl.js"></script>

   <script src="api/API.js"></script>

   <script src="general/general_types.js"></script>

   <script src="api/api_types.js"></script>

   <script src="base58.js"></script>

   <script src="Util.js"></script>

   <title>CREDITS API JS Demo</title>


       function run()



       function ready() {



       document.addEventListener("DOMContentLoaded", ready);




   <h1 >Public Key</h1>


   <h2 id="pc-id">Empty</h2>



   <h2 id="bl-id">0</h2>

   <h1>Transaction State</h1>


   <h2 id="tr-st-id">0</h2>



Votes 0, average rating 0