pub struct Submit { /* private fields */ }Expand description
A ledger command submission: which parties act, which commands to run, and the submission metadata (change ID, de-duplication period, workflow).
The command id is one component of the change ID
(user_id, act_as, command_id) that the Ledger API de-duplicates on.
Leave it unset for a fresh UUID, or set it explicitly to make a submission
idempotent across retries. user_id defaults to the one derived from the
bearer token.
Implementations§
Source§impl Submit
impl Submit
Sourcepub fn new_multi(act_as: Vec<String>) -> Self
pub fn new_multi(act_as: Vec<String>) -> Self
Start a submission acting as multiple parties (multi-party authorization, e.g. proposal-accept or DvP patterns).
Sourcepub fn add_command(self, command: Command) -> Self
pub fn add_command(self, command: Command) -> Self
Add a command to the submission.
Sourcepub fn with_command_id(self, command_id: impl Into<String>) -> Self
pub fn with_command_id(self, command_id: impl Into<String>) -> Self
Set an explicit command id (for de-duplication / retry idempotency).
Sourcepub fn with_user_id(self, user_id: impl Into<String>) -> Self
pub fn with_user_id(self, user_id: impl Into<String>) -> Self
Set the acting user id — the first component of the change ID. Defaults to the user derived from the bearer token.
Sourcepub fn with_read_as(self, read_as: Vec<String>) -> Self
pub fn with_read_as(self, read_as: Vec<String>) -> Self
Add read-as parties (data visible to these parties may be read during interpretation).
Sourcepub fn with_workflow_id(self, workflow_id: impl Into<String>) -> Self
pub fn with_workflow_id(self, workflow_id: impl Into<String>) -> Self
Set the workflow id (an opaque correlation id carried on the resulting transaction).
Sourcepub fn with_synchronizer_id(self, synchronizer_id: impl Into<String>) -> Self
pub fn with_synchronizer_id(self, synchronizer_id: impl Into<String>) -> Self
Pin the submission to a specific synchronizer.
Sourcepub fn with_deduplication_duration(self, duration: Duration) -> Self
pub fn with_deduplication_duration(self, duration: Duration) -> Self
Set the de-duplication period as a wall-clock duration: a submission with the same change ID within this window is rejected as a duplicate.
Sourcepub fn with_deduplication_offset(self, offset: i64) -> Self
pub fn with_deduplication_offset(self, offset: i64) -> Self
Set the de-duplication period as a ledger offset: submissions with the same change ID since that offset are rejected as duplicates.
Sourcepub fn with_transaction_shape(self, shape: TransactionShape) -> Self
pub fn with_transaction_shape(self, shape: TransactionShape) -> Self
Select the shape of the transaction returned by
submit_and_wait_for_transaction (default:
TransactionShape::LedgerEffects, the full as-executed view;
TransactionShape::AcsDelta returns the net create/archive change).
Ignored by the submission-only paths, which return no transaction.
Sourcepub fn with_submission_id(self, submission_id: impl Into<String>) -> Self
pub fn with_submission_id(self, submission_id: impl Into<String>) -> Self
Set an explicit submission id, to correlate this particular submission attempt in completions (unlike the command id, it identifies one attempt, not the change). Defaults to participant-generated.
Sourcepub fn add_disclosed_contract(self, contract: DisclosedContract) -> Self
pub fn add_disclosed_contract(self, contract: DisclosedContract) -> Self
Attach a disclosed contract: an off-ledger contract (obtained as a
created_event_blob, e.g. via
UpdatesRequest::with_created_event_blobs /
ActiveContractsRequest::with_created_event_blobs) made readable to
this submission’s interpretation. May be called repeatedly.
Sourcepub fn with_package_id_selection_preference(
self,
package_ids: Vec<String>,
) -> Self
pub fn with_package_id_selection_preference( self, package_ids: Vec<String>, ) -> Self
Restrict package selection for interpretation to these package ids (at most one preference per package name) — the SCU upgrade pin.
Sourcepub fn with_min_ledger_time_abs(self, time: Timestamp) -> Self
pub fn with_min_ledger_time_abs(self, time: Timestamp) -> Self
Set the lower bound for the ledger-effective time as an absolute
timestamp (mutually exclusive with
Self::with_min_ledger_time_rel — the participant rejects both).
Sourcepub fn with_min_ledger_time_rel(self, duration: Duration) -> Self
pub fn with_min_ledger_time_rel(self, duration: Duration) -> Self
Set the lower bound for the ledger-effective time relative to the
participant’s local clock (mutually exclusive with
Self::with_min_ledger_time_abs).
Sourcepub fn with_prefetch_contract_keys(self, keys: Vec<PrefetchContractKey>) -> Self
pub fn with_prefetch_contract_keys(self, keys: Vec<PrefetchContractKey>) -> Self
Hint contract keys to resolve eagerly before interpretation (a performance knob for key-heavy workflows).
Sourcepub fn with_taps_max_passes(self, passes: u32) -> Self
pub fn with_taps_max_passes(self, passes: u32) -> Self
Cap the topology-aware package selection passes (defaults to the participant’s configured value).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Submit
impl RefUnwindSafe for Submit
impl Send for Submit
impl Sync for Submit
impl Unpin for Submit
impl UnsafeUnpin for Submit
impl UnwindSafe for Submit
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