How to Publish a Web Page on Keva Blockchain

If you follow the steps below, you can publish a web page on the Keva blockchain. This specific format is supported by the Kevacoin block explorer and anyone can view it on the explorer. However, any software that can read the Keva database and support this simple format can render this web page too. The software can be run locally and no central server is required.

  1. Create a namespace

    kevacoin-cli keva_namespace "Any name you like"

    The above command generates a namespace with a prefix "N". We refer it as "N12345" in the rest of the article, but you should use the actual namespace returned by the command.

  2. Add "html" key to the namespace, with its value as the HTML content.

    kevacoin-cli keva_put N12345 html '<!DOCTYPE html><html lang="en"><head> </head> <body> Hello,{{your_name}}<body></html>'

    We recommend that you use a minifier to reduce the HTML content size. You can single quote the string when passing it to the command line.

  3. The Kevacoin block explorer uses the Squirrelly template engine. The {{your_name}} in the above HTML content string can be replaced with actual value. To do so, add a key "your_name" in the namespace:

    kevacoin-cli keva_put N12345 your_name "Satoshi Nakamoto".
  4. You are done! Now you need to wait until all the updates are written in the blockchain. Run the following command to check the status:

    kevacoin-cli keva_pending

    The command should return an empty array [] when all the updates are in the blockchain.

  5. Now you can view your web page. Go to the website:

    You should be able to see the web page you just created. You can use the keva_putcommand to update the web page. Kevacoin block explorer can render a web page like this, but anyone can write a simple software to perform the same task without a central server. We add fewer than 30 lines of code in our block explorer to support this feature and we plan to open-source the code.