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

# getSignaturesForAsset

> Список транзакций, которые сминтили, передали, сожгли или обновили сжатый NFT Solana, с помощью DAS getSignaturesForAsset в OrbitFlare.

## Обзор

У сжатого NFT нет собственного аккаунта, поэтому `getSignaturesForAddress` не может показать его историю. `getSignaturesForAsset` возвращает транзакции Bubblegum, изменявшие актив, каждую с типом инструкции, например `MintToCollectionV1`, `Transfer` или `Burn`.

Этот метод также доступен как `getAssetSignatures`.

## Параметры

Укажите актив по `id` или по `tree` и `leafIndex` вместе.

<ResponseField name="id" type="string">
  ID сжатого актива (base-58).
</ResponseField>

<ResponseField name="tree" type="string">
  Адрес дерева Меркла (base-58). Используйте вместе с `leafIndex`.
</ResponseField>

<ResponseField name="leafIndex" type="number">
  Индекс листа в дереве. Используйте вместе с `tree`.
</ResponseField>

<ResponseField name="page" type="number">
  Номер страницы, начиная с 1. См. [Пагинация](/ru/das-api/pagination).
</ResponseField>

<ResponseField name="limit" type="number">
  Количество результатов на странице. Максимум и значение по умолчанию: 1 000.
</ResponseField>

<ResponseField name="sortDirection" type="string">
  `asc` или `desc`.
</ResponseField>

## Ответ

<ResponseField name="result" type="object">
  <Expandable title="поля result">
    <ResponseField name="total" type="number">
      Количество элементов на этой странице.
    </ResponseField>

    <ResponseField name="limit" type="number">
      Использованный размер страницы.
    </ResponseField>

    <ResponseField name="page" type="number">
      Номер страницы при пагинации по страницам.
    </ResponseField>

    <ResponseField name="items" type="array">
      Пары `[signature, instruction type]`.
    </ResponseField>
  </Expandable>
</ResponseField>

## Примеры кода

### Запрос

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
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": "getSignaturesForAsset",
  "params": {
    "id": "JEKNNLZK6uQaQUEUz9GRoYZ7buHQ4rTN6k3qhX9NG8qU",
    "page": 1,
    "limit": 100
  }
}'
```

### Ответ

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
{
  "jsonrpc": "2.0",
  "result": {
    "last_indexed_slot": 457714577,
    "total": 1,
    "limit": 100,
    "page": 1,
    "items": [
      [
        "3eUm7YYq71vcZdgYT3X51xrJeNKaUg5fFfCFaBS2fwP3BPvip2hYxaAaqfNDs3Pj53JPDriQauBtWbz4u7cFN2dw",
        "MintToCollectionV1"
      ]
    ]
  },
  "id": 1
}
```

### TypeScript

```typescript theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
const RPC_URL = 'https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY';

async function getAssetHistory(id: string) {
  const response = await fetch(RPC_URL, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      jsonrpc: '2.0',
      id: 1,
      method: 'getSignaturesForAsset',
      params: { id, page: 1, limit: 1000 },
    }),
  });
  const { result, error } = await response.json();
  if (error) throw new Error(error.message);

  return result.items.map(([signature, type]: [string, string]) => ({ signature, type }));
}
```

## Распространённые ошибки

| Код | Сообщение | Решение |
| - | - | - |
| -32602 | Must provide either 'id' or both 'tree' and 'leafIndex' | Передайте только `id` либо `tree` и `leafIndex` вместе |
| -32602 | Pubkey Validation Err: ... is invalid | Передайте действительный ID актива или адрес дерева в base-58 |
| -32602 | Pagination Error. Limit should not be greater than 1000. | Используйте `limit` не более 1 000 |


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