> ## Documentation Index
> Fetch the complete documentation index at: https://primev-24-validator-dashboard-intro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Provider API

## **Providers**

Execution providers can use the `provider` role to run their nodes. This allows them to receive signed bids and issue commitments for execution.
The **Provider RPC API** allows providers to receive signed bids that are being propagated in the network.
Once they get a bid, they'll need to communicate with the mev-commit node to **Accept**.
Accepted bids result in the mev-commit node sending a signed commitment to the p2p network.

The Provider API is implemented using the gRPC framework, supporting two primary operations:

* **Receiving Bids:** Providers receive streaming bids from the mev-commit node.
* **Sending Processed Bids:** Providers send information about processed bids back to the mev-commit node.

### **RPC API Details**

The protobuf file is available in the [repository](https://github.com/primev/mev-commit/blob/v0.1.2-rc4/rpc/providerapi/v1/providerapi.proto).
The Go client has already been generated in the repository. To generate the RPC client for other languages, please follow the instructions
in the [gRPC documentation](https://grpc.io/docs/languages/).

**Primary RPC Operations:**

```protobuf
// ReceiveBids is called by the execution provider to receive bids from the mev-commit node.
// The mev-commit node will stream bids to the execution provider.
rpc ReceiveBids(EmptyMessage) returns (stream Bid) {}

// SendProcessedBids is called by the provider to send processed bids to the mev-commit node.
// The execution provider will stream processed bids to the mev-commit node.
rpc SendProcessedBids(stream BidResponse) returns (EmptyMessage) {}
```

**Message Structures**

```protobuf
message Bid {  string txn_hash = 1;  int64 bid_amt = 2;  int64 block_number = 3;  bytes bid_hash = 4;}; message BidResponse {  bytes bid_hash = 1;  enum Status {    STATUS_UNSPECIFIED = 0;    STATUS_ACCEPTED = 1;    STATUS_REJECTED = 2;  }  Status status = 2;};
```

### **HTTP API**

The same API is also available on the HTTP port configured on the node. Please review the [API docs](/api-reference/provider/receivebids) to understand the usage.

An [example client](https://github.com/primev/mev-commit/tree/main/examples/provideremulator) is implemented in the repository. This example showcases how to integrate a client into the provider's operational framework. While the sample client automatically accepts every incoming bid, providers should incorporate their own decision-making logic to evaluate and respond to these bids.
