<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://betaardordocs.jelurida.com/index.php?action=history&amp;feed=atom&amp;title=API</id>
	<title>API - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://betaardordocs.jelurida.com/index.php?action=history&amp;feed=atom&amp;title=API"/>
	<link rel="alternate" type="text/html" href="https://betaardordocs.jelurida.com/index.php?title=API&amp;action=history"/>
	<updated>2026-05-14T18:12:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://betaardordocs.jelurida.com/index.php?title=API&amp;diff=12833&amp;oldid=prev</id>
		<title>Almonte at 16:56, 15 April 2021</title>
		<link rel="alternate" type="text/html" href="https://betaardordocs.jelurida.com/index.php?title=API&amp;diff=12833&amp;oldid=prev"/>
		<updated>2021-04-15T16:56:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Ardordocs - Ardor API&lt;br /&gt;
|titlemode=replace&lt;br /&gt;
|keywords=ardor learning hub, ardor documentation, blockchain, proof of stake, ardor, ignis, jelurida, development, ardor wiki, wiki, API, API documentation, Application program interface&lt;br /&gt;
|description=Description and examples of the API of Ardor.&lt;br /&gt;
}}&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Description== &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
The Ardor API allows interaction with Ardor nodes using HTTP requests to port 27876. Most HTTP requests can use either the GET or POST methods, but some API calls accept only the POST method for security reasons. Responses are returned as JSON objects. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
If you want to interact with an [[Testnet|Ardor testnet local node]], please be aware that the port for sending the HTTP requests is different, you should use 26876 instead of the mainnet one 27876. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
Each API call is documented ([[All_Operations_index|see the full API list]]), with definitions given for HTTP request parameters and JSON response fields, followed by an example:&lt;br /&gt;
*The JSON response fields are each followed by one of &amp;#039;&amp;#039;S&amp;#039;&amp;#039; for string, &amp;#039;&amp;#039;A&amp;#039;&amp;#039; for array, &amp;#039;&amp;#039;O&amp;#039;&amp;#039; for object, &amp;#039;&amp;#039;N&amp;#039;&amp;#039; for number or &amp;#039;&amp;#039;B&amp;#039;&amp;#039; for boolean.&lt;br /&gt;
*In the examples, the Ardor node is represented as &amp;#039;&amp;#039;localhost&amp;#039;&amp;#039; and requests and responses are formatted for easy reading; line breaks and spaces are not actually used except in some parameter values. All requests are in URL format which implies the HTTP GET method. When GET is allowed, the URL can be entered into a browser URL field but proper URL encoding is usually required (e.g., spaces in a parameter value must be replaced by &amp;#039;&amp;#039;+&amp;#039;&amp;#039; or &amp;#039;&amp;#039;%20&amp;#039;&amp;#039;). Otherwise, the URL should be used as a guide to preparing an HTTP POST request using cURL, for example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
All API calls can be viewed and tested at http://localhost:27876/test while the local server node is running. For specific API calls, use &amp;#039;http://localhost:27876/test?requestType=&amp;#039;&amp;#039;&amp;#039;specificRequestType&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
There are some [[Sample_Java_Programs|Sample Java Programs]], which demonstrate how to perform operations such as calculating the best bundling fee for child chain transactions, the use of APIs locally without relying on a remote node among others.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
This document corresponds to Ardor Software Version {{NRSVersion}}: [https://www.jelurida.com/sites/default/files/Ardor-Developers-Cheat-Sheet.pdf Download Ardor Developers Cheat Sheet]&lt;br /&gt;
&amp;lt;accordion parent=&amp;quot;accordion&amp;quot; heading=&amp;quot;Ardor developers cheat sheet&amp;quot;&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Java Conversion Functions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;#039;&amp;#039;&amp;#039;From&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! &amp;#039;&amp;#039;&amp;#039;To&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! &amp;#039;&amp;#039;&amp;#039;Code&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Secret Phrase&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Public Key&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Crypto.getPublicKey(String s)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Public Key&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Numeric ID&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Account.getId(byte[] pk)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Numeric ID&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Public Key&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Account.getPublicKey(long id)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Numeric ID&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;String ID&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Long.toUnsignedString(long id)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;String ID&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Numeric ID&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Convert.parseUnsignedLong(String s)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Numeric ID&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;RS Format&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Convert.rsAccount(id)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;RS Format or String ID&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Numeric ID&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Convert.parseAccountId(String s)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;byte[]&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Hex String&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Convert.toHexString(b)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Hex String&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;byte[]&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Convert.parseHexString(hex)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Full Hash&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;ID&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Convert.fullHashToId(byte[] b)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Epoch Time&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Time Millis&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Convert.fromEpochTime(int t)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Time Millis&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Epoch Time&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Convert.toEpochTime(long t)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;String&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;byte[]&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Convert.toString(byte[] b, Boolean isText)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;byte[]&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;String&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Convert.toBytes(String s, boolean isText)&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Java Common Operations&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;#039;&amp;#039;&amp;#039;Operation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! &amp;#039;&amp;#039;&amp;#039;Code&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! &amp;#039;&amp;#039;&amp;#039;Return&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Sign&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Crypto.sign(byte[] message, String secretPhrase)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;byte[]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Verify&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Crypto.verify(byte[] signature, byte[] message, byte[] publicKey)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Boolean&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Encrypt&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Account.encryptTo(byte[] publicKey, byte[] data, String senderSecretPhrase, boolean compress)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;EncryptedData&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Decrypt&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Account.decryptFrom(EncryptedData encryptedData, String recipientSecretPhrase, boolean uncompress)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;byte[]&amp;lt;/code&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| &amp;#039;&amp;#039;Sha256&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Crypto.sha256().digest(byte[] b)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;byte[]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Compress&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Convert.compress(byte[] bytes)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;byte[]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Uncompress&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;Convert.uncompress(byte[] bytes)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;byte[]&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Useful Constants&amp;#039;&amp;#039;&amp;#039; see &amp;lt;code&amp;gt;nxt.Constants&amp;lt;/code&amp;gt; class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reading from properties file&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;Nxt.getBooleanProperty(), Nxt.getIntProperty(), Nxt.getStringProperty(), Nxt.getStringListProperty()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Javascript Conversion Functions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;#039;&amp;#039;&amp;#039;From&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! &amp;#039;&amp;#039;&amp;#039;To&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! &amp;#039;&amp;#039;&amp;#039;Code&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Secret Phrase&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Public Key&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.getPublicKey(converters.stringToHexString(secretPhrase))&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Public Key&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;String ID&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.getAccountIdFromPublicKey(publicKeyHexString)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;String ID&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Public Key&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.getPublicKey(id, true)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;String ID&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;RS Format&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.convertNumericToRSAccountFormat(id)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;byte[]&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Hex String&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;converters.byteArrayToHexString(bytes)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Hex String&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;byte[]&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;converters.hexStringToByteArray(hex)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Full Hash&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;ID&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.fullHashToId(fullHash)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Epoch Time&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Time Millis&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.fromEpochTime(epochTime)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Time Millis&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Epoch Time&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.toEpochTime(time)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;String&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;byte[]&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.getUtf8Bytes(String), converters.stringToByteArray(String)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;byte[]&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;String&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;converters.byteArrayToString(bytes)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;NQT&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;Chain tokens&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.intToFloat(amountNQT, decimals)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;NQT&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;formatted&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.formatQuantity(amountNQT, decimals) – many different variants&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Chain tokens&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;NQT&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.floatToInt(amountNXT, decimals)&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Javascript Common Operations&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &amp;#039;&amp;#039;&amp;#039;Operation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! &amp;#039;&amp;#039;&amp;#039;Code&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! &amp;#039;&amp;#039;&amp;#039;Return&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Sign&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.signBytes(hexStringMessage, secretPhrase)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Hex String&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Verify&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.verifySignature(hexSignature, hexStringMessage, hexPublicKey, callback)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Encrypt&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.encryptNote(), NRS.encryptData() – see test.nrs.encryption.js&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;encrypted message, nonce&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Decrypt&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;NRS.decryptNote(), NRS.decryptData() - see test.nrs.encryption.js&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Decrypted message, shared key&amp;lt;/code&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| &amp;#039;&amp;#039;Sha256&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;CryptoJS.algo.SHA256.create(), update(), finalize()&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;word array&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Compress&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;pako.gzip(new Uint8Array(bytes))&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;byte array&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;Uncompress&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;lt;code&amp;gt;pako.inflate(new Uint8Array(bytes))&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;byte array&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Useful Constants&amp;#039;&amp;#039;&amp;#039; see &amp;lt;code&amp;gt;nrs.constants.js&amp;lt;/code&amp;gt; class &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Reading account settings&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;code&amp;gt;NRS.settings[&amp;lt;setting name&amp;gt;]&amp;lt;/code&amp;gt; - account specific&lt;br /&gt;
&amp;lt;code&amp;gt;NRS.mobileSettings[&amp;lt;setting name&amp;gt;]&amp;lt;/code&amp;gt; - device specific&lt;br /&gt;
&amp;lt;/accordion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==General Notes== &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
===Flexible Account IDs=== &lt;br /&gt;
All API requests that require an account ID accept either an account number or the corresponding [[RS_Address_Format|Reed-Solomon address]].&lt;br /&gt;
&lt;br /&gt;
===Quantity Units amountNQT, QNT and priceNQTPer(Share, Coin, Unit, etc.)=== &amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
The Ardor system is defined relative to a whole unit of the holding being transactioned. The parent chain ARDOR has a currency ARDR used to quantify value of forging in the system. Like all currencies, ARDR circulates in the system, moving from one user to another by transfers. Also, a small fee is required for every transaction, including those in which no ARDR is transferred, such as simple messages when using a child chain. This fee goes to the owner of the node that forges (generates) the new block containing the transaction that is accepted onto the blockchain, and the bundlers get the child chain fees and pay the ARDR fees to the forgers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
One billion ARDR were distributed during the snapshot, and no new ARDR will ever be created. ARDR is divisible to eight decimal places. Yet internally, the currency is still stored in integer form in units of amountNQT, where 1 ARDR = 10&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt; amountNQT. All parameters and fields in the API involving a quantity of a token are denominated in units of amountNQT, for example &amp;#039;&amp;#039;feeNQT&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
The Ardor system can be thought of as an asset owned by all who possess ARDR. In this sense, ARDR quantifies ownership of or stake in the system. Stakeholders are entitled to forge blocks and collect transaction fees in proportion to the amount of ARDR they possess.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
Other assets can be created within ARDR using [[Asset_Exchange#Issue_Asset|Issue Asset]] within a child chain (eg Ignis). The issuer must specify the number of decimal places to use in quantifying the asset, and the amount of the asset to create in generic units of QNT or Quant. Quantities of assets are stored internally as integers in units of QNT, and assets are priced at priceNQTper(Share, Coin, Unit, etc.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
For example, an ABTC (it represents Bitcoin) asset is divisible to eight decimal places, like the original bitcoin (BTC). Therefore a QNT of ABTC is equivalent to a Satoshi (10&amp;lt;sup&amp;gt;-8&amp;lt;/sup&amp;gt; BTC). To place an order to sell 25,000,000 QNT of the ABTC asset at a price of 20,000 priceNQTperShare, use the API Call [[Asset_Exchange#Place_Order|Place Order]] with &amp;#039;&amp;#039;requestType&amp;#039;&amp;#039;=&amp;#039;&amp;#039;placeAskOrder&amp;#039;&amp;#039;, &amp;#039;&amp;#039;quantityQNT&amp;#039;&amp;#039;=25000000 and &amp;#039;&amp;#039;priceNQTPerShare&amp;#039;&amp;#039;=20000 in the chain Ignis. If the entire quantity is sold on the Asset Exchange, the seller will receive 500,000,000,000 NQT (&amp;#039;&amp;#039;quantityQNT&amp;#039;&amp;#039; * &amp;#039;&amp;#039;priceNQT&amp;#039;&amp;#039;) from the buyer(s). This trade corresponds to selling 0.25 ABTC for 5,000 IGNIS, which is how the trade appears in the [[Ardor_client_interface|NRS client]]. In this case, the price of 20,000 in priceNQTperShare is also the price in Ignis per ABTC, since both ABTC and Ignis are divisible to eight decimal places.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Currencies in the Ardor [[Monetary_System#Monetary_System_Operations|Monetary System]] are a special kind of asset with properties and exchange methods suitable for currencies. Concerning quantities, exchange rates, and decimal places, the Monetary System API calls use amountNQT, QNT, and priceNQTPer(Share, Coin, Unit, etc.) in the same way as assets.&lt;br /&gt;
&lt;br /&gt;
===Creating Unsigned Transactions=== &amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
All API requests that create a new transaction will accept either a &amp;#039;&amp;#039;secretPhrase&amp;#039;&amp;#039; or a &amp;#039;&amp;#039;publicKey&amp;#039;&amp;#039; parameter:&lt;br /&gt;
*If &amp;#039;&amp;#039;secretPhrase&amp;#039;&amp;#039; is supplied, a transaction is created, signed at the server, and broadcast by the server as usual.&lt;br /&gt;
*If only a &amp;#039;&amp;#039;publicKey&amp;#039;&amp;#039; parameter is supplied as a 64-digit (32-byte) hex string, the transaction will be prepared by the server and returned in the JSON response as &amp;#039;&amp;#039;transactionJSON&amp;#039;&amp;#039; without a signature. This JSON object along with &amp;#039;&amp;#039;secretPhrase&amp;#039;&amp;#039; can then be supplied to [[Transactions#Sign_Transaction|Sign Transaction]] as &amp;#039;&amp;#039;unsignedTransactionJSON&amp;#039;&amp;#039; and the resulting signed &amp;#039;&amp;#039;transactionJSON&amp;#039;&amp;#039; can then be supplied to [[Transactions#Broadcast_Transaction|Broadcast Transaction]]. This sequence allows for offline signing of transactions so that &amp;#039;&amp;#039;secretPhrase&amp;#039;&amp;#039; never needs to be exposed.&lt;br /&gt;
*&amp;#039;&amp;#039;unsignedTransactionBytes&amp;#039;&amp;#039; may be used instead of unsigned &amp;#039;&amp;#039;transactionJSON&amp;#039;&amp;#039; when there is no encrypted message. Messages to be encrypted require the &amp;#039;&amp;#039;secretPhrase&amp;#039;&amp;#039; for encryption and so cannot be included in &amp;#039;&amp;#039;unsignedTransactionBytes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
===Escrow Operations=== &amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
All API requests that create a new transaction will accept an optional &amp;#039;&amp;#039;referencedTransactionFullHash&amp;#039;&amp;#039; parameter which creates a chained transaction, meaning that the new transaction cannot be confirmed unless the referenced transaction is also confirmed. This feature allows a simple way of transaction escrow:&lt;br /&gt;
*Alice prepares and signs a transaction A, but doesn&amp;#039;t broadcast it by setting the &amp;#039;&amp;#039;broadcast&amp;#039;&amp;#039; parameter to &amp;#039;&amp;#039;false&amp;#039;&amp;#039;. She sends to Bob the &amp;#039;&amp;#039;unsignedTransactionBytes&amp;#039;&amp;#039;, the &amp;#039;&amp;#039;fullHash&amp;#039;&amp;#039; of the transaction, and the &amp;#039;&amp;#039;signatureHash&amp;#039;&amp;#039;. All of those are included in the JSON returned by the API request. (Warning: make sure not to send the signed &amp;#039;&amp;#039;transactionBytes&amp;#039;&amp;#039;, or the &amp;#039;&amp;#039;signature&amp;#039;&amp;#039; itself, as then Bob can just broadcast transaction A himself).&lt;br /&gt;
*Bob prepares, signs, and broadcasts transaction B, setting the &amp;#039;&amp;#039;referencedTransactionFullHash&amp;#039;&amp;#039; parameter to the &amp;#039;&amp;#039;fullHash&amp;#039;&amp;#039; of A provided by Alice. He can verify that this hash indeed belongs to the transaction he expects from Alice, by using [[Transactions#Calculate_Full_Hash|Calculate Full Hash]], which takes &amp;#039;&amp;#039;unsignedTransactionBytes&amp;#039;&amp;#039; and &amp;#039;&amp;#039;signatureHash&amp;#039;&amp;#039; (both of which Alice has also sent to Bob). He can also use [[Transactions#Parse_Transaction|Parse Transaction]] to decode the unsigned bytes and inspect all transaction fields.&lt;br /&gt;
*Transaction B is accepted in the unconfirmed transaction pool, but as long as A is still missing, B will not be confirmed, i.e. will not be included in the blockchain. If A is never submitted, B will eventually expire -- so Bob should make sure to set a long enough deadline, such as the maximum of 32767 minutes.&lt;br /&gt;
*Once in the unconfirmed transactions pool, Bob has no way of recalling B back. So now Alice can safely submit her transaction A, by just broadcasting the &amp;#039;&amp;#039;signedTransactionBytes&amp;#039;&amp;#039; she got in the first step. Transaction A will get included in the blockchain first, and in the next block, Bob&amp;#039;s transaction B will also be included.&lt;br /&gt;
Note that while the above scheme is good enough for a simple escrow, the blockchain does not enforce that if A is included, B will also be included. It may happen due to forks and blockchain reorganization, that B never gets a chance to be included and expires unconfirmed, while A remains in the blockchain. However, it is not practically possible for Bob to intentionally cause such chain of events and to prevent B from being confirmed.&lt;br /&gt;
&lt;br /&gt;
===Prunable Data=== &amp;lt;!--T:27--&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
Prunable data can be removed from the blockchain without affecting the integrity of the blockchain. When a transaction containing prunable data is created, only the 32-byte sha256 hash of the prunable data is included in the &amp;#039;&amp;#039;transactionBytes&amp;#039;&amp;#039;, not the prunable data itself. The non-prunable signed &amp;#039;&amp;#039;transactionBytes&amp;#039;&amp;#039; are used to verify the signature and to generate the transaction&amp;#039;s &amp;#039;&amp;#039;fullHash&amp;#039;&amp;#039; and ID; when the prunable part of the transaction is removed at a later time, none of these operations are affected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
Prunable data has a predetermined minimum lifetime of two weeks (24 hours on the [[Testnet]]) from the timestamp of the transaction. Transactions and blocks received from peer nodes are not accepted if prunable data is missing before this time has elapsed. After this time has elapsed, prunable data is no longer included with transactions and blocks transmitted to peer nodes, and is no longer included in the transaction JSON returned by general-purpose API calls such as Get Transaction; the only way to retrieve it, if still available, is through special-purpose API calls such as Get Prunable Message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
Expired prunable data remains stored in the blockchain until removed at the same time derived tables are trimmed, which occurs automatically every 1000 blocks by default. Use [[Debug#Trim_Derived_Tables|Trim Derived Tables]] to remove expired prunable data immediately.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
Prunable data can be preserved on a node beyond the predetermined minimum lifetime by setting the &amp;#039;&amp;#039;nxt.maxPrunableLifetime&amp;#039;&amp;#039; property to a larger value than two weeks or to &amp;#039;&amp;#039;-1&amp;#039;&amp;#039; to preserve it indefinitely. To force the node to include such preserved prunable data when transactions and blocks are transmitted to peer nodes, set the &amp;#039;&amp;#039;nxt.includeExpiredPrunables&amp;#039;&amp;#039; property to &amp;#039;&amp;#039;true&amp;#039;&amp;#039;, thus making it an archival node.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
Currently, there are two varieties of prunable data in the Nxt system: prunable [[Messages#Arbitrary_Message_System_Operations|Arbitrary Messages]] and [[Tagged_Data#Tagged_Data_Operations|Tagged Data]]. Both varieties have a maximum prunable data length of 42 kilobytes.&lt;br /&gt;
&lt;br /&gt;
===Properties Files=== &amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
The behavior of some API calls is affected by property settings loaded from files in the &amp;#039;&amp;#039;ardor/conf&amp;#039;&amp;#039; directory during Ardor server initialization. This directory contains the &amp;#039;&amp;#039;nxt-default.properties&amp;#039;&amp;#039; and &amp;#039;&amp;#039;logging-default.properties&amp;#039;&amp;#039; files, both of which contain default property settings along with documentation. A few of the property settings can be obtained while the server is running through the [[Server_info#Get_Blockchain_Status|Get Blockchain Status]] and [[Server_info#Get_State|Get State]] calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
It is recommended not to modify default properties files because they can be overwritten during software updates. Instead, properties in the default files can be overridden by including them in optional &amp;#039;&amp;#039;nxt.properties&amp;#039;&amp;#039; and &amp;#039;&amp;#039;logging.properties&amp;#039;&amp;#039; files in the same directory. For example, a &amp;#039;&amp;#039;nxt.properties&amp;#039;&amp;#039; file can be created with the contents:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
nxt.isTestnet=true&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
This causes the Ardor server to connect to the [[Testnet]] instead of the Mainnet.&lt;br /&gt;
&lt;br /&gt;
===Admin Password=== &amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
The admin password protects the node from malicious external access. It is not related to your passphrase or seed, your account id nor your public key.&lt;br /&gt;
Some API functions take an adminPassword parameter, which must match the nxt.adminPassword property unless the nxt.disableAdminPassword property is set to true or the API server only listens on the localhost interface (when the nxt.apiServerHost property is set to 127.0.0.1).&lt;br /&gt;
&lt;br /&gt;
====How to setup the Admin Password====&lt;br /&gt;
The setup is done in the node &amp;lt;code&amp;gt;nxt.properties&amp;lt;/code&amp;gt; [[Faq#Node_configuration_using_the_nxt.properties|configuration file]]:&lt;br /&gt;
# Password that should be provided when executing protected (administrative) API requests.&lt;br /&gt;
# Please choose a decent password here. Preferably, use a password generator.&lt;br /&gt;
# Password protection is disabled and password is not needed when the API server only listens on the localhost interface, i.e. when &amp;lt;code&amp;gt;nxt.apiServerHost=127.0.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
# Add the &amp;lt;code&amp;gt;nxt.adminPassword=&amp;lt;type here the password&amp;gt;&amp;lt;/code&amp;gt; entry&lt;br /&gt;
# Restart the node&lt;br /&gt;
&lt;br /&gt;
The same value specified in nxt.adminPassword should be passed when calling any API which accepts adminPassword as parameter. When loading the wallet from a remote node enter this value in the account settings page &amp;quot;Administrator Password&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
==== Operations that require Admin Password ==== &amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
The admin password is required for the following operations (partial list) &lt;br /&gt;
# For any query API such as getBlockchainTransactions to return more than 100 records &lt;br /&gt;
# Get and stop APIs for forging, bundling, funding monitor, and shuffler &lt;br /&gt;
# Access to the /dbshell page to execute SQL queries &lt;br /&gt;
# Various administrative APIs: All [[Debug#Debug_Operations|Debug Operations]] require adminPassword since they require some kind of privilege. On some functions, adminPassword is used to override the maximum allowed value for the lastIndex parameter, which is set to 100 by default by the nxt.maxAPIRecords property. Giving you the option to retrieve more than objects per request.&lt;br /&gt;
&lt;br /&gt;
==== Admin Password API responses ====&lt;br /&gt;
API response errors and their meaning, as follows:&lt;br /&gt;
* &amp;quot;Administrator&amp;#039;s password is not configured. Please set nxt.adminPassword&amp;quot; - you need to configure the admin password on the remote node. &lt;br /&gt;
* &amp;quot;adminPassword not specified&amp;quot; - password is configured on the remote node but is not specified by the API call &lt;br /&gt;
* &amp;quot;Incorrect adminPassword (the specified password does not match nxt.adminPassword)&amp;quot; - the password specified did not match the remote node password &lt;br /&gt;
* &amp;quot;Too many incorrect admin password attempts from ...&amp;quot; - you specified too many incorrect password attempts&lt;br /&gt;
&lt;br /&gt;
===Roaming and Light Client Modes=== &amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
The remote node to use when in roaming and light client modes is selected randomly, but can be changed manually in the UI, or using the new [[Networking#Set_API_Proxy_Peer|set API Proxy Peer]] API, or forced to a specific peer using the &amp;#039;&amp;#039;nxt.forceAPIProxyServerURL&amp;#039;&amp;#039; property.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
Remote nodes can be blacklisted from the UI, or using the [[Networking#Blacklist_API_Proxy_Peer|Blacklist API Proxy Peer]] API. This blacklisting is independent of peer blacklisting. The API proxy blacklisting period can be set using the &amp;#039;&amp;#039;nxt.apiProxyBlacklistingPeriod&amp;#039;&amp;#039; property (default 1800000 milliseconds).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
API requests that require sending the secret phrase, shared key, or admin password to the server, for features like forging, shuffling, or running a funding monitor, are disabled when in roaming or light client mode.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Almonte</name></author>
	</entry>
</feed>