pub fn read_partial_tx(
	keychain: &keychain::Keychain,
	partial_tx: &PartialTx,
) -> Result<(u64, keychain::BlindingFactor, Transaction), Error> {
	let blind_bin = util::from_hex(partial_tx.blind_sum.clone())?;
	let blinding = keychain::BlindingFactor::from_slice(keychain.secp(), &blind_bin[..])?;
	let tx_bin = util::from_hex(partial_tx.tx.clone())?;
	let tx = ser::deserialize(&mut &tx_bin[..]).map_err(|_| {
		Error::Format("Could not deserialize transaction, invalid format.".to_string())
	})?;
	Ok((partial_tx.amount, blinding, tx))
}
/// Reads a partial transaction into the amount, sum of blinding
/// factors and the transaction itself.
Reads a partial transaction into the amount, sum of blinding
factors and the transaction itself.
Reads a partial transaction into the amount sum of blinding factors and the transaction itself .
pub fn read_partial_tx(
	keychain: &keychain::Keychain,
	partial_tx: &PartialTx,
) -> Result<(u64, keychain::BlindingFactor, Transaction), Error> {
	let blind_bin = util::from_hex(partial_tx.blind_sum.clone())?;
	let blinding = keychain::BlindingFactor::from_slice(keychain.secp(), &blind_bin[..])?;
	let tx_bin = util::from_hex(partial_tx.tx.clone())?;
	let tx = ser::deserialize(&mut &tx_bin[..]).map_err(|_| {
		Error::Format("Could not deserialize transaction, invalid format.".to_string())
	})?;
	Ok((partial_tx.amount, blinding, tx))
}
pub fn read_partial_tx ( keychain : & keychain :: Keychain , partial_tx : & PartialTx , ) -> Result < ( u64 , keychain :: BlindingFactor , Transaction ) , Error > { let blind_bin = util :: from_hex ( partial_tx . blind_sum . clone ( ) ) ? ; let blinding = keychain :: BlindingFactor :: from_slice ( keychain . secp ( ) , & blind_bin [ .. ] ) ? ; let tx_bin = util :: from_hex ( partial_tx . tx . clone ( ) ) ? ; let tx = ser :: deserialize ( & mut & tx_bin [ .. ] ) . map_err ( | _ | { Error :: Format ( " " . to_string ( ) ) } ) ? ; Ok ( ( partial_tx . amount , blinding , tx ) ) }
Reads a partial transaction into the amount, sum of blinding
factors and the transaction itself.
Reads a partial transaction into the amount sum of blinding factors and the transaction itself .
keychain
&keychain::Keychain
partial_tx
&PartialTx