2020-05-07 22:34:39 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2018-11-01 00:19:25 +09:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2020-04-28 09:53:34 +02:00
|
|
|
|
using BTCPayServer.Services.Labels;
|
2018-11-01 00:19:25 +09:00
|
|
|
|
|
|
|
|
|
namespace BTCPayServer.Models.WalletViewModels
|
|
|
|
|
{
|
|
|
|
|
public class WalletSendModel
|
|
|
|
|
{
|
2020-05-24 21:11:33 +09:00
|
|
|
|
public enum ThreeStateBool
|
|
|
|
|
{
|
|
|
|
|
Maybe,
|
|
|
|
|
Yes,
|
|
|
|
|
No
|
|
|
|
|
}
|
2020-05-07 22:34:39 +02:00
|
|
|
|
public class FeeRateOption
|
|
|
|
|
{
|
|
|
|
|
public TimeSpan Target { get; set; }
|
|
|
|
|
public decimal FeeRate { get; set; }
|
|
|
|
|
}
|
2019-05-21 08:10:07 +00:00
|
|
|
|
public List<TransactionOutput> Outputs { get; set; } = new List<TransactionOutput>();
|
2018-11-01 00:19:25 +09:00
|
|
|
|
|
2019-05-21 08:10:07 +00:00
|
|
|
|
public class TransactionOutput
|
|
|
|
|
{
|
|
|
|
|
[Display(Name = "Destination Address")]
|
|
|
|
|
[Required]
|
|
|
|
|
public string DestinationAddress { get; set; }
|
|
|
|
|
|
2019-11-21 18:47:10 -08:00
|
|
|
|
[Display(Name = "Amount")]
|
|
|
|
|
[Required]
|
|
|
|
|
[Range(1E-08, 21E6)]
|
|
|
|
|
public decimal? Amount { get; set; }
|
2019-05-21 08:10:07 +00:00
|
|
|
|
|
2019-05-24 14:28:09 +09:00
|
|
|
|
[Display(Name = "Subtract fees from amount")]
|
2019-05-21 08:10:07 +00:00
|
|
|
|
public bool SubtractFeesFromOutput { get; set; }
|
|
|
|
|
}
|
2018-11-01 00:19:25 +09:00
|
|
|
|
public decimal CurrentBalance { get; set; }
|
|
|
|
|
|
|
|
|
|
public string CryptoCode { get; set; }
|
2020-05-07 22:34:39 +02:00
|
|
|
|
|
|
|
|
|
public List<FeeRateOption> RecommendedSatoshiPerByte { get; set; }
|
2018-11-01 00:19:25 +09:00
|
|
|
|
|
|
|
|
|
[Display(Name = "Fee rate (satoshi per byte)")]
|
|
|
|
|
[Required]
|
2020-05-05 19:06:59 +09:00
|
|
|
|
public decimal? FeeSatoshiPerByte { get; set; }
|
2019-01-15 23:50:45 +09:00
|
|
|
|
|
2020-06-11 12:10:51 +02:00
|
|
|
|
[Display(Name = "Don't create UTXO change")]
|
2019-01-15 23:50:45 +09:00
|
|
|
|
public bool NoChange { get; set; }
|
2018-11-01 00:19:25 +09:00
|
|
|
|
public decimal? Rate { get; set; }
|
|
|
|
|
public int Divisibility { get; set; }
|
|
|
|
|
public string Fiat { get; set; }
|
|
|
|
|
public string RateError { get; set; }
|
2019-05-08 15:24:20 +09:00
|
|
|
|
public bool SupportRBF { get; set; }
|
2020-05-24 21:11:33 +09:00
|
|
|
|
[Display(Name = "Allow fee increase (RBF)")]
|
|
|
|
|
public ThreeStateBool AllowFeeBump { get; set; }
|
2020-01-21 09:33:12 +01:00
|
|
|
|
|
|
|
|
|
public bool NBXSeedAvailable { get; set; }
|
2020-04-08 15:40:41 +02:00
|
|
|
|
[Display(Name = "PayJoin Endpoint Url")]
|
2020-01-06 13:57:32 +01:00
|
|
|
|
public string PayJoinEndpointUrl { get; set; }
|
2020-03-19 09:44:47 +01:00
|
|
|
|
public bool InputSelection { get; set; }
|
|
|
|
|
public InputSelectionOption[] InputsAvailable { get; set; }
|
2020-03-19 10:08:33 +01:00
|
|
|
|
|
|
|
|
|
[Display(Name = "UTXOs to spend from")]
|
2020-03-19 09:44:47 +01:00
|
|
|
|
public IEnumerable<string> SelectedInputs { get; set; }
|
|
|
|
|
|
|
|
|
|
public class InputSelectionOption
|
|
|
|
|
{
|
|
|
|
|
public IEnumerable<Label> Labels { get; set; }
|
|
|
|
|
public string Comment { get; set; }
|
|
|
|
|
public decimal Amount { get; set; }
|
|
|
|
|
public string Outpoint { get; set; }
|
|
|
|
|
public string Link { get; set; }
|
|
|
|
|
}
|
2018-11-01 00:19:25 +09:00
|
|
|
|
}
|
|
|
|
|
}
|