nip5 improve

This commit is contained in:
Kukks
2024-06-06 13:13:29 +02:00
parent 72dd7aa1be
commit 01ba71f419
8 changed files with 59 additions and 116 deletions

View File

@@ -0,0 +1,26 @@
using NBitcoin.Secp256k1;
using Newtonsoft.Json;
using NNostr.Client;
namespace BTCPayServer.Plugins.NIP05;
public class ZapperSettings
{
public ZapperSettings(string ZapperPrivateKey)
{
this.ZapperPrivateKey = ZapperPrivateKey;
}
public ZapperSettings()
{
}
[JsonIgnore]
public ECPrivKey ZappingKey => NostrExtensions.ParseKey(ZapperPrivateKey);
[JsonIgnore]
public ECXOnlyPubKey ZappingPublicKey => ZappingKey.CreateXOnlyPubKey();
[JsonIgnore]
public string ZappingPublicKeyHex => ZappingPublicKey.ToHex();
public string ZapperPrivateKey { get; set; }
}