Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose the parts of jsonrpc_core_client necessary to create a custom transport #667

Open
phiresky opened this issue Mar 19, 2022 · 2 comments

Comments

@phiresky
Copy link

I've built a transport that allows jsonrpc-client to work in the browser with wasm, but I think it's impossible to create such a transport outside of jsonrpc_core_client crate because some of the types used to build the transports are not exposed.

This includes:

  • RpcMessage and all the variants
  • RequestBuilder.* (call_request etc)
  • probably others

It would be great if those types could be exposed to make it possible to create a custom transport

@shaggygi
Copy link

Not sure, but this might be something I'm also interested in. Early stages, but looking for a way to create custom transport like serial port. Understanding there are limitations like one way communications at a time, but okay with that. Thx.

@niklasad1
Copy link
Member

niklasad1 commented Apr 13, 2022

hey, I don't expect anyone to work on that in this repo however we already got similar functionality that you want in https://github.com/paritytech/jsonrpsee

basically you have to implement two traits Sender and Receiver for the transport.

however, feel free to open a PR for that in this repo anyway :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants