borderless / Json Rpc
Licence: mit
Tiny, type-safe JSON-RPC 2.0 implementation
Stars: β 18
Programming Languages
typescript
32286 projects
Labels
Projects that are alternatives of or similar to Json Rpc
node-jsonrpc2
JSON-RPC 2.0 server and client library, with HTTP (with Websocket support) and TCP endpoints
Stars: β 103 (+472.22%)
Mutual labels: json-rpc
Hyperf
π A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.
Stars: β 4,206 (+23266.67%)
Mutual labels: json-rpc
Oui
A modern web interface for OpenWrt implemented in vue.js and Lua.
Stars: β 594 (+3200%)
Mutual labels: json-rpc
web3j-scala
Lightweight and idiomatic Scala wrapper around Web3J for Ethereum.
Stars: β 75 (+316.67%)
Mutual labels: json-rpc
Joyrpc
high-performance, high-extensibility Java rpc framework.
Stars: β 290 (+1511.11%)
Mutual labels: json-rpc
Vs Streamjsonrpc
The StreamJsonRpc library offers JSON-RPC 2.0 over any .NET Stream, WebSocket, or Pipe. With bonus support for request cancellation, client proxy generation, and more.
Stars: β 421 (+2238.89%)
Mutual labels: json-rpc
laravel-bitcoinrpc
Bitcoin JSON-RPC Service Provider for Laravel.
Stars: β 83 (+361.11%)
Mutual labels: json-rpc
Delphimvcframework
DMVCFramework (for short) is a popular and powerful framework for web solution in Delphi. Supports RESTful and JSON-RPC APIs development.
Stars: β 761 (+4127.78%)
Mutual labels: json-rpc
Json Rpc
π JSON-RPC 1/2 transport implementation. Supports python 2/3 and pypy.
Stars: β 359 (+1894.44%)
Mutual labels: json-rpc
Getty
a netty like asynchronous network I/O library based on tcp/udp/websocket; a bidirectional RPC framework based on JSON/Protobuf; a microservice framework based on zookeeper/etcd
Stars: β 532 (+2855.56%)
Mutual labels: json-rpc
Web3swift
Elegant Web3js functionality in Swift. Native ABI parsing and smart contract interactions on Ethereum network.
Stars: β 462 (+2466.67%)
Mutual labels: json-rpc
Libjson Rpc Cpp
C++ framework for json-rpc (json remote procedure call)
Stars: β 653 (+3527.78%)
Mutual labels: json-rpc
scala-json-rpc
Let your servers and clients communicate over function calls! JSON-RPC 2.0 library for Scala and Scala.js
Stars: β 38 (+111.11%)
Mutual labels: json-rpc
Atom Languageclient
Language Server Protocol support for Atom (the basis of Atom-IDE)
Stars: β 385 (+2038.89%)
Mutual labels: json-rpc
Btc Rpc Explorer
Database-free, self-hosted Bitcoin explorer, via RPC to Bitcoin Core.
Stars: β 699 (+3783.33%)
Mutual labels: json-rpc
JSON RPC
Tiny, mostly compliant JSON-RPC 2.0 implementation.
This package intentionally doesn't implement the "arguments" form of request parameters. This is when the input params
can be an object or an ordered array representing the object. Instead, you can pass any JSON params over the wire.
Installation
npm install @borderlesslabs/json-rpc --save
Usage
This package makes no assumptions about the transportation layer, for client or server.
Methods
type Methods = {
hello: {
request: {};
response: string;
};
echo: {
request: { arg: string };
response: string;
};
};
Server
The server accepts a dictionary of resolvers.
import { createServer } from "@borderlesslabs/json-rpc";
const server = createServer<Methods>({
hello: _ => "Hello World!",
echo: ({ arg }) => arg
});
const res = await server({
jsonrpc: "2.0",
id: "test",
method: "hello"
}); //=> { jsonrpc: "2.0", id: "test", result: "Hello World!" }
Client
The client accepts a function to send
the JSON-RPC request.
import { createClient } from "@borderlesslabs/json-rpc";
const client = createClient(async payload => {
const res = await fetch("...", {
method: "POST",
body: JSON.stringify(payload),
headers: {
"Content-Type": "application/json"
}
});
return res.json();
});
const result = await client({
method: "hello",
params: {}
}); //=> "Hello World!"
const results = await client.many([
{
method: "hello",
params: {}
},
{
method: "echo",
params: { arg: "Test" }
}
]); //=> ["Hello World!", "Test"]
License
MIT
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].