> For the complete documentation index, see [llms.txt](https://docs.triton.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.triton.one/solana/real-time-streaming/preconfirmations-grpc/other-languages.md).

# Other languages

Call Preconfirmations gRPC from any language with preconfs.proto: Harmonic and BAM services, x-token metadata, Subscribe request fields and updates.

The wire contract is `preconfs.proto` in the [client repository](https://github.com/rpcpool/preconfs-client) (`preconfs-proto/proto/preconfs.proto`); the same file is exported by the Rust proto crate as `PROTO_SOURCE`. Generate a client for your language from it. Triton publishes no TypeScript or Python client. To try the API without writing code, see [Trying it with grpcurl](/solana/real-time-streaming/preconfirmations-grpc.md#trying-it-with-grpcurl).

## Calls

| service                 | rpc                                                           |                                                              |
| ----------------------- | ------------------------------------------------------------- | ------------------------------------------------------------ |
| `preconfs.Harmonic`     | `Subscribe(SubscribeRequest) returns (stream HarmonicUpdate)` | the Harmonic stream                                          |
| `preconfs.Harmonic`     | `GetVersion(VersionRequest) returns (VersionResponse)`        | server version and point of presence region; needs the token |
| `preconfs.BAM`          | `Subscribe(SubscribeRequest) returns (stream BamUpdate)`      | the BAM stream                                               |
| `preconfs.BAM`          | `GetVersion(VersionRequest) returns (VersionResponse)`        |                                                              |
| `grpc.health.v1.Health` | `Check`                                                       | standard health service; needs the token                     |

## Authentication

Send the token as gRPC metadata on every call, `GetVersion` and health checks included. Key: `x-token`. Value: the token's value, not its name. A call without one is refused with `UNAUTHENTICATED` and `x-token required`; a token that is not entitled to at least one feed is refused with `x-token not entitled to preconfs`. Other refusals are listed in [When a token is refused](/solana/real-time-streaming/preconfirmations-grpc.md#when-a-token-is-refused).

## Request

`SubscribeRequest` has two fields:

* `transactions`: a map from filter name to `TransactionFilter`: `account_include`, `account_required`, `account_exclude`, `signer_include`, `signer_exclude`, `signature` and `execution_results`, accounts and signatures as base58 strings, and `instructions`, each an `InstructionFilter` with `program_id` (base58), `memcmp` (`offset` and `bytes`) and an optional `data_size`. The Rust client's `.signatures()` in [Filters](/solana/real-time-streaming/preconfirmations-grpc/filters.md) sets the `signature` field in the proto.
* `region`: exactly one of `harmonic_region` or `bam_region`, matching the service called. Unspecified or the other feed's region is `INVALID_ARGUMENT`; a region the server does not serve is `FAILED_PRECONDITION`.

The [limits](/solana/real-time-streaming/preconfirmations-grpc/coverage-billing-and-limits.md#limits) apply. A request over a filter limit (filters, accounts, signatures, name length, instruction conditions) is `INVALID_ARGUMENT`. [Filters](/solana/real-time-streaming/preconfirmations-grpc/filters.md) describes how each condition matches and which filters are refused; status codes are in [Errors and reconnection](/solana/real-time-streaming/preconfirmations-grpc/errors-and-reconnection.md). In the JSON form grpcurl uses, `bytes` is base64. From the directory holding `preconfs.proto`, every Meteora DBC `create_config` on BAM Frankfurt:

```bash
grpcurl -import-path . -proto preconfs.proto -H "x-token: $TOKEN" \
  -d '{"bam_region":"BAM_REGION_FRA","transactions":{"configs":{"instructions":[{"program_id":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN","memcmp":[{"offset":0,"bytes":"yc/zcktvL70="}]}]}}}' \
  preconfs.rpcpool.com:443 preconfs.BAM/Subscribe
```

## Updates

`HarmonicUpdate` and `BamUpdate` carry `filters` (the names that matched, empty for slot boundaries, pings and clips) and one payload: `transaction`, `ping`, `clip`, and on Harmonic `slot_start` and `slot_end`. The contract in [Stream and message format](/solana/real-time-streaming/preconfirmations-grpc/stream-and-message-format.md) holds as described; pings arrive every 10 seconds and can be ignored.

{% hint style="warning" %}
`result` on `HarmonicTransaction` and `BamTransaction` is an `optional` field. Check that it is set before reading it, and treat a value your generated code does not know as unknown: the enum's zero value is `EXECUTION_RESULT_SUCCESS`, so an unset field read as its default reports a success that never happened.
{% endhint %}

Transactions carry the raw bytes in `transaction`, in the wire format of their message version. Legacy and v0 transactions start with a compact-u16 signature count and the signatures, so their first signature is the 64 bytes after the count. v1 transactions (SIMD-0385) carry the message first and the signatures after it. Decode them with a Solana SDK that knows all three rather than reading fixed offsets.

***

<i class="fa-life-ring">:life-ring:</i> Contact support by clicking the chat icon in your [customer dashboard](https://customers.triton.one)\ <i class="fa-briefcase">:briefcase:</i> Sales questions? [Contact us](https://triton.one/contact)\ <i class="fa-sparkles">:sparkles:</i> AI agent? Read [llms.txt](https://docs.triton.one/llms.txt)\ <i class="fa-rss">:rss:</i> Follow updates: [Blog](https://blog.triton.one) · [X](https://x.com/triton_one) · [YouTube](https://www.youtube.com/@triton_one_ltd) · [Telegram](https://t.me/tritonone) · [GitHub](https://github.com/rpcpool)
