{"id":20461307,"url":"https://github.com/prysmaticlabs/ethereumapis","last_synced_at":"2025-04-12T22:19:52.505Z","repository":{"id":48408356,"uuid":"192110043","full_name":"prysmaticlabs/ethereumapis","owner":"prysmaticlabs","description":"A collection of public Ethereum APIs.","archived":false,"fork":false,"pushed_at":"2025-01-27T20:09:12.000Z","size":3246,"stargazers_count":85,"open_issues_count":3,"forks_count":52,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-04T01:16:11.567Z","etag":null,"topics":["eth2","ethereum"],"latest_commit_sha":null,"homepage":"","language":"Starlark","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prysmaticlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-15T18:13:12.000Z","updated_at":"2025-03-31T22:08:14.000Z","dependencies_parsed_at":"2023-10-24T21:29:54.483Z","dependency_job_id":"3ba84947-c7dd-48ad-8fba-c1839219de14","html_url":"https://github.com/prysmaticlabs/ethereumapis","commit_stats":{"total_commits":372,"total_committers":20,"mean_commits":18.6,"dds":0.5,"last_synced_commit":"d3d4f76b6741f44d9ded042d348263e26ad8ee14"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prysmaticlabs%2Fethereumapis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prysmaticlabs%2Fethereumapis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prysmaticlabs%2Fethereumapis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prysmaticlabs%2Fethereumapis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prysmaticlabs","download_url":"https://codeload.github.com/prysmaticlabs/ethereumapis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248638217,"owners_count":21137629,"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":["eth2","ethereum"],"created_at":"2024-11-15T12:24:44.202Z","updated_at":"2025-04-12T22:19:52.465Z","avatar_url":"https://github.com/prysmaticlabs.png","language":"Starlark","funding_links":[],"categories":["Starlark"],"sub_categories":[],"readme":"# Ethereum APIs\n\n[![Build status](https://badge.buildkite.com/62be08099e9e228b165c2dba69c637eb9ca7a1ca95efd54b9f.svg?branch=master)](https://buildkite.com/prysmatic-labs/ethereum-apis)\n[![Discord](https://user-images.githubusercontent.com/7288322/34471967-1df7808a-efbb-11e7-9088-ed0b04151291.png)](https://discord.gg/prysmaticlabs)\n[![PyPI](https://img.shields.io/pypi/v/ethereumapis.svg)](https://pypi.org/project/ethereumapis/)\n\n\nThis repository hosts a **mirror** of [Prysm](https://github.com/prysmaticlabs/prysm/)'s service interface definitions for the Ethereum. These [protocol buffer](https://developers.google.com/protocol-buffers/) service definitions support [gRPC](https://grpc.io/) as well as JSON over HTTP.\n\n## Mirror details\n\nThis repository is a **mirror** of [github.com/prysmaticlabs/prysm/proto/eth](https://github.com/prysmaticlabs/prysm/tree/develop/proto/eth). This means changes and contributions to protobufs **ARE NOT** accepted in this repository and must instead be made in the source repository instead. This project is updated on every new release of Prysm.\n\n### Need assistance?\n\nFor general information on the functionality of gRPC and protocol buffers, see the [gRPC guide](https://grpc.io/docs/guides/). If you still have questions, feel free to stop by either our [Discord](https://discord.gg/prysmaticlabs) and a member of the team or our community will be happy to assist you.\n\n## Service definitions\n\n| Package | Service | Version | Description |\n| :--- | :--- | :--- | :--- |\n| eth | [BeaconChain](https://github.com/prysmaticlabs/ethereumapis/blob/master/eth/v1alpha1/beacon_chain.proto#L36) | v1alpha1 | This service is used to retrieve critical data relevant to the Ethereum proof-of-stake beacon chain, including the most recent head block, current pending deposits, the chain state and more. |\n| eth | [Node](https://github.com/prysmaticlabs/ethereumapis/blob/master/eth/v1alpha1/node.proto#L33) | v1alpha1 | The Node service returns information about the Ethereum beacon node itself, including versioning and general information as well as network sync status and a list of services currently implemented on the beacon node. |\n| eth | [Validator](https://github.com/prysmaticlabs/ethereumapis/blob/master/eth/v1alpha1/validator.proto) | v1alpha1 | This API provides the information a validator needs to retrieve throughout its life cycle, including assignments from the network, its current index in the state as well as the rewards and penalties that have been applied to it. |\n\n## Contributing\n\n\n### Dependencies\n\nHere's what you need to get started:\n\n- A modern, UNIX operating system\n- Go installed\n- The latest release of [protocol buffers](https://grpc.io/docs/protoc-installation/) installed (the protoc compiler)\n- The `cmake` package installed\n\n#### Installing and Building Go Stubs\n\nTo install the required dependencies for compiling the protocol buffers, run\n```text\nmake install\n```\n\nNext, to generate the Go stubs for the protocol buffers, run\n```text\nmake generate\n```\n\n#### Building Python stubs\n\nPython libraries can be generated using [`scripts/build-py-package.py`](https://github.com/prysmaticlabs/ethereumapis/blob/master/scripts/build-py-package.py).\n\n### Making API Schema Changes\n\nSay you want to add a new endpoint to the `BeaconChain` gRPC service in our API schema to retrieve orphaned blocks. Keep in mind making strict changes to the API schema can often times be difficult without a significant reason as this API is used by many different developers building on eth2. If you are confident in your desired changes, you can proceed by modifying the protobuf schema:\n\n```go\nservice BeaconChain {\n    // Retrieve orphaned blocks from the eth2 chain.\n    rpc GetOrphanedBlocks(OrphanedBlocksRequest) returns (OrphanedBlocksResponse) {\n        option (google.api.http) = {\n            get: \"/eth/v1alpha1/beacon/blocks/orphaned\"\n        };\n    }\n    ...\n}\n\nmessage OrphanedBlocksRequest {\n    uint64 slot = 1;\n}\n\nmessage OrphanedBlocksResponse {\n    repeated BeaconBlock blocks = 1;\n}\n```\n\nAfter making your changes, you can regenerate the Go libraries from the schema by running:\n\n```bash\nmake generate\n```\n\n## RESTful endpoints \\(gRPC Transcoding\\)\n\nAll of the gRPC services should define JSON over HTTP endpoints by specifying [HTTPRules](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto). Developers may choose to bundle a REST service of gRPC with their client implementation binaries, or alternatively, they may use a JSON encoding proxy such as [Envoy Proxy](https://www.envoyproxy.io/), [grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway), etc.\n\nFor more information on gRPC transcoding, see the examples found [here](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto#L45).\n\nCode sample:\n\n```text\nservice Messaging {\n    rpc GetMessage(GetMessageRequest) returns (Message) {\n        option (google.api.http) = {\n            get: \"/v1/{name=messages/*}\"\n        };\n    }\n}\nmessage GetMessageRequest {\n    string name = 1; // Mapped to URL Path.\n}\nmessage Message {\n    string text = 1; // The resource content.\n}\n```\n\nThis enables an HTTP REST to gRPC mapping, as shown below:\n\n| HTTP | gRPC |\n| :--- | :--- |\n| `GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")` |\n\n### gRPC tooling and resources\n\n* [Awesome gRPC](https://github.com/grpc-ecosystem/awesome-grpc)\n* [Google's API Style Guide](https://cloud.google.com/apis/design/)\n* [Language reference for protoc3](https://developers.google.com/protocol-buffers/docs/proto3)\n* [Protocol Buffer Basics: Go](https://developers.google.com/protocol-buffers/docs/gotutorial)\n* [Transcoding gRPC to JSON/HTTP using Envoy](https://blog.jdriven.com/2018/11/transcoding-grpc-to-http-json-using-envoy/)\n\n## License\n[Apache 2.0](https://github.com/prysmaticlabs/ethereumapis/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprysmaticlabs%2Fethereumapis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprysmaticlabs%2Fethereumapis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprysmaticlabs%2Fethereumapis/lists"}