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

# getShieldedTransactionsBySignature

> 检索 Solana 交易签名对应的已索引屏蔽事件。

## 交易中的事件

响应返回 `result.transactions`，并按 `eventIndex` 排序。每个条目都包含事件索引和一笔屏蔽交易，其中含有加密输出、消息和作废标识符。一笔 Solana 交易可以包含多个屏蔽事件。

空的 `transactions` 数组表示索引器中没有匹配的屏蔽事件。在将最近提交的交易视为不存在之前，请检查 `context.slot`。此方法不使用分页。

## 请求参数

**txSignature** `string` *required*

经过 Base58 编码的 64 字节 Solana 交易签名。


## OpenAPI

````yaml zh/openapi/privacy/getShieldedTransactionsBySignature.yaml POST /v1/spr/getShieldedTransactionsBySignature
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/getShieldedTransactionsBySignature:
    post:
      summary: getShieldedTransactionsBySignature
      description: 检索 Solana 交易签名对应的已索引隐私事件。
      operationId: getShieldedTransactionsBySignature
      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:
                    - getShieldedTransactionsBySignature
                  default: getShieldedTransactionsBySignature
                params:
                  type: object
                  required:
                    - txSignature
                  properties:
                    txSignature:
                      allOf:
                        - $ref: '#/components/schemas/SerializableSignature'
                      description: 使用 Base58 编码的 64 字节 Solana 交易签名。
                  additionalProperties: false
                  example:
                    txSignature: >-
                      555555555555555555555555555555555555555555555555555555555555555555555555555555555555555
            example:
              jsonrpc: '2.0'
              id: '1'
              method: getShieldedTransactionsBySignature
              params:
                txSignature: >-
                  555555555555555555555555555555555555555555555555555555555555555555555555555555555555555
        required: true
      responses:
        '200':
          description: JSON-RPC 响应。读取 result 前请检查 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
                    required:
                      - context
                      - transactions
                    properties:
                      context:
                        $ref: '#/components/schemas/Context'
                      outputTreeId:
                        type: integer
                        format: uint16
                        description: 最新的未暂停状态树 ID。不可用时省略。
                        minimum: 0
                      transactions:
                        type: array
                        items:
                          $ref: '#/components/schemas/IndexedShieldedTransaction'
              example:
                jsonrpc: '2.0'
                id: '1'
                result:
                  context:
                    slot: 4242
                    blockTime: 1730000000
                  transactions: []
        '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:
    SerializableSignature:
      type: string
      description: 使用 Base58 编码的 64 字节 Solana 交易签名。
    Context:
      type: object
      required:
        - blockTime
        - slot
      properties:
        blockTime:
          type: integer
          format: int64
        slot:
          type: integer
          format: uint64
          description: 索引器已持久化的最高槽位，用于基于槽位的新鲜度检查。
          minimum: 0
    IndexedShieldedTransaction:
      type: object
      required:
        - eventIndex
        - transaction
      properties:
        eventIndex:
          type: integer
          format: uint16
          minimum: 0
        transaction:
          $ref: '#/components/schemas/ShieldedTransaction'
    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
    RingsMessage:
      type: object
      required:
        - viewTag
        - payload
      properties:
        payload:
          $ref: '#/components/schemas/Base64String'
        viewTag:
          $ref: '#/components/schemas/Hash'
    Hash:
      type: string
      description: 使用 Base58 编码的 32 字节哈希值。
    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；树账户由该 ID 派生。
          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.