pub struct StellarTransactionData {
pub source_account: String,
pub fee: Option<u32>,
pub sequence_number: Option<i64>,
pub memo: Option<MemoSpec>,
pub valid_until: Option<String>,
pub network_passphrase: String,
pub signatures: Vec<DecoratedSignature>,
pub hash: Option<String>,
pub simulation_transaction_data: Option<String>,
pub transaction_input: TransactionInput,
pub signed_envelope_xdr: Option<String>,
}
Fields§
§source_account: String
§fee: Option<u32>
§sequence_number: Option<i64>
§memo: Option<MemoSpec>
§valid_until: Option<String>
§network_passphrase: String
§signatures: Vec<DecoratedSignature>
§hash: Option<String>
§simulation_transaction_data: Option<String>
§transaction_input: TransactionInput
§signed_envelope_xdr: Option<String>
Implementations§
Source§impl StellarTransactionData
impl StellarTransactionData
Sourcepub fn reset_to_pre_prepare_state(self) -> Self
pub fn reset_to_pre_prepare_state(self) -> Self
Resets the transaction data to its pre-prepare state by clearing all fields that are populated during the prepare and submit phases.
Fields preserved (from initial creation):
- source_account, network_passphrase, memo, valid_until, transaction_input
Fields reset to None/empty:
- fee, sequence_number, signatures, signed_envelope_xdr, hash, simulation_transaction_data
Sourcepub fn with_sequence_number(self, sequence_number: i64) -> Self
pub fn with_sequence_number(self, sequence_number: i64) -> Self
Sourcepub fn build_unsigned_envelope(
&self,
) -> Result<TransactionEnvelope, SignerError>
pub fn build_unsigned_envelope( &self, ) -> Result<TransactionEnvelope, SignerError>
Builds an unsigned envelope from any transaction input.
Returns an envelope without signatures, suitable for simulation and fee calculation.
§Returns
Ok(TransactionEnvelope)
containing the unsigned transactionErr(SignerError)
if the transaction data cannot be converted
Sourcepub fn get_envelope_for_simulation(
&self,
) -> Result<TransactionEnvelope, SignerError>
pub fn get_envelope_for_simulation( &self, ) -> Result<TransactionEnvelope, SignerError>
Gets the transaction envelope for simulation purposes.
Convenience method that delegates to build_unsigned_envelope().
§Returns
Ok(TransactionEnvelope)
containing the unsigned transactionErr(SignerError)
if the transaction data cannot be converted
Sourcepub fn build_signed_envelope(&self) -> Result<TransactionEnvelope, SignerError>
pub fn build_signed_envelope(&self) -> Result<TransactionEnvelope, SignerError>
Builds a signed envelope ready for submission to the network.
Uses cached signed_envelope_xdr if available, otherwise builds from components.
§Returns
Ok(TransactionEnvelope)
containing the signed transactionErr(SignerError)
if the transaction data cannot be converted
Sourcepub fn get_envelope_for_submission(
&self,
) -> Result<TransactionEnvelope, SignerError>
pub fn get_envelope_for_submission( &self, ) -> Result<TransactionEnvelope, SignerError>
Gets the transaction envelope for submission to the network.
Convenience method that delegates to build_signed_envelope().
§Returns
Ok(TransactionEnvelope)
containing the signed transactionErr(SignerError)
if the transaction data cannot be converted
Sourcepub fn attach_signature(self, sig: DecoratedSignature) -> Self
pub fn attach_signature(self, sig: DecoratedSignature) -> Self
Sourcepub fn with_simulation_data(
self,
sim_response: SimulateTransactionResponse,
operations_count: u64,
) -> Result<Self, SignerError>
pub fn with_simulation_data( self, sim_response: SimulateTransactionResponse, operations_count: u64, ) -> Result<Self, SignerError>
Return a new instance with simulation data applied (fees and transaction extension).
Trait Implementations§
Source§impl Clone for StellarTransactionData
impl Clone for StellarTransactionData
Source§fn clone(&self) -> StellarTransactionData
fn clone(&self) -> StellarTransactionData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StellarTransactionData
impl Debug for StellarTransactionData
Source§impl<'de> Deserialize<'de> for StellarTransactionData
impl<'de> Deserialize<'de> for StellarTransactionData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for StellarTransactionData
impl Serialize for StellarTransactionData
Source§impl TryFrom<StellarTransactionData> for Transaction
impl TryFrom<StellarTransactionData> for Transaction
Source§type Error = SignerError
type Error = SignerError
Auto Trait Implementations§
impl Freeze for StellarTransactionData
impl RefUnwindSafe for StellarTransactionData
impl Send for StellarTransactionData
impl Sync for StellarTransactionData
impl Unpin for StellarTransactionData
impl UnwindSafe for StellarTransactionData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Encode for T
impl<T> Encode for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
] or
a color-specific method, such as [OwoColorize::green
], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
] or
a color-specific method, such as [OwoColorize::on_yellow
], Read more