> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbitflare.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Jetstream v1 Protokol Referansı (Kullanımdan Kaldırıldı)

> Kullanımdan kaldırılan v1 Protocol Buffer belirtimi; bunun yerine Jetstream Protokol Referansını kullanın

> [!WARNING]
>
> **Jetstream v1 kullanımdan kaldırılmıştır.** Yeni entegrasyonlar
> [Jetstream Protokol Referansı](https://docs.orbitflare.com/tr/data-streaming/jetstream-reference.md) bölümünü kullanmalıdır. v1, mevcut
> entegrasyonlar için kullanılabilir olmaya devam eder.

## Mevcut Uç Noktalar

Jetstream, tüm OrbitFlare bölgelerinde kullanılabilir. En düşük gecikme için altyapınıza en yakın bölgeye bağlanın.

> [tab] US
>
> | Şehir | Bölge Kodu | Uç Nokta |
> | - | - | - |
> | New York | `ny` | `http://ny.jetstream.orbitflare.com` |
> | Salt Lake City | `slc` | `http://slc.jetstream.orbitflare.com` |

> [tab] Europe
>
> | Şehir | Bölge Kodu | Uç Nokta |
> | - | - | - |
> | Frankfurt | `fra` | `http://fra.jetstream.orbitflare.com` |
> | Amsterdam | `ams` | `http://ams.jetstream.orbitflare.com` |
> | London | `lon` | `http://lon.jetstream.orbitflare.com` |
> | Dublin | `dub` | `http://dub.jetstream.orbitflare.com` |
> | Siauliai, Lithuania | `sqq` | `http://sqq.jetstream.orbitflare.com` |

> [tab] Asia Pacific
>
> | Şehir | Bölge Kodu | Uç Nokta |
> | - | - | - |
> | Tokyo | `jp` | `http://jp.jetstream.orbitflare.com` |
> | Singapore | `sgp` | `http://sgp.jetstream.orbitflare.com` |

> [!NOTE]
>
> Jetstream, gRPC bağlantıları için düz `http://` kullanır (`https://` değil). gRPC, HTTP/2 üzerinde kendi taşıma güvenliği müzakeresini kullanır. `https://` yalnızca özel düğümünüz bunu açıkça gerektiriyorsa kullanın.

## Protocol Buffer Belirtimi

Bu belge, OrbitFlare Jetstream tarafından kullanılan Protocol Buffer (protobuf) belirtimini özetlemektedir. Tam belirtim [GitHub depomuzdaki](https://github.com/orbitflare/orbitflare-sdk-proto-rs/blob/HEAD/protos/jetstream.proto) belgede bulunabilir.

### Hizmet Tanımı

```protobuf theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
syntax = "proto3";

import "google/protobuf/timestamp.proto";
package jetstream;

// ============= Service Definition =============
service Jetstream {
  // Subscribe to data streams with filtering support
  rpc Subscribe(stream SubscribeRequest) returns (stream SubscribeUpdate) {}
  // Subscribe to data streams with filtering support and parsed instructions
  // Not implemented.
  rpc SubscribeParsed(stream SubscribeParsedRequest) returns (stream SubscribeUpdateParsedTransaction) {}
  // Basic ping/pong for connection testing
  rpc Ping(PingRequest) returns (PongResponse) {}
  // Get information about current state
  rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {}
}
```

### İstek Mesajları

#### SubscribeRequest

Veri güncellemelerine abone olmak için ana istek mesajı:

```protobuf theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
message SubscribeRequest {
  map<string, SubscribeRequestFilterTransactions> transactions = 1;
  map<string, SubscribeRequestFilterAccounts> accounts = 2;  // Not implemented.
  optional SubscribeRequestPing ping = 4;
}
```

#### İşlem Filtreleme

```protobuf theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
message SubscribeRequestFilterTransactions {
  repeated string account_include = 1;
  repeated string account_exclude = 2;
  repeated string account_required = 3;
}
```

#### Hesap Filtreleme

> [!WARNING]
>
> Hesap filtreleri proto'da tanımlıdır ancak uygulanmamıştır. Jetstream hesap güncellemesi akışı sağlamaz; bu yüzden `SubscribeRequest` içindeki `accounts` haritasını boş bırakın. İşlemleri hesaba göre eşleştirmek için işlem filtresinin `account_include`, `account_exclude` ve `account_required` alanlarını kullanın. Hesap güncellemeleri için [Yellowstone gRPC](https://docs.orbitflare.com/tr/data-streaming/yellowstone-account-monitoring.md) kullanın.

```protobuf theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Not implemented.
message SubscribeRequestFilterAccounts {
  repeated string account = 1;
  repeated string owner = 2;
  repeated SubscribeRequestFilterAccountsFilter filters = 3;
}

message SubscribeRequestFilterAccountsFilter {
  oneof filter {
    SubscribeRequestFilterAccountsFilterMemcmp memcmp = 1;
    uint64 datasize = 2;
    SubscribeRequestFilterAccountsFilterLamports lamports = 3;
  }
}

message SubscribeRequestFilterAccountsFilterMemcmp {
  uint64 offset = 1;
  oneof data {
    bytes bytes = 2;
    string base58 = 3;
    string base64 = 4;
  }
}

message SubscribeRequestFilterAccountsFilterLamports {
  oneof cmp {
    uint64 eq = 1;
    uint64 ne = 2;
    uint64 lt = 3;
    uint64 gt = 4;
  }
}
```

#### Ping İsteği

```protobuf theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
message SubscribeRequestPing {
  int32 id = 1;
}
```

### Yanıt Mesajları

#### SubscribeUpdate

Güncellemeleri içeren ana yanıt mesajı:

```protobuf theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
message SubscribeUpdate {
  repeated string filters = 1;
  google.protobuf.Timestamp created_at = 2;
  oneof update_oneof {
    SubscribeUpdateTransaction transaction = 3;
    SubscribeUpdateAccount account = 4;  // Not implemented.
    SubscribeUpdatePing ping = 5;
    SubscribeUpdatePong pong = 6;
  }
}
```

#### İşlem Güncellemesi

```protobuf theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
message SubscribeUpdateTransaction {
  SubscribeUpdateTransactionInfo transaction = 1;
  uint64 slot = 2;
}

message SubscribeUpdateTransactionInfo {
  bytes signature = 1;
  uint64 slot = 2;
  uint32 num_required_signatures = 3;
  uint32 num_readonly_signed_accounts = 4;
  uint32 num_readonly_unsigned_accounts = 5;
  bytes recent_blockhash = 6;
  repeated bytes signatures = 7;
  repeated bytes account_keys = 8;
  repeated CompiledInstruction instructions = 9;
  repeated MessageAddressTableLookup address_table_lookups = 10;
}
```

#### Hesap Güncellemesi

> [!NOTE]
>
> Uygulanmamıştır. Jetstream hiçbir zaman hesap güncellemesi göndermez; bu mesaj proto'nun bir parçası olduğu için listelenmiştir.

```protobuf theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Not implemented.
message SubscribeUpdateAccount {
  SubscribeUpdateAccountInfo account = 1;
  uint64 slot = 2;
  bool is_startup = 3;
}

message SubscribeUpdateAccountInfo {
  bytes pubkey = 1;
  uint64 lamports = 2;
  bytes owner = 3;
  bool executable = 4;
  uint64 rent_epoch = 5;
  bytes data = 6;
  uint64 write_version = 7;
  optional bytes txn_signature = 8;
}
```

#### Ping/Pong Güncellemeleri

```protobuf theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
message SubscribeUpdatePing {}

message SubscribeUpdatePong {
  int32 id = 1;
}
```

#### Paylaşılan Türler

```protobuf theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
message MessageAddressTableLookup {
  bytes account_key = 1;
  bytes writable_indexes = 2;
  bytes readonly_indexes = 3;
}

message CompiledInstruction {
  uint32 program_id_index = 1;
  bytes accounts = 2;
  bytes data = 3;
}
```

### Ayrıştırılmış Talimat Desteği

#### Ayrıştırılmış İstek

```protobuf theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Not implemented.
message SubscribeParsedRequest {
  optional SubscribeRequestPing ping = 1;
}
```

#### Ayrıştırılmış İşlem Güncellemesi

```protobuf theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
message SubscribeUpdateParsedTransaction {
  bytes signature = 1;
  uint64 slot = 2;
  SubscribeUpdateAccount account = 3;
  bytes recent_blockhash = 4;
  repeated bytes signatures = 5;
  repeated Instruction instructions = 6;
}
```

#### Talimat Türleri

```protobuf theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
message Instruction {
  oneof instruction_oneof {
    Initialize initialize = 1;
    SetParams set_params = 2;
    Create create = 3;
    Buy buy = 4;
    Sell sell = 5;
    Withdraw withdraw = 6;
  }
}

message Initialize {}

message SetParams {
  bytes fee_recipient = 1;
  uint64 initial_virtual_token_reserves = 2;
  uint64 initial_virtual_sol_reserves = 3;
  uint64 initial_real_token_reserves = 4;
  uint64 token_total_supply = 5;
  uint64 fee_basis_points = 6;
}

message Create {
  string name = 1;
  string symbol = 2;
  string uri = 3;
}

message Buy {
  uint64 amount = 1;
  uint64 max_sol_cost = 2;
}

message Sell {
  uint64 amount = 1;
  uint64 min_sol_output = 2;
}

message Withdraw {}
```

### Akışsız Metotlar

```protobuf theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
message PingRequest {
  int32 count = 1;
}

message PongResponse {
  int32 count = 1;
}

message GetVersionRequest {}

message GetVersionResponse {
  string version = 1;
}

message GetSlotResponse {
  uint64 slot = 1;
}
```

## Protokolü Kullanma

Jetstream için bir istemci uygularken şunları yapmanız gerekecektir:

1. Protobuf tanımından istemci kodu oluşturma
2. Veri akışı için Subscribe RPC metodunu uygulama
3. Bağlantı sağlık kontrolleri için Ping/Pong kullanma
4. Sunucu uyumluluğunu kontrol etmek için GetVersion kullanma
5. Farklı türdeki güncellemeleri işleme (işlemler, pong'lar)

### Kod Oluşturma

TypeScript/JavaScript için:

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
protoc --plugin=protoc-gen-ts_proto=./node_modules/.bin/protoc-gen-ts_proto \
  --ts_proto_out=. \
  --ts_proto_opt=esModuleInterop=true \
  jetstream.proto
```

Rust için:

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
protoc --rust_out=. jetstream.proto
```

## En İyi Uygulamalar

1. **Sürüm Uyumluluğu**
   * Protokol uyumluluğunu kontrol etmek için GetVersion kullanın
   * Beta sürümlerindeki kırıcı değişiklikler için izleyin
   * Yükseltme yaparken kapsamlı test yapın

2. **Hata İşleme**
   * Tüm mesaj türleri için uygun hata işleme uygulayın
   * Bağlantı hatalarını zarif bir şekilde yönetin
   * İşlemeden önce mesaj alanlarını doğrulayın

3. **Bağlantı Yönetimi**
   * Bağlantı sağlık kontrolleri için Ping/Pong kullanın
   * Otomatik yeniden bağlanma mantığı uygulayın
   * Uygun zaman aşımı değerleri belirleyin

4. **Performans**
   * Gereksiz veriyi en aza indirmek için uygun filtreler kullanın
   * İşlem filtrelerini `account_include`, `account_exclude` ve `account_required` ile daraltın
   * Özellikle geniş işlem filtrelerinde kaynak kullanımını izleyin

## Ayrıca Bakınız

> [card] [Jetstream Genel Bakış](https://docs.orbitflare.com/tr/data-streaming/jetstream.md)
>
> Başlangıç kılavuzu, örnekler ve filtreleme belgeleri.

> [card] [Değişiklik Günlüğü](https://docs.orbitflare.com/tr/data-streaming/jetstream-changelog.md)
>
> Sürüm geçmişi ve protokol güncellemeleri.

## Destek

Protokol belirtimi veya uygulama ayrıntıları hakkındaki teknik sorularınız için [GitHub depomuzu](https://github.com/orbitflare/jetstream-client-example) ziyaret edin veya [Discord topluluğumuza](https://discord.gg/orbitflare) katılın.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.