pub struct Transaction {
pub inputs: Vec<Input>,
pub outputs: Vec<Output>,
pub struct_metadata: Option<StructMetadata>,
pub options: Option<TransactionOptions>,
}Fields§
§inputs: Vec<Input>§outputs: Vec<Output>§struct_metadata: Option<StructMetadata>§options: Option<TransactionOptions>Implementations§
Source§impl Transaction
impl Transaction
pub fn combine_multisig_proofs( &mut self, other: &Transaction, address: &Address, ) -> RgResult<Transaction>
pub fn with_pow(self) -> RgResult<Self>
pub fn signable_hash_or(&self) -> Hash
pub fn sponsored_time(&self) -> RgResult<i64>
pub fn transaction_type(&self) -> RgResult<TransactionType>
pub fn is_metadata_or_obs(&self) -> bool
pub fn validate_network(&self, network: &NetworkEnvironment) -> RgResult<()>
pub fn network(&self) -> RgResult<NetworkEnvironment>
pub fn is_test(&self) -> bool
pub fn input_of(&self, f: &UtxoId) -> Option<&Input>
pub fn is_swap(&self) -> bool
pub fn is_swap_fulfillment(&self) -> bool
pub fn swap_fulfillment(&self) -> Option<&SwapFulfillment>
pub fn swap_fulfillment_amount_and_destination_and_origin( &self, ) -> Option<(&SwapFulfillment, &CurrencyAmount, &Address, Address)>
pub fn output_data(&self) -> impl Iterator<Item = &StandardData>
pub fn output_request(&self) -> impl Iterator<Item = &StandardRequest>
pub fn output_response(&self) -> impl Iterator<Item = &StandardResponse>
pub fn swap_request(&self) -> Option<&SwapRequest>
pub fn swap_request_and_amount_and_party_address( &self, ) -> Option<(&SwapRequest, &CurrencyAmount, &Address)>
pub fn swap_destination(&self) -> Option<&Address>
pub fn stake_request(&self) -> Option<&StakeRequest>
pub fn stake_deposit_request(&self) -> Option<&StakeDeposit>
pub fn stake_withdrawal_request(&self) -> Option<&StakeWithdrawal>
pub fn stake_withdrawal_fulfillments( &self, ) -> impl Iterator<Item = &StakeWithdrawalFulfillment>
pub fn stake_deposit_destination(&self) -> Option<&Address>
pub fn stake_destination(&self) -> Option<&Address>
pub fn stake_withdrawal_destination(&self) -> Option<&Address>
pub fn swap_destination_currency(&self) -> Option<SupportedCurrency>
pub fn external_destination_currency(&self) -> Option<SupportedCurrency>
pub fn is_stake(&self) -> bool
pub fn has_portfolio_request(&self) -> bool
pub fn portfolio_request(&self) -> Option<&PortfolioRequest>
pub fn is_metadata(&self) -> bool
pub fn is_request(&self) -> bool
pub fn is_deploy(&self) -> bool
pub fn observation_output_index(&self) -> RgResult<i64>
pub fn observation_as_utxo_id(&self) -> RgResult<UtxoId>
pub fn observation_output(&self) -> RgResult<&Output>
pub fn observation_output_as(&self) -> RgResult<UtxoEntry>
pub fn observation(&self) -> RgResult<&Observation>
pub fn observation_proof(&self) -> RgResult<&Proof>
pub fn observation_public_key(&self) -> RgResult<&PublicKey>
pub fn build_observation_proofs(&self) -> RgResult<Vec<ObservationProof>>
pub fn with_hashes(&mut self) -> &mut Self
pub fn with_signable_hash(&mut self) -> Result<&mut Self, ErrorInfo>
pub fn add_proof_per_input(&mut self, proof: &Proof) -> &Transaction
pub fn utxo_inputs(&self) -> impl Iterator<Item = &UtxoId>
pub fn fixed_utxo_ids_of_inputs(&self) -> Result<Vec<UtxoId>, ErrorInfo>
pub fn input_utxo_ids(&self) -> impl Iterator<Item = &UtxoId>
pub fn output_amounts(&self) -> impl Iterator<Item = AddressBalance> + '_
pub fn output_amount_total(&self) -> CurrencyAmount
pub fn output_amounts_opt(&self) -> impl Iterator<Item = &CurrencyAmount>
pub fn output_address_amounts_opt( &self, ) -> impl Iterator<Item = (&Address, CurrencyAmount)>
pub fn output_amount_map<'a>(&'a self) -> HashMap<&'a Address, i64>
pub fn non_remainder_amount_rdg(&self) -> i64
pub fn non_remainder_amount_rdg_typed(&self) -> CurrencyAmount
pub fn remainder_amount(&self) -> i64
pub fn fee_amount(&self) -> i64
pub fn first_output_external_txid(&self) -> Option<&ExternalTransactionId>
pub fn output_external_txids( &self, ) -> impl Iterator<Item = &ExternalTransactionId>
pub fn output_rdg_amount_of(&self, address: &Address) -> i64
pub fn output_of(&self, address: &Address) -> Vec<&Output>
pub fn output_of_with_index(&self, address: &Address) -> Vec<(usize, &Output)>
pub fn first_peer_utxo(&self) -> RgResult<UtxoEntry>
pub fn output_swap_amount_of(&self, address: &Address) -> i64
pub fn has_swap_to(&self, address: &Address) -> bool
pub fn output_bitcoin_address_of(&self, address: &Address) -> Option<&Address>
pub fn output_index(&self, output: &Output) -> RgResult<i64>
pub fn utxo_id_at(&self, index: usize) -> RgResult<UtxoId>
pub fn liquidity_of(&self, a: &Address) -> Vec<(UtxoId, &StakeRequest)>
pub fn stake_requests(&self) -> Vec<(UtxoId, &StakeRequest)>
pub fn total_output_amount(&self) -> i64
pub fn floating_inputs(&self) -> impl Iterator<Item = &FloatingUtxoId>
pub fn total_input_amount(&self) -> i64
pub fn total_output_amount_float(&self) -> f64
pub fn output_amounts_by_product(&self) -> HashMap<ProductId, CurrencyAmount>
pub fn signable_hash(&self) -> Hash
pub fn signed_hash(&self) -> Hash
pub fn to_utxo_entries(&self, time: u64) -> Vec<UtxoEntry>
pub fn to_utxo_address(&self, address: &Address) -> Vec<UtxoEntry>
pub fn utxo_outputs(&self) -> RgResult<Vec<UtxoEntry>>
pub fn output_utxo_ids(&self) -> impl Iterator<Item = &UtxoId>
pub fn head_utxo(&self) -> RgResult<UtxoEntry>
pub fn nmd_utxo(&self) -> RgResult<UtxoEntry>
pub fn height(&self) -> RgResult<i64>
pub fn options(&self) -> RgResult<&TransactionOptions>
pub fn salt(&self) -> RgResult<i64>
pub fn peer_data(&self) -> Result<PeerMetadata, ErrorInfo>
pub fn node_metadata(&self) -> Result<NodeMetadata, ErrorInfo>
pub fn addresses(&self) -> Vec<Address>
👎Deprecated
pub fn input_addresses(&self) -> Vec<Address>
👎Deprecated
pub fn input_address_descriptor_address_or_public_key(&self) -> Vec<Address>
pub fn input_address_set(&self) -> HashSet<Address>
👎Deprecated
pub fn first_input_address(&self) -> Option<Address>
👎Deprecated
pub fn first_input_proof_public_key(&self) -> Option<&PublicKey>
👎Deprecated
pub fn first_output_non_input_or_fee(&self) -> Option<&Output>
pub fn has_input_address_as_output_address(&self) -> bool
pub fn has_relation_to_address(&self, a: &Address) -> bool
pub fn is_outgoing(&self) -> bool
pub fn first_output_address_non_input_or_fee(&self) -> Option<Address>
pub fn first_output_amount(&self) -> Option<f64>
pub fn first_output_amount_i64(&self) -> Option<i64>
pub fn first_output_amount_typed(&self) -> Option<CurrencyAmount>
pub fn first_contract_type(&self) -> Option<StandardContractType>
Trait Implementations§
Source§impl Clone for Transaction
impl Clone for Transaction
Source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Transaction
impl Debug for Transaction
Source§impl Default for Transaction
impl Default for Transaction
Source§impl<'de> Deserialize<'de> for Transaction
impl<'de> Deserialize<'de> for Transaction
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for Transaction
impl Hash for Transaction
Source§impl HashClear for Transaction
impl HashClear for Transaction
fn hash_clear(&mut self)
Source§impl Message for Transaction
impl Message for Transaction
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for Transaction
impl PartialEq for Transaction
Source§impl SchemaValidationSupport for Transaction
impl SchemaValidationSupport for Transaction
fn validate_schema( &self, network_opt: Option<&NetworkEnvironment>, expect_signed: bool, ) -> RgResult<()>
fn validate_current_time(&self, max_delta: Option<i64>) -> RgResult<()>
Source§impl Serialize for Transaction
impl Serialize for Transaction
Source§impl TransactionPowValidate for Transaction
impl TransactionPowValidate for Transaction
fn pow_validate(&self) -> RgResult<bool>
Source§impl WithMetadataHashableFields for Transaction
impl WithMetadataHashableFields for Transaction
fn struct_metadata_opt(&mut self) -> Option<&mut StructMetadata>
fn struct_metadata_opt_ref(&self) -> Option<&StructMetadata>
impl Eq 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 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> 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>
Converts
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>
Converts
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