{"id":18467168,"url":"https://github.com/draganm/rpcrequest","last_synced_at":"2025-05-05T16:33:58.994Z","repository":{"id":230295256,"uuid":"778800972","full_name":"draganm/rpcrequest","owner":"draganm","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-04T14:27:03.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T17:56:23.580Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/draganm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-28T12:37:30.000Z","updated_at":"2025-02-04T14:26:42.000Z","dependencies_parsed_at":"2025-02-16T17:50:29.514Z","dependency_job_id":null,"html_url":"https://github.com/draganm/rpcrequest","commit_stats":null,"previous_names":["draganm/rpcrequest"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draganm%2Frpcrequest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draganm%2Frpcrequest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draganm%2Frpcrequest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draganm%2Frpcrequest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/draganm","download_url":"https://codeload.github.com/draganm/rpcrequest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252533854,"owners_count":21763666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T09:19:06.222Z","updated_at":"2025-05-05T16:33:58.970Z","avatar_url":"https://github.com/draganm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RPCRequest\n\nRPCRequest is a versatile command-line utility designed for executing JSON-RPC (Remote Procedure Call) requests. \nWhile it's tailored for seamless interaction with Ethereum RPC endpoints, its flexible design makes it suitable for a wide range of JSON-RPC based services.\n\n## Features\n\n- **Ethereum RPC Support:** Optimized for Ethereum, facilitating direct command-line interactions with Ethereum nodes.\n- **Broad JSON-RPC Compatibility:** Use it with any JSON-RPC service, not just Ethereum Nodes.\n- **Environment Variable \u0026 Command Line URL Configuration:** Specify your RPC node URL through an environment variable or directly as a command-line argument.\n- **Basic Auth Support:** Easily pass basic authentication credentials within the URL for secure endpoints.\n- **Flexible Parameter Typing:** Convert string arguments to booleans, integers, or hex-encoded strings to meet various parameter requirements.\n\n## Getting Started\n\n### Installation\n\n\n#### Using Homebrew\n\n```bash\nbrew install draganm/tools/rpcrequest\n```\n\n#### Using `go install`\n\n```bash\ngo install github.com/draganm/rpcrequest\n```\n\n### Usage\n\nRPCRequest accepts the JSON-RPC method name and parameters as command-line arguments. \nThe first argument should always be the method name, followed by each parameter as a separate argument.\n\n#### Example Command\n\n```bash\nrpcrequest --node-url https://my-node/path eth_getBlockByNumber asHex:12345 bool:true\n```\n\n### Specifying the RPC Node\n\nYou can specify the RPC node URL in two ways:\n\n1. **Environment Variable:** Set the `NODE_URL` environment variable with your RPC node URL.\n2. **Command-Line Flag:** Use the `--node-url=\u003curl\u003e` flag to provide the URL directly in your command.\n\n### Authentication\n\nIf the RPC endpoint requires basic authentication, include the credentials directly in the URL as follows:\n\n```url\nhttps://username:password@hostname/path\n```\n\n### Converting to JSON Types\n\nRPCRequest can automatically convert string arguments into the required JSON types. Use the following prefixes to indicate the type:\n\n- `bool:` Converts the following value to a boolean (`true` or `false`).\n- `int:` Converts the following value to an integer.\n- `asHex:` Converts an integer value into a hex-encoded string prefixed with `0x`. This is particularly useful for Ethereum RPC parameters like block numbers.\n- `json:` Converts a JSON string into a JSON value. This is useful when RPC parameter is a data structure.\n\n## Contributing\n\nContributions are welcome, send your issues and PRs to this repo.\n\n## License\n\n[MIT](LICENCE) - Copyright Dragan Milic and contributors.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdraganm%2Frpcrequest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdraganm%2Frpcrequest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdraganm%2Frpcrequest/lists"}