Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

stdrpc

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stdrpc

ES6+ compatible, isomorphic JSON-RPC module for node and the browser.

Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
9
80%
Maintainers
1
Weekly downloads
 
Created
Source

stdrpc

ES6+ compatible, isomorphic JSON-RPC module for node and the browser.

  • Compatible with Bitcoin, Ethereum, Zcash, and many more.
  • Supports on-the-fly RPC methods using Proxies
  • Works in browser and in node
  • Very small codebase
  • Uses axios behind the scenes

Usage

const rpc = stdrpc("http://localhost:8332");

rpc.getbalance().then(balance => {
	// woo!
});

API

stdrpc(url [, options ])

Returns a proxied object, returning a function for every method.

options

methodTransform

A Function which all method names will be passed through.

// connecting to an ethereum node
const rpc = stdrpc("http://localhost:8545", {
	methodTransform: require("decamelize")
});

rpc.ethCoinbase() // becomes rpc.eth_coinbase()

FAQs

Package last updated on 25 Feb 2018

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