btcpayserver/BTCPayServer/Models/WalletViewModels/WalletSendModel.cs

85 lines
2.8 KiB
C#
Raw Normal View History

2020-06-28 21:44:35 -05:00
using System;
2020-05-07 22:34:39 +02:00
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using BTCPayServer.Services.Labels;
namespace BTCPayServer.Models.WalletViewModels
{
public class WalletSendModel
{
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; }
}
Transfer Processors (#3476) * Automated Transfer processors This PR introduces a few things: * Payouts can now be directly nested under a store instead of through a pull payment. * The Wallet Send screen now has an option to "schedule" instead of simply creating a transaction. When you click on schedule, all transaction destinations are converted into approved payouts. Any options relating to fees or coin selection are discarded. * There is a new concept introduced, called "Transfer Processors". Transfer Processors are services for stores that process payouts that are awaiting payment. Each processor specifies which payment methods it can handle. BTCPay Server will have some forms of transfer processors baked in but it has been designed to allow the Plugin System to provide additional processors. * The initial transfer processors provided are "automated processors", for on chain and lightning payment methods. They can be configured to process payouts every X amount of minutes. For on-chain, this means payments are batched into one transaction, resulting in more efficient and cheaper fees for processing. * * fix build * extract * remove magic string stuff * fix error message when scheduling * Paginate migration * add payout count to payment method tab * remove unused var * add protip * optimzie payout migration dramatically * Remove useless double condition * Fix bunch of warnings * Remove warning * Remove warnigns * Rename to Payout processors * fix typo Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2022-04-24 05:19:34 +02:00
public List<TransactionOutput> Outputs { get; set; } = new();
public class TransactionOutput
{
[Display(Name = "Destination Address")]
[Required]
public string DestinationAddress { get; set; }
[Display(Name = "Amount")]
[Required]
[Range(1E-08, 21E6)]
public decimal? Amount { get; set; }
[Display(Name = "Subtract fees from amount")]
public bool SubtractFeesFromOutput { get; set; }
Transfer Processors (#3476) * Automated Transfer processors This PR introduces a few things: * Payouts can now be directly nested under a store instead of through a pull payment. * The Wallet Send screen now has an option to "schedule" instead of simply creating a transaction. When you click on schedule, all transaction destinations are converted into approved payouts. Any options relating to fees or coin selection are discarded. * There is a new concept introduced, called "Transfer Processors". Transfer Processors are services for stores that process payouts that are awaiting payment. Each processor specifies which payment methods it can handle. BTCPay Server will have some forms of transfer processors baked in but it has been designed to allow the Plugin System to provide additional processors. * The initial transfer processors provided are "automated processors", for on chain and lightning payment methods. They can be configured to process payouts every X amount of minutes. For on-chain, this means payments are batched into one transaction, resulting in more efficient and cheaper fees for processing. * * fix build * extract * remove magic string stuff * fix error message when scheduling * Paginate migration * add payout count to payment method tab * remove unused var * add protip * optimzie payout migration dramatically * Remove useless double condition * Fix bunch of warnings * Remove warning * Remove warnigns * Rename to Payout processors * fix typo Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2022-04-24 05:19:34 +02:00
public string PayoutId { get; set; }
}
public decimal CurrentBalance { get; set; }
public decimal ImmatureBalance { get; set; }
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; }
[Display(Name = "Fee rate (satoshi per byte)")]
[Required]
public decimal? FeeSatoshiPerByte { get; set; }
2020-06-11 12:10:51 +02:00
[Display(Name = "Don't create UTXO change")]
public bool NoChange { get; set; }
public decimal? Rate { get; set; }
public int FiatDivisibility { get; set; }
public int CryptoDivisibility { get; set; }
public string Fiat { get; set; }
public string RateError { get; set; }
public bool SupportRBF { get; set; }
[Display(Name = "Always include non-witness UTXO if available")]
public bool AlwaysIncludeNonWitnessUTXO { get; set; }
[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; }
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")]
public IEnumerable<string> SelectedInputs { get; set; }
public string BackUrl { get; set; }
public string ReturnUrl { get; set; }
public class InputSelectionOption
{
public IEnumerable<TransactionTagModel> Labels { get; set; }
public string Comment { get; set; }
2020-06-28 17:55:27 +09:00
public decimal Amount { get; set; }
public string Outpoint { get; set; }
public string Link { get; set; }
2022-04-05 14:46:42 +09:00
public long Confirmations { get; set; }
}
}
}