The release of ARK Desktop Wallet v2.4 is a major milestone in development. With this release, the ARK Desktop Wallet supports full plugin integration. Developers can develop and distribute their own wallet plugins to users of the ARK Desktop Wallet. As this is a new function of the wallet, we wanted to take this time to show developers how to get started and in return get some input on what could be improved/fixed. In this guide, we will cover setting up your development environment, explain the structure of the plugins, and create our first custom plugin using a simple example.

Plugin Architecture

The architecture of plugins adheres to the default npm package structure, meaning it should have a package.json with your main file in which your code will reside.

To start a project, let’s create a directory with the mkdir command, open it and run yarn init , which will open an interactive session to create a package.json file. We then create a new file in the src directory named index.js.

mkdir my-first-plugin && cd $_

yarn init

mkdir src && touch src/index.js

The structure of the plugin now looks like this:

|-- src

|---- index.js

|-- package.json

Your main file is where you will interact with the plugin’s API. You must export an object containing the methods that will be called by the Desktop Wallet.

Writing Your First Plugin

As mentioned above, in the main file we have the lifecycle event register that is called when the plugin is loaded.

The getComponentPaths method should return a key-value object in which the key is the name of the component and the value is the relative path of the file to be rendered.

Now to reflect this we need to update our main file:

And the my-first-plugin.js file should be a valid Vue Component object, currently you can not write your plugin as a Single File Component, but instead of using the <template> tag you will write your HTML into the template field:

Running Your Plugin

Now that our definition file and component are ready, let’s check if it’s working:

Clone the official desktop-wallet repository and prepare your environment:



git clone

cd desktop-wallet

yarn install cd ..git clone https://github.com/ArkEcosystem/desktop-wallet cd desktop-walletyarn install

2. Move your project directory to the plugins folder:

mv ../my-first-plugin/ ~/.ark-desktop/plugins/

3. Now you are able to run it and test your plugin by running the wallet:

yarn dev

4. Open the Desktop Wallet and go to the Sidebar > Plugin Manager and enable it: