Javascript library to interact with RPC Daemon and RPC Wallet.
All requests are queued. Most functions are async.
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.
Please refer to the documentation and look at the unit tests.
const rpcDaemon = require('@xolentum/xolentum-rpc').RPCDaemon
const daemonClient = rpcDaemon.createDaemonClient({
url: 'http://127.0.0.1:13580'
})
// When using a self signed certificate with HTTPS you need to set the function sslRejectUnauthorized to false.
daemonClient.sslRejectUnauthorized(false)
Please refer to the documentation and look at the unit tests.
const rpcDaemon = require('@xolentum/xolentum-rpc').RPCDaemon
const daemonClient = rpcDaemon.createDaemonClient({
url: 'http://127.0.0.1:13580',
username: 'user',
password: 'pass'
})
// When using a self signed certificate with HTTPS you need to set the function sslRejectUnauthorized to false.
daemonClient.sslRejectUnauthorized(false)
Please refer to the documentation and look at the unit tests.
const rpcWallet = require('@xolentum/xolentum-rpc').RPCWallet
const walletClient = rpcWallet.createWalletClient({
url: 'http://127.0.0.1:20000'
})
// When using a self signed certificate with HTTPS you need to set the function sslRejectUnauthorized to false.
walletClient.sslRejectUnauthorized(false)
Please refer to the documentation and look at the unit tests.
const rpcWallet = require('@xolentum/xolentum-rpc').RPCWallet
const walletClient = rpcWallet.createWalletClient({
url: 'http://127.0.0.1:20000',
username: 'user',
password: 'pass'
})
// When using a self signed certificate with HTTPS you need to set the function sslRejectUnauthorized to false.
walletClient.sslRejectUnauthorized(false)
npm run generate-docs
npm test
Copyright (c) 2020, The Xolentum Project
Copyright (c) 2019, The ArQmA Network