openapi: 3.0.3
info:
  title: photon-indexer
  description: Solana indexer for general compression
  license:
    name: Apache-2.0
  version: 0.50.0
servers:
  - url: https://mainnet.helius-rpc.com
paths:
  /:
    summary: getLatestCompressionSignatures
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                id:
                  type: string
                  description: An ID to identify the request.
                  enum:
                    - test-account
                jsonrpc:
                  type: string
                  description: The version of the JSON-RPC protocol.
                  enum:
                    - '2.0'
                method:
                  type: string
                  description: The name of the method to invoke.
                  enum:
                    - getLatestCompressionSignatures
                params:
                  type: object
                  properties:
                    cursor:
                      type: string
                      nullable: true
                    limit:
                      allOf:
                        - $ref: '#/components/schemas/Limit'
                      nullable: true
                  additionalProperties: false
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                required:
                  - context
                  - value
                properties:
                  context:
                    $ref: '#/components/schemas/Context'
                  value:
                    $ref: '#/components/schemas/PaginatedSignatureInfoList'
                additionalProperties: false
        '429':
          description: Exceeded rate limit.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '500':
          description: >-
            The server encountered an unexpected condition that prevented it
            from fulfilling the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
components:
  schemas:
    Context:
      type: object
      required:
        - slot
      properties:
        slot:
          type: integer
          default: 100
          example: 100
    Limit:
      type: integer
      format: int64
      minimum: 0
    PaginatedSignatureInfoList:
      type: object
      required:
        - items
      properties:
        cursor:
          type: string
          nullable: true
        items:
          type: array
          items:
            $ref: '#/components/schemas/SignatureInfo'
    SerializableSignature:
      type: string
      description: A Solana transaction signature.
      default: 5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c
      example: 5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c
    SignatureInfo:
      type: object
      required:
        - signature
        - slot
        - blockTime
      properties:
        blockTime:
          $ref: '#/components/schemas/UnixTimestamp'
        signature:
          $ref: '#/components/schemas/SerializableSignature'
        slot:
          $ref: '#/components/schemas/UnsignedInteger'
    UnixTimestamp:
      type: integer
      description: An Unix timestamp (seconds)
      default: 1714081554
      example: 1714081554
    UnsignedInteger:
      type: integer
      default: 100
      example: 100
