Struct redgold_schema::structs::Transaction
source · 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 input_of(&self, f: &UtxoId) -> Option<&Input>
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 iter_utxo_outputs(&self) -> Vec<(Vec<u8>, i64)>
pub fn iter_utxo_inputs(&self) -> Vec<(Vec<u8>, i64)>
pub fn fixed_utxo_ids_of_inputs(&self) -> Result<Vec<UtxoId>, ErrorInfo>
pub fn output_amounts(&self) -> Vec<AddressBalance>
pub fn output_amount_of(&self, address: &Address) -> i64
pub fn output_of(&self, address: &Address) -> Vec<&Output>
pub fn first_peer_utxo(&self) -> RgResult<UtxoEntry>
pub fn output_swap_amount_of(&self, address: &Address) -> i64
pub fn output_bitcoin_address_of(&self, address: &Address) -> Option<&Address>
pub fn liquidity_of(&self, a: &Address) -> Option<&Output>
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 to_utxo_entries(&self, time: u64) -> Vec<UtxoEntry>
pub fn utxo_outputs(&self) -> RgResult<Vec<UtxoEntry>>
pub fn head_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>
pub fn input_addresses(&self) -> Vec<Address>
pub fn first_input_address(&self) -> Option<Address>
pub fn first_input_proof_public_key(&self) -> Option<&PublicKey>
pub fn first_output_address(&self) -> Option<Address>
pub fn first_output_amount(&self) -> Option<f64>
Trait Implementations§
source§impl Clone for Transaction
impl Clone for Transaction
source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a copy 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>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
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>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
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>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
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>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
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§fn eq(&self, other: &Transaction) -> bool
fn eq(&self, other: &Transaction) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for Transaction
impl Serialize for Transaction
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 StructuralEq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementations§
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