2020-06-28 21:44:35 -05:00
|
|
|
using System;
|
2020-05-07 22:34:39 +02:00
|
|
|
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; }
|
2021-08-01 17:42:00 +05:30
|
|
|
public decimal ImmatureBalance { get; set; }
|
2018-11-01 00:19:25 +09:00
|
|
|
|
|
|
|
public string CryptoCode { get; set; }
|
2020-06-28 17:55:27 +09:00
|
|
|
|
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; }
|
2020-09-11 09:23:08 +02:00
|
|
|
public int FiatDivisibility { get; set; }
|
|
|
|
public int CryptoDivisibility { get; set; }
|
2018-11-01 00:19:25 +09:00
|
|
|
public string Fiat { get; set; }
|
|
|
|
public string RateError { get; set; }
|
2019-05-08 15:24:20 +09:00
|
|
|
public bool SupportRBF { get; set; }
|
2020-06-12 13:58:55 +02:00
|
|
|
[Display(Name = "Always include non-witness UTXO if available")]
|
2020-10-16 20:29:29 +09:00
|
|
|
public bool AlwaysIncludeNonWitnessUTXO { 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-06-17 21:43:56 +09:00
|
|
|
[Display(Name = "PayJoin BIP21")]
|
|
|
|
public string PayJoinBIP21 { get; set; }
|
2020-03-19 09:44:47 +01:00
|
|
|
public bool InputSelection { get; set; }
|
|
|
|
public InputSelectionOption[] InputsAvailable { get; set; }
|
2020-06-28 17:55:27 +09:00
|
|
|
|
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
|
|
|
|
{
|
2020-12-12 14:10:47 +09:00
|
|
|
public IEnumerable<ColoredLabel> Labels { get; set; }
|
2020-03-19 09:44:47 +01:00
|
|
|
public string Comment { get; set; }
|
2020-06-28 17:55:27 +09:00
|
|
|
public decimal Amount { get; set; }
|
2020-03-19 09:44:47 +01:00
|
|
|
public string Outpoint { get; set; }
|
|
|
|
public string Link { get; set; }
|
2022-04-05 14:46:42 +09:00
|
|
|
public long Confirmations { get; set; }
|
2020-03-19 09:44:47 +01:00
|
|
|
}
|
2018-11-01 00:19:25 +09:00
|
|
|
}
|
|
|
|
}
|