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

# getLatestBlockhash

> 최신 Solana 블록 해시를 반환하여 새로운 트랜잭션을 구성하는 데 필요합니다. 블록 해시는 약 150 슬롯 후에 만료되므로 서명 직전에 가져와 포함 창을 최대화하세요.

## 요청 매개변수

<ParamField body="commitment" type="string">
  요청에 대한 커밋 수준입니다.

  * `confirmed`
  * `finalized`
  * `processed`
</ParamField>

<ParamField body="minContextSlot" type="number">
  요청을 평가할 수 있는 최소 슬롯입니다.
</ParamField>


## OpenAPI

````yaml ko/openapi/rpc-http/getLatestBlockhash.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: 블록체인 트랜잭션을 생성하고 서명하는 데 필요한 최신 유효 블록해시를 검색하기 위한 필수 Solana 트랜잭션 준비 API입니다.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://mainnet.helius-rpc.com
    description: 메인넷 RPC 엔드포인트
  - url: https://devnet.helius-rpc.com
    description: Devnet RPC 엔드포인트
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getLatestBlockhash
      description: >
        Solana 블록체인에서 트랜잭션 생성을 위해 필수적인 최신 유효 블록해시를 검색합니다.

        이 기본 API는 현재 블록해시와 그 유효 기간을 제공하며, 이는 Solana 트랜잭션을 구성할 때 필요한 요소입니다. 블록해시는
        최근 상태 참조이자 재생 방지 메커니즘으로 작용합니다. 모든 트랜잭션은 네트워크에서 유효하다고 간주되기 위해 최신 블록해시를
        포함해야 합니다. 지갑 제공자, DApp, 그리고 Solana 블록체인에 트랜잭션을 제출하는 모든 서비스에 필수적입니다.
      operationId: getLatestBlockhash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
              properties:
                jsonrpc:
                  type: string
                  description: JSON-RPC 프로토콜 버전입니다.
                  enum:
                    - '2.0'
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: 요청의 고유 식별자입니다.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  description: 호출할 RPC 메서드의 이름입니다.
                  enum:
                    - getLatestBlockhash
                  example: getLatestBlockhash
                  default: getLatestBlockhash
                params:
                  type: array
                  description: 요청의 선택적 구성 객체입니다.
                  items:
                    type: object
                    properties:
                      commitment:
                        type: string
                        description: 요청에 대한 커밋 수준입니다.
                        enum:
                          - confirmed
                          - finalized
                          - processed
                        example: processed
                      minContextSlot:
                        type: integer
                        description: 요청이 평가될 수 있는 최소 슬롯입니다.
                        example: 1000
      responses:
        '200':
          description: 성공적으로 최신 블록해시 정보를 검색했습니다.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPC 프로토콜 버전입니다.
                    enum:
                      - '2.0'
                    example: '2.0'
                  id:
                    type: string
                    description: 요청과 일치하는 식별자입니다.
                    example: '1'
                  result:
                    type: object
                    description: 블록해시 정보를 포함하는 RpcResponse입니다.
                    properties:
                      context:
                        type: object
                        description: 응답의 컨텍스트입니다.
                        properties:
                          slot:
                            type: integer
                            description: 데이터가 검색된 슬롯입니다.
                            example: 2792
                      value:
                        type: object
                        description: 블록해시 및 그 유효성 세부사항입니다.
                        properties:
                          blockhash:
                            type: string
                            description: >-
                              트랜잭션 생성을 위해 필요한 최신 Solana 블록해시(base-58 문자열로
                              인코딩됨)입니다.
                            example: EkSnNWid2cvwEVnVx9aBqawnmiCNiDgp3gUdkDPTKN1N
                          lastValidBlockHeight:
                            type: integer
                            description: 이 블록해시가 트랜잭션에서 허용되는 마지막 Solana 블록 높이입니다.
                            example: 3090
        '400':
          description: 잘못된 요청 - 요청 매개변수 또는 요청 형식이 잘못되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: 잘못된 매개변수
                id: '1'
        '401':
          description: 인증되지 않음 - API 키가 잘못되었거나 누락되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: 인증 실패
                id: '1'
        '429':
          description: 요청 수 초과 - 속도 제한 초과.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: 요청 수 초과
                id: '1'
        '500':
          description: 내부 서버 오류 - 서버에서 오류가 발생했습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: 내부 오류
                id: '1'
        '503':
          description: 서비스 이용 불가 - 서비스가 일시적으로 이용 불가합니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: 서비스 이용 불가
                id: '1'
        '504':
          description: 게이트웨이 시간 초과 - 요청 시간이 초과되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: 게이트웨이 시간 초과
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: JSON-RPC 프로토콜 버전입니다.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: 오류 코드입니다.
              example: -32602
            message:
              type: string
              description: 오류 메시지입니다.
            data:
              type: object
              description: 오류에 대한 추가 데이터입니다.
        id:
          type: string
          description: 요청과 일치하는 식별자입니다.
          example: '1'
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Helius API 키입니다. 무료로 [대시보드](https://dashboard.helius.dev/api-keys)에서 받을
        수 있습니다.

````