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

# getShieldedTransactionsByNullifiers

> 检索花费所提供无效符对应输入的隐私交易事件。

## 查找支出交易

使用钱包派生的无效符查找花费其输入的交易。无效符用于选择交易。`result.data` 中的每个条目都包含一笔所选 Solana 交易的所有事件，以及该交易的 `slot` 和 `signature`。

提供 1 到 1,000 个无效符。有关页面限制、续传令牌和增量读取的信息，请参阅[分页和数据新鲜度](https://www.helius.dev/docs/zh/api-reference/privacy.md#分页)。

## 请求参数

**filters** `object`

时隙范围。要恢复已追平且不设上限的读取，请将 `slot.gt` 设置为上一页的 `context.slot`。

**filters.slot** `object`

读取的时隙范围。提供的范围条件以 AND 组合。

**filters.slot.gt** `number`

仅包含此时隙之后的交易。

**filters.slot.gte** `number`

仅包含此时隙或之后的交易。

**filters.slot.lt** `number`

仅包含此时隙之前的交易。

**filters.slot.lte** `number`

仅包含此时隙或之前的交易。

**limit** `number` (default: 1000)

每页最多包含的 Solana 交易数，范围为 1 到 1,000。

**minContextSlot** `number`

此次读取要求索引器至少已持久化到的时隙。如果索引器进度落后，则返回 JSON-RPC 错误 -32016。

**nullifiers** `array` *required*

用于匹配已花费输入的 Base58 编码 32 字节无效符。

**paginationToken** `string`

上一个响应返回的续传令牌。使用相同的无效符和时隙筛选条件将其原样传回。


## OpenAPI

````yaml zh/openapi/privacy/getShieldedTransactionsByNullifiers.yaml POST /v1/spr/getShieldedTransactionsByNullifiers
openapi: 3.0.3
info:
  title: Solana 隐私环 API
  version: 0.51.2
  description: 用于加密状态、历史记录、证明和公共注册表记录的隐私索引器 JSON-RPC API。
servers:
  - url: https://devnet.helius-rpc.com
    description: 开发网 Solana 隐私环 API
security: []
paths:
  /v1/spr/getShieldedTransactionsByNullifiers:
    post:
      summary: getShieldedTransactionsByNullifiers
      description: 检索花费所提供作废标识符的隐私交易事件。
      operationId: getShieldedTransactionsByNullifiers
      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:
                    - getShieldedTransactionsByNullifiers
                  default: getShieldedTransactionsByNullifiers
                params:
                  type: object
                  required:
                    - nullifiers
                  properties:
                    filters:
                      allOf:
                        - $ref: '#/components/schemas/HistoryFilters'
                      description: >-
                        槽位边界。若要恢复已追上进度且无上限的读取，请将 `slot.gt` 设置为上一页的
                        `context.slot`。
                    limit:
                      type: integer
                      format: uint64
                      maximum: 1000
                      minimum: 1
                      nullable: true
                      default: 1000
                      description: 每页最多包含的 Solana 交易数，范围为 1 到 1,000。
                    minContextSlot:
                      type: integer
                      format: uint64
                      minimum: 0
                      nullable: true
                      description: 此读取要求索引器至少已持久化到该槽位。如果索引器进度落后，则返回 JSON-RPC 错误 -32016。
                    nullifiers:
                      type: array
                      items:
                        $ref: '#/components/schemas/Hash'
                      minItems: 1
                      maxItems: 1000
                      description: 采用 Base58 编码的 32 字节作废标识符，用于与已花费输入进行匹配。
                    paginationToken:
                      type: string
                      description: 上一个响应中的续传令牌。请将其原样传回，并使用相同的作废标识符和槽位筛选条件。
                      nullable: true
                  additionalProperties: false
                  example:
                    nullifiers:
                      - '11111111111111111111111111111112'
                    limit: 100
            example:
              jsonrpc: '2.0'
              id: '1'
              method: getShieldedTransactionsByNullifiers
              params:
                nullifiers:
                  - '11111111111111111111111111111112'
                limit: 100
        required: true
      responses:
        '200':
          description: JSON-RPC 响应。读取结果前请检查 error。
          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
                    description: 历史记录读取中有界的一页，采用 gTFA 风格的分页方式。
                    required:
                      - context
                      - data
                      - paginationToken
                    properties:
                      context:
                        $ref: '#/components/schemas/Context'
                      data:
                        type: array
                        items:
                          type: object
                          description: 一个 Solana 交易返回的事件，按事件顺序排列。
                          required:
                            - slot
                            - signature
                            - events
                          properties:
                            events:
                              type: array
                              items:
                                $ref: '#/components/schemas/ShieldedTransaction'
                            signature:
                              $ref: '#/components/schemas/SerializableSignature'
                            slot:
                              type: integer
                              format: uint64
                              minimum: 0
                          additionalProperties: false
                      outputTreeId:
                        type: integer
                        format: uint16
                        description: 最新的未暂停状态树 ID。不可用时省略。
                        minimum: 0
                      paginationToken:
                        type: string
                        description: >-
                          下一页的令牌；没有更多匹配结果时为 null。对于不带 `lt` 或 `lte`
                          边界且已追上进度的读取，稍后可将 `filters.slot.gt` 设置为本页的
                          `context.slot` 以继续读取；有上限的读取仅涵盖不超过其上限的槽位。
                        nullable: true
              example:
                jsonrpc: '2.0'
                id: '1'
                result:
                  context:
                    slot: 4242
                    blockTime: 1730000000
                  data: []
                  paginationToken: null
        '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:
    HistoryFilters:
      type: object
      description: 历史记录查询的可选槽位边界。
      properties:
        slot:
          $ref: '#/components/schemas/SlotFilter'
      additionalProperties: false
    Hash:
      type: string
      description: 采用 Base58 编码的 32 字节哈希。
    Context:
      type: object
      required:
        - blockTime
        - slot
      properties:
        blockTime:
          type: integer
          format: int64
        slot:
          type: integer
          format: uint64
          description: 索引器已持久化的最高槽位，用于基于槽位的新鲜度检查。
          minimum: 0
    ShieldedTransaction:
      type: object
      required:
        - slot
        - txSignature
        - txViewingPk
        - salt
        - outputSlots
        - messages
        - nullifiers
        - proofless
      properties:
        eventIndex:
          type: integer
          format: uint16
          minimum: 0
        messages:
          type: array
          items:
            $ref: '#/components/schemas/RingsMessage'
          description: 未绑定到任何输出承诺的已发布数据槽位，按原样重新发布。
        nullifiers:
          type: array
          items:
            $ref: '#/components/schemas/Hash'
        outputSlots:
          type: array
          items:
            $ref: '#/components/schemas/RingsOutputSlot'
        proofless:
          type: boolean
          description: 当此交易中至少有一个输出无证明时为 true。
        ringConfig:
          type: string
          description: 环的配置账户（其 `ring_auth` PDA）。当没有环授权此交易时省略。
        ringProgramId:
          type: string
          description: >-
            通过已索引注册信息解析出的环程序。当省略 `ringConfig` 或环的注册信息尚未建立索引时省略。使用 `ringConfig`
            区分“无环”和“环的程序尚未建立索引”。
        salt:
          type: string
          description: 每个输出密文共享的交易级 AES 盐值。
          nullable: true
        slot:
          type: integer
          format: uint64
          minimum: 0
        txSignature:
          $ref: '#/components/schemas/SerializableSignature'
        txViewingPk:
          type: string
          description: 采用 Base64 编码的字节字符串。
          nullable: true
    SerializableSignature:
      type: string
      description: 采用 Base58 编码的 64 字节 Solana 交易签名。
    SlotFilter:
      type: object
      description: 读取的槽位边界。提供的边界以 AND 方式组合。
      properties:
        gt:
          type: integer
          format: uint64
          minimum: 0
          nullable: true
          description: 仅包含此槽位之后的交易。
        gte:
          type: integer
          format: uint64
          minimum: 0
          nullable: true
          description: 仅包含此槽位或之后的交易。
        lt:
          type: integer
          format: uint64
          minimum: 0
          nullable: true
          description: 仅包含此槽位之前的交易。
        lte:
          type: integer
          format: uint64
          minimum: 0
          nullable: true
          description: 仅包含此槽位或之前的交易。
      additionalProperties: false
    RingsMessage:
      type: object
      required:
        - viewTag
        - payload
      properties:
        payload:
          $ref: '#/components/schemas/Base64String'
        viewTag:
          $ref: '#/components/schemas/Hash'
    RingsOutputSlot:
      type: object
      required:
        - viewTag
        - outputContext
        - payload
      properties:
        outputContext:
          $ref: '#/components/schemas/RingsOutputContext'
        payload:
          $ref: '#/components/schemas/Base64String'
        viewTag:
          $ref: '#/components/schemas/Hash'
    Base64String:
      type: string
      description: 采用 Base64 编码的字节字符串。
    RingsOutputContext:
      type: object
      required:
        - hash
        - tree
        - treeId
        - leafIndex
      properties:
        hash:
          $ref: '#/components/schemas/Hash'
        leafIndex:
          type: integer
          format: uint64
          minimum: 0
        tree:
          allOf:
            - $ref: '#/components/schemas/SerializablePubkey'
          description: 状态树账户。优先使用 treeId；树账户由它派生。
          deprecated: true
        treeId:
          type: integer
          format: uint16
          description: 输出承诺进行哈希时所依据的原始树 ID。
          minimum: 0
    SerializablePubkey:
      type: string
      description: 采用 Base58 编码的 Solana 公钥。
  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.