Sample Ardor APIs for Node JS
What's new?This release is compatible with the Ardor 2.3.4 APIs.
The Node JS module performs local signing and encryption using the same code used by the official Ardor wallet.
- Your passphrase, seed or private key are never submitted to the remote node when submitting a transaction.
- Transaction bytes returned by the remote node are parsed and validated against the submitted data.
Setup using NPM
npm i ardor
echo n | copy /-y node_modules\ardor\sample\*.* *.*- copy the Ardor samples without overwriting existing files
Setup using Ardor installationInstall the Ardor software (no need to download the blockchain)
Install Node JS and NPM from https://nodejs.org
Open a command prompt
Navigate to the Ardor installation folder
cd html/www/js- make sure the folder has write permissions
Run ExamplesConfigure the remote node, Ardor account and default chain by editing the
Invoke any of the available samples using node, for example
Packaging and DistributionIf installed from Ardor installation, the Ardor package no longer depends on a local Ardor node.
You can use the content of the
html/www/jsfolder as a standalone module.
WarningYour passphrase or private key are submitted to a remote node only when invoking specific APIs which require them to operate like the startForging API.
We recommend that you avoid using these APIs in your scripts when connecting to an untrusted remote node.