Struct saito_rust::transaction::Transaction [−][src]
pub struct Transaction {
pub inputs: Vec<Slip>,
pub outputs: Vec<Slip>,
pub total_in: u64,
pub total_out: u64,
pub total_fees: u64,
pub cumulative_fees: u64,
pub routing_work_for_me: u64,
pub routing_work_for_creator: u64,
// some fields omitted
}
Fields
inputs: Vec<Slip>
outputs: Vec<Slip>
total_in: u64
total_out: u64
total_fees: u64
cumulative_fees: u64
routing_work_for_me: u64
routing_work_for_creator: u64
Implementations
pub async fn add_hop_to_path(
&mut self,
wallet_lock: Arc<RwLock<Wallet>>,
to_publickey: SaitoPublicKey
)
pub async fn build_last_hop(
&mut self,
wallet_lock: Arc<RwLock<Wallet>>,
peer_pubkey: SaitoPublicKey
) -> Option<Hop>
pub async fn generate_transaction(
wallet_lock: Arc<RwLock<Wallet>>,
to_publickey: SaitoPublicKey,
with_payment: u64,
with_fee: u64
) -> Transaction
pub async fn generate_vip_transaction(
_wallet_lock: Arc<RwLock<Wallet>>,
to_publickey: SaitoPublicKey,
with_amount: u64,
number_of_vip_slips: u64
) -> Transaction
pub fn generate_rebroadcast_transaction(
transaction_to_rebroadcast: &Transaction,
output_slip_to_rebroadcast: &Slip,
with_fee: u64
) -> Transaction
pub fn get_inputs(&self) -> &Vec<Slip>ⓘ
pub fn get_mut_inputs(&mut self) -> &mut Vec<Slip>ⓘ
pub fn get_mut_outputs(&mut self) -> &mut Vec<Slip>ⓘ
pub fn get_outputs(&self) -> &Vec<Slip>ⓘ
pub fn get_message(&self) -> &Vec<u8>ⓘ
pub fn serialize_for_signature(&self) -> Vec<u8>ⓘ
Deserialize from bytes to a Transaction. [len of inputs - 4 bytes - u32] [len of outputs - 4 bytes - u32] [len of message - 4 bytes - u32] [len of path - 4 bytes - u32] [signature - 64 bytes - Secp25k1 sig] [timestamp - 8 bytes - u64] [transaction type - 1 byte] [input][input][input]… [output][output][output]… [message] [hop][hop][hop]…
Serialize a Transaction for transport or disk. [len of inputs - 4 bytes - u32] [len of outputs - 4 bytes - u32] [len of message - 4 bytes - u32] [len of path - 4 bytes - u32] [signature - 64 bytes - Secp25k1 sig] [timestamp - 8 bytes - u64] [transaction type - 1 byte] [input][input][input]… [output][output][output]… [message] [hop][hop][hop]…
pub fn on_chain_reorganization(
&self,
utxoset: &mut AHashMap<SaitoUTXOSetKey, u64>,
longest_chain: bool,
block_id: u64
)
pub fn on_chain_reorganization(
&self,
utxoset: &mut AHashMap<SaitoUTXOSetKey, u64>,
longest_chain: bool,
block_id: u64
)
Runs when the chain is re-organized
Trait Implementations
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more