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 { Event } from './event.js';
import { TraceContext } from './trace_context.js';
import { Timestamp } from '../../../../../google/protobuf/timestamp.js';
import { ExercisedEvent } from './event.js';
import { CreatedEvent } from './event.js';
/**
 * Provided for backwards compatibility, it will be removed in the Canton version 3.4.0.
 * Each tree event message type below contains a ``witness_parties`` field which
 * indicates the subset of the requested parties that can see the event
 * in question.
 *
 * Note that transaction trees might contain events with
 * _no_ witness parties, which were included simply because they were
 * children of events which have witnesses.
 *
 * @deprecated
 * @generated from protobuf message com.daml.ledger.api.v2.TreeEvent
 */
export interface TreeEvent {
    /**
     * @generated from protobuf oneof: kind
     */
    kind: {
        oneofKind: 'created';
        /**
         * The event as it appeared in the context of its original daml transaction on this participant node.
         * In particular, the offset, node_id pair of the daml transaction are preserved.
         *
         * @generated from protobuf field: com.daml.ledger.api.v2.CreatedEvent created = 1
         */
        created: CreatedEvent;
    } | {
        oneofKind: 'exercised';
        /**
         * @generated from protobuf field: com.daml.ledger.api.v2.ExercisedEvent exercised = 2
         */
        exercised: ExercisedEvent;
    } | {
        oneofKind: undefined;
    };
}
/**
 * Provided for backwards compatibility, it will be removed in the Canton version 3.4.0.
 * Complete view of an on-ledger transaction.
 *
 * @deprecated
 * @generated from protobuf message com.daml.ledger.api.v2.TransactionTree
 */
export interface TransactionTree {
    /**
     * Assigned by the server. Useful for correlating logs.
     * Must be a valid LedgerString (as described in ``value.proto``).
     * Required
     *
     * @generated from protobuf field: string update_id = 1
     */
    updateId: string;
    /**
     * The ID of the command which resulted in this transaction. Missing for everyone except the submitting party.
     * Must be a valid LedgerString (as described in ``value.proto``).
     * Optional
     *
     * @generated from protobuf field: string command_id = 2
     */
    commandId: string;
    /**
     * The workflow ID used in command submission. 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 = 3
     */
    workflowId: string;
    /**
     * Ledger effective time.
     * Required
     *
     * @generated from protobuf field: google.protobuf.Timestamp effective_at = 4
     */
    effectiveAt?: Timestamp;
    /**
     * The absolute offset. The details of this field are described in ``community/ledger-api/README.md``.
     * Required, it is a valid absolute offset (positive integer).
     *
     * @generated from protobuf field: int64 offset = 5
     */
    offset: bigint;
    /**
     * Changes to the ledger that were caused by this transaction. Nodes of the transaction tree.
     * Each key must be a valid node ID (non-negative integer).
     * Required
     *
     * @generated from protobuf field: map<int32, com.daml.ledger.api.v2.TreeEvent> events_by_id = 6
     */
    eventsById: {
        [key: number]: TreeEvent;
    };
    /**
     * A valid synchronizer id.
     * Identifies the synchronizer that synchronized the transaction.
     * Required
     *
     * @generated from protobuf field: string synchronizer_id = 7
     */
    synchronizerId: string;
    /**
     * Optional; ledger API trace context
     *
     * The trace context transported in this message corresponds to the trace context supplied
     * by the client application in a HTTP2 header of the original command submission.
     * We typically use a header to transfer this type of information. Here we use message
     * body, because it is used in gRPC streams which do not support per message headers.
     * This field will be populated with the trace context contained in the original submission.
     * If that was not provided, a unique ledger-api-server generated trace context will be used
     * instead.
     *
     * @generated from protobuf field: com.daml.ledger.api.v2.TraceContext trace_context = 8
     */
    traceContext?: TraceContext;
    /**
     * The time at which the transaction was recorded. The record time refers to the synchronizer
     * which synchronized the transaction.
     * Required
     *
     * @generated from protobuf field: google.protobuf.Timestamp record_time = 9
     */
    recordTime?: Timestamp;
}
/**
 * Filtered view of an on-ledger transaction's create and archive events.
 *
 * @generated from protobuf message com.daml.ledger.api.v2.Transaction
 */
export interface Transaction {
    /**
     * Assigned by the server. Useful for correlating logs.
     * Must be a valid LedgerString (as described in ``value.proto``).
     * Required
     *
     * @generated from protobuf field: string update_id = 1
     */
    updateId: string;
    /**
     * The ID of the command which resulted in this transaction. Missing for everyone except the submitting party.
     * Must be a valid LedgerString (as described in ``value.proto``).
     * Optional
     *
     * @generated from protobuf field: string command_id = 2
     */
    commandId: string;
    /**
     * The workflow ID used in command submission.
     * Must be a valid LedgerString (as described in ``value.proto``).
     * Optional
     *
     * @generated from protobuf field: string workflow_id = 3
     */
    workflowId: string;
    /**
     * Ledger effective time.
     * Required
     *
     * @generated from protobuf field: google.protobuf.Timestamp effective_at = 4
     */
    effectiveAt?: Timestamp;
    /**
     * The collection of events.
     * Contains:
     *
     * - ``CreatedEvent`` or ``ArchivedEvent`` in case of ACS_DELTA transaction shape
     * - ``CreatedEvent`` or ``ExercisedEvent`` in case of LEDGER_EFFECTS transaction shape
     *
     * Required
     *
     * @generated from protobuf field: repeated com.daml.ledger.api.v2.Event events = 5
     */
    events: Event[];
    /**
     * The absolute offset. The details of this field are described in ``community/ledger-api/README.md``.
     * Required, it is a valid absolute offset (positive integer).
     *
     * @generated from protobuf field: int64 offset = 6
     */
    offset: bigint;
    /**
     * A valid synchronizer id.
     * Identifies the synchronizer that synchronized the transaction.
     * Required
     *
     * @generated from protobuf field: string synchronizer_id = 7
     */
    synchronizerId: string;
    /**
     * Optional; ledger API trace context
     *
     * The trace context transported in this message corresponds to the trace context supplied
     * by the client application in a HTTP2 header of the original command submission.
     * We typically use a header to transfer this type of information. Here we use message
     * body, because it is used in gRPC streams which do not support per message headers.
     * This field will be populated with the trace context contained in the original submission.
     * If that was not provided, a unique ledger-api-server generated trace context will be used
     * instead.
     *
     * @generated from protobuf field: com.daml.ledger.api.v2.TraceContext trace_context = 8
     */
    traceContext?: TraceContext;
    /**
     * The time at which the transaction was recorded. The record time refers to the synchronizer
     * which synchronized the transaction.
     * Required
     *
     * @generated from protobuf field: google.protobuf.Timestamp record_time = 9
     */
    recordTime?: Timestamp;
}
declare class TreeEvent$Type extends MessageType<TreeEvent> {
    constructor();
    create(value?: PartialMessage<TreeEvent>): TreeEvent;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TreeEvent): TreeEvent;
    internalBinaryWrite(message: TreeEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @deprecated
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.TreeEvent
 */
export declare const TreeEvent: TreeEvent$Type;
declare class TransactionTree$Type extends MessageType<TransactionTree> {
    constructor();
    create(value?: PartialMessage<TransactionTree>): TransactionTree;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TransactionTree): TransactionTree;
    private binaryReadMap6;
    internalBinaryWrite(message: TransactionTree, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @deprecated
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.TransactionTree
 */
export declare const TransactionTree: TransactionTree$Type;
declare class Transaction$Type extends MessageType<Transaction> {
    constructor();
    create(value?: PartialMessage<Transaction>): Transaction;
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Transaction): Transaction;
    internalBinaryWrite(message: Transaction, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
 * @generated MessageType for protobuf message com.daml.ledger.api.v2.Transaction
 */
export declare const Transaction: Transaction$Type;
export {};
//# sourceMappingURL=transaction.d.ts.map