MCPcopy Create free account
hub / github.com/BitVM/BitVM / serialize_txout

Function serialize_txout

final-spv/src/transaction.rs:124–127  ·  view source on GitHub ↗
(txout: &TxOut, writer: &mut W)

Source from the content-addressed store, hash-verified

122}
123
124fn serialize_txout<W: borsh::io::Write>(txout: &TxOut, writer: &mut W) -> borsh::io::Result<()> {
125 BorshSerialize::serialize(&txout.value.to_sat(), writer)?;
126 BorshSerialize::serialize(&txout.script_pubkey.as_bytes(), writer)
127}
128
129fn deserialize_txout<R: borsh::io::Read>(reader: &mut R) -> borsh::io::Result<TxOut> {
130 let value = Amount::from_sat(u64::deserialize_reader(reader)?);

Callers 1

serializeMethod · 0.85

Calls 1

serializeFunction · 0.85

Tested by

no test coverage detected