public Transaction Create( ISecretDestination from, IDestination to, decimal amount, decimal fees, ICoin coin, bool sign = true ) => this.network.CreateTransactionBuilder() .AddCoin(coin) .AddKeys(from.PrivateKey) .SetChange(from.ScriptPubKey) .Send(to.ScriptPubKey, SugarMoney.Coins(amount)) .SendFees(SugarMoney.Coins(fees)) .BuildTransaction(sign);
public Transaction Create( ISecretDestination from, IDestination to, Money amount, Money fees, IEnumerable <ICoin> coins, bool sign = true ) => this.network.CreateTransactionBuilder() .AddCoins(coins) .AddKeys(from.PrivateKey) .SetChange(from.ScriptPubKey) .Send(to.ScriptPubKey, amount) .SendFees(fees) .BuildTransaction(sign);