New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

scala-rpc-js

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scala-rpc-js

Scala RPC Daemon and RPC Wallet Javascript Library

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by150%
Maintainers
0
Weekly downloads
 
Created
Source

Scala RPC Daemon and RPC Wallet Javascript Library

NPM

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'
})
// When using a self signed certificate with HTTPS you need to set the function sslRejectUnauthorized to false.
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'
})
// When using a self signed certificate with HTTPS you need to set the function sslRejectUnauthorized to false.
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'
})
// When using a self signed certificate with HTTPS you need to set the function sslRejectUnauthorized to false.
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'
})
// When using a self signed certificate with HTTPS you need to set the function sslRejectUnauthorized to false.
walletClient.sslRejectUnauthorized(false)

Generate JSDoc documentation

npm run generate-docs

Get unit tests list

npm test

Keywords

FAQs

Package last updated on 20 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc