2021-07-27 16:53:44 +02:00
|
|
|
using NBitcoin;
|
|
|
|
|
2020-12-23 06:00:38 +01:00
|
|
|
namespace BTCPayServer.Client.Models
|
|
|
|
{
|
2021-08-29 19:07:12 -07:00
|
|
|
public class OnChainPaymentMethodDataPreview : OnChainPaymentMethodBaseData
|
2020-12-23 06:00:38 +01:00
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Crypto code of the payment method
|
|
|
|
/// </summary>
|
|
|
|
public string CryptoCode { get; set; }
|
|
|
|
|
2021-08-29 19:07:12 -07:00
|
|
|
public OnChainPaymentMethodDataPreview()
|
2020-12-23 06:00:38 +01:00
|
|
|
{
|
2021-12-31 16:59:02 +09:00
|
|
|
|
2020-12-23 06:00:38 +01:00
|
|
|
}
|
|
|
|
|
2021-08-29 19:07:12 -07:00
|
|
|
public OnChainPaymentMethodDataPreview(string cryptoCode, string derivationScheme, string label, RootedKeyPath accountKeyPath)
|
2020-12-23 06:00:38 +01:00
|
|
|
{
|
2021-07-27 16:53:44 +02:00
|
|
|
Label = label;
|
|
|
|
AccountKeyPath = accountKeyPath;
|
2020-12-23 06:00:38 +01:00
|
|
|
CryptoCode = cryptoCode;
|
|
|
|
DerivationScheme = derivationScheme;
|
|
|
|
}
|
|
|
|
}
|
2021-08-29 19:07:12 -07:00
|
|
|
|
|
|
|
public class OnChainPaymentMethodData : OnChainPaymentMethodDataPreview
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Whether the payment method is enabled
|
|
|
|
/// </summary>
|
|
|
|
public bool Enabled { get; set; }
|
|
|
|
|
2021-09-25 07:04:34 +02:00
|
|
|
public string PaymentMethod { get; set; }
|
|
|
|
|
2021-08-29 19:07:12 -07:00
|
|
|
public OnChainPaymentMethodData()
|
|
|
|
{
|
2021-12-31 16:59:02 +09:00
|
|
|
|
2021-08-29 19:07:12 -07:00
|
|
|
}
|
|
|
|
|
2021-09-25 07:04:34 +02:00
|
|
|
public OnChainPaymentMethodData(string cryptoCode, string derivationScheme, bool enabled, string label, RootedKeyPath accountKeyPath, string paymentMethod) :
|
2021-08-29 19:07:12 -07:00
|
|
|
base(cryptoCode, derivationScheme, label, accountKeyPath)
|
|
|
|
{
|
|
|
|
Enabled = enabled;
|
2021-09-25 07:04:34 +02:00
|
|
|
PaymentMethod = paymentMethod;
|
2021-08-29 19:07:12 -07:00
|
|
|
}
|
|
|
|
}
|
2020-12-23 06:00:38 +01:00
|
|
|
}
|