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

# voteSubscribe

> 가십에서 새 투표가 관찰될 때마다 알림을 받기 위해 구독하세요. 이러한 투표는 합의 전 투표이므로 이들이 원장에 기록될 것이라는 보장은 없습니다.

<Note>
  이 구독은 불안정하며 validator가 `--rpc-pubsub-enable-vote-subscription` 플래그로 시작된 경우에만 사용할 수 있습니다. 이 구독의 형식은 향후 변경될 수 있습니다.
</Note>

<Warning>
  이것은 **Helius가 지원하지 않는** 불안정한 RPC 메서드입니다. 이 문서는 참조용으로만 제공됩니다.
</Warning>

## Endpoints

웹소켓은 다음 URL을 통해 메인넷 및 개발 네트워크에서 사용할 수 있습니다:

* **Mainnet** `wss://mainnet.helius-rpc.com/?api-key=<api-key>`
* **Devnet** `wss://devnet.helius-rpc.com/?api-key=<api-key>`

<Note>웹소켓에는 10분 간의 비활성 타이머가 있습니다; 웹소켓 연결을 유지하기 위해 상태 확인을 구현하고 매분 ping을 보내는 것이 강력히 권장됩니다.</Note>

## Authorizations

<ParamField query="api-key" type="string" required>
  귀하의 Helius API 키입니다. [dashboard](https://dashboard.helius.dev/api-keys)에서 무료로 받을 수 있습니다.
</ParamField>

## Body

<ParamField body="params" type="array">
  <Expandable title="properties" defaultOpen>
    <ParamField body="none" type="null">
      필요한 매개변수 없음.
    </ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="result" type="integer">
  구독 ID (구독 취소 시 필요)
</ResponseField>

## Notification Format

알림은 다음 필드를 가진 객체입니다:

* `hash: <string>` - 투표 해시
* `slots: <array>` - 투표가 포함된 슬롯, u64 정수 배열로 표현
* `timestamp: <i64|null>` - 투표의 타임스탬프
* `signature: <string>` - 해당 투표가 포함된 거래의 서명
* `votePubkey: <string>` - 투표 계정의 공개 키, base-58 인코딩된 문자열로 표현

<RequestExample>
  ```json Request theme={"system"}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "voteSubscribe"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={"system"}
  {
    "jsonrpc": "2.0",
    "result": 0,
    "id": 1
  }
  ```

  ```json Notification theme={"system"}
  {
    "jsonrpc": "2.0",
    "method": "voteNotification",
    "params": {
      "result": {
        "hash": "8Rshv2oMkPu5E4opXTRyuyBeZBqQ4S477VG26wUTFxUM",
        "slots": [1, 2],
        "timestamp": null
      },
      "subscription": 0
    }
  }
  ```
</ResponseExample>
