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

Add Cardano RPC command #4810

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mesudip
Copy link

@mesudip mesudip commented Jan 19, 2023

I have added a JSON-RPC client feature to cardano-cli that allows making RPC calls to any backend. The client uses the network.http.simple library for sending HTTP requests and aeson for parsing JSON responses.

The RPC methods are not yet decided, so the client currently supports any method specified in the request. The standard for the methods can be added later, once the specification for the RPC is created. Additionally, validation of methods can also be added later to ensure they conform to the specified standard.

$ cardano-cli rpc --help
Usage: cardano-cli rpc [--url ARG]
            [-u|--user ARG]
            [-H|--header ARG]
            method
            [argument]

  Call cardano rpc over network

Available options:
  --url ARG                Rpc Address (default: "http://localhost:3345")
  -u,--user ARG            Basic auth "User:Password"
  -H,--header ARG          Rpc extra HTTP headers "HeaderName:HeaderValue"
  method                   Json RPC method
  argument                 RPC method arguments
  -h,--help                Show this help text

Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I need to discuss with @newhoggy and @MarcFontaine if cardano-cli is the best place for RPC calls.

@disassembler disassembler requested a review from a team as a code owner June 17, 2024 09:33
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

Successfully merging this pull request may close these issues.

2 participants