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

# getMerkleProofs

> 프라이버시 상태 트리의 커밋먼트에 대한 Merkle 포함 증명을 가져옵니다.

## 포함 증명

동일한 상태 트리에서 1\~1,000개의 커밋먼트를 제공하세요. 각 리프는 BN254 스칼라 필드 원소를 인코딩해야 합니다. 암호화된 출력과 함께 반환된 트리와 커밋먼트를 사용하세요. 증명은 요청한 리프 순서를 따릅니다.

각 증명에는 형제 `path`, `leafIndex`, `root`, `rootSeq` 및 `rootIndex`이 포함됩니다. 상태 트리에서 `rootSeq`은 증명의 최신성을 판단하는 데 사용되는 완료된 Solana 슬롯입니다. `rootIndex`은 Solana 계정의 루트 기록에서 루트가 위치한 지점이며, 슬롯에서 계산할 수 없습니다.

인덱싱된 루트가 루트 기록에서 만료된 경우 인덱서가 따라잡은 후 다시 시도하세요. [SDK](https://www.helius.dev/docs/ko/privacy/sdk.md)는 지갑 작업에 필요한 증명 구성을 처리합니다.

## 요청 매개변수

**leaves** `array` *required*

base58로 인코딩된 32바이트 BN254 스칼라 필드 원소 형식의 상태 트리 커밋먼트입니다.

**treeAccount** `string` *required*

커밋먼트를 포함하는 상태 트리 계정입니다.


## OpenAPI

````yaml ko/openapi/privacy/getMerkleProofs.yaml POST /v1/spr/getMerkleProofs
openapi: 3.0.3
info:
  title: Solana Privacy Rings API
  version: 0.51.2
  description: 암호화된 상태, 기록, 증명 및 공개 레지스트리 레코드를 위한 개인정보 보호 인덱서 JSON-RPC API입니다.
servers:
  - url: https://devnet.helius-rpc.com
    description: Devnet Solana Privacy Rings API
security: []
paths:
  /v1/spr/getMerkleProofs:
    post:
      summary: getMerkleProofs
      description: 개인정보 보호 상태 트리의 커밋먼트에 대한 Merkle 포함 증명을 조회합니다.
      operationId: getMerkleProofs
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                id:
                  type: string
                  description: 요청을 식별하는 ID입니다.
                  default: '1'
                jsonrpc:
                  type: string
                  description: JSON-RPC 프로토콜 버전입니다.
                  enum:
                    - '2.0'
                  default: '2.0'
                method:
                  type: string
                  description: 호출할 메서드입니다. URL 경로의 마지막 세그먼트와 일치해야 합니다.
                  enum:
                    - getMerkleProofs
                  default: getMerkleProofs
                params:
                  type: object
                  required:
                    - treeAccount
                    - leaves
                  properties:
                    leaves:
                      type: array
                      items:
                        $ref: '#/components/schemas/Hash'
                      minItems: 1
                      maxItems: 1000
                      description: base58로 인코딩된 32바이트 BN254 스칼라 필드 요소 형식의 상태 트리 커밋먼트입니다.
                    treeAccount:
                      allOf:
                        - $ref: '#/components/schemas/SerializablePubkey'
                      description: 커밋먼트가 포함된 상태 트리 계정입니다.
                  additionalProperties: false
                  example:
                    treeAccount: 33KVhbT4QtdQDrrrGwwThqD47Dh4Q6tA443t9jMNcWFN
                    leaves:
                      - '11111111111111111111111111111112'
            example:
              jsonrpc: '2.0'
              id: '1'
              method: getMerkleProofs
              params:
                treeAccount: 33KVhbT4QtdQDrrrGwwThqD47Dh4Q6tA443t9jMNcWFN
                leaves:
                  - '11111111111111111111111111111112'
        required: true
      responses:
        '200':
          description: JSON-RPC 응답입니다. 결과를 읽기 전에 오류를 확인하세요.
          content:
            application/json:
              schema:
                type: object
                required:
                  - jsonrpc
                  - id
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data:
                        type: object
                        additionalProperties: true
                  id:
                    type: string
                    description: 요청 ID입니다.
                  jsonrpc:
                    type: string
                    description: JSON-RPC 프로토콜의 버전입니다.
                    enum:
                      - '2.0'
                  result:
                    type: object
                    required:
                      - context
                      - proofs
                    properties:
                      context:
                        $ref: '#/components/schemas/Context'
                      proofs:
                        type: array
                        items:
                          $ref: '#/components/schemas/MerkleProof'
                    additionalProperties: false
        '400':
          description: >-
            실행 전에 거부되었습니다. 메서드와 경로가 일치하지 않거나, 메서드 필드가 중복되거나, 배치 요청인 경우 -32601을
            반환합니다. 읽을 수 없거나 너무 큰 본문은 -32600을 반환합니다.
          content:
            application/json:
              schema:
                type: object
                required:
                  - jsonrpc
                  - id
                  - error
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                  id:
                    type: string
                    nullable: true
                    description: 요청 ID입니다. 본문이 단일 JSON-RPC 호출이 아닌 경우 null입니다.
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data:
                        type: object
                        additionalProperties: true
        '429':
          description: 요청 한도를 초과했습니다.
          content:
            application/json:
              schema:
                type: object
                required:
                  - jsonrpc
                  - id
                  - error
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                  id:
                    type: string
                    nullable: true
                    description: 요청 ID입니다. 본문이 단일 JSON-RPC 호출이 아닌 경우 null입니다.
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data:
                        type: object
                        additionalProperties: true
        '500':
          description: 내부 서버 오류입니다.
          content:
            application/json:
              schema:
                type: object
                required:
                  - jsonrpc
                  - id
                  - error
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                  id:
                    type: string
                    nullable: true
                    description: 요청 ID입니다. 본문이 단일 JSON-RPC 호출이 아닌 경우 null입니다.
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data:
                        type: object
                        additionalProperties: true
      security:
        - ApiKeyQuery: []
components:
  schemas:
    Hash:
      type: string
      description: base58로 인코딩된 32바이트 해시입니다.
    SerializablePubkey:
      type: string
      description: base58로 인코딩된 Solana 공개 키입니다.
    Context:
      type: object
      required:
        - blockTime
        - slot
      properties:
        blockTime:
          type: integer
          format: int64
        slot:
          type: integer
          format: uint64
          description: 슬롯 기반 최신 상태 확인을 위해 인덱서가 영구 저장한 가장 높은 슬롯입니다.
          minimum: 0
    MerkleProof:
      type: object
      required:
        - leaf
        - merkleContext
        - path
        - leafIndex
        - root
        - rootSeq
        - rootIndex
      properties:
        leaf:
          $ref: '#/components/schemas/Hash'
        leafIndex:
          type: integer
          format: uint64
          minimum: 0
        merkleContext:
          $ref: '#/components/schemas/MerkleContext'
        path:
          type: array
          items:
            $ref: '#/components/schemas/Hash'
        root:
          $ref: '#/components/schemas/Hash'
        rootIndex:
          type: integer
          format: uint16
          description: |-
            `root`의 실제 온체인 기록 위치입니다. 업데이트가 없는 슬롯은 항목을 사용하지 않으므로 상태 루트의 위치를
            `root_seq`에서 도출할 수 없습니다.
          minimum: 0
        rootSeq:
          type: integer
          format: uint64
          description: |-
            루트 정렬 키입니다. 상태 트리 증명의 최신 상태에는 완료된 Solana 슬롯을 사용하고,
            인덱싱된 트리 증명에는 온체인 업데이트 시퀀스를 사용합니다.
          minimum: 0
      additionalProperties: false
    MerkleContext:
      type: object
      required:
        - treeType
        - tree
      properties:
        tree:
          $ref: '#/components/schemas/SerializablePubkey'
        treeType:
          type: integer
          format: uint16
          minimum: 0
      additionalProperties: false
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: Helius API 키입니다.

````

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