Scala RPC Daemon and RPC Wallet Javascript Library

Javascript library to interact with RPC Daemon and RPC Wallet.
All requests are queued. Most functions are async.
Since version 0.2.0 the RPCDaemon and RPCWallet objects are created using a factory function instead of declaring the object with "new".
There is no need to connect and disconnect the underlying socket anymore.
The library supports HTTP, HTTPS and digest authentication.
The library use an axios interceptor to implement digest authentication.
Digest authentication is activated as soon as a username and a password is supplied during object creation.
Once initialized simply use the query functions.
RPCDaemon without Digest Authentication
Please refer to the documentation and look at the unit tests.
const rpcDaemon = require('scala-rpc-js').RPCDaemon
const daemonClient = rpcDaemon.createDaemonClient({
url: 'http://127.0.0.1:39994'
})
daemonClient.sslRejectUnauthorized(false)
RPCDaemon with Digest Authentication
Please refer to the documentation and look at the unit tests.
const rpcDaemon = require('scala-rpc-js').RPCDaemon
const daemonClient = rpcDaemon.createDaemonClient({
url: 'http://127.0.0.1:39994',
username: 'user',
password: 'pass'
})
daemonClient.sslRejectUnauthorized(false)
RPCWallet without Digest Authentication
Please refer to the documentation and look at the unit tests.
const rpcWallet = require('scala-rpc-js').RPCWallet
const walletClient = rpcWallet.createWalletClient({
url: 'http://127.0.0.1:20000'
})
walletClient.sslRejectUnauthorized(false)
RPCWallet with Digest Authentication
Please refer to the documentation and look at the unit tests.
const rpcWallet = require('scala-rpc-js').RPCWallet
const walletClient = rpcWallet.createWalletClient({
url: 'http://127.0.0.1:20000',
username: 'user',
password: 'pass'
})
walletClient.sslRejectUnauthorized(false)
Generate JSDoc documentation
npm run generate-docs
Get unit tests list
npm test