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

Write spec for RPC Protocol #322

Open
yaymukund opened this issue Nov 15, 2021 · 3 comments
Open

Write spec for RPC Protocol #322

yaymukund opened this issue Nov 15, 2021 · 3 comments

Comments

@yaymukund
Copy link
Contributor

yaymukund commented Nov 15, 2021

We'd like to expose an RPC protocol that wallets can use to perform actions on behalf of the customer. This will require the customerd rearchitecture.

To close this issue, write out a spec that contains all the required functionality for the RPC requests and responses in a long-term accessible location (maybe the zkchannels-spec repo).

Closed questions (see comments)

  1. What kind of RPC? JSON-RPC might be easiest to integrate. Do wallets already use JSON-RPC for other things?
  2. Can we reach out to wallet developers directly for feedback?
@yaymukund
Copy link
Contributor Author

yaymukund commented Dec 1, 2021

Our requirements are straightforward - we just need to expose the CLI API as RPC commands - and most RPC protocols ought to support it. I think we should go with JSON-RPC because it has libraries [1] in most languages and is used by bitcoind [2] and Zcash [3], so wallet developers should be able to integrate it easily.

The API should mimic the CLI arguments we presently expose.

1: https://github.com/shanejonas/awesome-json-rpc
2: https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)
3: https://zcash.readthedocs.io/en/latest/rtd_pages/zig.html#zcash-integration-guide

@yaymukund
Copy link
Contributor Author

https://github.com/paritytech/jsonrpc looks like it's actively developed and might be a good fit for Zeekoe's use-case.

Questions:

  • Would adding paritytech/jsonrpc increase compile time?
  • Would you have to define the interface twice (once for the CLI once for JSON-RPC)? You could use a macro to avoid the duplication, but maybe there's a more elegant way to do it with a trait.

@marsella
Copy link
Contributor

See also: #191 (comment)

@marsella marsella mentioned this issue Jan 11, 2022
Closed
@marsella marsella changed the title RPC Protocol Write spec for RPC Protocol Jan 11, 2022
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

2 participants