How to install Massa’s decentralized web

andrei
Massa Update
Massa Update

Massa’s decentralized web allows you to store websites directly on the blockchain. Another layer of security for your dApps

What is Web3, the decentralized internet that promises a revolution?

The term Web3 is not necessarily new. However, we have seen an explosion in its use throughout 2021, although not everyone yet fully understands what it is. From its name, many assume that it is the evolution of Web 2.0, which is the Internet as we know and use it today, and they are not wrong in their assessment. But the implications of its adoption are much broader, and for this reason we want to take advantage of the following lines to try to explain what its advantages and disadvantages are, and why some still remain skeptical about the philosophy behind its implementation.

The simplest—and most widely accepted—definition of Web3 is that it is the decentralized internet. If the term “decentralization” is familiar to you, it is because you have surely read or heard it in content related to cryptocurrencies, NFTs, decentralized finance (DeFi) and the blockchain. But beyond specific implementations of this technology, the vision of Web3 is that it is here to break the hegemony of big technology companies such as Google, Facebook and Amazon, which since the mid-2000s have centralized their power over data and the content.

 

Decentralized web :

decentralized web

Uploading your website on Massa

To upload a website to Massa’s decentralized web you can use the following smart-contract. If you want latter want to be able to access to your website through the Massa plugin it’s important to use the entry massa_web for your website.

import { include_base64, print, Storage } from "massa-sc-std";

function createWebsite(): void {
const bytes = include_base64('./site.zip');
Storage.set_data("massa_web", bytes);
}

export function main(_args: string): i32 {
createWebsite();
print("Uploaded site");
return 0;
}

This smart-contract and the dependencies are available here.

See also  Frequently Asked Questions - how to run a Massa node

Setting the DNS

Easy way to build a decentralized web.

To claim a DNS address for you smart-contract you can use the following smart-contract:

import { call } from "massa-sc-std";
import { JSON } from "json-as";

@json
export class SetResolverArgs {
name: string = "";
address: string = "";
}

export function main(_args: string): i32 {
const sc_address = "2cVNfo79K173ddPwNezMi8WzvapMFojP7H7V4reCU2dk6QTeA"
call(sc_address, "setResolver", JSON.stringify<SetResolverArgs>({name: "flappy",
 address: "Gr2aeZt7ZRb9S5SKgAEV1tZ6ERLHGhBCZsAp2sdB6i3rDK9M7"}), 0);
return 0;
}

For now DNS addresses can only be claimed using the following address: 9mvJfA4761u1qT8QwSWcJ4gTDaFP5iSgjQzKMaqTbrWCFo1QM (and its associated secret key).

Once you’ve done this step, you should be able to access to your website using Massa’s browser plugin at massa://flappy.

Massa’s browser plugin 

In order to access decentralized websites they developed a browser plugin.

The Massa browser plugin function like Metamask (wallet, interaction with the blockchain) but also provide extra functions:


  • when an URL of the form xxxxxxxxxxxx.massa is typed in the address bar, the plugin will check if xxxxxxxxxxxx is an address

  • if it’s an address, the plugin will try to load the website.zip file from the filestore of that address, unzip it, and display its index.html (or whatever other page is requested).

  • if it’s not and address but something like a domain name, the plugin will interrogate a “Massa Name Service” smart contract through a readonly call to try to match the domain name to an address. This is inspired by how the Ethereum Name Service works. Then it will load the address’s website as defined above.

  • the website will typically contain html, css and javascript to remain lightweight. The javascript can dynamically talk to the Massa plugin to interact with the blockchain and wallet (just like Metamask)

  • if the website needs heavy assets (videos, large images…) that cannot be stored on the blockchain, the plugin allows looking up optional external data on IPFS or on the normal web, but plugin settings allow users to disable the fetching of off-chain assets for maximum security.
See also  Who are these 3 shadows ? three blockchain projects ?

Installation : Last step to the decentralized web.

For now the Massa browser plugin is only compatible with Chrome and Firefox.

To install it, you can follow this installation procedure detailed on the Github repository.

More info massa.readthedocs.io

 

Total
2
Shares
Leave a Reply

Your email address will not be published.

Previous Post
bitcoin going to 0

Bitcoin is going to 0 ?? It will be the biggest crisis, influencers warn

Next Post

Visa launches Bitcoin Black club, a VIP card for the crypto rich to spend in luxury


Disclaimer : This website does not invite anyone to invest in the projects we are talking about. This is simple information about crypto projects that we find interesting.
Related Posts
ua.Massadopted.com uses cookies to ensure the best experience for you.