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

# getUserRecords

> Tra cứu các bản ghi địa chỉ được che chắn công khai do chủ sở hữu ví Solana đăng ký.

## Bản ghi đăng ký

Cung cấp từ 1 đến 100 khóa công khai của chủ sở hữu Solana. Phản hồi chứa một mục trong `result.records` cho mỗi chủ sở hữu, theo thứ tự yêu cầu. Mục sẽ là `null` khi chủ sở hữu không có bản ghi đăng ký tại slot mà các bản ghi được đọc.

Một bản ghi bao gồm khóa công khai nullifier dạng base58 và khóa công khai xem dạng base64 của chủ sở hữu. Khóa công khai xem là khóa X25519 có thẻ dài 33 byte: `0x04`, tiếp theo là tọa độ u chuẩn dài 32 byte. `mergeEncryption` là `0` khi tính năng hợp nhất bị tắt và là `1` đối với PoseidonCtrV1.

Các bản ghi được truy xuất từ Solana tại một slot không sớm hơn `context.slot`. Đây là các khóa đăng ký công khai; xem [cặp khóa được che chắn và mã hóa](https://www.helius.dev/docs/vi/privacy/concepts/encryption.md) để biết cách ví xử lý khóa.

## Tham số yêu cầu

**owners** `array` *required*

Các khóa công khai Solana cần tra cứu trong sổ đăng ký người dùng. Tối đa 100 khóa.


## OpenAPI

````yaml vi/openapi/privacy/getUserRecords.yaml POST /v1/spr/getUserRecords
openapi: 3.0.3
info:
  title: API Vòng riêng tư Solana
  version: 0.51.2
  description: >-
    API JSON-RPC của trình lập chỉ mục quyền riêng tư dành cho trạng thái được
    mã hóa, lịch sử, bằng chứng và bản ghi đăng ký công khai.
servers:
  - url: https://devnet.helius-rpc.com
    description: API Vòng riêng tư Solana trên Devnet
security: []
paths:
  /v1/spr/getUserRecords:
    post:
      summary: getUserRecords
      description: >-
        Tra cứu các bản ghi địa chỉ được che chắn công khai do chủ sở hữu ví
        Solana đăng ký.
      operationId: getUserRecords
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                id:
                  type: string
                  description: ID dùng để xác định yêu cầu.
                  default: '1'
                jsonrpc:
                  type: string
                  description: Phiên bản giao thức JSON-RPC.
                  enum:
                    - '2.0'
                  default: '2.0'
                method:
                  type: string
                  description: >-
                    Phương thức cần gọi. Phải khớp với phân đoạn cuối cùng của
                    đường dẫn URL.
                  enum:
                    - getUserRecords
                  default: getUserRecords
                params:
                  type: object
                  required:
                    - owners
                  properties:
                    owners:
                      type: array
                      items:
                        $ref: '#/components/schemas/SerializablePubkey'
                      description: >-
                        Các khóa công khai Solana cần tra cứu trong sổ đăng ký
                        người dùng. Tối đa 100 khóa.
                      maxItems: 100
                      minItems: 1
                  additionalProperties: false
                  example:
                    owners:
                      - '11111111111111111111111111111111'
            example:
              jsonrpc: '2.0'
              id: '1'
              method: getUserRecords
              params:
                owners:
                  - '11111111111111111111111111111111'
        required: true
      responses:
        '200':
          description: Phản hồi JSON-RPC. Kiểm tra lỗi trước khi đọc kết quả.
          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 của yêu cầu.
                  jsonrpc:
                    type: string
                    description: Phiên bản của giao thức JSON-RPC.
                    enum:
                      - '2.0'
                  result:
                    type: object
                    required:
                      - context
                      - records
                    properties:
                      context:
                        $ref: '#/components/schemas/Context'
                      records:
                        type: array
                        items:
                          type: object
                          description: >-
                            Một bản ghi trong sổ đăng ký người dùng, tức địa chỉ
                            được che chắn do một khóa công khai Solana công bố.
                          required:
                            - owner
                            - nullifierPubkey
                            - viewingPubkey
                            - mergeEncryption
                          properties:
                            mergeEncryption:
                              type: integer
                              format: uint8
                              description: >-
                                Lược đồ mã hóa đầu ra hợp nhất mà chủ sở hữu
                                chấp nhận cho `merge_transact`. Giá trị 0 vô
                                hiệu hóa việc hợp nhất và 1 chọn PoseidonCtrV1.
                                Khi một lược đồ được chọn, bất kỳ bên gọi nào
                                cũng có thể hợp nhất các UTXO của chủ sở hữu này
                                theo lược đồ đó.
                              minimum: 0
                            nullifierPubkey:
                              allOf:
                                - $ref: '#/components/schemas/Hash'
                              description: >-
                                Khóa công khai nullifier dùng cho toàn bộ ví.
                                Không bao giờ luân chuyển.
                            owner:
                              $ref: '#/components/schemas/SerializablePubkey'
                            viewingPubkey:
                              allOf:
                                - $ref: '#/components/schemas/Base64String'
                              description: >-
                                Khóa công khai xem X25519 có thẻ (0x04 theo sau
                                là tọa độ u chuẩn dài 32 byte).
                          additionalProperties: false
                          nullable: true
                        description: >-
                          Mỗi chủ sở hữu được yêu cầu có một mục, theo thứ tự
                          yêu cầu. Giá trị là `null` khi chủ sở hữu

                          không có bản ghi đăng ký tại slot mà các bản ghi được
                          đọc; slot này không

                          sớm hơn `context.slot`.
                    additionalProperties: false
              example:
                jsonrpc: '2.0'
                id: '1'
                result:
                  context:
                    slot: 4242
                    blockTime: 1730000000
                  records:
                    - null
        '400':
          description: >-
            Bị từ chối trước khi thực thi. Phương thức không khớp với đường dẫn,
            các trường phương thức trùng lặp hoặc yêu cầu theo lô sẽ trả về
            -32601. Nội dung không thể đọc hoặc quá lớn sẽ trả về -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 của yêu cầu hoặc null khi nội dung không phải là một
                      lệnh gọi JSON-RPC đơn lẻ.
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data:
                        type: object
                        additionalProperties: true
        '429':
          description: Đã vượt quá giới hạn tốc độ.
          content:
            application/json:
              schema:
                type: object
                required:
                  - jsonrpc
                  - id
                  - error
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                  id:
                    type: string
                    nullable: true
                    description: >-
                      ID của yêu cầu hoặc null khi nội dung không phải là một
                      lệnh gọi JSON-RPC đơn lẻ.
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data:
                        type: object
                        additionalProperties: true
        '500':
          description: Lỗi máy chủ nội bộ.
          content:
            application/json:
              schema:
                type: object
                required:
                  - jsonrpc
                  - id
                  - error
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                  id:
                    type: string
                    nullable: true
                    description: >-
                      ID của yêu cầu hoặc null khi nội dung không phải là một
                      lệnh gọi JSON-RPC đơn lẻ.
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                      data:
                        type: object
                        additionalProperties: true
      security:
        - ApiKeyQuery: []
components:
  schemas:
    SerializablePubkey:
      type: string
      description: Khóa công khai Solana được mã hóa base58.
    Context:
      type: object
      required:
        - blockTime
        - slot
      properties:
        blockTime:
          type: integer
          format: int64
        slot:
          type: integer
          format: uint64
          description: >-
            Slot cao nhất mà trình lập chỉ mục đã lưu trữ, dùng để kiểm tra độ
            mới dựa trên slot.
          minimum: 0
    Hash:
      type: string
      description: Hàm băm 32 byte được mã hóa base58.
    Base64String:
      type: string
      description: Chuỗi byte được mã hóa base64.
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: Khóa API Helius của bạn.

````

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