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: getCompressedAccountProof
    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:
                    - getCompressedAccountProof
                params:
                  type: object
                  required:
                    - hash
                  properties:
                    hash:
                      $ref: '#/components/schemas/Hash'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                required:
                  - context
                  - value
                properties:
                  context:
                    $ref: '#/components/schemas/Context'
                  value:
                    $ref: '#/components/schemas/MerkleProofWithContext'
                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
    Hash:
      type: string
      description: A 32-byte hash represented as a base58 string.
      example: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP
    MerkleProofWithContext:
      type: object
      required:
        - proof
        - root
        - leafIndex
        - hash
        - merkleTree
        - rootSeq
      properties:
        hash:
          $ref: '#/components/schemas/Hash'
        leafIndex:
          type: integer
          format: int32
          minimum: 0
        merkleTree:
          $ref: '#/components/schemas/SerializablePubkey'
        proof:
          type: array
          items:
            $ref: '#/components/schemas/Hash'
        root:
          $ref: '#/components/schemas/Hash'
        rootSeq:
          type: integer
          format: int64
          minimum: 0
      additionalProperties: false
    SerializablePubkey:
      type: string
      description: A Solana public key represented as a base58 string.
      default: 11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB
      example: 11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB
