New feature: Coin Selection

This opt-in feature allows you to select which utxos you want to use for a specific transaction.
This commit is contained in:
Kukks
2020-03-19 09:44:47 +01:00
parent c85fb3e89f
commit d6c66d0c03
10 changed files with 279 additions and 8 deletions

View File

@@ -20,6 +20,10 @@ namespace BTCPayServer.Controllers
{
var nbx = ExplorerClientProvider.GetExplorerClient(network);
CreatePSBTRequest psbtRequest = new CreatePSBTRequest();
if (sendModel.InputSelection)
{
psbtRequest.IncludeOnlyOutpoints = sendModel.SelectedInputs?.Select(OutPoint.Parse)?.ToList()?? new List<OutPoint>();
}
foreach (var transactionOutput in sendModel.Outputs)
{
var psbtDestination = new CreatePSBTDestination();