How to publish a web page on Keva blockchain

If you follow the following steps, you can publish a web page on the Keva blockchain, which can be rendered by Kevacoin's block explorer, or any other software that support this particular format. It is recommended that you have at least one Kevacoin (KVA) in your wallet, as these operations require small amount of Kevacoin.

  1. Create a Namespace

    kevacoin-cli keva_namespace "What ever the name you like"

    The above command will generate a namespace with a prefix "N". Let's called it N1234567890, but you should use the actual namespace returned by the command.

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

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

    It is highly recommended that you use a HTML minifier (e.g. online one) to reduce the html size. You can use single quote to quote the value string when passing it to the command line.

  3. Kevacoin block explorer used Squirrelly template engine. The {{your_name}} in the above html string can be replaced by an actual value. To do so, add other key "your_name" in the namespace:

    kevacoin-cli keva_put N1234567890 your_name "John Smith".
  4. You are done! Now you need to wait until all your changes are written to the blockchain. To check that, run this command:

    kevacoin-cli keva_pending

    The command should return an empty array [] if all your changes are in the blockchain.

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

    And you should see the result. You can modify the web page by using the keva_put command to update the values. Kevacoin block explorer can render a web page like this, but eanyone can write a software to perform similar task. We added fewer than 30 lines of code in the block explorer to support this feature.