Metaverse Lightwallet Developer Intro

Sven Mutzl
Metaverse
Published in
3 min readMar 20, 2018

As the Metaverse lightwallet got more and more popular and received many great contributions from the Metaverse community I finally decided to give a brief introduction on how to build and how to contribute code to the lightwallet. For the moment most of our developers use Linux so I will use Linux in this guide. However, it should also be possible to use other operating systems as well.

Requirements

Of course you will also need to get the code. It’s hostet on github and you can clone the repository with the following command:

git clone https://github.com/mvs-org/lightwallet.git

Preparation

Before starting right away you should prepare the wallet to your needs. This will also help you to prevent conflicts if you later want to submit your changes.

Branching

If you want to work on a new feature you should create a new branch from the dev branch and commit your changes to the local branch.

Network

To be able to test functions without the risk of loosing real ETP or MVS Assets you should always develop on the testnet. You can set the config to testnet in the file src/app/app.globals.ts. Just set the variable network to “testnet”.

Of course you will need to get some testnet tokens. The dev team can provide you with free testnet tokens. Also this is a good opportunity to take a look into mining using the fullnode wallet. We will also help you out if you want to try to mine testnet coins.

Issues

Please take a look at the open issues. You can also see the status and discussions. It is always a good idea to talk about new features or changes before you start with the implementation.

Coding

Languages

The language definitions you can find in src/assets/i18n. If you add a completely new language you will also need to add the new language to the language switcher in src/pages/language-switcher/language-switcher.ts.

Styling

There is a scss file that contains the styling of the app. You can find it in src/app/app.scss. You will find all theme definitions… Every page also has its own scss file that will overwrite the settings from the app.scss.

Pages

All pages are located in src/pages. If you want to create a new page please use the command:

ionic generate page PAGENAME

You can also check the ionic generate command for other options.

Building

To build your code you just have to execute the ionic build command:

ionic cordova build browser

It should build in this case for the browser. You can also build it for android or iOS but you will need to setup the android environment… For regular contributions it is enough to make your code run in browser.

It should generate the folder platforms/browser/www. This folder contains all generated JavaScript files that you will need.

If you want to get a live preview you can also use the following command:

ionic serve

Depending on the files that you change it is sometimes necessary to restart the command if the preview stops to update as expected.

Submit changes

To submit your changes to the project you should create a new pull request to the lightwallet dev branch or another branch depending on what you changed. We usually discuss it previously in the issues on github.

--

--