Skip to content

Commit

Permalink
doco
Browse files Browse the repository at this point in the history
  • Loading branch information
jrick committed Feb 26, 2016
1 parent a536b22 commit 4a171c3
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Paymetheus.Bitcoin/Wallet/TransactionBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,23 @@ namespace Paymetheus.Bitcoin.Wallet
{
public static class TransactionBuilder
{
/// <summary>
/// Provides transaction inputs referencing spendable outputs to construct a
/// transaction with some target output amount.
/// </summary>
/// <param name="target">Target amount the previous output value must meet or exceed.</param>
/// <returns>Total previous output amount and array of transaction inputs if the target was met.</returns>
public delegate Task<Tuple<Amount, Transaction.Input[]>> InputSource(Amount target);

/// <summary>
/// Constructs an unsigned transaction by referencing previous unspent outputs.
/// A change output is added when necessary to return extra value back to the wallet.
/// </summary>
/// <param name="outputs">Transaction output array without change</param>
/// <param name="changeScript">Output script to pay change to</param>
/// <param name="fetchInputsAsync">Input selection source</param>
/// <returns>Unsigned transaction and total input amount</returns>
/// <exception cref="InsufficientFundsException">Input source was unable to provide enough input value</exception>
/// <param name="outputs">Transaction output array without change.</param>
/// <param name="changeScript">Output script to pay change to.</param>
/// <param name="fetchInputsAsync">Input selection source.</param>
/// <returns>Unsigned transaction and total input amount.</returns>
/// <exception cref="InsufficientFundsException">Input source was unable to provide enough input value.</exception>
public static async Task<Tuple<Transaction, Amount>> BuildUnsignedTransaction(Transaction.Output[] outputs,
OutputScript changeScript,
Amount feePerKb,
Expand Down

0 comments on commit 4a171c3

Please sign in to comment.