pub struct Prepared { /* private fields */ }Expand description
Interactive submission keeps the key away from the participant. It does not, on its own, make a dishonest participant harmless.
Implementations§
Source§impl Prepared
impl Prepared
Sourcepub fn transaction(&self) -> Option<&PreparedTransaction>
pub fn transaction(&self) -> Option<&PreparedTransaction>
The interpreted transaction, for a caller that wants to inspect what it is about to authorize before signing it.
Sourcepub fn command_id(&self) -> &str
pub fn command_id(&self) -> &str
The change ID’s command component, carried from preparation.
Sourcepub fn change_id(&self) -> ChangeId
pub fn change_id(&self) -> ChangeId
The identity the participant de-duplicates this submission by —
(user_id, act_as, command_id). Keep it: it is what
CantonClient::await_completion
recovers an ambiguous execute by, and Executable is consumed on
execute.
Sourcepub fn hashing_details(&self) -> Option<&str>
pub fn hashing_details(&self) -> Option<&str>
What the participant says about how it hashed, when preparation asked
for it with Prepare::with_verbose_hashing.
For troubleshooting a hash mismatch and nothing else: the proto is explicit that neither the format nor the content is stable, so this is a string to read, never one to parse.
Sourcepub fn cost_estimation(&self) -> Option<&CostEstimation>
pub fn cost_estimation(&self) -> Option<&CostEstimation>
The participant’s estimate of what executing this will cost in traffic, unless preparation turned the estimate off.
Sourcepub fn hashing_scheme_version(&self) -> HashingSchemeVersion
pub fn hashing_scheme_version(&self) -> HashingSchemeVersion
The hashing scheme the participant hashed under, echoed back with the signature so it verifies under the same one.
Sourcepub async fn sign_with(self, signer: &dyn Signer) -> Result<Executable>
pub async fn sign_with(self, signer: &dyn Signer) -> Result<Executable>
Sign as the single acting party.
§Errors
Error::InvalidRequest if the submission acts as more than one party
— then it is ambiguous which one this signature is for, and
sign_as says so explicitly.
Sourcepub async fn sign_as(
self,
party: &str,
signer: &dyn Signer,
) -> Result<Executable>
pub async fn sign_as( self, party: &str, signer: &dyn Signer, ) -> Result<Executable>
Sign on behalf of party.
§Errors
Error::InvalidRequest if party is not among the acting parties —
the participant would reject the execution, and catching it here says
which party was meant. Otherwise, whatever the signer returns.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Prepared
impl RefUnwindSafe for Prepared
impl Send for Prepared
impl Sync for Prepared
impl Unpin for Prepared
impl UnsafeUnpin for Prepared
impl UnwindSafe for Prepared
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