Getting Started with Dispatch Devnet

Colin Lowenberg
Sep 18, 2018 · 8 min read

The Dispatch Developer Network (“Devnet” for short) is now live. We’re going to cover a lot of information about it in this article, but if you stick to the end, I promise you’ll know all you need to build smart contracts on Dispatch. You’ll see it’s as easy as 1 + 1 = 2.

Highlights and tips to start:

  • If you haven’t done so already, please register for the Dispatch Developer Network. We will review your GitHub and send you a developer kit.
  • We love APIs as much as you do, so we’ve published our new API docs on Below, we will walk through how to use the API with the live Developer Network. You don’t even need to know how to code.
  • Dispatch allows you to build, deploy, and execute smart contracts. This article will walk through how to use our Node JS SDK step-by-step, and we will even show you how the code works.
  • We are working on an App Directory of real-world applications using distributed ledger tech. If you’d like your company or app to be featured and promoted, please register and we will get in touch with you.
  • If you want to look under the hood and learn how the Dispatch protocol works, check out the Technical White-paper.

In the remaining sections of this post, I’ll cover each of these points in further detail, as well as provide a few thoughts about things we have in the works for our community going forward.

Not a coder?

If you are not a developer, you are still awesome. You might be excited to see our recently released Light-paper, a less technical version of our white-paper. You can take our ledger for a test drive and explore using our network scanner or mobile wallet for iOS and Android.

  1. Go to to view the TestNet’s Scanner
  2. Click Deploy Smart Contract to view the built-in developer tool
  3. Click Compile -> and you will see example warnings below the contract
  4. Click Deploy -> and you will see a request for a private key
  5. Click Generate New Private Key and Address
  6. Save your private key somewhere!
  7. Copy paste your public address into our Discord channel and we will send you tokens.

Get your free developer’s kit.

If you are a developer, Dispatch will give you a free developer’s kit. Please fill out the developer registration form to apply for a kit.

What’s in the Dispatch developer’s kit?

  • Membership in the Dispatch Developer Network
  • Licenses for the Dispatch Test Network
  • Support from the developer chat on Discord
  • Potential spotlight on the Dispatch App Directory
  • Invite to our office for a coffee chat
  • More goodies in the future!

Play with the Disgo API

Every developer loves application programming interfaces (APIs) even if she doesn’t realize it yet. Our engineering team has spent the last couple weeks updating the API to help app developers build on Dispatch. It’s ready for you to test out, and we’d love your feedback. It’s easy to find our documentation at and you can use the docs page to generate example requests in almost any language you want.

You don’t even need to write a line of code to test out all of these API calls. Just download the free Postman app and click Run in Postman.

Select the API call you want on the left and just click Send! Go ahead and walk through each of the API calls. You’ll also see some calls that are still under development for interacting with artifacts stored on the Dispatch Artifact Network, coming later in our roadmap.

In the top right you’ll see we’ve included a Dispatch environment so the API calls will work right away. You can edit the parameters to point to you own local cluster or to the Mainnet when you’re ready.

Postman can also create code snippets in almost any language. This is one of the best use cases for Postman and will save you tons of time. If you love our API, please let us know by joining the developer chat on Discord.

Deploy Smart Contracts with the Node JS SDK

Let’s walk through deploying a Smart Contract on Dispatch’s network. First we will clone the NodeJS software development kit from the Dispatch GitHub and then run through a few sample example transactions. Note that this guide is based on Mac OSX.

First, I created a new directory called getting-started and then cloned the Dispatch Node JS SDK repository from Dispatch’s GitHub.

To check if you have Node.js and NPM installed, run these commands in your terminal:

If you don’t have Node JS, let’s fix that. You can download and install Node JS from that project’s official website.

If you’d rather do it via command line, you can install node using Homebrew. If you don’t have Homebrew, run these commands in Terminal:

Now just run the install command and Node JS and npm will be installed together:

Once you’ve got the prerequisites installed, you can install the disnode client using npm. Make sure you are in the directory named disnode_sdk that you cloned from GitHub.

If you happen to get errors with using npm, I recommend uninstalling Node completely with this command and then reinstall with the latest version.

The SDK is a good starting point to integrate any existing Node or Javascript application with the Dispatch protocol. You can create accounts, send transactions including transfers of licenses, and you can even deploy and run smart contracts. We will demonstrate each of these with examples.

Before you use the SDK, you will want to switch from using the MainNet to the TestNet. Find and edit the config.json in the lib directory and input the TestNet’s seed node: instead of the MainNet’s hostname Click here to find it on GitHub.

It’s easy just run the examples with a command line from the disnode_sdk directory.

The examples will run, you’ll see the output of the account.js and transactions.js as well. If you’d like to comment them out, just edit the index.js file.

You’ll see on the terminal console the result of the contract in the contractResult is 2! Congratulations you just did addition on the Dispatch distributed ledger.

You should see the results instantly appear on the Dispatch ledger with our network scanner or our mobile wallet for iOS and Android. Both are open source projects you can copy and use for your own project.

So you want to see what’s going on behind the scenes? If you browse the code on GitHub (or your local clone) go to the examples directory, and you will see the scripts to generate an account, transfer licenses, deploy a smart contract, and execute the smart contract.

In the contract.js file first you’ll see two accounts “temp” and “test” are set as constants. For the “temp” account a new private key will be generated using the init command. The “test” account however will be configured with the name and private key of an account with existing licenses.

Next we will send some licenses from the “test” account to the “temp” account.

Learning Solidity is a great goal, and I’m trying to learn myself. However, it’s just as easy to find existing smart contracts from others for testing. We’ve written a very simple contract called “math” with a single function called “plus one” that adds 1 to a number.

We will insert the source code of the Smart Contract into the contract.js file for simplicity. You could also use a file operation in Node to get the code from a Solidity file.

We can now execute the smart contract with a single command, and we are going to add the input parameter of “1.0”. Feel free to edit this to change the input.

Thanks for walking through the code with me, if you have any feedback on this article you email me at colin at dispatchlabs dot io. If you want to talk right away, you are invited to talk to us anytime on the developer chat on Discord.

Register for Dispatch Devnet:

Don’t forget to fill out the developer registration form to apply for a free developers kit. You’ll get everything you need to build smart contracts, distributed apps, and we’ll review apps to be listed on our App Directory.

Thanks for reading. We look forward to hearing from many of you in the future — and to all the cool stuff we know you’ll build — as we grow the Dispatch developer community. We’ll also be posting additional updates from our end as we move toward launch of Dispatch’s main network. So please stay tuned.


Colin Lowenberg

Join the Dispatch Developers on Discord

Learn more about Dispatch Labs:


Dispatch Protocol,

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store