Giter Club home page Giter Club logo

nip-55's Introduction

NIP-55

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).

nip-55's People

Contributors

tvolk131 avatar

Watchers

 avatar

nip-55's Issues

Cleanup JSON-RPC 2.0 batch request support

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.

Support pipelined requests/responses

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.

Support JSON-RPC 2.0 notifications

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.

  • Clients should be able to send notifications to a server and should automatically ignore/reject any notifications received back
  • Servers should parse incoming notifications and separate them out before passing them off to their handler

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.