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

# getNonInclusionProofs

> 检索无效化器不在隐私无效化器树中的证明。

## 非包含证明

提供 1 到 1,000 个无效化器值以及无效化器树账户。每个叶子节点都必须编码一个 BN254 标量域元素。如果无效化器已被使用或已进入该树的队列，请求将失败。证明顺序与请求的叶子节点顺序一致。

每个证明都包含同级 `path`、作为边界的 `lowElement` 和 `highElement` 值及其索引，以及根。对于无效化器树，`rootSeq` 是树的更新序列，`rootIndex` 是根在 Solana 账户根历史记录中的位置。

## 请求参数

**leaves** `array` *required*

编码为 base58 格式 32 字节 BN254 标量域元素的无效化器值。

**treeAccount** `string` *required*

要查询的树账户。状态树和无效化器树共用一个账户。


## OpenAPI

````yaml zh/openapi/privacy/getNonInclusionProofs.yaml POST /v1/spr/getNonInclusionProofs
openapi: 3.0.3
info:
  title: Solana 隐私环 API
  version: 0.51.2
  description: 用于加密状态、历史记录、证明和公共注册表记录的隐私索引器 JSON-RPC API。
servers:
  - url: https://devnet.helius-rpc.com
    description: Devnet Solana 隐私环 API
security: []
paths:
  /v1/spr/getNonInclusionProofs:
    post:
      summary: getNonInclusionProofs
      description: 检索证明无效符不存在于隐私无效符树中的证明。
      operationId: getNonInclusionProofs
      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:
                    - getNonInclusionProofs
                  default: getNonInclusionProofs
                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: getNonInclusionProofs
              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/NonInclusionProof'
                    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
    NonInclusionProof:
      type: object
      required:
        - leaf
        - merkleContext
        - path
        - lowElement
        - lowElementIndex
        - highElement
        - highElementIndex
        - root
        - rootSeq
        - rootIndex
      properties:
        highElement:
          $ref: '#/components/schemas/Hash'
        highElementIndex:
          type: integer
          format: uint64
          minimum: 0
        leaf:
          $ref: '#/components/schemas/Hash'
        lowElement:
          $ref: '#/components/schemas/Hash'
        lowElementIndex:
          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` 在链上历史记录中的位置。'
          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.