The reference implementation of Nostr NIP-55.
NIP-55 defines a protocol for sending and receiving JSON-RPC 2.0 requests and responses over Unix domain sockets (UDS).
Rust reference implementation of Nostr NIP-55
The current state of single req/res and batch req/res is a bit messy. It probably makes the most sense to treat single req/res as batch req/res as far down in the stack as possible (i.e. close to the raw UDS level). I don't see any reason why servers would want to distinguish between a single request and a batch request with one element.
Option 3 described here
Serde provides a StreamDeserializer
struct that should make this fairly trivial at the transport level. The server and client would each pass their UnixStream
into a StreamDeserializer
(I believe they'd each need to use a SyncIoBridge
in between) to create an Iter<serde_json::Value>
of incoming requests. The server can simply expose this iterator in its API along with a function where a response can be passed in and sent to the client. However, the client will need to keep track of in-flight requests so it knows where to route responses. This will likely be the most complex part.
According to the JSON-RPC 2.0 spec, notifications are requests that don't contain any id
value. Currently we don't even treat a request without an id
as valid. We should properly deserialize notifications and treat them as first-class citizens.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.