Getting started with Node.js and delion.io to use IOTA Tangle

The full article was originally published by Malik Dakdaki on Medium. Read the full article here.

Introduction

Some months passed since the first introduction of delion.io, the first Tangle-as-a-Service provider. Meanwhile we managed to stabilize and optimize the API to interact with the IOTA Tangle thanks to the valuable feedback from the community as well as startups and some corporates (which overwhelmed us a lot in a positive way!).

In our previous article we gave a rough outline on how delion.io works based on an example we call API-Splitting. We showed the role of delion.io which acts as a facilitator for app developers and consumers to leverage the potential of IOTAs Distributed Ledger called Tangle.

Today we are going to get our hands dirty and learn how to write some lines of code using Node.js to create, execute and check transactions on the Tangle using delion.io API.

Prerequisites

Installed and running latest stable version of Node.js
Code highlighting editor, we recommend using Visual Studio Code
Account on delion.io
Knowledge of Javascript + REST API + JSON
Familiarize with the developer docs of delion.io

Structure

The structure of this blog post is straightforward. We walk you through the single steps from the beginning to the end to complete a transaction.

  1. Signup
  2. Authorize
  3. Create Payment
  4. Execute Payment
  5. Check for Payment status

Getting started

To use the API it is necessary to have an account on delion.io, which handles all of the transaction management in the background for you. There is no need to know about Trits, Trytes, Nodes, Proof-of-Work, Addresses etc.

Signup

The signup to delion.io requires a unique email and a strong password. The password policy is as follows: minimum of 10 digits, at least 1 lower-case character, at least 1 uppercase character, at least 1 number and at least 1 symbol.

After signup, a confirmation email is sent to you. Click on the link within the email to complete the signup. If the mail does not arrive within 2 minutes, check your spam folder of your mail provider. If still no confirmation mail arrives, please let us know and send us an email to info@delion.io

Option 1: delion management console

This option refers to human centric signups, where you want to create an account for yourself or some devices for your smart home. Just go to https://console.delion.io/#/auth/register and you will see this screen.

Option 2: Via API

The API options allows to create accounts via batch or other automated processes. Below is a code example to achieve this.

Read the full Article

The full article was originally published by Malik Dakdaki on Medium, where people are continuing the conversation by highlighting and responding to this story.

You might also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. AcceptRead More