pub struct Transaction {
pub update_id: String,
pub command_id: String,
pub workflow_id: String,
pub effective_at: Option<Timestamp>,
pub events: Vec<Event>,
pub offset: i64,
pub synchronizer_id: String,
pub trace_context: Option<TraceContext>,
pub record_time: Option<Timestamp>,
pub external_transaction_hash: Option<Vec<u8>>,
pub paid_traffic_cost: Option<i64>,
pub transaction_hash: Option<Vec<u8>>,
}Expand description
Filtered view of an on-ledger transaction’s create and archive events.
Fields§
§update_id: StringAssigned by the server. Useful for correlating logs.
Must be a valid LedgerString (as described in value.proto).
Required
command_id: StringThe 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
workflow_id: StringThe workflow ID used in command submission.
Must be a valid LedgerString (as described in value.proto).
Optional
effective_at: Option<Timestamp>Ledger effective time.
Required
events: Vec<Event>The collection of events. Contains:
CreatedEventorArchivedEventin case of ACS_DELTA transaction shapeCreatedEventorExercisedEventin case of LEDGER_EFFECTS transaction shape
Required: must be non-empty
offset: i64The absolute offset. The details of this field are described in community/ledger-api/README.md.
It is a valid absolute offset (positive integer).
Required
synchronizer_id: StringA valid synchronizer id. Identifies the synchronizer that synchronized the transaction.
Required
trace_context: Option<TraceContext>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.
Optional
record_time: Option<Timestamp>The time at which the transaction was recorded. The record time refers to the synchronizer which synchronized the transaction.
Required
external_transaction_hash: Option<Vec<u8>>Deprecated: please use transaction_hash which has the same value.
For transaction externally signed, contains the external transaction hash
signed by the external party. Can be used to correlate an external submission with a committed transaction.
Optional: can be empty
paid_traffic_cost: Option<i64>The traffic cost that this participant node paid for the confirmation request for this transaction.
Not set for transactions that were
- initiated by another participant
- initiated offline via the repair service
- processed before the participant started serving traffic cost on the Ledger API
- returned as part of a query filtering for a non submitting party
Optional
transaction_hash: Option<Vec<u8>>The transaction hash signed by the external party for prepared transactions
that were submitted using InteractiveSubmissionService.ExecuteSubmission
or one of its variants.
Use this to correlate prepared transactions with their execution result on the same participant that executed the transaction.
Not available for:
- transactions executed on Canton versions prior to 3.6
- transactions of internal parties submitted using
CommandSubmissionService.Submitand its variants
Optional: can be empty
Implementations§
Source§impl Transaction
impl Transaction
Sourcepub fn external_transaction_hash(&self) -> &[u8] ⓘ
pub fn external_transaction_hash(&self) -> &[u8] ⓘ
Returns the value of external_transaction_hash, or the default value if external_transaction_hash is unset.
Sourcepub fn paid_traffic_cost(&self) -> i64
pub fn paid_traffic_cost(&self) -> i64
Returns the value of paid_traffic_cost, or the default value if paid_traffic_cost is unset.
Sourcepub fn transaction_hash(&self) -> &[u8] ⓘ
pub fn transaction_hash(&self) -> &[u8] ⓘ
Returns the value of transaction_hash, or the default value if transaction_hash is unset.
Trait Implementations§
Source§impl Clone for Transaction
impl Clone for Transaction
Source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Transaction
impl Debug for Transaction
Source§impl Default for Transaction
impl Default for Transaction
Source§fn default() -> Transaction
fn default() -> Transaction
Source§impl Message for Transaction
impl Message for Transaction
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for Transaction
impl PartialEq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementations§
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnsafeUnpin for Transaction
impl UnwindSafe for Transaction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request