🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@cicara/jsonrpc-client

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cicara/jsonrpc-client

a json-rpc client with multiple transports for browser

1.0.2
latest
Source
npm
Version published
Maintainers
1
Created
Source

JSON RPC Client

This repository is a fork of https://github.com/open-rpc/client-js.

A JSON-RPC client with multiple transports for browser.

  • EventEmitter
  • HTTP/HTTPS
  • WebSocket
  • PostMessageWindow
  • PostMessageIframe
import { Client, RequestManager, WebSocketTransport } from "@cicara/jsonrpc-client";

const transport = new WebSocketTransport("ws://127.0.0.1:2087");
const client = new Client(new RequestManager([transport]));

async function main() {
  const result = await client.request({ method: "abc", params: {} });
  console.log(result);
}

main()
  .catch((err) => console.error(err))
  .finally(() => client.close());

Keywords

jsonrpc

FAQs

Package last updated on 12 Jun 2024

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