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: getMultipleNewAddressProofsV2
    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:
                    - getMultipleNewAddressProofsV2
                params:
                  type: array
                  items:
                    $ref: '#/components/schemas/AddressWithTree'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                required:
                  - context
                  - value
                properties:
                  context:
                    $ref: '#/components/schemas/Context'
                  value:
                    type: array
                    items:
                      $ref: '#/components/schemas/MerkleContextWithNewAddressProof'
        '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:
    AddressWithTree:
      type: object
      required:
        - address
        - tree
      properties:
        address:
          $ref: '#/components/schemas/SerializablePubkey'
        tree:
          $ref: '#/components/schemas/SerializablePubkey'
      additionalProperties: false
    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
    MerkleContextWithNewAddressProof:
      type: object
      required:
        - root
        - address
        - lowerRangeAddress
        - higherRangeAddress
        - nextIndex
        - proof
        - merkleTree
        - rootSeq
        - lowElementLeafIndex
      properties:
        address:
          $ref: '#/components/schemas/SerializablePubkey'
        higherRangeAddress:
          $ref: '#/components/schemas/SerializablePubkey'
        lowElementLeafIndex:
          type: integer
          format: int32
          minimum: 0
        lowerRangeAddress:
          $ref: '#/components/schemas/SerializablePubkey'
        merkleTree:
          $ref: '#/components/schemas/SerializablePubkey'
        nextIndex:
          type: integer
          format: int32
          minimum: 0
        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: 11111118F5rixNBnFLmioWZSYzjjFuAL5dyoDVzhD
      example: 11111118F5rixNBnFLmioWZSYzjjFuAL5dyoDVzhD
