openapi: 3.0.0
info:
  title: Scan API
  version: 0.0.1
servers:
  - url: https://scan.sv-1.global.canton.network.sync.global/api/scan
tags:
  - name: external
    description: |
      These endpoints are intended for public usage and will remain backward-compatible.
  - name: internal
    description: |
      For internal usage only, not guaranteed to be stable or backward-compatible.
  - name: deprecated
    description: |
      These endpoints are deprecated and will be removed in a future release.
  - name: scan
    description: |
      The internal and external endpoints.
  - name: pre-alpha
    description: |
      Still under active development, highly unstable. Do not use in production.
paths:
  /readyz:
    get:
      summary: "GET /readyz"
      tags:
        - common
      x-jvm-package: external.common_admin
      operationId: isReady
      responses:
        '200':
          description: ok
        '503':
          description: service_unavailable
  /livez:
    get:
      summary: "GET /livez"
      tags:
        - common
      x-jvm-package: external.common_admin
      operationId: isLive
      responses:
        '200':
          description: ok
        '503':
          description: service_unavailable
  /status:
    get:
      summary: "GET /status"
      tags:
        - common
      x-jvm-package: external.common_admin
      operationId: getHealthStatus
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeStatus'
  /version:
    get:
      summary: "GET /version"
      tags:
        - common
      x-jvm-package: external.common_admin
      operationId: getVersion
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Version'
  /v0/dso:
    get:
      summary: "GET /v0/dso"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getDsoInfo
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDsoInfoResponse'
  /v0/validators/validator-faucets:
    get:
      summary: "GET /v0/validators/validator-faucets"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getValidatorFaucetsByValidator
      description: |
        For every argument that is a valid onboarded validator, return
        statistics on its liveness activity, according to on-ledger state at the
        time of the request.
      parameters:
        - name: validator_ids
          in: query
          required: true
          description: |
            A list of validator party IDs, one per specification of the parameter.
            Any party IDs not matching onboarded validators will be ignored
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetValidatorFaucetsByValidatorResponse'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
  /v0/scans:
    get:
      summary: "GET /v0/scans"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: listDsoScans
      description: |
        Retrieve Canton scan configuration for all SVs, grouped by
        connected synchronizer ID
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDsoScansResponse'
  /v0/admin/validator/licenses:
    get:
      summary: "GET /v0/admin/validator/licenses"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: listValidatorLicenses
      description: |
        List all validators currently approved by members of the DSO, paginated,
        sorted newest-first.
      parameters:
        - name: after
          description: |
            A `next_page_token` from a prior response; if absent, return the first page.
          in: query
          required: false
          schema:
            type: integer
            format: int64
        - name: limit
          description: Maximum number of elements to return, 1000 by default.
          in: query
          required: false
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListValidatorLicensesResponse'
  /v0/dso-sequencers:
    get:
      summary: "GET /v0/dso-sequencers"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: listDsoSequencers
      description: |
        Retrieve Canton sequencer configuration for all SVs, grouped by
        connected synchronizer ID
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDsoSequencersResponse'
  /v0/sv-bft-sequencers:
    get:
      summary: "GET /v0/sv-bft-sequencers"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: listSvBftSequencers
      description: |
        Retrieve Canton BFT sequencer configuration for this SV, for each configured Synchronizer
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSvBftSequencersResponse'
  /v0/roll-forward-lsu:
    get:
      summary: "GET /v0/roll-forward-lsu"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getRollForwardLsu
      description: |
        Retrieve information on a roll-forward LSU
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRollForwardLsuResponse'
  /v0/lsu:
    get:
      summary: "GET /v0/lsu"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getLsu
      description: |
        Retrieve information on the next logical synchronizer upgrade (LSU)
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetLsuResponse'
  /v0/active-synchronizer-serial:
    get:
      summary: "GET /v0/active-synchronizer-serial"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getActivePhysicalSynchronizerSerial
      description: |
        Get the current physical synchronizer serial as reported by the SV participant.
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetActivePhysicalSynchronizerSerialResponse'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v0/domains/{domain_id}/parties/{party_id}/participant-id:
    get:
      summary: "GET /v0/domains/:domain_id/parties/:party_id/participant-id"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getPartyToParticipant
      description: |
        Get the ID of the participant hosting a given party.  This will fail if
        there are multiple party-to-participant mappings for the given
        synchronizer and party, which is not currently supported.
      parameters:
        - name: domain_id
          description: |
            The synchronizer ID to look up a mapping for.
          in: path
          required: true
          schema:
            type: string
        - name: party_id
          description: |
            The party ID to lookup a participant ID for.
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPartyToParticipantResponse'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v1/domains/{domain_id}/parties/{party_id}/participant-id:
    get:
      summary: "GET /v1/domains/:domain_id/parties/:party_id/participant-id"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getPartyToParticipantV1
      description: |
        Get the IDs of the participants hosting a given party.
        Unlike /v0, this endpoint supports parties hosted on multiple participants.
      parameters:
        - name: domain_id
          description: |
            The synchronizer ID to look up a mapping for.
          in: path
          required: true
          schema:
            type: string
        - name: party_id
          description: |
            The party ID to lookup a participant ID for.
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPartyToParticipantResponseV1'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v0/domains/{domain_id}/members/{member_id}/traffic-status:
    get:
      summary: "GET /v0/domains/:domain_id/members/:member_id/traffic-status"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getMemberTrafficStatus
      description: |
        Get a member's traffic status as reported by the sequencer, according to
        ledger state at the time of the request.
      parameters:
        - name: domain_id
          description: |
            The synchronizer ID to look up traffic for.
          in: path
          required: true
          schema:
            type: string
        - name: member_id
          description: |
            The participant or mediator whose traffic to look up, in the format
            `code::id::fingerprint` where `code` is `PAR` or `MED`.
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMemberTrafficStatusResponse'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v0/closed-rounds:
    get:
      summary: "GET /v0/closed-rounds"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getClosedRounds
      description: |
        Every closed mining round on the ledger still in post-close process for
        the connected Splice network, in round number order, earliest-first.
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetClosedRoundsResponse'
  /v0/open-and-issuing-mining-rounds:
    post:
      summary: "POST /v0/open-and-issuing-mining-rounds"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getOpenAndIssuingMiningRounds
      description: |
        All current open and issuing mining rounds, if the request is empty;
        passing contract IDs in the request can reduce the response data for
        polling/client-cache-update efficiency.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetOpenAndIssuingMiningRoundsRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOpenAndIssuingMiningRoundsResponse'
  /v2/updates:
    post:
      summary: "POST /v2/updates"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getUpdateHistoryV2
      description: |
        Returns the update history in ascending order, paged, from ledger begin or optionally starting after a record time.
        Compared to `/v1/updates`, the `/v2/updates` removes the `offset` field in responses,
        which was hardcoded to 1 in `/v1/updates` for compatibility, and is now removed.
        `/v2/updates` sorts events lexicographically in `events_by_id` by `ID` for convenience, which should not be confused with the
        order of events in the transaction, for this you should rely on the order of `root_event_ids` and `child_event_ids`.
        Updates are ordered lexicographically by `(migration id, record time)`.
        For a given migration id, each update has a unique record time.
        The record time ranges of different migrations may overlap, i.e.,
        it is not guaranteed that the maximum record time of one migration is smaller than the minimum record time of the next migration,
        and there may be two updates with the same record time but different migration ids.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateHistoryRequestV2'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateHistoryResponseV2'
        '400':
          $ref: '#/components/responses/400'
        '500':
          $ref: '#/components/responses/500'
  /v2/updates/{update_id}:
    get:
      summary: "GET /v2/updates/:update_id"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getUpdateByIdV2
      description: |
        Returns the update with the given update_id.
        Compared to `/v1/updates/{update_id}`, the `/v2/updates/{update_id}` removes the `offset` field in responses,
        which was hardcoded to 1 in `/v1/updates/{update_id}` for compatibility, and is now removed.
        `/v2/updates/{update_id}` sorts events lexicographically in `events_by_id` by `ID` for convenience, which should not be confused with the
        order of events in the transaction, for this you should rely on the order of `root_event_ids` and `child_event_ids`.
      parameters:
        - name: update_id
          in: path
          required: true
          schema:
            type: string
        - name: daml_value_encoding
          in: query
          schema:
            $ref: '#/components/schemas/DamlValueEncoding'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateHistoryItemV2'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v1/updates:
    post:
      summary: "POST /v1/updates"
      deprecated: true
      tags:
        - deprecated
      x-jvm-package: scan
      operationId: getUpdateHistoryV1
      description: |
        Returns the update history in ascending order, paged, from ledger begin or optionally starting after a record time.
        Unlike /v0/updates, this endpoint returns responses that are consistent across different
        scan instances. Event ids returned by this endpoint are not comparable to event ids returned by /v0/updates.

        Updates are ordered lexicographically by `(migration id, record time)`.
        For a given migration id, each update has a unique record time.
        The record time ranges of different migrations may overlap, i.e.,
        it is not guaranteed that the maximum record time of one migration is smaller than the minimum record time of the next migration,
        and there may be two updates with the same record time but different migration ids.
        The order of items in events_by_id is not defined.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateHistoryRequestV1'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateHistoryResponse'
        '400':
          $ref: '#/components/responses/400'
        '500':
          $ref: '#/components/responses/500'
  /v1/updates/{update_id}:
    get:
      summary: "GET /v1/updates/:update_id"
      deprecated: true
      tags:
        - deprecated
      x-jvm-package: scan
      operationId: getUpdateByIdV1
      description: |
        Returns the update with the given update_id.
        Unlike /v0/updates/{update_id}, this endpoint returns responses that are consistent across different
        scan instances. Event ids returned by this endpoint are not comparable to event ids returned by /v0/updates.
        The order of items in events_by_id is not defined.
      parameters:
        - name: update_id
          in: path
          required: true
          schema:
            type: string
        - name: daml_value_encoding
          in: query
          schema:
            $ref: '#/components/schemas/DamlValueEncoding'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateHistoryItem'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v2/updates/hash/{hash}:
    get:
      summary: "GET /v2/updates/hash/:hash"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getUpdateByHash
      description: |
        Returns the update associated with the given hash of the prepared transaction.

        This endpoint is not always BFT safe.
        For transactions committed before a scan instance started indexing hashes, the instance will return a 404 error.
        For transactions committed around the time different scans started indexing hashes,
        some scan instances might return a 404 error while others return the matching update.

        This is in contrast to the `v2/updates` and `v2/updates/{update_id}` endpoints, which are guaranteed to be always BFT safe.
      parameters:
        - name: hash
          in: path
          required: true
          schema:
            type: string
        - name: daml_value_encoding
          in: query
          schema:
            $ref: '#/components/schemas/DamlValueEncoding'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateHistoryItemV2WithHash'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v0/state/acs/snapshot-timestamp:
    get:
      summary: "GET /v0/state/acs/snapshot-timestamp"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getDateOfMostRecentSnapshotBefore
      description: |
        Returns the timestamp of the most recent snapshot before the given date, for the given migration_id.
        This corresponds to the record time of the last transaction in the snapshot.
      parameters:
        - name: before
          in: query
          required: true
          schema:
            type: string
            format: date-time
            description: |
              The endpoint will return the record time of the most recent snapshot before this parameter.
        - name: migration_id
          in: query
          required: true
          schema:
            type: integer
            format: int64
            description: |
              The endpoint will return the record time of the most recent snapshot for this migration id.
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcsSnapshotTimestampResponse'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v0/state/acs/snapshot-timestamp-after:
    get:
      summary: "GET /v0/state/acs/snapshot-timestamp-after"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getDateOfFirstSnapshotAfter
      description: |
        Returns the timestamp of the first snapshot after the given date, for the given migration_id or larger.
      parameters:
        - name: after
          in: query
          required: true
          schema:
            type: string
            format: date-time
            description: |
              The endpoint will return the record time of the first snapshot after this parameter.
        - name: migration_id
          in: query
          required: true
          schema:
            type: integer
            format: int64
            description: |
              The endpoint will return the record time of the first snapshot for this migration id or larger.
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcsSnapshotTimestampResponse'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v0/state/acs:
    post:
      summary: "POST /v0/state/acs"
      deprecated: true
      tags:
        - deprecated
      x-jvm-package: scan
      operationId: getAcsSnapshotAt
      description: |
        Deprecated. Please use /v1/state/acs instead. Returns the ACS in creation date ascending order, paged, for a given migration id and record time.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AcsRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcsResponse'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v1/state/acs:
    post:
      summary: "POST /v1/state/acs"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getAcsSnapshotAtV1
      description: |
        Returns the ACS in creation date ascending order, paged, for a given migration id and record time.
        Unlike /v0/state/acs, every contract is identified by an (optional) update_id
        (as opposed to the event ID in /v0/state/acs, which was not BFT-safe).
        The update_id is the ID of the update in which the contract was created, and can be used to correlate with updates returned by /v2/updates.
        For contracts created in an earlier migration ID, the update_id will be absent.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AcsRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcsResponseV1'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v0/state/acs/force:
    post:
      summary: "POST /v0/state/acs/force"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: forceAcsSnapshotNow
      description: |
        Takes a snapshot of the ACS at the current time.
        The responses can be used as parameters to `/v0/state/acs` to retrieve the snapshot.
        Disabled in production environments due to its persistent alteration of
        the behavior of future invocations of `/v0/state/acs`, as it causes an
        immediate internal snapshot and delay in the next automatic snapshot.
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForceAcsSnapshotResponse'
        '400':
          $ref: '#/components/responses/400'
        '500':
          $ref: '#/components/responses/500'
  /v0/holdings/state:
    post:
      summary: "POST /v0/holdings/state"
      tags:
        - deprecated
      x-jvm-package: scan
      operationId: getHoldingsStateAt
      description: |
        Deprecated. Please use /v1/holdings/state instead. Returns the active amulet contracts for a given migration id and record time, in creation date ascending order, paged.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HoldingsStateRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcsResponse'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v1/holdings/state:
    post:
      summary: "POST /v1/holdings/state"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getHoldingsStateAtV1
      description: |
        Returns the active amulet contracts for a given migration id and record time, in creation date ascending order, paged.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HoldingsStateRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcsResponseV1'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v0/holdings/summary:
    post:
      summary: "POST /v0/holdings/summary"
      deprecated: true
      tags:
        - deprecated
      x-jvm-package: scan
      operationId: getHoldingsSummaryAt
      description: |
        Deprecated. Please use /v1/holdings/summary instead. Returns the summary of active amulet contracts for a given migration id and record time, for the given parties.
        This is an aggregate of `/v0/holdings/state` by owner party ID with better performance than client-side computation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HoldingsSummaryRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HoldingsSummaryResponse'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v1/holdings/summary:
    post:
      summary: "POST /v1/holdings/summary"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getHoldingsSummaryAtV1
      description: |
        Returns the summary of active amulet contracts for a given migration id and record time, for the given parties.
        This is an aggregate of `/v0/holdings/state` by owner party ID with better performance than client-side computation.
        Unlike /v0/holdings/summary, this version does not include holding fee fields
        as they do not express a meaningful aggregate value.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HoldingsSummaryRequestV1'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HoldingsSummaryResponseV1'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v0/ans-entries:
    get:
      summary: "GET /v0/ans-entries"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: listAnsEntries
      description: |
        Lists all non-expired ANS entries whose names are prefixed with the
        `name_prefix`, up to `page_size` entries.
      parameters:
        - name: name_prefix
          description: |
            Every result's name will start with this substring; if empty or absent,
            all entries will be listed.
            Does not have to be a whole word or segment; any substring will be accepted.
          in: query
          schema:
            type: string
        - name: page_size
          description: |
            The maximum number of results returned.
            Older (but still non-expired) results are listed first.
          in: query
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEntriesResponse'
  /v0/ans-entries/by-party/{party}:
    get:
      summary: "GET /v0/ans-entries/by-party/:party"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: lookupAnsEntryByParty
      description: |
        If present, the first ANS entry for user `party` according to
        `name` lexicographic order.
      parameters:
        - name: party
          description: The user party ID that holds the ANS entry.
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupEntryByPartyResponse'
        '404':
          $ref: '#/components/responses/404'
  /v0/ans-entries/by-name/{name}:
    get:
      summary: "GET /v0/ans-entries/by-name/:name"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: lookupAnsEntryByName
      description: If present, the ANS entry named exactly `name`.
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupEntryByNameResponse'
        '404':
          $ref: '#/components/responses/404'
  /v0/dso-party-id:
    get:
      summary: "GET /v0/dso-party-id"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getDsoPartyId
      description: |
        The party ID of the DSO for the Splice network connected by this Scan app.
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDsoPartyIdResponse'
  /v0/amulet-rules:
    post:
      summary: "POST /v0/amulet-rules"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getAmuletRules
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetAmuletRulesRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAmuletRulesResponse'
  /v0/external-party-amulet-rules:
    post:
      summary: "POST /v0/external-party-amulet-rules"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getExternalPartyAmuletRules
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetExternalPartyAmuletRulesRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetExternalPartyAmuletRulesResponse'
  /v0/ans-rules:
    post:
      summary: "POST /v0/ans-rules"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getAnsRules
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetAnsRulesRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAnsRulesResponse'
  /v0/featured-apps:
    get:
      summary: "GET /v0/featured-apps"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: listFeaturedAppRights
      description: |
        List every `FeaturedAppRight` registered with the DSO on the ledger.
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFeaturedAppRightsResponse'
  /v0/featured-apps/{provider_party_id}:
    get:
      summary: "GET /v0/featured-apps/:provider_party_id"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: lookupFeaturedAppRight
      description: |
        If `provider_party_id` has a `FeaturedAppRight` registered with the DSO,
        return it; `featured_app_right` will be empty otherwise.
      parameters:
        - name: provider_party_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupFeaturedAppRightResponse'
  /v0/featured-apps/by-provider/{provider_party_id}:
    get:
      summary: "GET /v0/featured-apps/by-provider/:provider_party_id"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: listFeaturedAppRightsByProvider
      description: |
        List all `FeaturedAppRight` contracts for the given provider.
      parameters:
        - name: provider_party_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFeaturedAppRightsResponse'
  /v0/featured-apps/by-contract-id/{contract_id}:
    get:
      summary: "GET /v0/featured-apps/by-contract-id/:contract_id"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: lookupFeaturedAppRightByContractId
      description: |
        Look up a `FeaturedAppRight` contract by its contract ID.
        Returns `featured_app_right` if found, empty otherwise.
      parameters:
        - name: contract_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupFeaturedAppRightResponse'
  /v0/transfer-preapprovals/by-party/{party}:
    get:
      summary: "GET /v0/transfer-preapprovals/by-party/:party"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: lookupTransferPreapprovalByParty
      description: Lookup a TransferPreapproval by the receiver party.
      parameters:
        - name: party
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupTransferPreapprovalByPartyResponse'
        '404':
          $ref: '#/components/responses/404'
  /v0/transfer-command-counter/{party}:
    get:
      summary: "GET /v0/transfer-command-counter/:party"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: lookupTransferCommandCounterByParty
      description: Lookup a TransferCommandCounter by the receiver party.
      parameters:
        - name: party
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupTransferCommandCounterByPartyResponse'
        '404':
          description: No TransferCommandCounter exists for this party. This means the nonce that should be used is 0.
          $ref: '#/components/responses/404'
  /v0/transfer-command/status:
    get:
      summary: "GET /v0/transfer-command/status"
      description: Retrieve the status of all transfer commands (up to a limit of 100) of the given sender for the specified nonce.
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: lookupTransferCommandStatus
      parameters:
        - name: sender
          in: query
          required: true
          schema:
            type: string
        - name: nonce
          in: query
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupTransferCommandStatusResponse'
        '404':
          description: No TransferCommand exists with this contract id within the last 24h
          $ref: '#/components/responses/404'
  /v0/migrations/schedule:
    get:
      summary: "GET /v0/migrations/schedule"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getMigrationSchedule
      description: |
        If the DSO has scheduled a synchronizer upgrade, return its planned time
        and the new migration ID.
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MigrationSchedule'
        '404':
          description: No migration scheduled
  /v0/migrations/last:
    get:
      summary: "GET /v0/migrations/last"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getMigrationId
      description: |
        Returns the last migration id that was configured for the synchronizer upgrades.
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMigrationIdResponse'
  /v0/synchronizer-identities/{domain_id_prefix}:
    get:
      summary: "GET /v0/synchronizer-identities/:domain_id_prefix"
      tags:
        - internal
        - scan
      x-jvm-package: scan_soft_domain_migration_poc
      operationId: getSynchronizerIdentities
      parameters:
        - name: domain_id_prefix
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SynchronizerIdentities'
        '404':
          $ref: '#/components/responses/404'
  /v0/synchronizer-bootstrapping-transactions/{domain_id_prefix}:
    get:
      summary: "GET /v0/synchronizer-bootstrapping-transactions/:domain_id_prefix"
      tags:
        - internal
        - scan
      x-jvm-package: scan_soft_domain_migration_poc
      operationId: getSynchronizerBootstrappingTransactions
      parameters:
        - name: domain_id_prefix
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SynchronizerBootstrappingTransactions'
        '404':
          $ref: '#/components/responses/404'
  /v0/splice-instance-names:
    get:
      summary: "GET /v0/splice-instance-names"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getSpliceInstanceNames
      description: Retrieve the UI names of various elements of this Splice network.
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSpliceInstanceNamesResponse'
        '404':
          $ref: '#/components/responses/404'
  /v0/amulet-price/votes:
    get:
      summary: "GET /v0/amulet-price/votes"
      tags:
        - scan
        - internal
      x-jvm-package: scan
      operationId: listAmuletPriceVotes
      description: Retrieve a list of the latest amulet price votes
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAmuletPriceVotesResponse'
  /v0/voterequest:
    post:
      summary: "POST /v0/voterequest"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: listVoteRequestsByTrackingCid
      description: Look up several `VoteRequest`\ s at once by their contract IDs.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchListVotesByVoteRequestsRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListVoteRequestByTrackingCidResponse'
  /v0/voterequests/{vote_request_contract_id}:
    get:
      summary: "GET /v0/voterequests/:vote_request_contract_id"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: lookupDsoRulesVoteRequest
      description: Look up a `VoteRequest` by contract ID.
      parameters:
        - name: vote_request_contract_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupDsoRulesVoteRequestResponse'
        '404':
          description: VoteRequest contract not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v0/admin/sv/voterequests:
    get:
      summary: "GET /v0/admin/sv/voterequests"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: listDsoRulesVoteRequests
      description: List all active `VoteRequest`\ s.
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDsoRulesVoteRequestsResponse'
  /v0/admin/sv/voteresults:
    post:
      summary: "POST /v0/admin/sv/voteresults"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: listVoteRequestResults
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListVoteResultsRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDsoRulesVoteResultsResponse'
  /v0/admin/sv/voteresults/count:
    post:
      summary: "POST /v0/admin/sv/voteresults/count"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: countVoteRequestResults
      description: Count all vote results matching the request filters.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CountVoteResultsRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountVoteResultsResponse'
  /v0/admin/sv/previous-sv-reward-weight:
    post:
      summary: "POST /v0/admin/sv/previous-sv-reward-weight"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getPreviousSvRewardWeight
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreviousSvRewardWeightRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreviousSvRewardWeightResponse'
  /v0/backfilling/migration-info:
    post:
      summary: "POST /v0/backfilling/migration-info"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getMigrationInfo
      description: |
        List all previous synchronizer migrations in this Splice network's history.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetMigrationInfoRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMigrationInfoResponse'
        '404':
          $ref: '#/components/responses/404'
  /v0/backfilling/updates-before:
    post:
      summary: "POST /v0/backfilling/updates-before"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getUpdatesBefore
      description: |
        Retrieve transactions and synchronizer reassignments prior to the
        request's specification.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetUpdatesBeforeRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUpdatesBeforeResponse'
        '404':
          $ref: '#/components/responses/404'
  /v0/backfilling/status:
    get:
      summary: "GET /v0/backfilling/status"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getBackfillingStatus
      description: |
        Retrieve the status of the backfilling process.
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBackfillingStatusResponse'
  /v0/acs/{party}:
    get:
      summary: "GET /v0/acs/:party"
      deprecated: true
      tags:
        - deprecated
      x-jvm-package: scan
      operationId: getAcsSnapshot
      description: '**Deprecated**. Fetch the current SV participant ACS snapshot for the DSO and `party`.'
      parameters:
        - name: party
          in: path
          required: true
          schema:
            type: string
        - name: record_time
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAcsSnapshotResponse'
  /v0/amulet-config-for-round:
    get:
      summary: "GET /v0/amulet-config-for-round"
      deprecated: true
      tags:
        - deprecated
      x-jvm-package: scan
      operationId: getAmuletConfigForRound
      description: |
        **Deprecated**. Retrieve some information from the `AmuletRules` selected for the given round
      parameters:
        - in: query
          name: round
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAmuletConfigForRoundResponse'
        '404':
          $ref: '#/components/responses/404'
  /v0/updates:
    post:
      summary: "POST /v0/updates"
      deprecated: true
      tags:
        - deprecated
      x-jvm-package: scan
      operationId: getUpdateHistory
      description: |
        **Deprecated**, use /v2/updates instead.
        Returns the update history in ascending order, paged, from ledger begin or optionally starting after a record time.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateHistoryRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateHistoryResponse'
        '400':
          $ref: '#/components/responses/400'
        '500':
          $ref: '#/components/responses/500'
  /v0/updates/{update_id}:
    get:
      summary: "GET /v0/updates/:update_id"
      deprecated: true
      tags:
        - deprecated
      x-jvm-package: scan
      operationId: getUpdateById
      description: |
        **Deprecated**, use /v2/updates/{update_id} instead.
      parameters:
        - name: update_id
          in: path
          required: true
          schema:
            type: string
        - name: lossless
          in: query
          description: |
            Whether contract payload should be encoded into json using a lossless, but much harder to process, encoding.
            This is mostly used for backend calls, and is not recommended for external users.
            Optional and defaults to false.
          schema:
            type: boolean
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateHistoryItem'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v0/feature-support:
    get:
      summary: "GET /v0/feature-support"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: featureSupport
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeatureSupportResponse'
        '500':
          $ref: '#/components/responses/500'
  /v0/backfilling/import-updates:
    post:
      summary: "POST /v0/backfilling/import-updates"
      tags:
        - scan
      x-jvm-package: scan
      operationId: getImportUpdates
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetImportUpdatesRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetImportUpdatesResponse'
        '404':
          $ref: '#/components/responses/404'
  /v0/events:
    post:
      summary: "POST /v0/events"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getEventHistory
      description: |
        Returns the event history in ascending order, paged, from ledger begin or optionally starting after a record time.
        An event bears some combination of a transaction, a contract reassignment, and a verdict.
        Events are ordered lexicographically by `(migration id, record time)`.
        For a given migration id, each event has a unique record time.
        The record time ranges of different migrations may overlap, i.e.,
        it is not guaranteed that the maximum record time of one migration is smaller than the minimum record time of the next migration,
        and there may be two updates with the same record time but different migration ids.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventHistoryRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventHistoryResponse'
        '400':
          $ref: '#/components/responses/400'
        '500':
          $ref: '#/components/responses/500'
  /v0/events/{update_id}:
    get:
      summary: "GET /v0/events/:update_id"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: getEventById
      description: |
        Returns the event with the given update_id.
        An event bears some combination of a transaction, a contract reassignment, and a verdict.
      parameters:
        - name: update_id
          in: path
          required: true
          schema:
            type: string
        - name: daml_value_encoding
          in: query
          schema:
            $ref: '#/components/schemas/DamlValueEncoding'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventHistoryItem'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /v0/unclaimed-development-fund-coupons:
    get:
      summary: "GET /v0/unclaimed-development-fund-coupons"
      tags:
        - external
        - scan
      x-jvm-package: scan
      operationId: listUnclaimedDevelopmentFundCoupons
      description: |
        List all unclaimed development fund coupons.
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListUnclaimedDevelopmentFundCouponsResponse'
        '500':
          $ref: '#/components/responses/500'
  /v0/internal/reward-accounting-process/rounds/earliest-available:
    get:
      summary: "GET /v0/internal/reward-accounting-process/rounds/earliest-available"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getRewardAccountingEarliestAvailableRound
      description: |
        SV node internal API (CIP-0104, subject to change).
        Returns the earliest round for which CIP-0104 reward accounting activity
        records are complete.
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRewardAccountingEarliestAvailableRoundResponse'
        '404':
          $ref: '#/components/responses/404'
  /v0/internal/reward-accounting-process/rounds/{round_number}/activity-totals:
    get:
      summary: "GET /v0/internal/reward-accounting-process/rounds/:round_number/activity-totals"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getRewardAccountingActivityTotals
      description: |
        SV node internal API (CIP-0104, subject to change).
        Return the CIP-0104 per-round activity totals for the
        specified round number.
      parameters:
        - name: round_number
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRewardAccountingActivityTotalsResponse'
  /v0/internal/reward-accounting-process/rounds/{round_number}/root-hash:
    get:
      summary: "GET /v0/internal/reward-accounting-process/rounds/:round_number/root-hash"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getRewardAccountingRootHash
      description: |
        SV node internal API (CIP-0104, subject to change).
        Returns the root hash computed for the specified round.
      parameters:
        - name: round_number
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRewardAccountingRootHashResponse'
  /v0/internal/reward-accounting-process/rounds/{round_number}/batches/{batch_hash}:
    get:
      summary: "GET /v0/internal/reward-accounting-process/rounds/:round_number/batches/:batch_hash"
      tags:
        - internal
        - scan
      x-jvm-package: scan
      operationId: getRewardAccountingBatch
      description: |
        SV node internal API (CIP-0104, subject to change).
        Returns the contents of a reward batch identified by its hash.
        The response is either a list of child batch hashes (for internal nodes)
        or a list of minting allowances (for leaf nodes).
      parameters:
        - name: round_number
          in: path
          required: true
          schema:
            type: integer
            format: int64
        - name: batch_hash
          in: path
          required: true
          schema:
            type: string
            description: Hex-encoded batch hash
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRewardAccountingBatchResponse'
        '404':
          $ref: '#/components/responses/404'
  /v0/history/bulk/acs:
    get:
      summary: "GET /v0/history/bulk/acs"
      tags:
        - pre-alpha
        - scan
      x-jvm-package: scan
      operationId: listBulkAcsSnapshotObjects
      description: |
        **Under Development, do not use in production yet** Get download URLs and metadata for an ACS snapshot available for bulk download, at or before a certain record time.
      parameters:
        - name: at_or_before_record_time
          in: query
          required: true
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListBulkAcsSnapshotObjectsResponse'
        '404':
          $ref: '#/components/responses/404'
        '501':
          $ref: '#/components/responses/501'
  /v0/history/bulk/updates:
    post:
      summary: "POST /v0/history/bulk/updates"
      tags:
        - pre-alpha
        - scan
      x-jvm-package: scan
      operationId: listBulkUpdateHistoryObjects
      description: |
        **Under Development, do not use in production yet** Get download URLs and metadata for update history objects available for bulk download, between two record times.
        Note that the returned objects may include also updates outside of the requested record time range (since only full objects are served from storage), but guaranteed
        to include all updates in the requested range.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListBulkUpdateHistoryObjectsRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListBulkUpdateHistoryObjectsResponse'
        '400':
          $ref: '#/components/responses/404'
        '404':
          $ref: '#/components/responses/404'
        '501':
          $ref: '#/components/responses/501'
  /v0/history/bulk/checksums:
    post:
      summary: "POST /v0/history/bulk/checksums"
      tags:
        - internal
        - pre-alpha
        - scan
      x-jvm-package: scan
      operationId: getBulkObjectChecksums
      description: |
        **Under Development, do not use in production yet** Get checksums for bulk history objects. Searches for object_keys in both staging and committed objects.
        Meant for internal use only, as part of the processing pipeline of bulk history objects.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetBulkObjectChecksumsRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBulkObjectChecksumsResponse'
        '501':
          $ref: '#/components/responses/501'
components:
  schemas:
    GetSpliceInstanceNamesResponse:
      type: object
      required:
        - network_name
        - network_favicon_url
        - amulet_name
        - amulet_name_acronym
        - name_service_name
        - name_service_name_acronym
      properties:
        network_name:
          description: What to call this Splice network.
          type: string
        network_favicon_url:
          description: URL of an HTML favicon for this Splice network.
          type: string
        amulet_name:
          description: What this Splice network calls Amulet.
          type: string
        amulet_name_acronym:
          description: The three-letter acronym for Amulet.
          type: string
        name_service_name:
          description: What this Splice network calls the Amulet Name Service.
          type: string
        name_service_name_acronym:
          description: The acronym for `name_service_name`.
          type: string
    GetDsoPartyIdResponse:
      type: object
      required:
        - dso_party_id
      properties:
        dso_party_id:
          type: string
    GetClosedRoundsResponse:
      type: object
      required:
        - rounds
      properties:
        rounds:
          description: |
            Contracts of the Daml template `Splice.Round:ClosedMiningRound`, one
            for every closed round that is still in process, i.e. it either has
            unprocessed rewards or a missing `Splice.DsoRules:Confirmation`.
          type: array
          items:
            $ref: '#/components/schemas/Contract'
    GetOpenAndIssuingMiningRoundsRequest:
      type: object
      required:
        - cached_open_mining_round_contract_ids
        - cached_issuing_round_contract_ids
      properties:
        cached_open_mining_round_contract_ids:
          description: |
            The contract IDs for `open_mining_rounds` in the response the caller
            knows about. If unsure, an empty array is fine; only a performance
            penalty is incurred.
          type: array
          items:
            $ref: '#/components/schemas/ContractId'
        cached_issuing_round_contract_ids:
          description: |
            The contract IDs for `issuing_mining_rounds` in the response the
            caller knows about. If unsure, an empty array is fine; only a
            performance penalty is incurred.
          type: array
          items:
            $ref: '#/components/schemas/ContractId'
    GetOpenAndIssuingMiningRoundsResponse:
      description: |
        Daml contracts of the templates `Splice.Round.OpenMiningRound` and
        `Splice.Round.IssuingMiningRound` representing rounds for which rewards
        can be registered or are currently being computed, respectively.
        Contract IDs in the input serve as input sets for the two
        `MaybeCachedContractWithStateMap`s as described for that structure for
        `open_mining_rounds` and `issuing_mining_rounds`.
      type: object
      required:
        - open_mining_rounds
        - issuing_mining_rounds
        - time_to_live_in_microseconds
      properties:
        time_to_live_in_microseconds:
          description: |
            Suggested cache TTL for the response; this should expire before the
            `opensAt` of any open rounds that may not be in this response yet.
          type: integer
        open_mining_rounds:
          $ref: '#/components/schemas/MaybeCachedContractWithStateMap'
        issuing_mining_rounds:
          $ref: '#/components/schemas/MaybeCachedContractWithStateMap'
    GetAmuletRulesRequest:
      type: object
      properties:
        cached_amulet_rules_contract_id:
          $ref: '#/components/schemas/ContractId'
        cached_amulet_rules_domain_id:
          type: string
    GetAmuletRulesResponse:
      description: |
        Contract of the Daml template `Splice.AmuletRules.AmuletRules`,
        including the full schedule of `AmuletConfig` changes approved by
        the DSO. Callers should not assume that `initialValue` is up-to-date,
        and should instead search `futureValues` for the latest configuration
        valid as of now. `contract` will be absent if its ID matches the input
        `cached_amulet_rules_contract_id`.
      type: object
      properties:
        amulet_rules_update:
          $ref: '#/components/schemas/MaybeCachedContractWithState'
      required:
        - amulet_rules_update
    GetExternalPartyAmuletRulesRequest:
      type: object
      properties:
        cached_external_party_amulet_rules_contract_id:
          $ref: '#/components/schemas/ContractId'
        cached_external_party_amulet_rules_domain_id:
          type: string
    GetExternalPartyAmuletRulesResponse:
      description: |
        A contract state update of Daml template
        `Splice.ExternalPartyAmuletRules.ExternalPartyAmuletRules`
      type: object
      properties:
        external_party_amulet_rules_update:
          $ref: '#/components/schemas/MaybeCachedContractWithState'
      required:
        - external_party_amulet_rules_update
    GetAnsRulesRequest:
      type: object
      properties:
        cached_ans_rules_contract_id:
          $ref: '#/components/schemas/ContractId'
        cached_ans_rules_domain_id:
          type: string
    GetAnsRulesResponse:
      description: |
        A contract state update of Daml template `Splice.Ans.AnsRules`.
      type: object
      properties:
        ans_rules_update:
          $ref: '#/components/schemas/MaybeCachedContractWithState'
      required:
        - ans_rules_update
    ListFeaturedAppRightsResponse:
      description: |
        Contracts of Daml template `Splice.Amulet.FeaturedAppRight`.
      type: object
      required:
        - featured_apps
      properties:
        featured_apps:
          type: array
          items:
            $ref: '#/components/schemas/Contract'
    LookupFeaturedAppRightResponse:
      description: |
        If defined, a contract of Daml template `Splice.Amulet.FeaturedAppRight`.
      type: object
      properties:
        featured_app_right:
          $ref: '#/components/schemas/Contract'
    GetAmuletConfigForRoundResponse:
      type: object
      required:
        - amulet_create_fee
        - holding_fee
        - lock_holder_fee
        - transfer_fee
      properties:
        amulet_create_fee:
          type: string
        holding_fee:
          type: string
        lock_holder_fee:
          type: string
        transfer_fee:
          $ref: '#/components/schemas/SteppedRate'
    SteppedRate:
      type: object
      required:
        - initial
        - steps
      properties:
        initial:
          type: string
        steps:
          type: array
          items:
            $ref: '#/components/schemas/RateStep'
    RateStep:
      type: object
      required:
        - amount
        - rate
      properties:
        amount:
          type: string
        rate:
          type: string
    GetValidatorTrafficBalanceResponse:
      type: object
      required:
        - remainingBalance
        - totalPurchased
      properties:
        remainingBalance:
          type: number
          format: double
        totalPurchased:
          type: number
          format: double
    CheckAndUpdateValidatorTrafficBalanceResponse:
      type: object
      required:
        - approved
      properties:
        approved:
          type: boolean
    ValidatorPurchasedTraffic:
      type: object
      required:
        - validator
        - numPurchases
        - totalTrafficPurchased
        - totalCcSpent
        - lastPurchasedInRound
      properties:
        validator:
          type: string
        numPurchases:
          type: integer
          format: int64
        totalTrafficPurchased:
          type: integer
          format: int64
        totalCcSpent:
          type: string
        lastPurchasedInRound:
          type: integer
          format: int64
    ListSvBftSequencersResponse:
      type: object
      required:
        - bftSequencers
      properties:
        bftSequencers:
          type: array
          items:
            $ref: '#/components/schemas/SynchronizerBftSequencer'
    SynchronizerBftSequencer:
      type: object
      required:
        - serialId
        - id
        - p2pUrl
      properties:
        serialId:
          description: |
            The synchronizer serial corresponding to this sequencer.
          type: integer
          format: int64
        id:
          description: The id of the sequencer.
          type: string
        p2pUrl:
          description: The public accessible P2P url of the sequencer, use for inter sequencer communication.
          type: string
    ListDsoSequencersResponse:
      type: object
      required:
        - domainSequencers
      properties:
        domainSequencers:
          type: array
          items:
            $ref: '#/components/schemas/DomainSequencers'
    DomainSequencers:
      type: object
      required:
        - domainId
        - sequencers
      properties:
        domainId:
          description: the synchronizer ID for the associated sequencers
          type: string
        sequencers:
          description: the sequencers associated with the synchronizer
          type: array
          items:
            $ref: '#/components/schemas/DsoSequencer'
    DsoSequencer:
      type: object
      required:
        - migrationId
        - id
        - url
        - svName
        - availableAfter
      properties:
        migrationId:
          description: |
            The synchronizer migration id corresponding to this sequencer.
            Set to -1 if serial is set.
          type: integer
          format: int64
        synchronizerSerial:
          description: |
            The synchronizer serial corresponding to this sequencer.
            One of migrationId or serialId will be set.
          type: integer
          format: int64
        id:
          description: The id of the sequencer.
          type: string
        url:
          description: The public accessible url of the sequencer.
          type: string
        svName:
          description: The sequencer's operating SV name.
          type: string
        availableAfter:
          description: |
            Any participant should subscribe to this sequencer after this time.
          type: string
          format: date-time
    GetRollForwardLsuResponse:
      type: object
      properties:
        rollForwardLsu:
          description: Info on a roll-forward LSU
          $ref: '#/components/schemas/RollForwardLsu'
    RollForwardLsu:
      type: object
      required:
        - upgradeTime
        - currentPhysicalSynchronizerId
        - successorPhysicalSynchronizerId
      properties:
        upgradeTime:
          description: The time at which to upgrade
          type: string
          format: date-time
        currentPhysicalSynchronizerId:
          type: string
        successorPhysicalSynchronizerId:
          type: string
    GetLsuResponse:
      type: object
      properties:
        lsu:
          description: Info on the next LSU
          $ref: '#/components/schemas/Lsu'
    Lsu:
      type: object
      required:
        - topologyFreezeTime
        - upgradeTime
        - successorPhysicalSynchronizerId
      properties:
        topologyFreezeTime:
          description: The time when topology freeze starts
          type: string
          format: date-time
        upgradeTime:
          description: The time at which to upgrade
          type: string
          format: date-time
        successorPhysicalSynchronizerId:
          description: The successor physical synchronizer ID
          type: string
    GetActivePhysicalSynchronizerSerialResponse:
      type: object
      required:
        - serial
      properties:
        serial:
          description: |
            The current physical synchronizer serial as reported by the SV participant.
          type: integer
          format: int64
    ListDsoScansResponse:
      type: object
      required:
        - scans
      properties:
        scans:
          type: array
          items:
            $ref: '#/components/schemas/DomainScans'
    DomainScans:
      type: object
      required:
        - domainId
        - scans
      properties:
        domainId:
          type: string
        scans:
          description: |
            SV scans for the associated synchronizer ID; there is at most one
            scan per SV for each synchronizer ID.
          type: array
          items:
            $ref: '#/components/schemas/ScanInfo'
    ScanInfo:
      type: object
      required:
        - publicUrl
        - svName
      properties:
        publicUrl:
          description: The public accessible url of the scan.
          type: string
        svName:
          description: The sequencer's operating SV name.
          type: string
    UpdateHistoryRequestAfter:
      type: object
      required:
        - after_migration_id
        - after_record_time
      properties:
        after_migration_id:
          type: integer
          format: int64
          description: |
            The migration id from which to start returning transactions. This is inclusive.
        after_record_time:
          type: string
          description: |
            The record time to start returning transactions from. This only affects
            transactions with the same migration id as after_migration_id. Higher migration ids
            are always considered to be later.
    UpdateHistoryRequest:
      type: object
      required:
        - page_size
      properties:
        after:
          $ref: '#/components/schemas/UpdateHistoryRequestAfter'
          description: |
            The transactions returned will either have a higher migration id or
            the same migration id and a record_time greater than the migration id and record time
            specified.
        page_size:
          description: |
            The maximum number of transactions returned for this request.
          type: integer
          format: int32
        lossless:
          description: |
            Whether contract payload should be encoded into json using a lossless, but much harder to process, encoding.
            This is mostly used for backend calls, and is not recommended for external users.
            Optional and defaults to false.
          type: boolean
    UpdateHistoryRequestV1:
      type: object
      required:
        - page_size
      properties:
        after:
          $ref: '#/components/schemas/UpdateHistoryRequestAfter'
          description: |
            The transactions returned will either have a higher migration id or
            the same migration id and a record_time greater than the migration id and record time
            specified.
        page_size:
          description: |
            The maximum number of transactions returned for this request.
          type: integer
          format: int32
        daml_value_encoding:
          $ref: '#/components/schemas/DamlValueEncoding'
    UpdateHistoryRequestV2:
      type: object
      required:
        - page_size
      properties:
        after:
          $ref: '#/components/schemas/UpdateHistoryRequestAfter'
          description: |
            The transactions returned will either have a higher migration id or
            the same migration id and a record_time greater than the migration id and record time
            specified.
        page_size:
          description: |
            The maximum number of transactions returned for this request.
          type: integer
          format: int32
        daml_value_encoding:
          $ref: '#/components/schemas/DamlValueEncoding'
    UpdateHistoryResponseV2:
      type: object
      required:
        - transactions
      properties:
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/UpdateHistoryItemV2'
    UpdateHistoryResponse:
      type: object
      required:
        - transactions
      properties:
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/UpdateHistoryItem'
    UpdateHistoryItemV2WithHash:
      type: object
      description: |
        An individual item in the update history. May be a transaction or a contract reassignment.
      oneOf:
        - $ref: '#/components/schemas/UpdateHistoryTransactionV2WithHash'
        - $ref: '#/components/schemas/UpdateHistoryReassignment'
    UpdateHistoryItemV2:
      type: object
      description: |
        An individual item in the update history. May be a transaction or a contract reassignment.
      oneOf:
        - $ref: '#/components/schemas/UpdateHistoryTransactionV2'
        - $ref: '#/components/schemas/UpdateHistoryReassignment'
    UpdateHistoryItem:
      type: object
      description: |
        An individual item in the update history. May be a transaction or a contract reassignment.
      oneOf:
        - $ref: '#/components/schemas/UpdateHistoryTransaction'
        - $ref: '#/components/schemas/UpdateHistoryReassignment'
    UpdateHistoryReassignment:
      type: object
      description: A contract reassignment between synchronizer. May be an assignment or unassignment.
      required:
        - update_id
        - offset
        - record_time
        - event
      properties:
        update_id:
          description: |
            The id of the update.
          type: string
        offset:
          description: |
            The absolute offset.
            Note that this field may not be the same across nodes, and therefore should not be compared between SVs.
          type: string
        record_time:
          description: |
            The time at which the transaction was sequenced.
          type: string
        event:
          description: |
            The reassignment event. May be an assignment or unassignment.
          type: object
          oneOf:
            - $ref: '#/components/schemas/UpdateHistoryAssignment'
            - $ref: '#/components/schemas/UpdateHistoryUnassignment'
    UpdateHistoryAssignment:
      type: object
      required:
        - submitter
        - source_synchronizer
        - target_synchronizer
        - migration_id
        - unassign_id
        - created_event
        - reassignment_counter
      properties:
        submitter:
          description: |
            The party ID who submitted this reassignment
          type: string
        source_synchronizer:
          description: |
            The id of the synchronizer from which the contract was reassigned
          type: string
        target_synchronizer:
          description: |
            The id of the synchronizer to which the contract was reassigned
          type: string
        migration_id:
          description: |
            The migration id of the target synchronizer
          type: integer
          format: int64
        unassign_id:
          description: |
            The id of the corresponding unassign event; this assignment will
            usually, but not always, occur after the so-identified unassignment
            event.
          type: string
        created_event:
          description: |
            The corresponding contract create event
          $ref: '#/components/schemas/CreatedEvent'
        reassignment_counter:
          description: Each corresponding assigned and unassigned event has the same reassignment_counter. This strictly increases with each unassign command for the same contract. Creation of the contract corresponds to reassignment_counter 0.
          type: integer
          format: int64
    UpdateHistoryUnassignment:
      type: object
      required:
        - submitter
        - source_synchronizer
        - migration_id
        - target_synchronizer
        - unassign_id
        - reassignment_counter
        - contract_id
      properties:
        submitter:
          description: |
            The party who submitted this reassignment
          type: string
        source_synchronizer:
          description: |
            The id of the synchronizer from which the contract was reassigned
          type: string
        migration_id:
          description: |
            The migration id of the synchronizer from which the contract was reassigned
          type: integer
          format: int64
        target_synchronizer:
          description: |
            The id of the synchronizer to which the contract was reassigned
          type: string
        unassign_id:
          description: |
            The id of the unassign event, to later be correlated to an assign event
          type: string
        reassignment_counter:
          description: Each corresponding assigned and unassigned event has the same reassignment_counter. This strictly increases with each unassign command for the same contract. Creation of the contract corresponds to reassignment_counter 0.
          type: integer
          format: int64
        contract_id:
          description: |
            The id of the unassigned contract
          type: string
    UpdateHistoryTransaction:
      type: object
      required:
        - update_id
        - migration_id
        - workflow_id
        - record_time
        - synchronizer_id
        - effective_at
        - offset
        - root_event_ids
        - events_by_id
      properties:
        update_id:
          description: |
            The id of the update.
          type: string
        migration_id:
          description: |
            The migration id of the synchronizer.
          type: integer
          format: int64
        workflow_id:
          description: |
            This transaction's Daml workflow ID; a workflow ID can be associated
            with multiple transactions. If empty, no workflow ID was set.
          type: string
        record_time:
          description: |
            The time at which the transaction was sequenced, with microsecond
            resolution, using ISO-8601 representation.
          type: string
        synchronizer_id:
          description: |
            The id of the synchronizer through which this transaction was sequenced.
          type: string
        effective_at:
          description: |
            Ledger effective time, using ISO-8601 representation. This is the time
            returned by `getTime` for all Daml executed as part of this transaction,
            both by the submitting participant and all confirming participants.
          type: string
        offset:
          description: |
            The absolute offset.
            Note that this field may not be the same across nodes, and therefore should not be compared between SVs.
            However, within a single SV's scan, it is monotonically, lexicographically increasing.
          type: string
        root_event_ids:
          description: |
            Roots of the transaction tree. These are guaranteed to occur as keys
            of the `events_by_id` object.
          type: array
          items:
            type: string
        events_by_id:
          description: |
            Changes to the ledger that were caused by this transaction, keyed by ID.
            Values are nodes of the transaction tree.
            Within a transaction, IDs may be referenced by `root_event_ids` or
            `child_event_ids` in `ExercisedEvent` herein.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TreeEvent'
        external_transaction_hash:
          description: |
            For an externally signed transaction, contains the external transaction hash
            signed by the external party. Can be used to correlate an external submission with a committed transaction.
            This field is conditionally omitted from JSON when null (see OmitNullString).
          type: string
          x-scala-type: org.lfdecentralizedtrust.splice.http.OmitNullString
    BaseUpdateHistoryTransaction:
      type: object
      required:
        - update_id
        - migration_id
        - workflow_id
        - record_time
        - synchronizer_id
        - effective_at
        - root_event_ids
        - events_by_id
      properties:
        update_id:
          description: |
            The id of the update.
          type: string
        migration_id:
          description: |
            The migration id of the synchronizer.
          type: integer
          format: int64
        workflow_id:
          description: |
            This transaction's Daml workflow ID; a workflow ID can be associated
            with multiple transactions. If empty, no workflow ID was set.
          type: string
        record_time:
          description: |
            The time at which the transaction was sequenced, with microsecond
            resolution, using ISO-8601 representation.
          type: string
        synchronizer_id:
          description: |
            The id of the synchronizer through which this transaction was sequenced.
          type: string
        effective_at:
          description: |
            Ledger effective time, using ISO-8601 representation. This is the time
            returned by `getTime` for all Daml executed as part of this transaction,
            both by the submitting participant and all confirming participants.
          type: string
        root_event_ids:
          description: |
            Roots of the transaction tree. These are guaranteed to occur as keys
            of the `events_by_id` object.
          type: array
          items:
            type: string
        events_by_id:
          x-scala-map-type: scala.collection.immutable.SortedMap
          description: |
            Changes to the ledger that were caused by this transaction, keyed by ID and sorted lexicographically by ID for display consistency.
            Values are nodes of the transaction tree.
            Within a transaction, IDs may be referenced by `root_event_ids` or
            `child_event_ids` in `ExercisedEvent` herein, which are sorted in the order as they occurred in the transaction.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TreeEvent'
    UpdateHistoryTransactionV2:
      allOf:
        - $ref: '#/components/schemas/BaseUpdateHistoryTransaction'
        - type: object
          properties:
            external_transaction_hash:
              description: |
                For an externally signed transaction, contains the external transaction hash
                signed by the external party. Can be used to correlate an external submission with a committed transaction.
                This field is conditionally omitted from JSON when null (see OmitNullString).
              type: string
              x-scala-type: org.lfdecentralizedtrust.splice.http.OmitNullString
    UpdateHistoryTransactionV2WithHash:
      allOf:
        - $ref: '#/components/schemas/BaseUpdateHistoryTransaction'
        - type: object
          required:
            - external_transaction_hash
          properties:
            external_transaction_hash:
              description: |
                For an externally signed transaction, contains the external transaction hash
                signed by the external party. Can be used to correlate an external submission with a committed transaction.
              type: string
              x-scala-type: org.lfdecentralizedtrust.splice.http.OmitNullString
    TreeEvent:
      type: object
      description: |
        Either a creation or an exercise of a contract.
      oneOf:
        - $ref: '#/components/schemas/CreatedEvent'
        - $ref: '#/components/schemas/ExercisedEvent'
      discriminator:
        propertyName: event_type
        mapping:
          created_event: '#/components/schemas/CreatedEvent'
          exercised_event: '#/components/schemas/ExercisedEvent'
    CreatedEvent:
      type: object
      required:
        - event_type
        - event_id
        - contract_id
        - template_id
        - package_name
        - create_arguments
        - created_at
        - signatories
        - observers
      properties:
        event_type:
          type: string
        event_id:
          description: |
            The ID of this particular event. Equal to the key of this element of
            the containing `events_by_id` if this is part of a `TreeEvent`.
          type: string
        contract_id:
          description: |
            The ID of the created contract.
          type: string
        template_id:
          description: |
            The template of the created contract.
          type: string
        package_name:
          description: |
            The package name of the created contract.
          type: string
        create_arguments:
          description: |
            The arguments that have been used to create the contract, in the
            form of JSON representation of a Daml record.
          type: object
        created_at:
          description: |
            Ledger effective time of the transaction that created the contract.
          type: string
          format: date-time
        signatories:
          description: |
            Signatories to the contract, in the form of party IDs.
          type: array
          items:
            type: string
        observers:
          description: |
            Observers to the contract, in the form of party IDs.
          type: array
          items:
            type: string
    ActiveContract:
      type: object
      required:
        - contract_id
        - template_id
        - package_name
        - create_arguments
        - created_at
        - signatories
        - observers
      properties:
        created_in_update_id:
          description: |
            The id of the update in which this contract was created.
            Optional and will be absent for contracts created in prior migration IDs.
          type: string
        contract_id:
          description: |
            The ID of the created contract.
          type: string
        template_id:
          description: |
            The template of the created contract.
          type: string
        package_name:
          description: |
            The package name of the created contract.
          type: string
        create_arguments:
          description: |
            The arguments that have been used to create the contract, in the
            form of JSON representation of a Daml record.
          type: object
        created_at:
          description: |
            Ledger effective time of the transaction that created the contract.
          type: string
          format: date-time
        signatories:
          description: |
            Signatories to the contract, in the form of party IDs.
          type: array
          items:
            type: string
        observers:
          description: |
            Observers to the contract, in the form of party IDs.
          type: array
          items:
            type: string
    ExercisedEvent:
      type: object
      required:
        - event_type
        - event_id
        - contract_id
        - template_id
        - package_name
        - choice
        - choice_argument
        - child_event_ids
        - exercise_result
        - consuming
        - acting_parties
      properties:
        event_type:
          type: string
        event_id:
          description: |
            The ID of this particular event. Equal to the key of this element of
            the containing `events_by_id` if this is part of a `TreeEvent`.
          type: string
        contract_id:
          description: |
            The ID of the created contract.
          type: string
        template_id:
          description: |
            The template of the created contract.
          type: string
        package_name:
          description: |
            The package name of the created contract.
          type: string
        choice:
          description: |
            The choice that was exercised on the target contract, as an unqualified
            choice name, i.e. with no package or module name qualifiers.
          type: string
        choice_argument:
          description: |
            The argument of the exercised choice, in the form of JSON
            representation of a Daml value. This is usually a record with field
            names being the argument names, even in the case of a single apparent
            choice argument, which is represented as a single-element Daml record.
          type: object
        child_event_ids:
          description: |
            References to further events in the same transaction that appeared as a result of this ExercisedEvent.
            It contains only the immediate children of this event, not all members of the subtree rooted at this node.
            The order of the children is the same as the event order in the transaction.
          type: array
          items:
            type: string
        exercise_result:
          description: |
            The result of exercising the choice, as the JSON representation of a
            Daml value.
          type: object
        consuming:
          description: |
            If true, the target contract may no longer be exercised.
          type: boolean
        acting_parties:
          description: |
            The parties that exercised the choice, in the form of party IDs.
          type: array
          items:
            type: string
        interface_id:
          description: |
            The interface where the choice is defined, if inherited.
          type: string
    AcsSnapshotTimestampResponse:
      type: object
      required:
        - record_time
      properties:
        record_time:
          type: string
          format: date-time
          description: |
            The record time of the last transaction in the snapshot.
    AcsRequest:
      type: object
      required:
        - migration_id
        - record_time
        - page_size
      properties:
        migration_id:
          type: integer
          format: int64
          description: |
            The migration id for which to return the ACS.
        record_time:
          type: string
          format: date-time
          description: |
            The timestamp at which the contract set was active.
            This needs to be an exact timestamp, i.e.,
            needs to correspond to a timestamp reported by `/v0/state/acs/snapshot-timestamp` if `record_time_match` is set to `exact` (which is the default).
            If `record_time_match` is set to `at_or_before`, this can be any timestamp, and the most recent snapshot at or before the given `record_time` will be returned.
        record_time_match:
          type: string
          description: |
            How to match the record_time. "exact" requires the record_time to match exactly.
            "at_or_before" finds the most recent snapshot at or before the given record_time.
          enum:
            - exact
            - at_or_before
          default: exact
        after:
          type: integer
          format: int64
          description: |
            Pagination token for the next page of results. For this to be valid,
            this must be the `next_page_token` from a prior request with identical
            parameters aside from `after` and `page_size`; the response may be
            invalid otherwise.
        page_size:
          description: |
            The maximum number of created events returned for this request.
          type: integer
          format: int32
        party_ids:
          type: array
          items:
            type: string
          description: |
            Filters the ACS by contracts in which these party IDs are stakeholders.
        templates:
          type: array
          items:
            type: string
          description: |
            Filters the ACS by contracts with these template IDs, specified as "PACKAGE_NAME:MODULE_NAME:ENTITY_NAME".
    HoldingsStateRequest:
      type: object
      required:
        - migration_id
        - record_time
        - page_size
        - owner_party_ids
      properties:
        migration_id:
          type: integer
          format: int64
          description: |
            The migration id for which to return the ACS.
        record_time:
          type: string
          format: date-time
          description: |
            The timestamp at which the contract set was active.
            This needs to be an exact timestamp, i.e.,
            needs to correspond to a timestamp reported by `/v0/state/acs/snapshot-timestamp` if `record_time_match` is set to `exact` (which is the default).
            If `record_time_match` is set to `at_or_before`, this can be any timestamp, and the most recent snapshot at or before the given `record_time` will be returned.
        record_time_match:
          type: string
          description: |
            How to match the record_time. "exact" requires the record_time to match exactly.
            "at_or_before" finds the most recent snapshot at or before the given record_time.
          enum:
            - exact
            - at_or_before
          default: exact
        after:
          type: integer
          format: int64
          description: |
            Pagination token for the next page of results.
        page_size:
          description: |
            The maximum number of created events returned for this request.
          type: integer
          format: int32
        owner_party_ids:
          type: array
          items:
            type: string
          minItems: 1
          description: |
            Filters by contracts in which these party_ids are the owners of the amulets.
    HoldingsSummaryRequest:
      type: object
      required:
        - migration_id
        - record_time
        - owner_party_ids
      properties:
        migration_id:
          type: integer
          format: int64
          description: |
            The migration id for which to return the summary.
        record_time:
          type: string
          format: date-time
          description: |
            The timestamp at which the contract set was active.
            This needs to be an exact timestamp, i.e.,
            needs to correspond to a timestamp reported by `/v0/state/acs/snapshot-timestamp` if `record_time_match` is set to `exact` (which is the default).
            If `record_time_match` is set to `at_or_before`, this can be any timestamp, and the most recent snapshot at or before the given `record_time` will be returned.
        record_time_match:
          type: string
          description: |
            How to match the record_time. "exact" requires the record_time to match exactly.
            "at_or_before" finds the most recent snapshot at or before the given record_time.
          enum:
            - exact
            - at_or_before
          default: exact
        owner_party_ids:
          type: array
          items:
            type: string
          minItems: 1
          description: |
            The owners for which to compute the summary.
        as_of_round:
          type: integer
          format: int64
          description: |
            Compute holding fees as of this round. Defaults to the earliest open mining round.
    HoldingsSummaryRequestV1:
      type: object
      required:
        - migration_id
        - record_time
        - owner_party_ids
      properties:
        migration_id:
          type: integer
          format: int64
          description: |
            The migration id for which to return the summary.
        record_time:
          type: string
          format: date-time
          description: |
            The timestamp at which the contract set was active.
            This needs to be an exact timestamp, i.e.,
            needs to correspond to a timestamp reported by `/v0/state/acs/snapshot-timestamp` if `record_time_match` is set to `exact` (which is the default).
            If `record_time_match` is set to `at_or_before`, this can be any timestamp, and the most recent snapshot at or before the given `record_time` will be returned.
        record_time_match:
          type: string
          description: |
            How to match the record_time. "exact" requires the record_time to match exactly.
            "at_or_before" finds the most recent snapshot at or before the given record_time.
          enum:
            - exact
            - at_or_before
          default: exact
        owner_party_ids:
          type: array
          items:
            type: string
          minItems: 1
          description: |
            The owners for which to compute the summary.
    ForceAcsSnapshotResponse:
      type: object
      required:
        - record_time
        - migration_id
      properties:
        record_time:
          description: |
            The [recent] time for which this ACS snapshot was persisted.
          type: string
          format: date-time
        migration_id:
          description: The current migration ID of the Scan.
          type: integer
          format: int64
    AcsResponse:
      type: object
      required:
        - record_time
        - migration_id
        - created_events
      properties:
        record_time:
          description: The same `record_time` as in the request.
          type: string
          format: date-time
        migration_id:
          description: The same `migration_id` as in the request.
          type: integer
          format: int64
        created_events:
          description: |
            Up to `page_size` contracts in the ACS.
            `create_arguments` are always encoded as `compact_json`.
          type: array
          items:
            $ref: '#/components/schemas/CreatedEvent'
        next_page_token:
          type: integer
          format: int64
          description: |
            When requesting the next page of results, pass this as `after`
            to the `AcsRequest` or `HoldingsStateRequest`.
            Will be absent when there are no more pages.
    AcsResponseV1:
      type: object
      required:
        - record_time
        - migration_id
        - created_events
      properties:
        record_time:
          description: The same `record_time` as in the request.
          type: string
          format: date-time
        migration_id:
          description: The same `migration_id` as in the request.
          type: integer
          format: int64
        created_events:
          description: |
            Up to `page_size` contracts in the ACS.
            `create_arguments` are always encoded as `compact_json`.
          type: array
          items:
            $ref: '#/components/schemas/ActiveContract'
        next_page_token:
          type: integer
          format: int64
          description: |
            When requesting the next page of results, pass this as `after`
            to the `AcsRequest` or `HoldingsStateRequest`.
            Will be absent when there are no more pages.
    HoldingsSummaryResponse:
      type: object
      required:
        - record_time
        - migration_id
        - computed_as_of_round
        - summaries
      properties:
        record_time:
          description: The same `record_time` as in the request.
          type: string
          format: date-time
        migration_id:
          description: The same `migration_id` as in the request.
          type: integer
          format: int64
        computed_as_of_round:
          description: The same `as_of_round` as in the request, with the same default.
          type: integer
          format: int64
        summaries:
          type: array
          items:
            $ref: '#/components/schemas/HoldingsSummary'
    HoldingsSummary:
      description: Aggregate Amulet totals for a particular owner party ID.
      type: object
      required:
        - party_id
        - total_unlocked_coin
        - total_locked_coin
        - total_coin_holdings
        - accumulated_holding_fees_unlocked
        - accumulated_holding_fees_locked
        - accumulated_holding_fees_total
        - total_available_coin
      properties:
        party_id:
          description: |
            Owner party ID of the amulet. Guaranteed to be unique among `summaries`.
          type: string
        total_unlocked_coin:
          description: |
            Sum of unlocked amulet at time of reception, not counting holding
            fees deducted since.
          type: string
        total_locked_coin:
          description: |
            Sum of locked amulet at time of original amulet reception, not
            counting holding fees deducted since.
          type: string
        total_coin_holdings:
          description: |
            `total_unlocked_coin` + `total_locked_coin`.
          type: string
        accumulated_holding_fees_unlocked:
          description: |
            Sum of holding fees as of `computed_as_of_round` that apply to
            unlocked amulet.
          type: string
        accumulated_holding_fees_locked:
          description: |
            Sum of holding fees as of `computed_as_of_round` that apply to
            locked amulet, including fees applied since the amulet's creation
            round.
          type: string
        accumulated_holding_fees_total:
          description: |
            Same as `accumulated_holding_fees_unlocked` + `accumulated_holding_fees_locked`.
          type: string
        total_available_coin:
          description: Same as `total_unlocked_coin` - `accumulated_holding_fees_unlocked`.
          type: string
    HoldingsSummaryResponseV1:
      type: object
      required:
        - record_time
        - migration_id
        - summaries
      properties:
        record_time:
          description: The same `record_time` as in the request.
          type: string
          format: date-time
        migration_id:
          description: The same `migration_id` as in the request.
          type: integer
          format: int64
        summaries:
          type: array
          items:
            $ref: '#/components/schemas/HoldingsSummaryV1'
    HoldingsSummaryV1:
      description: Aggregate Amulet totals for a particular owner party ID.
      type: object
      required:
        - party_id
        - total_unlocked_coin
        - total_locked_coin
        - total_coin_holdings
      properties:
        party_id:
          description: |
            Owner party ID of the amulet. Guaranteed to be unique among `summaries`.
          type: string
        total_unlocked_coin:
          description: |
            Sum of unlocked amulet initial amounts, not counting holding
            fees deducted since.
          type: string
        total_locked_coin:
          description: |
            Sum of locked amulet initial amounts, not
            counting holding fees deducted since.
          type: string
        total_coin_holdings:
          description: |
            `total_unlocked_coin` + `total_locked_coin`.
          type: string
    Transfer:
      description: |
        A transfer between one sender and possibly many receivers
      type: object
      required:
        - sender
        - receivers
        - balance_changes
      properties:
        sender:
          description: |
            The sender amounts and fees.
          $ref: '#/components/schemas/SenderAmount'
        receivers:
          description: |
            The amounts and fees per receiver.
          type: array
          items:
            $ref: '#/components/schemas/ReceiverAmount'
        balance_changes:
          description: |
            Normalized balance changes per party caused by this transfer.
          type: array
          items:
            $ref: '#/components/schemas/BalanceChange'
        description:
          type: string
        transferInstructionReceiver:
          type: string
        transferInstructionAmount:
          type: string
        transferInstructionCid:
          type: string
        transfer_kind:
          type: string
          enum:
            - create_transfer_instruction
            - transfer_instruction_accept
            - preapproval_send
    AbortTransferInstruction:
      type: object
      required:
        - abort_kind
        - transfer_instruction_cid
      properties:
        abort_kind:
          type: string
          enum:
            - withdraw
            - reject
        transfer_instruction_cid:
          type: string
    BalanceChange:
      type: object
      required:
        - party
        - change_to_initial_amount_as_of_round_zero
        - change_to_holding_fees_rate
      properties:
        party:
          description: |
            The party for which the balance changes.
          type: string
        change_to_initial_amount_as_of_round_zero:
          description: |
            The change to the total balance introduced by this balance change, normalized to round zero, i.e.,
            a amulet created in round 3 is treated as a amulet created in round 0 with a higher initial amount.
          type: string
        change_to_holding_fees_rate:
          description: |
            The change of total holding fees introduced by this balance change.
          type: string
    AmuletAmount:
      type: object
      required:
        - amulet_owner
        - amulet_amount
      properties:
        amulet_owner:
          description: |
            The party that owns the amulet.
          type: string
        amulet_amount:
          description: |
            The amulet amount.
          type: string
    SenderAmount:
      type: object
      required:
        - party
        - sender_change_fee
        - sender_change_amount
        - sender_fee
        - holding_fees
      properties:
        party:
          description: |
            The sender who has transferred amulet.
          type: string
        input_amulet_amount:
          description: |
            Total amount of amulet input into this transfer, before deducting holding fees.
          type: string
        input_app_reward_amount:
          description: |
            Total amount of app rewards input into this transfer.
          type: string
        input_validator_reward_amount:
          description: |
            Total amount of validator rewards input into this transfer.
          type: string
        input_sv_reward_amount:
          description: |
            Total amount of sv rewards input into this transfer.
          type: string
        input_validator_faucet_amount:
          description: |
            Total amount of validator faucet coupon issuance input into this transfer.
          type: string
        sender_change_fee:
          description: |
            Fee charged for returning change to the sender,
            which is the smaller of the left-over balance after paying for all outputs
            or one amulet create fee.
          type: string
        sender_change_amount:
          description: |
            The final amount of amulet returned to the sender after paying for all outputs and fees.
          type: string
        sender_fee:
          description: |
            Total fees paid by the sender, based on receiver's receiver_fee_ratio on outputs
          type: string
        holding_fees:
          description: |
            Holding fees paid by the sender on their input amulets.
          type: string
    ReceiverAmount:
      type: object
      required:
        - party
        - amount
        - receiver_fee
      properties:
        party:
          description: |
            The receiver who will own the created output amulet.
          type: string
        amount:
          description: |
            The amount of amulet to receive, before deducting receiver's part of the fees.
          type: string
        receiver_fee:
          description: |
            Total fees paid by the receiver, based on receiver_fee_ratio on outputs
          type: string
    ListEntriesResponse:
      type: object
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/AnsEntry'
    LookupEntryByPartyResponse:
      type: object
      required:
        - entry
      properties:
        entry:
          $ref: '#/components/schemas/AnsEntry'
    LookupEntryByNameResponse:
      type: object
      required:
        - entry
      properties:
        entry:
          $ref: '#/components/schemas/AnsEntry'
    LookupTransferPreapprovalByPartyResponse:
      description: A Daml contract of template `Splice.AmuletRules:TransferPreapproval`.
      type: object
      required:
        - transfer_preapproval
      properties:
        transfer_preapproval:
          $ref: '#/components/schemas/ContractWithState'
    LookupTransferCommandCounterByPartyResponse:
      description: A Daml contract of template `Splice.ExternalPartyAmuletRules:TransferCommandCounter`.
      type: object
      required:
        - transfer_command_counter
      properties:
        transfer_command_counter:
          $ref: '#/components/schemas/ContractWithState'
    LookupTransferCommandStatusResponse:
      type: object
      required:
        - transfer_commands_by_contract_id
      properties:
        transfer_commands_by_contract_id:
          $ref: '#/components/schemas/TransferCommandMap'
    TransferCommandMap:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/TransferCommandContractWithStatus'
    TransferCommandContractWithStatus:
      description: |
        A contract of Daml template `Splice.ExternalPartyAmuletRules:TransferCommand`,
        and its status determined by the latest transactions.
      type: object
      required:
        - contract
        - status
      properties:
        contract:
          $ref: '#/components/schemas/Contract'
        status:
          $ref: '#/components/schemas/TransferCommandContractStatus'
    TransferCommandContractStatus:
      type: object
      oneOf:
        - $ref: '#/components/schemas/TransferCommandCreatedResponse'
        - $ref: '#/components/schemas/TransferCommandSentResponse'
        - $ref: '#/components/schemas/TransferCommandFailedResponse'
      discriminator:
        propertyName: status
        mapping:
          created: '#/components/schemas/TransferCommandCreatedResponse'
          sent: '#/components/schemas/TransferCommandSentResponse'
          failed: '#/components/schemas/TransferCommandFailedResponse'
    BaseLookupTransferCommandStatusResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          description: |
            The status of the transfer command.
            created:
              The transfer command has been created and is waiting for automation to complete it.
            sent:
              The transfer command has been completed and the transfer to the receiver has finished.
            failed:
              The transfer command has failed permanently and nothing has been transferred. Refer to
              failure_reason for details. A new transfer command can be created.
    TransferCommandCreatedResponse:
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseLookupTransferCommandStatusResponse'
    TransferCommandSentResponse:
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseLookupTransferCommandStatusResponse'
    TransferCommandFailedResponse:
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseLookupTransferCommandStatusResponse'
        - type: object
          required:
            - failure_kind
            - reason
          properties:
            failure_kind:
              type: string
              description: |
                The reason for the failure of the TransferCommand.
                failed:
                  Completing the transfer failed, check the reason for details.
                withdrawn:
                  The sender has withdrawn the TransferCommand before it could be completed.
                expired:
                  The expiry time on the TransferCommand was reached before it could be completed.
              enum:
                - failed
                - expired
                - withdrawn
            reason:
              type: string
              description: |
                Human readable description of the failure
    GetAcsSnapshotResponse:
      type: object
      required:
        - acs_snapshot
      properties:
        acs_snapshot:
          description: base64-encoded ACS snapshot for the intersection of the DSO party and the requested party’s ACS
          type: string
    AnsEntry:
      type: object
      required:
        - user
        - name
        - url
        - description
      properties:
        contract_id:
          description: |
            If present, Daml contract ID of template `Splice.Ans:AnsEntry`.
            If absent, this is a DSO-provided entry for either the DSO or an SV.
          type: string
        user:
          description: Owner party ID of this ANS entry.
          type: string
        name:
          description: The ANS entry name.
          type: string
        url:
          description: Either empty, or an http/https URL supplied by the `user`.
          type: string
        description:
          description: Arbitrary description text supplied by `user`; may be empty.
          type: string
        expires_at:
          description: |
            Time after which this ANS entry expires; if renewed, it will have a
            new `contract_id` and `expires_at`.
            If `null` or absent, does not expire; this is the case only for
            special entries provided by the DSO.
          type: string
          format: date-time
    MigrationSchedule:
      type: object
      required:
        - time
        - migration_id
      properties:
        time:
          type: string
          format: date-time
        migration_id:
          type: integer
          format: int64
    GetMigrationIdResponse:
      type: object
      required:
        - migration_id
      properties:
        migration_id:
          type: integer
          format: int64
    SynchronizerIdentities:
      type: object
      required:
        - sequencer_id
        - sequencer_identity_transactions
        - mediator_id
        - mediator_identity_transactions
      properties:
        sequencer_id:
          type: string
        sequencer_identity_transactions:
          type: array
          items:
            type: string
        mediator_id:
          type: string
        mediator_identity_transactions:
          type: array
          items:
            type: string
    SynchronizerBootstrappingTransactions:
      type: object
      required:
        - domain_parameters
        - sequencer_domain_state
        - mediator_domain_state
      properties:
        domain_parameters:
          type: string
        sequencer_domain_state:
          type: string
        mediator_domain_state:
          type: string
    GetMigrationInfoRequest:
      type: object
      required:
        - migration_id
      properties:
        migration_id:
          type: integer
          format: int64
    GetMigrationInfoResponse:
      type: object
      required:
        - record_time_range
        - complete
      properties:
        previous_migration_id:
          description: |
            The migration id that was active before the given migration id, if any.
          type: integer
          format: int64
        record_time_range:
          description: |
            All domains for which there are updates in the given migration id,
            along with the record time of the newest and oldest update associated with each domain
          type: array
          items:
            $ref: '#/components/schemas/RecordTimeRange'
        last_import_update_id:
          description: |
            The update id of the last import update (where import updates are sorted by update id, ascending)
            for the given migration id, if any
          type: string
        complete:
          description: |
            True if this scan has all non-import updates for given migration id
          type: boolean
        import_updates_complete:
          description: |
            True if this scan has all import updates for the given migration id
          type: boolean
    RecordTimeRange:
      type: object
      required:
        - synchronizer_id
        - min
        - max
      properties:
        synchronizer_id:
          type: string
        min:
          type: string
          format: date-time
        max:
          type: string
          format: date-time
    GetUpdatesBeforeRequest:
      type: object
      required:
        - migration_id
        - synchronizer_id
        - before
        - count
      properties:
        migration_id:
          type: integer
          format: int64
        synchronizer_id:
          type: string
        before:
          description: |
            Only return updates with a record time strictly smaller than this time.
          type: string
          format: date-time
        at_or_after:
          description: |
            Only return updates with a record time equal to or greater than this time.
          type: string
          format: date-time
        count:
          description: |
            Return at most this many updates. The actual number of updates returned may be smaller.
          type: integer
          format: int32
    GetUpdatesBeforeResponse:
      type: object
      required:
        - transactions
      properties:
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/UpdateHistoryItem'
    GetImportUpdatesRequest:
      type: object
      required:
        - migration_id
        - after_update_id
        - limit
      properties:
        migration_id:
          type: integer
          format: int64
        after_update_id:
          description: |
            Only return updates with an update id strictly greater than this.
          type: string
        limit:
          description: |
            Return at most this many updates. The actual number of updates returned may be smaller.
          type: integer
          format: int32
    GetImportUpdatesResponse:
      type: object
      required:
        - transactions
      properties:
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/UpdateHistoryItem'
    DamlValueEncoding:
      type: string
      description: |
        How daml values should be encoded in the response.
        "compact_json" is a compact, human-readable JSON encoding. It is the same encoding
        as the one used in the HTTP JSON API or the JavaScript codegen.
        "protobuf_json" is a verbose JSON encoding that is more difficult to parse,
        but contains type information, i.e., the values can be parsed losslessly
        without having access to the Daml source code.
        Optional and defaults to "compact_json".
      enum:
        - compact_json
        - protobuf_json
    GetMemberTrafficStatusResponse:
      type: object
      required:
        - traffic_status
      properties:
        traffic_status:
          description: |
            The current traffic state for the member on the synchronizer under
            `actual`, and the total purchased traffic under `target`.  The purchased
            traffic may exceed the `actual` limit as purchases take time to be
            incorporated into the limit.
          $ref: '#/components/schemas/MemberTrafficStatus'
    MemberTrafficStatus:
      type: object
      required:
        - actual
        - target
      properties:
        actual:
          description: The current traffic state for the member on the synchronizer
          $ref: '#/components/schemas/ActualMemberTrafficState'
        target:
          description: Total purchased traffic; may exceed limit in `actual`
          $ref: '#/components/schemas/TargetMemberTrafficState'
    ActualMemberTrafficState:
      type: object
      required:
        - total_consumed
        - total_limit
      properties:
        total_consumed:
          description: |
            Total extra traffic consumed by the member on the given synchronizer
          type: integer
          format: int64
        total_limit:
          description: |
            Current extra traffic limit set for the member on the given synchronizer.
            An extra traffic top-up is complete once total_limit matches total_purchased.
          type: integer
          format: int64
    TargetMemberTrafficState:
      type: object
      required:
        - total_purchased
      properties:
        total_purchased:
          description: |
            Total extra traffic purchased for the member on the given
            synchronizer in bytes.
          type: integer
          format: int64
    GetPartyToParticipantResponse:
      type: object
      required:
        - participant_id
      properties:
        participant_id:
          description: |
            ID of the participant hosting the provided party, in the form
            `PAR::id::fingerprint`
          type: string
    GetPartyToParticipantResponseV1:
      type: object
      required:
        - participant_ids
      properties:
        participant_ids:
          description: |
            IDs of the participants hosting the provided party, each in the form
            `PAR::id::fingerprint`
          type: array
          items:
            type: string
    GetValidatorFaucetsByValidatorResponse:
      type: object
      required:
        - validatorsReceivedFaucets
      properties:
        validatorsReceivedFaucets:
          description: |
            Statistics for any party ID arguments found to have valid onboarding
            licenses; the order in the response is unrelated to argument order.
          type: array
          items:
            $ref: '#/components/schemas/ValidatorReceivedFaucets'
    ValidatorReceivedFaucets:
      type: object
      required:
        - validator
        - numRoundsCollected
        - numRoundsMissed
        - firstCollectedInRound
        - lastCollectedInRound
      properties:
        validator:
          description: The party ID of the onboarded validator
          type: string
        numRoundsCollected:
          description: |
            how many rounds the validator has received a faucet for; guaranteed
            that collected + missed = last - first + 1
          type: integer
          format: int64
        numRoundsMissed:
          description: |
            how many rounds between firstCollected and lastCollected in which
            the validator failed to collect (i.e. was not active or available);
            can at most be max(0, lastCollected - firstCollected - 1).
          type: integer
          format: int64
        firstCollectedInRound:
          description: |
            the round number when this validator started collecting faucets;
            the validator definitely recorded liveness in this round
          type: integer
          format: int64
        lastCollectedInRound:
          description: |
            The most recent round number in which the validator collected a faucet;
            the validator definitely recorded liveness in this round.  Will equal
            `firstCollected` if the validator has collected in only one round
          type: integer
          format: int64
    GetBackfillingStatusResponse:
      type: object
      required:
        - complete
      properties:
        complete:
          description: |
            True if ALL backfilling processes are complete, false otherwise.

            Some scan endpoints return error responses if backfilling is not complete
            (e.g., `/v1/updates`), others return partial results (e.g., `/v0/transactions`).
            This endpoint is a simple indicator for whether historical information may be incomplete.

            To determine the progress of individual backfilling processes, inspect the corresponding metrics.
          type: boolean
    EventHistoryRequest:
      type: object
      required:
        - page_size
      properties:
        after:
          $ref: '#/components/schemas/UpdateHistoryRequestAfter'
          description: |
            The events returned will either have a higher migration id or
            the same migration id and a record_time greater than the migration id and record time
            specified.
        page_size:
          description: |
            The maximum number of events returned for this request.
          type: integer
          format: int32
          minimum: 1
          maximum: 1000
        daml_value_encoding:
          $ref: '#/components/schemas/DamlValueEncoding'
    EventHistoryResponse:
      type: object
      required:
        - events
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/EventHistoryItem'
    EventHistoryItem:
      type: object
      description: |
        An event history item may contain a transaction update, a verdict from a mediator, both, or a contract reassignment.
        If an event pertains to a contract reassignment, there will be no verdict data.
        If an event pertains to a wholly private transaction, there will only be verdict data.
        If an event pertains to a transaction that is partially private, it may also bear verdict information for the private portions.
        When both fields are present, the transaction and verdict have the same `update_id` and `record_time`.

        For networks where the SVs enable activity record computation,
        a traffic summary and app activity record are present when
        a verdict is present.
      properties:
        update:
          $ref: '#/components/schemas/UpdateHistoryItemV2'
          nullable: true
        verdict:
          $ref: '#/components/schemas/EventHistoryVerdict'
          nullable: true
        traffic_summary:
          $ref: '#/components/schemas/EventHistoryTrafficSummary'
          nullable: true
        app_activity_records:
          $ref: '#/components/schemas/EventHistoryAppActivityRecords'
          nullable: true
    EventHistoryVerdict:
      type: object
      required:
        - update_id
        - migration_id
        - domain_id
        - record_time
        - finalization_time
        - submitting_parties
        - submitting_participant_uid
        - verdict_result
        - mediator_group
        - transaction_views
      properties:
        update_id:
          description: |
            The ID of the transaction update associated with this verdict.
          type: string
        migration_id:
          description: |
            The migration id of the domain through which this event was sequenced.
          type: integer
          format: int64
        domain_id:
          description: |
            The id of the domain through which this event was sequenced.
          type: string
        record_time:
          description: |
            The record_time of the transaction the verdict corresponds to.
          type: string
        finalization_time:
          description: |
            The finalization_time of the transaction the verdict corresponds to.
            Note that this time might be different between different scans/mediators.
          type: string
        submitting_parties:
          description: |
            Parties on whose behalf the transaction was submitted.
          type: array
          items:
            type: string
        submitting_participant_uid:
          description: |
            UID of the submitting participant.
          type: string
        verdict_result:
          description: |
            Result of the verdict.
          $ref: '#/components/schemas/VerdictResult'
        mediator_group:
          description: |
            The mediator group which finalized this verdict.
          type: integer
          format: int32
        transaction_views:
          $ref: '#/components/schemas/TransactionViews'
    TransactionViews:
      type: object
      required:
        - views
        - root_views
      properties:
        views:
          type: array
          items:
            $ref: '#/components/schemas/TransactionView'
        root_views:
          type: array
          items:
            type: integer
            format: int32
    TransactionView:
      type: object
      required:
        - view_id
        - informees
        - confirming_parties
        - sub_views
        - view_hash
      properties:
        view_id:
          type: integer
          format: int32
        informees:
          type: array
          items:
            type: string
        confirming_parties:
          type: array
          items:
            $ref: '#/components/schemas/Quorum'
        sub_views:
          type: array
          items:
            type: integer
            format: int32
        view_hash:
          description: Hash of the view, for correlation with sequencer traffic data. Empty for older data ingested before this field was added.
          type: string
    Quorum:
      type: object
      required:
        - parties
        - threshold
      properties:
        parties:
          type: array
          items:
            type: string
        threshold:
          type: integer
          format: int32
    VerdictResult:
      type: string
      enum:
        - VERDICT_RESULT_UNSPECIFIED
        - VERDICT_RESULT_ACCEPTED
        - VERDICT_RESULT_REJECTED
    EventHistoryTrafficSummary:
      type: object
      description: |
        Traffic summary data from the sequencer for the confirmation request corresponding to an event.
      required:
        - total_traffic_cost
        - envelope_traffic_summaries
      properties:
        total_traffic_cost:
          description: |
            Total traffic cost of the confirmation request paid by the validator node that submitted it.
          type: integer
          format: int64
        envelope_traffic_summaries:
          description: |
            Summary of traffic-related data for all envelopes in the confirmation request.
          type: array
          items:
            $ref: '#/components/schemas/EnvelopeTrafficSummary'
    EnvelopeTrafficSummary:
      type: object
      description: |
        Traffic cost for a single envelope and the view IDs contained in it
      required:
        - traffic_cost
        - view_ids
      properties:
        traffic_cost:
          description: |
            Traffic cost in bytes for this envelope.
          type: integer
          format: int64
        view_ids:
          description: |
            View IDs from the verdict contained in this envelope
          type: array
          items:
            type: integer
            format: int32
    EventHistoryAppActivityRecords:
      type: object
      description: |
        App activity record computed from verdicts and traffic summaries
        as per [CIP-104](https://github.com/canton-foundation/cips/blob/main/cip-0104/cip-0104.md).
      required:
        - round_number
        - records
      properties:
        round_number:
          description: |
            The round number assigned to the activity records.
          type: integer
          format: int64
        records:
          description: |
            App activity records, one per app provider.
          type: array
          items:
            $ref: '#/components/schemas/AppActivityRecord'
    AppActivityRecord:
      type: object
      description: |
        ActivityRecord for an app.
      required:
        - party
        - weight
      properties:
        party:
          description: |
            The app provider party identifier.
          type: string
        weight:
          description: |
            Activity weight in bytes of traffic.
          type: integer
          format: int64
    ListUnclaimedDevelopmentFundCouponsResponse:
      type: object
      required:
        - unclaimed-development-fund-coupons
      properties:
        unclaimed-development-fund-coupons:
          description: |
            Contracts of the Daml template `Splice.Amulet:UnclaimedDevelopmentFundCoupon`.
          type: array
          items:
            $ref: '#/components/schemas/ContractWithState'
    ListBulkAcsSnapshotObjectsResponse:
      type: object
      required:
        - record_time
        - object_refs
      properties:
        record_time:
          description: |
            The record time for which the ACS snapshot was taken.
          type: string
          format: date-time
        object_refs:
          description: |
            The list of references to the bulk storage objects containing the ACS snapshot data.
          type: array
          items:
            $ref: '#/components/schemas/BulkStorageObjectRef'
    ListBulkUpdateHistoryObjectsRequest:
      type: object
      required:
        - start_record_time
        - end_record_time
        - page_size
      properties:
        start_record_time:
          description: |
            The returned objects must include all updates with record time greater than start_record_time (but may also include updates before it).
          type: string
          format: date-time
        end_record_time:
          description: |
            The returned objects must include all updates with record time at most end_record_time (but may also include updates after it).
          type: string
          format: date-time
        next_page_token:
          type: string
          description: |
            The pagination token returned from a previous call to this endpoint with the same arguments.
        page_size:
          description: |
            The maximum number of objects returned for this request.
          type: integer
          format: int32
          minimum: 1
          maximum: 1000
    ListBulkUpdateHistoryObjectsResponse:
      type: object
      required:
        - object_refs
      properties:
        object_refs:
          description: |
            The list of references to the bulk storage objects containing the updates.
          type: array
          items:
            $ref: '#/components/schemas/BulkStorageObjectRef'
        next_page_token:
          type: string
          description: |
            When requesting the next page of results, pass this as `after`
            to the next `ListBulkUpdateHistoryObjectsRequest` invocation.
            Will be absent when there are no more pages.
    GetBulkObjectChecksumsRequest:
      type: object
      required:
        - object_keys
      properties:
        object_keys:
          description: |
            The list of keys of the bulk storage objects for which checksums are requested.
          type: array
          items:
            type: string
    GetBulkObjectChecksumsResponse:
      type: object
      required:
        - checksums
      properties:
        checksums:
          description: |
            The list of checksums for the requested bulk storage objects (in the same order as the object_keys).
          type: array
          items:
            type: object
            properties:
              value:
                type: string
    BulkStorageObjectRef:
      type: object
      required:
        - url
        - digest
      properties:
        url:
          description: |
            The URL from which the bulk storage object can be downloaded.
          type: string
        digest:
          description: |
            The sha256 digest of the bulk storage object, for verification of integrity and consistency across SVs.
          type: string
    GetRewardAccountingEarliestAvailableRoundResponse:
      type: object
      required:
        - earliest_round
      properties:
        earliest_round:
          type: integer
          format: int64
    GetRewardAccountingActivityTotalsResponse:
      type: object
      oneOf:
        - $ref: '#/components/schemas/RewardAccountingActivityTotalsOk'
        - $ref: '#/components/schemas/RewardAccountingActivityTotalsUndetermined'
        - $ref: '#/components/schemas/RewardAccountingActivityTotalsCannotProvide'
      discriminator:
        propertyName: status
        mapping:
          Ok: '#/components/schemas/RewardAccountingActivityTotalsOk'
          Undetermined: '#/components/schemas/RewardAccountingActivityTotalsUndetermined'
          CannotProvide: '#/components/schemas/RewardAccountingActivityTotalsCannotProvide'
    RewardAccountingActivityTotalsOk:
      type: object
      required:
        - status
        - round_number
        - total_app_activity_weight
        - active_parties_count
        - activity_records_count
        - total_app_reward_minting_allowance
        - total_app_reward_thresholded
        - total_app_reward_unclaimed
        - rewarded_app_provider_parties_count
      properties:
        status:
          type: string
        round_number:
          type: integer
          format: int64
        total_app_activity_weight:
          type: integer
          format: int64
        active_parties_count:
          type: integer
          format: int64
        activity_records_count:
          type: integer
          format: int64
        total_app_reward_minting_allowance:
          type: string
          description: The total of all minting allowances granted to app providers in this round.
        total_app_reward_thresholded:
          type: string
          description: Total amount of minting allowances that fell below the configured app reward threshold and was thus burned.
        total_app_reward_unclaimed:
          type: string
          description: Total amount of app rewards which could not be attributed to app providers in this round because of limit on app rewards per activity (aka the app rewards cap).
        rewarded_app_provider_parties_count:
          type: integer
          format: int64
    RewardAccountingActivityTotalsUndetermined:
      type: object
      required:
        - status
      properties:
        status:
          type: string
    RewardAccountingActivityTotalsCannotProvide:
      type: object
      required:
        - status
      properties:
        status:
          type: string
    GetRewardAccountingRootHashResponse:
      type: object
      oneOf:
        - $ref: '#/components/schemas/RewardAccountingRootHashOk'
        - $ref: '#/components/schemas/RewardAccountingRootHashUndetermined'
        - $ref: '#/components/schemas/RewardAccountingRootHashCannotProvide'
      discriminator:
        propertyName: status
        mapping:
          Ok: '#/components/schemas/RewardAccountingRootHashOk'
          Undetermined: '#/components/schemas/RewardAccountingRootHashUndetermined'
          CannotProvide: '#/components/schemas/RewardAccountingRootHashCannotProvide'
    RewardAccountingRootHashOk:
      type: object
      required:
        - status
        - round_number
        - root_hash
      properties:
        status:
          type: string
        round_number:
          type: integer
          format: int64
        root_hash:
          type: string
          description: Hex-encoded root hash
    RewardAccountingRootHashUndetermined:
      type: object
      required:
        - status
      properties:
        status:
          type: string
    RewardAccountingRootHashCannotProvide:
      type: object
      required:
        - status
      properties:
        status:
          type: string
    GetRewardAccountingBatchResponse:
      type: object
      oneOf:
        - $ref: '#/components/schemas/RewardAccountingBatchOfBatches'
        - $ref: '#/components/schemas/RewardAccountingBatchOfMintingAllowances'
      discriminator:
        propertyName: batch_type
        mapping:
          BatchOfBatches: '#/components/schemas/RewardAccountingBatchOfBatches'
          BatchOfMintingAllowances: '#/components/schemas/RewardAccountingBatchOfMintingAllowances'
    BaseRewardAccountingBatch:
      type: object
      required:
        - batch_type
      properties:
        batch_type:
          type: string
          description: |
            The type of batch.
            BatchOfBatches: Contains child batch hashes.
            BatchOfMintingAllowances: Contains party + amount pairs.
    RewardAccountingBatchOfBatches:
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseRewardAccountingBatch'
        - type: object
          required:
            - child_hashes
          properties:
            child_hashes:
              type: array
              items:
                type: string
              description: Hex-encoded child batch hashes
    RewardAccountingBatchOfMintingAllowances:
      type: object
      allOf:
        - $ref: '#/components/schemas/BaseRewardAccountingBatch'
        - type: object
          required:
            - minting_allowances
          properties:
            minting_allowances:
              type: array
              items:
                $ref: '#/components/schemas/RewardAccountingMintingAllowance'
              description: Party + amount pairs
    RewardAccountingMintingAllowance:
      type: object
      required:
        - provider
        - amount
      properties:
        provider:
          type: string
        amount:
          type: string
    Status:
      type: object
      required:
        - id
        - uptime
        - ports
        - active
      properties:
        id:
          type: string
        uptime:
          type: string
        ports:
          type: object
          additionalProperties:
            type: integer
            format: int32
        extra:
          type: string
          format: binary
        active:
          type: boolean
    SuccessStatusResponse:
      type: object
      required:
        - success
      properties:
        success:
          $ref: '#/components/schemas/Status'
    NotInitialized:
      type: object
      required:
        - active
      properties:
        active:
          type: boolean
    NotInitializedStatusResponse:
      type: object
      required:
        - not_initialized
      properties:
        not_initialized:
          $ref: '#/components/schemas/NotInitialized'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    FailureStatusResponse:
      type: object
      required:
        - failed
      properties:
        failed:
          $ref: '#/components/schemas/ErrorResponse'
    NodeStatus:
      oneOf:
        - $ref: '#/components/schemas/SuccessStatusResponse'
        - $ref: '#/components/schemas/NotInitializedStatusResponse'
        - $ref: '#/components/schemas/FailureStatusResponse'
    Version:
      type: object
      required:
        - version
        - commit_ts
      properties:
        version:
          type: string
        commit_ts:
          type: string
          format: date-time
    Contract:
      type: object
      properties:
        template_id:
          type: string
        contract_id:
          type: string
        payload:
          type: object
        created_event_blob:
          type: string
        created_at:
          type: string
      required:
        - template_id
        - contract_id
        - payload
        - created_event_blob
        - created_at
    ContractWithState:
      type: object
      properties:
        contract:
          $ref: '#/components/schemas/Contract'
        domain_id:
          type: string
      required:
        - contract
    GetDsoInfoResponse:
      type: object
      required:
        - sv_user
        - sv_party_id
        - dso_party_id
        - voting_threshold
        - latest_mining_round
        - amulet_rules
        - dso_rules
        - sv_node_states
      properties:
        sv_user:
          description: User ID representing the SV
          type: string
        sv_party_id:
          description: Party representing the SV
          type: string
        dso_party_id:
          description: |
            Party representing the whole DSO; for Scan only, also returned by
            `/v0/dso-party-id`
          type: string
        voting_threshold:
          description: |
            Threshold required to pass vote requests; also known as the
            "governance threshold", it is always derived from the number of
            `svs` in `dso_rules`
          type: integer
        latest_mining_round:
          description: |
            Contract of the Daml template `Splice.Round.OpenMiningRound`, the
            one with the highest round number on the ledger that has been signed
            by `dso_party_id`. The round may not be usable as it may not be
            opened yet, in accordance with its `opensAt` template field
          $ref: '#/components/schemas/ContractWithState'
        amulet_rules:
          description: |
            Contract of the Daml template `Splice.AmuletRules.AmuletRules`,
            including the full schedule of `AmuletConfig` changes approved by
            the DSO. Callers should not assume that `initialValue` is up-to-date,
            and should instead search `futureValues` for the latest configuration
            valid as of now
          $ref: '#/components/schemas/ContractWithState'
        dso_rules:
          description: |
            Contract of the Daml template `Splice.DsoRules.DsoRules`, listing
            the governance rules approved by the DSO governing this Splice network.
          $ref: '#/components/schemas/ContractWithState'
        sv_node_states:
          description: |
            For every one of `svs` listed in `dso_rules`, a contract of the Daml
            template `Splice.DSO.SvState.SvNodeState`. This does not include
            states for offboarded SVs, though they may still have an on-ledger
            state contract
          type: array
          items:
            $ref: '#/components/schemas/ContractWithState'
        initial_round:
          description: |
            Initial round from which the network bootstraps
          type: string
    ListValidatorLicensesResponse:
      type: object
      required:
        - validator_licenses
      properties:
        validator_licenses:
          description: Contracts of Daml template `Splice.ValidatorLicense:ValidatorLicense`.
          type: array
          items:
            $ref: '#/components/schemas/Contract'
        next_page_token:
          type: integer
          format: int64
          description: |
            When requesting the next page of results, pass this as URL query parameter `after`.
            If absent or `null`, there are no more pages.
    ContractId:
      type: string
    MaybeCachedContractWithState:
      type: object
      properties:
        contract:
          $ref: '#/components/schemas/Contract'
        domain_id:
          type: string
    MaybeCachedContractWithStateMap:
      description: |
        Always created with respect to an input set of contract IDs. If an input
        contract ID is absent from the keys of this map, that contract should be
        considered removed by the caller; if present, `contract` may be empty,
        reflecting that the caller should already have the full contract data
        for that contract ID. Contracts not present in the input set will have
        full contract data. `domain_id` is always up-to-date; if undefined the
        contract is currently unassigned to a synchronizer, i.e. "in-flight".
      type: object
      additionalProperties:
        $ref: '#/components/schemas/MaybeCachedContractWithState'
    ListAmuletPriceVotesResponse:
      description: Contracts of Daml template `Splice.DSO:AmuletPrice:AmuletPriceVote`.
      type: object
      required:
        - amulet_price_votes
      properties:
        amulet_price_votes:
          type: array
          items:
            $ref: '#/components/schemas/Contract'
    BatchListVotesByVoteRequestsRequest:
      type: object
      required:
        - vote_request_contract_ids
      properties:
        vote_request_contract_ids:
          description: Contract IDs of Daml template `Splice.DsoRules:VoteRequest`.
          type: array
          items:
            type: string
    ListVoteRequestByTrackingCidResponse:
      type: object
      required:
        - vote_requests
      properties:
        vote_requests:
          description: |
            Contracts of Daml template `Splice.DsoRules:VoteRequest` that match
            `vote_request_contract_ids` in the request.
          type: array
          items:
            $ref: '#/components/schemas/Contract'
    LookupDsoRulesVoteRequestResponse:
      description: A contract of Daml template `Splice.DsoRules:VoteRequest`.
      type: object
      required:
        - dso_rules_vote_request
      properties:
        dso_rules_vote_request:
          $ref: '#/components/schemas/Contract'
    ListDsoRulesVoteRequestsResponse:
      description: Contracts of Daml template `Splice.DsoRules:VoteRequest`.
      type: object
      required:
        - dso_rules_vote_requests
      properties:
        dso_rules_vote_requests:
          type: array
          items:
            $ref: '#/components/schemas/Contract'
    ListVoteResultsRequest:
      type: object
      required:
        - limit
      properties:
        actionName:
          type: string
        accepted:
          type: boolean
        requester:
          type: string
        effectiveFrom:
          type: string
        effectiveTo:
          type: string
        limit:
          type: integer
        pageToken:
          type: integer
          description: |
            Cursor for pagination. When requesting the next page of results, pass the `next_page_token` from the previous response.
            Results are ordered by effective date (the accepted vote's effectiveAt, or the result's completedAt otherwise), descending.
    ListDsoRulesVoteResultsResponse:
      type: object
      required:
        - dso_rules_vote_results
      properties:
        dso_rules_vote_results:
          type: array
          items:
            type: object
        next_page_token:
          type: integer
          description: |
            Cursor for the next page of results. Pass this as `pageToken` in the request.
            If absent or `null`, there are no more pages.
    CountVoteResultsRequest:
      description: |
        Filters for counting vote results. Same semantics as the corresponding
        fields on `ListVoteResultsRequest`.
      type: object
      properties:
        actionName:
          type: string
        accepted:
          type: boolean
        requester:
          type: string
        effectiveFrom:
          type: string
        effectiveTo:
          type: string
    CountVoteResultsResponse:
      type: object
      required:
        - count
      properties:
        count:
          type: integer
          format: int64
          description: Total number of vote results matching the request filters.
    PreviousSvRewardWeightRequest:
      type: object
      required:
        - svParty
      properties:
        svParty:
          type: string
        effectiveBefore:
          type: string
          description: |
            Only consider reward weight changes that took effect strictly before this time.
    PreviousSvRewardWeightResponse:
      type: object
      properties:
        rewardWeight:
          type: string
          description: |
            The SV's reward weight set by the most recent accepted `UpdateSvRewardWeight` proposal
            before `effectiveBefore`, or absent if there is no such proposal.
    FeatureSupportResponse:
      type: object
      properties:
        dummy:
          type: boolean
  responses:
    '400':
      description: bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    '404':
      description: not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    '500':
      description: internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    '501':
      description: not implemented
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
