> For the complete documentation index, see [llms.txt](https://docs.old-faithful.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.old-faithful.net/references/grpc-methods/examples.md).

# Examples

{% hint style="success" %}

### Token Optional

The `x-token` header is only required if you have enabled it in the configuration or you are accessing a hosted Old Faithful version that requires it.
{% endhint %}

{% hint style="warning" %}

## Protocol File

All `grpcurl` commands require the proto file to be passed. You can find it [here](https://raw.githubusercontent.com/rpcpool/yellowstone-faithful/refs/heads/main/old-faithful-proto/proto/old-faithful.proto).
{% endhint %}

## Unary Methods

Unary commands return a single response. \
\
They are similar to standard JSON-RPC methods, but you can send an arbitrary number of messages over a persistent, bi-direction connection.

### OldFaithful.OldFaithful/GetVersion

```bash
grpcurl \
  -proto old-faithful.proto \
  -d '' \
  -H 'x-token: <redacted-token>' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/GetVersion
```

### OldFaithful.OldFaithful/GetBlockTime

```bash
grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"slot": 307152000}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/GetBlockTime
```

### OldFaithful.OldFaithful/GetBlock

```
grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"slot": 307152000}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/GetBlock
```

### OldFaithful.OldFaithful/GetTransaction

```
grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"signature": "GbXoI+D7hhgeiUwovUhtaxog6zsxFcd5PKfhQM85GR6+NqmiFmQDf9cCCVj8BRj+DR1RvgR/E2E/ckbSGuQKCg=="}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/GetTransaction
```

## Streaming Methods

Streaming methods will stream the response to the client.  These methods allow you to retrieve data in large contiguous chunks, scoped by a `start_slot` and `end_slot` parameter.

Streaming commands also support a filter that will reduce the messages you receive.&#x20;

### OldFaithful.OldFaithful/StreamBlocks

The following filters are available for `StreamBlocks`:

* `account_include`: Array of base58 strings

#### No Filters

```
grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"start_slot": 307152000, "end_slot": 307152010}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/StreamBlocks
```

#### Filtered

```
grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"start_slot": 307152000, "end_slot": 307152010, "filter": {"account_include": ["Vote111111111111111111111111111111111111111"]}}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/StreamBlocks
```

### OldFaithful.OldFaithful/StreamTransactions

The following filters are available for `StreamTransactions`:

* `vote`: boolean
* `failed` : boolean
* `account_include`: Array of base58 strings
* `account_exclude`: Array of base58 strings
* `account_required`: Array of base58 strings

#### No Filters

```
grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"start_slot": 307152000, "end_slot": 307152010}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/StreamTransactions
```

#### Filtered

```
grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"start_slot": 307152000, "end_slot": 307152010, "filter": {"vote": false, "failed": true}}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/StreamTransactions
```
