Ardor Develop Tips for Dummies

If you are not a professional developer like me, or not familiar with the Ardor platform, here are some quick tips you may find useful at the beginning :).

Difference between Ardor and Ignis

In short, Ardor is the parent chain, using the token ARDOR, which security the networks and package all child-chain transactions.You can’t do much thing only with Ardor chain.

Ignis is the first child-chain which has the most features , using the token IGNIS.

If you want build some dApps , you should focus on Ignis chain and may need some IGNIS coins.

API Document

The official Ardor client has a API Console packaged in, which I found quite useful. You can test all API calls there and check the response:

API Console

Located at http://localhost:27876/test

It also lead you to the Wiki page of those API calls.

There is also a new Ardor API Reference in construction.

The Chain-id of Ignis is 2

Most API calls need a param called ‘chain’ to specify the chain-id.

The Ignis chain-id is 2 (I thought was 1, and wasted a lot of time ^^;) .

Get the Minimal-fee

The minimal fee needed for each transaction depends on transaction type, bundle rate, and size of attached data.

There is a simple way to get the minimal fee:

  1. Submit your transaction with ‘broadcast’ => false.
  2. Get the ‘feeNQT’ filed of response(that’s the minimal fee).
  3. Submit your transaction again with ‘broadcast’ => true and the feeNQT you got.

For fees of different transaction types, there is a official note:

Calculate the Current Timestamp

The timestamp API returning is the seconds after Ardor Main Net Launch, which is 2018–01–01 0:00 (UTC).

So if you want get the real date, JS code for example:

real_date = new Date(response[‘timestamp’]*1000 + Date.UTC(2018));