# Initializing the Yellowstone Client

The Yellowstone client is used to <mark style="color:yellow;">connect to gRPC</mark> on Solana, sending <mark style="color:yellow;">subscribe requests</mark> and receive data from stream. The gRPC streams and RPC calls are supported through Solana's Geyser interface. To initialize a  new Yellowstone client in typescript, you need to install the following package.

```bash
npm i @triton-one/yellowstone-grpc
```

Once done, we need two parameters to initialize the client, the gRPC endpoint, and the x-token, both of which is available in the Shyft dashboard once you unlock gRPC. You can find out more about [endpoint and access token](/solana-yellowstone-grpc/docs.md#authentication) here.

{% tabs %}
{% tab title="TypeScript" %}

```javascript
import Client from "@triton-one/yellowstone-grpc";

const client = new Client(
  "https://grpc.ams.shyft.to", //your region specific grpc endpoint
  "YOUR-ACCESS-XTOKEN", // xtoken, which is used to authenticate
  undefined,
);
```

{% endtab %}
{% endtabs %}

{% hint style="success" %}
Please note that some gRPC connections only take in the <mark style="color:yellow;">endpoint</mark> parameter to make a connection, in those cases, <mark style="color:yellow;">IP whitelisting</mark> is required to authenticate your connection. Find out more about making a connection in our docs [here](/solana-yellowstone-grpc/docs.md#authentication).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shyft.to/solana-yellowstone-grpc/docs/getting-started/initializing-grpc-client.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
