> ## 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.

# getAccountInfo

> Bir hesapla ilgili tüm bilgileri döndürür

Sağlanan açık anahtarın hesabıyla ilişkili tüm bilgileri döndürür.

## Parametreler

<ParamField query="account" type="string" required>
  Sorgulanacak hesabın açık anahtarı (base-58 kodlu dize)
</ParamField>

<ParamField query="config" type="object" optional>
  Aşağıdaki isteğe bağlı alanları içeren yapılandırma nesnesi:

  <Expandable title="config fields">
    <ParamField query="commitment" type="string" optional>
      Ağı sorgulamak için kullanılacak onay seviyesi:

      * `processed`: En son blok (onaylanmamış)
      * `confirmed`: Süper çoğunluk tarafından onaylanmış
      * `finalized`: Süper çoğunluk tarafından sonuçlandırılmış
    </ParamField>

    <ParamField query="encoding" type="string" optional default="base64">
      Hesap verisi için kodlama formatı:

      * `base58`
      * `base64`
      * `base64+zstd`
      * `jsonParsed` (belirli hesap türleriyle sınırlı)
    </ParamField>

    <ParamField query="dataSlice" type="object" optional>
      Hesap verisinin bir dilimini isteyin:

      * `offset`: number - Başlangıç konumu (bayt cinsinden)
      * `length`: number - Döndürülecek bayt sayısı
    </ParamField>

    <ParamField query="minContextSlot" type="number" optional>
      İsteğin değerlendirilebileceği minimum slot
    </ParamField>
  </Expandable>
</ParamField>

## Yanıt

<ResponseField name="result" type="object | null">
  İstenen hesap mevcut değilse `null` döndürür. Aksi takdirde şunları içeren bir nesne döndürür:

  <Expandable title="result fields">
    <ResponseField name="context" type="object">
      <ResponseField name="slot" type="number">
        İsteğin işlendiği slot
      </ResponseField>
    </ResponseField>

    <ResponseField name="value" type="object">
      <ResponseField name="lamports" type="number">
        Hesaba atanan lamport sayısı
      </ResponseField>

      <ResponseField name="owner" type="string">
        Bu hesabın sahibi programın base-58 kodlu açık anahtarı
      </ResponseField>

      <ResponseField name="executable" type="boolean">
        Bu hesabın bir program içerip içermediği
      </ResponseField>

      <ResponseField name="rentEpoch" type="number">
        Bu hesabın bir sonraki kira borcunun olacağı dönem
      </ResponseField>

      <ResponseField name="data" type="[string, string] | object">
        Hesabın verisi. Format, kodlama parametresine bağlıdır:

        * base58/base64 olarak kodlanmışsa `[string, encoding]` demeti
        * Kodlama "jsonParsed" ise ayrıştırılmış JSON nesnesi
      </ResponseField>

      <ResponseField name="space" type="number">
        Hesabın verisi tarafından kullanılan alan
      </ResponseField>
    </ResponseField>
  </Expandable>
</ResponseField>

## Kod Örnekleri

### Temel İstek

```bash theme={null}
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getAccountInfo",
  "params": [
    "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
    {
      "encoding": "base58"
    }
  ]
}'
```

### Yanıt

```json theme={null}
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 430
    },
    "value": {
      "data": ["", "base58"],
      "executable": false,
      "lamports": 5000000000,
      "owner": "11111111111111111111111111111111",
      "rentEpoch": 18446744073709551615,
      "space": 0
    }
  },
  "id": 1
}
```

### Veri Dilimi ile İstek

```bash theme={null}
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getAccountInfo",
  "params": [
    "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
    {
      "encoding": "base64",
      "dataSlice": {
        "offset": 0,
        "length": 64
      }
    }
  ]
}'
```

### web3.js Kullanımı

```typescript theme={null}
import { Connection, PublicKey } from '@solana/web3.js';

const connection = new Connection('https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY');
const publicKey = new PublicKey('vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg');

const accountInfo = await connection.getAccountInfo(
  publicKey,
  'confirmed'
);
```

## Notlar

1. `jsonParsed` kodlaması yalnızca belirli hesap türleri için kullanılabilir:
   * Stake hesabı
   * Token hesabı
   * Token mint
   * Token metadata

2. `dataSlice` kullanıldığında, data alanı yalnızca istenen dilimle sınırlı olacaktır.

3. Hesap verisi, hesabın sahibi olan programa bağlı olarak farklı şekilde kodlanmış olabilir.

## Yaygın Hatalar

| Kod    | Mesaj                                    | Çözüm                                            |
| ------ | ---------------------------------------- | ------------------------------------------------ |
| -32602 | Invalid param: WrongSize                 | Açık anahtarın geçerli olduğunu doğrulayın       |
| -32602 | Invalid param: not base58 encoded string | Açık anahtarın base58 kodlu olduğundan emin olun |
| -32007 | Account not found                        | İstenen hesap mevcut değil                       |
