import { ServiceType } from '@protobuf-ts/runtime-rpc';
import type { BinaryWriteOptions } from '@protobuf-ts/runtime';
import type { IBinaryWriter } from '@protobuf-ts/runtime';
import type { BinaryReadOptions } from '@protobuf-ts/runtime';
import type { IBinaryReader } from '@protobuf-ts/runtime';
import type { PartialMessage } from '@protobuf-ts/runtime';
import { MessageType } from '@protobuf-ts/runtime';
import { AssignedEvent } from './reassignment.js';
import { UnassignedEvent } from './reassignment.js';
import { CreatedEvent } from './event.js';
import { EventFormat } from './transaction_filter.js';
import { TransactionFilter } from './transaction_filter.js';
/**
 * If the given offset is different than the ledger end, and there are (un)assignments in-flight at the given offset,
 * the snapshot may fail with "FAILED_PRECONDITION/PARTICIPANT_PRUNED_DATA_ACCESSED".
 * Note that it is ok to request acs snapshots for party migration with offsets other than ledger end, because party
 * migration is not concerned with incomplete (un)assignments.
 *
 * @generated from protobuf message com.daml.ledger.api.v2.GetActiveContractsRequest
 */
export interface GetActiveContractsRequest {
    /**
     * Provided for backwards compatibility, it will be removed in the Canton version 3.4.0.
     * Templates to include in the served snapshot, per party.
     * Optional, if specified event_format must be unset, if not specified event_format must be set.
     *
     * @deprecated
     * @generated from protobuf field: com.daml.ledger.api.v2.TransactionFilter filter = 1 [deprecated = true]
     */
    filter?: TransactionFilter;
    /**
     * Provided for backwards compatibility, it will be removed in the Canton version 3.4.0.
     * If enabled, values served over the API will contain more information than strictly necessary to interpret the data.
     * In particular, setting the verbose flag to true triggers the ledger to include labels for record fields.
     * Optional, if specified event_format must be unset.
     *
     * @deprecated
     * @generated from protobuf field: bool verbose = 2 [deprecated = true]
     */
    verbose: boolean;
    /**
     * The offset at which the snapshot of the active contracts will be computed.
     * Must be no greater than the current ledger end offset.
     * Must be greater than or equal to the last pruning offset.
     * Required, must be a valid absolute offset (positive integer) or ledger begin offset (zero).
     * If zero, the empty set will be returned.
     *
     * @generated from protobuf field: int64 active_at_offset = 3
     */
    activeAtOffset: bigint;
    /**
     * Format of the contract_entries in the result. In case of CreatedEvent the presentation will be of
     * TRANSACTION_SHAPE_ACS_DELTA.
     * Optional for backwards compatibility, defaults to an EventFormat where:
     *
     * - filters_by_party is the filter.filters_by_party from this request
     * - filters_for_any_party is the filter.filters_for_any_party from this request
     * - verbose is the verbose field from this request
     *
     * @generated from protobuf field: com.daml.ledger.api.v2.EventFormat event_format = 4
     */
    eventFormat?: EventFormat;
}
/**
 * @generated from protobuf message com.daml.ledger.api.v2.GetActiveContractsResponse
 */
export interface GetActiveContractsResponse {
    /**
     * The workflow ID used in command submission which corresponds to the contract_entry. Only set if
     * the ``workflow_id`` for the command was set.
     * Must be a valid LedgerString (as described in ``value.proto``).
     * Optional
     *
     * @generated from protobuf field: string workflow_id = 1
     */
    workflowId: string;
    /**
     * For a contract there could be multiple contract_entry-s in the entire snapshot. These together define
     * the state of one contract in the snapshot.
     * A contract_entry is included in the result, if and only if there is at least one stakeholder party of the contract
     * that is hosted on the synchronizer at the time of the event and the party satisfies the
     * ``TransactionFilter`` in the query.
     *
     * @generated from protobuf oneof: contract_entry
     */
    contractEntry: {
        oneofKind: 'activeContract';
        /**
         * The contract is active on the assigned synchronizer, meaning: there was an activation event on the given synchronizer (
         * created, assigned), which is not followed by a deactivation event (archived, unassigned) on the same
         * synchronizer, until the active_at_offset.
         * Since activeness is defined as a per synchronizer concept, it is possible, that a contract is active on one
         * synchronizer, but already archived on another.
         * There will be one such message for each synchronizer the contract is active on.
         *
         * @generated from protobuf field: com.daml.ledger.api.v2.ActiveContract active_contract = 2
         */
        activeContract: ActiveContract;
    } | {
        oneofKind: 'incompleteUnassigned';
        /**
         * Included iff the unassigned event was before or at the active_at_offset, but there was no corresponding
         * assigned event before or at the active_at_offset.
         *
         * @generated from protobuf field: com.daml.ledger.api.v2.IncompleteUnassigned incomplete_unassigned = 3
         */
        incompleteUnassigned: IncompleteUnassigned;
    } | {
        oneofKind: 'incompleteAssigned';
        /**
         * Important: this message is not indicating that the contract is active on the target synchronizer!
         * Included iff the assigned event was before or at the active_at_offset, but there was no corresponding
         * unassigned event before or at the active_at_offset.
         *
         * @generated from protobuf field: com.daml.ledger.api.v2.IncompleteAssigned incomplete_assigned = 4
         */
        incompleteAssigned: IncompleteAssigned;
    } | {
        oneofKind: undefined;
    };
}
/**
 * @generated from protobuf message com.daml.ledger.api.v2.ActiveContract
 */
export interface ActiveContract {
    /**
     * Required
     * The event as it appeared in the context of its last update (i.e. daml transaction or
     * reassignment). In particular, the last offset, node_id pair is preserved.
     * The last update is the most recent update created or assigned this contract on synchronizer_id synchronizer.
     * The offset of the CreatedEvent might point to an already pruned update, therefore it cannot necessarily be used
     * for lookups.
     *
     * @generated from protobuf field: com.daml.ledger.api.v2.CreatedEvent created_event = 1
     */
    createdEvent?: CreatedEvent;
    /**
     * A valid synchronizer id
     * Required
     *
     * @generated from protobuf field: string synchronizer_id = 2
     */
    synchronizerId: string;
    /**
     * 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
     * equals zero.
     * This field will be the reassignment_counter of the latest observable activation event on this synchronizer, which is
     * before the active_at_offset.
     * Required
     *
     * @generated from protobuf field: uint64 reassignment_counter = 3
     */
    reassignmentCounter: bigint;
}
/**
 * @generated from protobuf message com.daml.ledger.api.v2.IncompleteUnassigned
 */
export interface IncompleteUnassigned {
    /**
     * Required
     * The event as it appeared in the context of its last activation update (i.e. daml transaction or
     * reassignment). In particular, the last activation offset, node_id pair is preserved.
     * The last activation update is the most recent update created or assigned this contract on synchronizer_id synchronizer before
     * the unassigned_event.
     * The offset of the CreatedEvent might point to an already pruned update, therefore it cannot necessarily be used
     * for lookups.
     *
     * @generated from protobuf field: com.daml.ledger.api.v2.CreatedEvent created_event = 1
     */
    createdEvent?: CreatedEvent;
    /**
     * Required
     *
     * @generated from protobuf field: com.daml.ledger.api.v2.UnassignedEvent unassigned_event = 2
     */
    unassignedEvent?: UnassignedEvent;
}
/**
 * @generated from protobuf message com.daml.ledger.api.v2.IncompleteAssigned
 */
export interface IncompleteAssigned {
    /**
     * Required
     *
     * @generated from protobuf field: com.daml.ledger.api.v2.AssignedEvent assigned_event = 1
     */
    assignedEvent?: AssignedEvent;
}
/**
 * @generated from protobuf message com.daml.ledger.api.v2.GetConnectedSynchronizersRequest
 */
export interface GetConnectedSynchronizersRequest {
    /**
     * The party of interest
     * Must be a valid PartyIdString (as described in ``value.proto``).
     * If defined, will return only synchronizers on which this party is hosted
     * If empty, all synchronizers this node is connected to will be returned
     * Optional
     *
     * @generated from protobuf field: string party = 1
     */
    party: string;
    /**
     * The id of a participant whose mapping of a party to connected synchronizers is requested.
     * Must be a valid participant-id retrieved through a prior call to getParticipantId.
     * Defaults to the participant id of the host participant.
     * Optional
     *
     * @generated from protobuf field: string participant_id = 2
     */
    participantId: string;
}
/**
 * @generated from protobuf message com.daml.ledger.api.v2.GetConnectedSynchronizersResponse
 */
export interface GetConnectedSynchronizersResponse {
    /**
     * @generated from protobuf field: repeated com.daml.ledger.api.v2.GetConnectedSynchronizersResponse.ConnectedSynchronizer connected_synchronizers = 1
     */
    connectedSynchronizers: GetConnectedSynchronizersResponse_ConnectedSynchronizer[];
}
/**
 * @generated from protobuf message com.daml.ledger.api.v2.GetConnectedSynchronizersResponse.ConnectedSynchronizer
 */
export interface GetConnectedSynchronizersResponse_ConnectedSynchronizer {
    /**
     * The alias of the synchronizer
     * Required
     *
     * @generated from protobuf field: string synchronizer_alias = 1
     */
    synchronizerAlias: string;
    /**
     * The ID of the synchronizer
     * Required
     *
     * @generated from protobuf field: string synchronizer_id = 2
     */
    synchronizerId: string;
    /**
     * The permission on the synchronizer
     * Set if a party was used in the request, otherwise unspecified.
     * Optional
     *
     * @generated from protobuf field: com.daml.ledger.api.v2.ParticipantPermission permission = 3
     */
    permission: ParticipantPermission;
}
/**
 * @generated from protobuf message com.daml.ledger.api.v2.GetLedgerEndRequest
 */
export interface GetLedgerEndRequest {
}
/**
 * @generated from protobuf message com.daml.ledger.api.v2.GetLedgerEndResponse
 */
export interface GetLedgerEndResponse {
    /**
     * It will always be a non-negative integer.
     * If zero, the participant view of the ledger is empty.
     * If positive, the absolute offset of the ledger as viewed by the participant.
     *
     * @generated from protobuf field: int64 offset = 1
     */
    offset: bigint;
}
/**
 * Empty for now, but may contain fields in the future.
 *
 * @generated from protobuf message com.daml.ledger.api.v2.GetLatestPrunedOffsetsRequest
 */
export interface GetLatestPrunedOffsetsRequest {
}
/**
 * @generated from protobuf message com.daml.ledger.api.v2.GetLatestPrunedOffsetsResponse
 */
export interface GetLatestPrunedOffsetsResponse {
    /**
     * It will always be a non-negative integer.
     * If positive, the absolute offset up to which the ledger has been pruned,
     * disregarding the state of all divulged contracts pruning.
     * If zero, the ledger has not been pruned yet.
     *
     * @generated from protobuf field: int64 participant_pruned_up_to_inclusive = 1
     */
    participantPrunedUpToInclusive: bigint;
    /**
     * It will always be a non-negative integer.
     * If positive, the absolute offset up to which all divulged events have been pruned on the ledger.
     * It can be at or before the ``participant_pruned_up_to_inclusive`` offset.
     * For more details about all divulged events pruning,
     * see ``PruneRequest.prune_all_divulged_contracts`` in ``participant_pruning_service.proto``.
     * If zero, the divulged events have not been pruned yet.
     *
     * @generated from protobuf field: int64 all_divulged_contracts_pruned_up_to_inclusive = 2
     */
    allDivulgedContractsPrunedUpToInclusive: bigint;
}
/**
 * Enum indicating the permission level that the participant has for the party
 * whose connected synchronizers are being listed.
 *
 * @generated from protobuf enum com.daml.ledger.api.v2.ParticipantPermission
 */
export declare enum ParticipantPermission {
    /**
     * @generated from protobuf enum value: PARTICIPANT_PERMISSION_UNSPECIFIED = 0;
     */
    UNSPECIFIED = 0,
    /**
     * @generated from protobuf enum value: PARTICIPANT_PERMISSION_SUBMISSION = 1;
     */
    SUBMISSION = 1,
    /**
     * participant can only confirm transactions
     *
     * @generated from protobuf enum value: PARTICIPANT_PERMISSION_CONFIRMATION = 2;
     */
    CONFIRMATION = 2,
    /**
     * participant can only observe transactions
     *
     * @generated from protobuf enum value: PARTICIPANT_PERMISSION_OBSERVATION = 3;
     */
    OBSERVATION = 3
}
declare class GetActiveContractsRequest$Type extends MessageType<GetActiveContractsRequest> {
    constructor();
    create(value?: PartialMessage<GetActiveContractsRequest>): GetActiveContractsRequest;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetActiveContractsRequest): GetActiveContractsRequest;
    internalBinaryWrite(message: GetActiveContractsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.GetActiveContractsRequest
 */
export declare const GetActiveContractsRequest: GetActiveContractsRequest$Type;
declare class GetActiveContractsResponse$Type extends MessageType<GetActiveContractsResponse> {
    constructor();
    create(value?: PartialMessage<GetActiveContractsResponse>): GetActiveContractsResponse;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetActiveContractsResponse): GetActiveContractsResponse;
    internalBinaryWrite(message: GetActiveContractsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.GetActiveContractsResponse
 */
export declare const GetActiveContractsResponse: GetActiveContractsResponse$Type;
declare class ActiveContract$Type extends MessageType<ActiveContract> {
    constructor();
    create(value?: PartialMessage<ActiveContract>): ActiveContract;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ActiveContract): ActiveContract;
    internalBinaryWrite(message: ActiveContract, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.ActiveContract
 */
export declare const ActiveContract: ActiveContract$Type;
declare class IncompleteUnassigned$Type extends MessageType<IncompleteUnassigned> {
    constructor();
    create(value?: PartialMessage<IncompleteUnassigned>): IncompleteUnassigned;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: IncompleteUnassigned): IncompleteUnassigned;
    internalBinaryWrite(message: IncompleteUnassigned, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.IncompleteUnassigned
 */
export declare const IncompleteUnassigned: IncompleteUnassigned$Type;
declare class IncompleteAssigned$Type extends MessageType<IncompleteAssigned> {
    constructor();
    create(value?: PartialMessage<IncompleteAssigned>): IncompleteAssigned;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: IncompleteAssigned): IncompleteAssigned;
    internalBinaryWrite(message: IncompleteAssigned, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.IncompleteAssigned
 */
export declare const IncompleteAssigned: IncompleteAssigned$Type;
declare class GetConnectedSynchronizersRequest$Type extends MessageType<GetConnectedSynchronizersRequest> {
    constructor();
    create(value?: PartialMessage<GetConnectedSynchronizersRequest>): GetConnectedSynchronizersRequest;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetConnectedSynchronizersRequest): GetConnectedSynchronizersRequest;
    internalBinaryWrite(message: GetConnectedSynchronizersRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.GetConnectedSynchronizersRequest
 */
export declare const GetConnectedSynchronizersRequest: GetConnectedSynchronizersRequest$Type;
declare class GetConnectedSynchronizersResponse$Type extends MessageType<GetConnectedSynchronizersResponse> {
    constructor();
    create(value?: PartialMessage<GetConnectedSynchronizersResponse>): GetConnectedSynchronizersResponse;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetConnectedSynchronizersResponse): GetConnectedSynchronizersResponse;
    internalBinaryWrite(message: GetConnectedSynchronizersResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.GetConnectedSynchronizersResponse
 */
export declare const GetConnectedSynchronizersResponse: GetConnectedSynchronizersResponse$Type;
declare class GetConnectedSynchronizersResponse_ConnectedSynchronizer$Type extends MessageType<GetConnectedSynchronizersResponse_ConnectedSynchronizer> {
    constructor();
    create(value?: PartialMessage<GetConnectedSynchronizersResponse_ConnectedSynchronizer>): GetConnectedSynchronizersResponse_ConnectedSynchronizer;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetConnectedSynchronizersResponse_ConnectedSynchronizer): GetConnectedSynchronizersResponse_ConnectedSynchronizer;
    internalBinaryWrite(message: GetConnectedSynchronizersResponse_ConnectedSynchronizer, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.GetConnectedSynchronizersResponse.ConnectedSynchronizer
 */
export declare const GetConnectedSynchronizersResponse_ConnectedSynchronizer: GetConnectedSynchronizersResponse_ConnectedSynchronizer$Type;
declare class GetLedgerEndRequest$Type extends MessageType<GetLedgerEndRequest> {
    constructor();
    create(value?: PartialMessage<GetLedgerEndRequest>): GetLedgerEndRequest;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetLedgerEndRequest): GetLedgerEndRequest;
    internalBinaryWrite(message: GetLedgerEndRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.GetLedgerEndRequest
 */
export declare const GetLedgerEndRequest: GetLedgerEndRequest$Type;
declare class GetLedgerEndResponse$Type extends MessageType<GetLedgerEndResponse> {
    constructor();
    create(value?: PartialMessage<GetLedgerEndResponse>): GetLedgerEndResponse;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetLedgerEndResponse): GetLedgerEndResponse;
    internalBinaryWrite(message: GetLedgerEndResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.GetLedgerEndResponse
 */
export declare const GetLedgerEndResponse: GetLedgerEndResponse$Type;
declare class GetLatestPrunedOffsetsRequest$Type extends MessageType<GetLatestPrunedOffsetsRequest> {
    constructor();
    create(value?: PartialMessage<GetLatestPrunedOffsetsRequest>): GetLatestPrunedOffsetsRequest;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetLatestPrunedOffsetsRequest): GetLatestPrunedOffsetsRequest;
    internalBinaryWrite(message: GetLatestPrunedOffsetsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.GetLatestPrunedOffsetsRequest
 */
export declare const GetLatestPrunedOffsetsRequest: GetLatestPrunedOffsetsRequest$Type;
declare class GetLatestPrunedOffsetsResponse$Type extends MessageType<GetLatestPrunedOffsetsResponse> {
    constructor();
    create(value?: PartialMessage<GetLatestPrunedOffsetsResponse>): GetLatestPrunedOffsetsResponse;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetLatestPrunedOffsetsResponse): GetLatestPrunedOffsetsResponse;
    internalBinaryWrite(message: GetLatestPrunedOffsetsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.GetLatestPrunedOffsetsResponse
 */
export declare const GetLatestPrunedOffsetsResponse: GetLatestPrunedOffsetsResponse$Type;
/**
 * @generated ServiceType for protobuf service com.daml.ledger.api.v2.StateService
 */
export declare const StateService: ServiceType;
export {};
//# sourceMappingURL=state_service.d.ts.map