mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 14:40:36 +01:00
40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using System.Collections.Generic;
|
|
using BTCPayServer.Client.JsonConverters;
|
|
using BTCPayServer.Client.Models;
|
|
using NBitcoin;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Converters;
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
namespace BTCPayServer.Client
|
|
{
|
|
public class GenerateOnChainWalletRequest
|
|
{
|
|
public int AccountNumber { get; set; } = 0;
|
|
[JsonConverter(typeof(MnemonicJsonConverter))]
|
|
public Mnemonic ExistingMnemonic { get; set; }
|
|
[JsonConverter(typeof(WordlistJsonConverter))]
|
|
public NBitcoin.Wordlist WordList { get; set; }
|
|
|
|
[JsonConverter(typeof(WordcountJsonConverter))]
|
|
public NBitcoin.WordCount? WordCount { get; set; } = NBitcoin.WordCount.Twelve;
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
public NBitcoin.ScriptPubKeyType ScriptPubKeyType { get; set; } = ScriptPubKeyType.Segwit;
|
|
public string Passphrase { get; set; }
|
|
public bool ImportKeysToRPC { get; set; }
|
|
public bool SavePrivateKeys { get; set; }
|
|
}
|
|
public class GenerateOnChainWalletResponse : GenericPaymentMethodData
|
|
{
|
|
public class ConfigData
|
|
{
|
|
public string AccountDerivation { get; set; }
|
|
[JsonExtensionData]
|
|
IDictionary<string, JToken> AdditionalData { get; set; }
|
|
}
|
|
[JsonConverter(typeof(MnemonicJsonConverter))]
|
|
public Mnemonic Mnemonic { get; set; }
|
|
public new ConfigData Config { get; set; }
|
|
}
|
|
}
|