Siasky + handshare = firebase hosting in blockchain world?

Tram Ho

We are no stranger to firebase hosting or github action, but the platform helps us deploy web single pages. So there are such services in the blockchain world. Through this article I will introduce Siasky and Namebase very interesting tools for deploying.

Sia (Decentralized storage)

Sia is a decentralized cloud storage platform secured by blockchain technology, this platform does not need signups, does not need servers, does not need trusted third parties. Sia network takes advantage of unused hard drive capacity around the world to create more reliable and lower cost data storage marketplace than traditional cloud storage providers. Sia runs a private chain and issues Siacoin. There are a few terms to grasp when getting started.

  • Node : Sia implementation machine similar to the concept of Node in other blockchain networks.
  • Renter : The person who uploads files to the network.
  • Host : A person who “lends” their storage space so that others can upload their files to the network.
  • Contracts : Formed between Renter and the host, these contracts determine the amount of data being stored, for how long, and at what price point. They are automatically tracked by software and blockchain.
  • Siacoins : A unit of money in the network that acts as the energy to run the entire network.

When a file is uploaded to Sia, the file is broken down, encrypted and sent around the world. Render uploads files, Host stores them, and everything is automated, and when you upload your files, the network ensures that you can always access them by copying the files themselves. many times. And you can also rest assured that your data is not lost because the host only receives encrypted files for storage.

Sia’s core goal is to provide decentralization for data storage which means that you can store your data with full control, ensuring that your data is protected from theft. , censorship and you should never be blocked by hackers, miners, developers or government agencies from accessing your data.

Skynet is layer 2 built on top of Sia. It is a decentralized (Content Delivery Network) (CDN) and even better because it can share a directory as well. Right on the homepage of Skynet you can test this service already.

Just drag and drop the file or directory and then skynet will return you a link. Skynet creates a 46Byte link called Skylink . This link can be shared with anyone so they can view them.

Skynet provides a convenient library to run on Nodejs, Python, and Go. I will try to demo a few features based on their docs , using Nodejs.

Note: Skynet allows us to deploy free with capacity <1GB

Upload file

This deployment is done either through the node you install or through the existing Skynet portal maintained by the developer. In the above example deploy a file with the indirect path to it. After deploying is complete it will return the skylink and you can access it using the link:

Or you can download the file by

Upload Directory

Uploading a whole directory is very convenient for example we have an image folder of 100 200 images including 1.png 2.png 3.png images … then when viewed on the web we can see by add image file name at the end of the skylink.

Similar to upload file up load directory also returns skylink and we view each image on the network using following url.

Downloading is similar to downloading files

Upload with Encryption

This is another pretty cool feature that skynet offers, that is with a layer of encryption and file upload. By adding an option skykeyName is a string that acts as a password on the file upload.

The download should also add skykeyName

At this point, we can see that skynet is an amazing deploy frontend page, it’s free, does not require registration, … However, a minus point is that skylink is a string of 46 bytes that is extremely difficult to remember so for convenience. More convenient, that solution is to combine with Handshake

Handshake

Handshake is basically no different from Bitcoin, which also uses Proof of work, but different in that the name of the co-issuer is HNS and in addition can be used to buy domain. Domain name on Handshake is Top level domain names (.com, .net, .org) abbreviated as TLD

But unlike traditional domain names that you can only rent, you actually own the domain name on handshake will own it forever, no one can take away from you nor prevent others from accessing it. okay. And instead of being limited to a few names like .com or .org, it is now much more expandable, such as being able to replace it with drought characters, russian letters or even emojis symbols.

HNS

HNS is a digital currency or more commonly, Handshake coin that you use to buy domain on Handshake and to pay fees for miners who add your transactions to the chain.

Namebase

Extremely powerful, NameBase is a website with a pretty nice interface that allows you to buy and sell domain names on it with HNS. In addition, it also has a HNS vs Bitcoin exchange, wallet and domain management page that I bought.

Skylink + Namebase

To solve the problem that the skylink is too hard to remember we will be mapping it to namebase. There are two ways that is using the interface and using the code.

Display

First go to the home page of namebase login with github to buy the domain (not free ? ) then go to Dashboard tab then go to Domain Manager and select Manage domain you want to setup.

Then fill in and the Blockchain DNS records can be mapping the public IP of your server or skylink as shown below.

After saving, wait a while for your transaction to be mine into the blockchain and after completion, instead of entering with long skylink, you can replace it with

Use code

First, go to https://www.namebase.io/pro/keys to create an api key from which to get ACCESS_KEY and SECRET_KEY . To test we create a file namebaseApi.js

Now run the command to add the skylink

How to access my domain

To have the domain name you bought, you need to configure the DNS server for mapping, it only takes a few minutes of setup

After configuring as shown in the picture, we can get in.

Reference

Share the news now

Source : Viblo