2021-11-11 06:30:19 +01:00
|
|
|
using System.Collections.Generic;
|
2021-10-29 08:25:43 +02:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
2021-11-11 06:30:19 +01:00
|
|
|
using Newtonsoft.Json;
|
2021-10-29 08:25:43 +02:00
|
|
|
|
|
|
|
namespace BTCPayServer.Models.StoreViewModels
|
|
|
|
{
|
|
|
|
public class WalletSettingsViewModel : DerivationSchemeViewModel
|
|
|
|
{
|
2021-11-11 06:30:19 +01:00
|
|
|
public WalletId WalletId { get; set; }
|
2021-10-29 08:25:43 +02:00
|
|
|
public string StoreId { get; set; }
|
|
|
|
public bool IsHotWallet { get; set; }
|
2024-10-25 15:48:53 +02:00
|
|
|
|
|
|
|
[Display(Name = "Enabled")]
|
2022-01-19 12:58:02 +01:00
|
|
|
public bool Enabled { get; set; }
|
2021-10-29 08:25:43 +02:00
|
|
|
public bool CanUsePayJoin { get; set; }
|
2021-12-31 16:59:02 +09:00
|
|
|
|
2021-10-29 08:25:43 +02:00
|
|
|
[Display(Name = "Enable Payjoin/P2EP")]
|
|
|
|
public bool PayJoinEnabled { get; set; }
|
|
|
|
|
2024-10-25 15:48:53 +02:00
|
|
|
[Display(Name = "Label")]
|
2021-11-11 06:30:19 +01:00
|
|
|
public string Label { get; set; }
|
2021-12-31 16:59:02 +09:00
|
|
|
|
2021-11-11 06:30:19 +01:00
|
|
|
public string DerivationSchemeInput { get; set; }
|
|
|
|
[Display(Name = "Is signing key")]
|
|
|
|
public string SelectedSigningKey { get; set; }
|
|
|
|
public bool IsMultiSig => AccountKeys.Count > 1;
|
|
|
|
|
2024-12-10 13:56:52 +01:00
|
|
|
public List<WalletSettingsAccountKeyViewModel> AccountKeys { get; set; } = new();
|
2021-11-11 06:30:19 +01:00
|
|
|
public bool NBXSeedAvailable { get; set; }
|
|
|
|
public string StoreName { get; set; }
|
|
|
|
public string UriScheme { get; set; }
|
2024-12-10 13:56:52 +01:00
|
|
|
|
|
|
|
#region MultiSig related settings
|
|
|
|
public bool CanSetupMultiSig { get; set; }
|
|
|
|
[Display(Name = "Is MultiSig on Server")]
|
|
|
|
public bool IsMultiSigOnServer { get; set; }
|
|
|
|
|
|
|
|
// some hardware devices like Jade require sending full input transactions if there are multiple inputs
|
|
|
|
// https://github.com/Blockstream/Jade/blob/0d6ce77bf23ef2b5dc43cdae3967b4207e8cad52/main/process/sign_tx.c#L586
|
|
|
|
[Display(Name = "Default Include NonWitness Utxo in PSBTs")]
|
|
|
|
public bool DefaultIncludeNonWitnessUtxo { get; set; }
|
|
|
|
#endregion
|
2021-11-11 06:30:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public class WalletSettingsAccountKeyViewModel
|
|
|
|
{
|
|
|
|
[JsonProperty("ExtPubKey")]
|
|
|
|
[Display(Name = "Account key")]
|
|
|
|
public string AccountKey { get; set; }
|
|
|
|
[Display(Name = "Master fingerprint")]
|
|
|
|
[Validation.HDFingerPrintValidator]
|
|
|
|
public string MasterFingerprint { get; set; }
|
|
|
|
[Display(Name = "Account key path")]
|
|
|
|
[Validation.KeyPathValidator]
|
|
|
|
public string AccountKeyPath { get; set; }
|
2021-10-29 08:25:43 +02:00
|
|
|
}
|
|
|
|
}
|