Metaverse Explained is an ongoing series explaining Metaverse and its applications.

The plugins feature is still in an early stage of development, and is currently only available on the testnet. Please use it with caution, and do not add untrusted plugins.

Beginning with v0.4.1 of MyETPWallet, users can now add plugins on the testnet. Plugins are third-party applications that can be added to the wallet in order to share some of the wallet’s information with the plugin. Plugins are a very simple and convenient way for developers to connect their applications with Metaverse.

What are plugins?

One popular place where plugins are frequently used is Facebook. Small applications on Facebook request access to some of their users’ information (friends, pictures, etc.) in order to personalize their experiences in games, tests, etc…

Similarly, a plugin on Metaverse could request a user’s Avatar name in order to use it in a video game; it could ask users to sign a message to login to an application; or it could create a MIT in order to prove the ownership of an object. The possibilities with plugins are endless, and we encourage the community and developers to come up with interesting and dynamic ideas.

From a technical standpoint, plugins are external applications that are embedded in the lightwallet. This means that any existing website or application in html or javascript can be seamlessly integrated into the lightwallet via a plugin.

Add a plugin

If you are connected to the testnet, you can go to Settings and see the Plugins option:

From here, you can add a plugin by typing its URL in the field and clicking on “ADD.” Here are 2 examples of plugins you can try:

Hello World:

https://hello-world.blocktrack.net/config.json

Meta Chat:

https://metachat-ffc22.firebaseapp.com/config.json

Clicking “ADD” will bring you to a confirmation page, where you can see general information about the plugin: its name, description, author and permissions (keep reading for more information about permissions).

Once added, the plugin will automatically appear at the bottom of the main menu. Just click on the plugin to open it.

You can now go back to plugin settings to see the list of plugins currently installed, check out details about them, or remove them. Currently, all plugins are removed when you log out.

Permissions

When you add a plugin, the requested permissions are listed on the plugin details page. There are a total of 8 permissions:

Create MITs

Know the current network (mainnet or testnet)

Access the list of all my Avatars and their attached addresses

Sign a message (not a transaction)

Verify the signature of other messages

After asking a password, re-use it in the same session

Access my list of addresses

Broadcast transactions

For security reasons, there is no permission available to generate and sign a transaction. If a plugin wants to generate a transaction, it will have to redirect the user to the transfer page of the lightwallet itself.

Hello World plugin

Installation link:

https://hello-world.blocktrack.net/config.json

As is standard in every programming language, the Hello world plugin is a very simple demo (only a few lines of codes) to say Hello to the user. It is designed to access the list of your Avatars and say Hello to them:

Metachat

Installation link:

https://metachat-ffc22.firebaseapp.com/config.json

Metachat is a classic chat room plugin where the pseudonym of each person in the chat is their Avatar name on Metaverse. Each message posted is also signed by the user’s private key, and other users can verify that this message contains the correct signature to guarantee that it was indeed posted by the owner of the Avatar.

When starting the chat, the plugin will request your passphrase (your wallet password) in order to sign your message. This password is only kept for the current session, so if you leave the chat you will have to enter it again. Keeping a password for the entirety of a session is made possible through the permission “After asking the password, can re-use it in the same session.”

Next, the Metachat plugin will use the name of your first Avatar to post messages in the chat. The plugin can access the Avatar name thanks to the permission “Access the list of all my Avatars and their attached addresses.” If an account does not have any Avatars, no name will be displayed (messages will be sent anonymously).

In the screenshot above, the Avatar name is green, indicating that it has been checked to confirm that the message has been correctly signed by the owner of the avatar. Messages in the chat are not written on the blockchain; they are signed by the message writers only to prove to others that they are the real owners of the Avatar names.

Development

The two plugins described above are just simple examples of the limitless possibilities offered by plugins, and anyone can create a plugin and add it via its url. We are happy to support any developer interested in designing a plugin, and really hope that the community takes advantage of the enormous power that this feature can provide.

Another Metaverse Explained article focused on how to develop a plugin will be published in the coming weeks, so stay tuned!