pub fn finalize_tx(
		&self,
		keychain_mask: Option<&SecretKey>,
		slate: &Slate,
	) -> Result<Slate, Error> {
		let mut w_lock = self.wallet_inst.lock();
		let w = w_lock.lc_provider()?.wallet_inst()?;
		let (slate_res, _context) = owner::finalize_tx(&mut **w, keychain_mask, &slate, true)?;

		Ok(slate_res)
	}
/// Finalizes a transaction, after all parties
/// have filled in both rounds of Slate generation. This step adds
/// all participants partial signatures to create the final signature,
/// resulting in a final transaction that is ready to post to a node.
///
/// Note that this function DOES NOT POST the transaction to a node
/// for validation. This is done in separately via the
/// [`post_tx`](struct.Owner.html#method.post_tx) function.
///
/// This function also stores the final transaction in the user's wallet files for retrieval
/// via the [`get_stored_tx`](struct.Owner.html#method.get_stored_tx) function.
/// Plus it check if proof is available. If it is - it will store it as well.
/// Currently proffs are generated by MQS only.
///
/// # Arguments
/// * `keychain_mask` - Wallet secret mask to XOR against the stored wallet seed before using, if
/// being used.
/// * `slate` - The transaction [`Slate`](../mimble_wallet_libwallet/slate/struct.Slate.html). All
/// participants must have filled in both rounds, and the sender should have locked their
/// outputs (via the [`tx_lock_outputs`](struct.Owner.html#method.tx_lock_outputs) function).
///
/// # Returns
/// * ``Ok([`slate`](../mimble_wallet_libwallet/slate/struct.Slate.html))` if successful,
/// containing the new finalized slate.
/// * or [`libwallet::Error`](../mimble_wallet_libwallet/struct.Error.html) if an error is encountered.
///
/// # Example
/// Set up as in [`new`](struct.Owner.html#method.new) method above.
/// ```
/// # mimble_wallet_api::doctest_helper_setup_doc_env!(wallet, wallet_config);
///
/// let mut api_owner = Owner::new(wallet.clone(), None, None);
/// let args = InitTxArgs {
///     src_acct_name: None,
///     amount: 2_000_000_000,
///     minimum_confirmations: 10,
///     max_outputs: 500,
///     num_change_outputs: 1,
///     selection_strategy_is_use_all: false,
///     message: Some("Finalize this tx now".to_owned()),
///     ..Default::default()
/// };
/// let result = api_owner.init_send_tx(
/// 	None,
/// 	args,
/// 	None,
/// 	1,
/// );
///
/// if let Ok(slate) = result {
///		// Send slate somehow
///		// ...
///		// Lock our outputs if we're happy the slate was (or is being) sent
///		let res = api_owner.tx_lock_outputs(None, &slate, None, 0);
///		//
///		// Retrieve slate back from recipient
///		//
///		let res = api_owner.finalize_tx(None, &slate);
/// }
/// ```
Finalizes a transaction, after all parties
have filled in both rounds of Slate generation. This step adds
all participants partial signatures to create the final signature,
resulting in a final transaction that is ready to post to a node.

Note that this function DOES NOT POST the transaction to a node
for validation.

This function also stores the final transaction in the user's wallet files for retrieval
via the [`get_stored_tx`](struct.Owner.html#method.get_stored_tx) function.
Plus it check if proof is available. If it is - it will store it as well.
Currently proffs are generated by MQS only.
Finalizes a transaction after all parties have filled in both rounds of Slate generation . This step adds all participants partial signatures to create the final signature resulting in a final transaction that is ready to post to a node . Note that this function DOES NOT POST the transaction to a node for validation . This function also stores the final transaction in the user ' s wallet files for retrieval via the [ ` get_stored_tx ` ] ( struct . Owner . html#method . get_stored_tx ) function . Plus it check if proof is available . If it is - it will store it as well . Currently proffs are generated by MQS only .
pub fn finalize_tx(
		&self,
		keychain_mask: Option<&SecretKey>,
		slate: &Slate,
	) -> Result<Slate, Error> {
		let mut w_lock = self.wallet_inst.lock();
		let w = w_lock.lc_provider()?.wallet_inst()?;
		let (slate_res, _context) = owner::finalize_tx(&mut **w, keychain_mask, &slate, true)?;
		Ok(slate_res)
	}
pub fn finalize_tx ( & self , keychain_mask : Option < & SecretKey > , slate : & Slate , ) -> Result < Slate , Error > { let mut w_lock = self . wallet_inst . lock ( ) ; let w = w_lock . lc_provider ( ) ? . wallet_inst ( ) ? ; let ( slate_res , _context ) = owner :: finalize_tx ( & mut * * w , keychain_mask , & slate , true ) ? ; Ok ( slate_res ) }
Finalizes a transaction, after all parties
have filled in both rounds of Slate generation.
Finalizes a transaction after all parties have filled in both rounds of Slate generation .
&self
keychain_mask
Option<&SecretKey>
slate
&Slate
``Ok([`slate`](../mimble_wallet_libwallet/slate/struct.Slate.html))` if successful,
containing the new finalized slate.
or [`libwallet::Error`](../mimble_wallet_libwallet/struct.Error.html) if an error is encountered.
` ` Ok ( [ ` slate ` ] ( .. / mimble_wallet_libwallet / slate / struct . Slate . html )) ` if successful containing the new finalized slate . or [ ` libwallet :: Error ` ] ( .. / mimble_wallet_libwallet / struct . Error . html ) if an error is encountered .
&self
keychain_mask
Option<&SecretKey>
slate
&Slate
example
Set up as in [`new`](struct.Owner.html#method.new) method above.
Set up as in [ ` new ` ] ( struct . Owner . html#method . new ) method above .
mimble_wallet_api::doctest_helper_setup_doc_env!(wallet, wallet_config);
let mut api_owner = Owner::new(wallet.clone(), None, None);
let args = InitTxArgs {
src_acct_name: None,
amount: 2_000_000_000,
minimum_confirmations: 10,
max_outputs: 500,
num_change_outputs: 1,
selection_strategy_is_use_all: false,
message: Some("Finalize this tx now".to_owned()),
Default::default()
};
let result = api_owner.init_send_tx(
None,
args,
None,
1,
).

if let Ok(slate) = result {
Send slate somehow

Lock our outputs if we're happy the slate was (or is being) sent
let res = api_owner.tx_lock_outputs(None, &slate, None, 0).

Retrieve slate back from recipient

let res = api_owner.finalize_tx(None, &slate);
}
```
let mut api_owner = Owner :: new ( wallet . clone () None None ) ; let args = InitTxArgs { src_acct_name : None amount : 2_000_000_000 minimum_confirmations : 10 max_outputs : 500 num_change_outputs : 1 selection_strategy_is_use_all : false message : Some ( " Finalize this tx now " . to_owned () ) Default :: default () } ; let result = api_owner . init_send_tx ( None args None 1 ) . if let Ok ( slate ) = result { Send slate somehow Lock our outputs if we ' re happy the slate was ( or is being ) sent let res = api_owner . tx_lock_outputs ( None &slate None 0 ) . Retrieve slate back from recipient let res = api_owner . finalize_tx ( None &slate ) ; } ` ` `