
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
node-jsonrpc-client
Advanced tools
A really, really simple JSON-RPC 2.0 client.
npm install --save node-jsonrpc-client
# Or
yarn add node-jsonrpc-client
const { JsonRpc } = require("node-jsonrpc-client");
// Our API server is at http://example.org/api
const client = new JsonRpc("http://example.org/api");
// Let's call the 'saySomething' method that takes two parameters, 'to' and 'message'
client.call("saySomething", { to: "Alice", message: "Hi, Bob!" })
.then((result) => {
// The 'saySomething' method has a field 'output'
console.log("output", result.output);
})
.catch((err) => {
// oops, something went wrong!
console.error("Oops! Error code " + err.code + ": " + err.message);
});
If the API is using a cookie to keep track of the session, you can use setUseCookies(true)
:
const { JsonRpc } = require("node-jsonrpc-client");
const CookieJar = require('tough-cookie')
const cookieJar = new CookieJar()
// Our API server is at http://example.org/api
const client = new JsonRpc("http://example.org/api");
// Let's call the 'login' method that takes two parameters, 'username' and 'password'
client.call("login", { username: "alice", password: "monkey" }, cookieJar)
.then((loginResult) => {
// The 'getMessages' method has a field 'messages' and requires the cookie from login
client.call("getMessages", {}, cookieJar).then((msgResult) => {
console.log("Messages: ", result.messages);
});
})
.catch((err) => {
// oops, something went wrong!
console.error("Oops! Error code " + err.code + ": " + err.message);
});
FAQs
A lightweight JSON-RPC 2.0 client
The npm package node-jsonrpc-client receives a total of 174 weekly downloads. As such, node-jsonrpc-client popularity was classified as not popular.
We found that node-jsonrpc-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.