<?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=Node_JS_module</id>
	<title>Node JS module - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://betaardordocs.jelurida.com/index.php?action=history&amp;feed=atom&amp;title=Node_JS_module"/>
	<link rel="alternate" type="text/html" href="https://betaardordocs.jelurida.com/index.php?title=Node_JS_module&amp;action=history"/>
	<updated>2026-05-14T18:12:25Z</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=Node_JS_module&amp;diff=12883&amp;oldid=prev</id>
		<title>Almonte: Removed the limitations as the packaged is already deployed to NPM</title>
		<link rel="alternate" type="text/html" href="https://betaardordocs.jelurida.com/index.php?title=Node_JS_module&amp;diff=12883&amp;oldid=prev"/>
		<updated>2021-05-18T12:13:49Z</updated>

		<summary type="html">&lt;p&gt;Removed the limitations as the packaged is already deployed to NPM&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;
&amp;lt;translate&amp;gt;&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Node JS module Ardor&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, tutorials, advanced tutorials, how to, Node JS module&lt;br /&gt;
|description=Guide for the Node JS module which can be used for JavaScript application development using the Ardor platform APIs. &lt;br /&gt;
}}&lt;br /&gt;
[[Category:Advanced_guides]]&lt;br /&gt;
__TOC__&lt;br /&gt;
==Introduction== &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Existing client API library for Ardor suffer from the following limitations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
#The API library sends the passphrase directly to the remote node in order to sign transactions, this means that the remote node has to be trusted which limits the usability of the API library.&lt;br /&gt;
#Some client libraries does implement local transaction signing but still were unable to validate unsigned bytes data returned from a random remote node thus still making it somewhat insecure to submit transactions to a random remote node.&lt;br /&gt;
#Client API libraries are developed by 3rd party developers so sometimes lag behind recent changes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
To address these problems we introduced a simple Node JS module which can be used for JavaScript application development using the Ardor platform APIs. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
This node JS module is now integral part of the core. It is wrapper of the existing Ardor Wallet JavaScript code configured as a node JS module.&lt;br /&gt;
&lt;br /&gt;
The official Ardor NPM package link is the following https://www.npmjs.com/package/ardor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Use Cases== &amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
#The Node JS module is able to work securely against any random Ardor node without trusting the node.&lt;br /&gt;
#When submitting a transaction, data submitted to a remote node is validated against the returned unsigned bytes.&lt;br /&gt;
#Transactions are signed locally so that the account passphrase is never submitted to a remote node.&lt;br /&gt;
#Message encrytption can be performed client side.&lt;br /&gt;
#API calls work at a higher level compared to the APIs provided by the existing test page, so that for example, complex numeric conversions and various formatting functions are already implemented by the API library.&lt;br /&gt;
#Updates to this API library will follow the standard Ardor release process and will be maintained by core developers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Getting Started== &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
To quickly get started using the node JS module, see instructions for [[Node_JS_module#Setup using Ardor installation|Setup using Ardor installation]] or the setup using the official [https://www.npmjs.com/package/ardor NPM Ardor package]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setup using NPM ===&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;npm i ardor&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;echo n | copy /-y node_modules\ardor\sample\*.* *.*&amp;lt;/code&amp;gt; - copy the Ardor samples without overwriting existing files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setup using Ardor installation ===&lt;br /&gt;
&lt;br /&gt;
* Install the Ardor software (no need to download the blockchain)&lt;br /&gt;
* Install Node JS and NPM from [https://nodejs.org nodejs.org]&lt;br /&gt;
*Open a command prompt&lt;br /&gt;
* Navigate to the Ardor installation folder&lt;br /&gt;
**&amp;lt;code&amp;gt;cd html/www/js&amp;lt;/code&amp;gt; - make sure the folder has write permissions&lt;br /&gt;
**&amp;lt;code&amp;gt;npm install&amp;lt;/code&amp;gt;&lt;br /&gt;
**&amp;lt;code&amp;gt;cd sample&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Run Examples ==&lt;br /&gt;
&lt;br /&gt;
* Configure the remote node, Ardor account and default chain by editing the &amp;lt;code&amp;gt;config.json&amp;lt;/code&amp;gt; file&lt;br /&gt;
* Invoke any of the available samples using node, for example &amp;lt;code&amp;gt;node send.money.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Packaging and Distribution ==&lt;br /&gt;
&lt;br /&gt;
If installed from Ardor installation, the Ardor package no longer depends on a local Ardor node.&lt;br /&gt;
You can use the content of the &amp;lt;code&amp;gt;html/www/js&amp;lt;/code&amp;gt; folder as a standalone module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Warning ==&lt;br /&gt;
&lt;br /&gt;
Your passphrase or private key are submitted to a remote node only when invoking specific APIs which require them to operate like the startForging API.&lt;br /&gt;
&lt;br /&gt;
We recommend that you avoid using these APIs in your scripts when connecting to an untrusted remote node.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Almonte</name></author>
	</entry>
</feed>