diff --git a/BTCPayServerPlugins.sln b/BTCPayServerPlugins.sln index 2462076..17f3cfa 100644 --- a/BTCPayServerPlugins.sln +++ b/BTCPayServerPlugins.sln @@ -97,10 +97,10 @@ Global {DF85EFA4-0EF5-4A99-853F-E6F9C88E3F8C}.Debug|Any CPU.Build.0 = Debug|Any CPU {DF85EFA4-0EF5-4A99-853F-E6F9C88E3F8C}.Release|Any CPU.ActiveCfg = Release|Any CPU {DF85EFA4-0EF5-4A99-853F-E6F9C88E3F8C}.Release|Any CPU.Build.0 = Release|Any CPU - {DF85EFA4-0EF5-4A99-853F-E6F9C88E3F8C}.Altcoins-Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DF85EFA4-0EF5-4A99-853F-E6F9C88E3F8C}.Altcoins-Debug|Any CPU.Build.0 = Debug|Any CPU - {DF85EFA4-0EF5-4A99-853F-E6F9C88E3F8C}.Altcoins-Release|Any CPU.ActiveCfg = Release|Any CPU - {DF85EFA4-0EF5-4A99-853F-E6F9C88E3F8C}.Altcoins-Release|Any CPU.Build.0 = Release|Any CPU + {DF85EFA4-0EF5-4A99-853F-E6F9C88E3F8C}.Altcoins-Debug|Any CPU.ActiveCfg = Altcoins-Debug|Any CPU + {DF85EFA4-0EF5-4A99-853F-E6F9C88E3F8C}.Altcoins-Debug|Any CPU.Build.0 = Altcoins-Debug|Any CPU + {DF85EFA4-0EF5-4A99-853F-E6F9C88E3F8C}.Altcoins-Release|Any CPU.ActiveCfg = Altcoins-Release|Any CPU + {DF85EFA4-0EF5-4A99-853F-E6F9C88E3F8C}.Altcoins-Release|Any CPU.Build.0 = Altcoins-Release|Any CPU {2C5C4DF9-BA1F-4671-9F24-B22D7C9C3D21}.Release|Any CPU.ActiveCfg = Release|Any CPU {2C5C4DF9-BA1F-4671-9F24-B22D7C9C3D21}.Release|Any CPU.Build.0 = Release|Any CPU {2C5C4DF9-BA1F-4671-9F24-B22D7C9C3D21}.Altcoins-Debug|Any CPU.ActiveCfg = Altcoins-Debug|Any CPU diff --git a/BTCPayServerPlugins.sln.DotSettings.user b/BTCPayServerPlugins.sln.DotSettings.user index 1ff6a17..b2109e6 100644 --- a/BTCPayServerPlugins.sln.DotSettings.user +++ b/BTCPayServerPlugins.sln.DotSettings.user @@ -1,3 +1,3 @@  - True + True \ No newline at end of file diff --git a/Plugins/BTCPayServer.Plugins.LiquidPlus/BTCPayServer.Plugins.LiquidPlus.csproj b/Plugins/BTCPayServer.Plugins.LiquidPlus/BTCPayServer.Plugins.LiquidPlus.csproj index a16cbe8..fefb405 100644 --- a/Plugins/BTCPayServer.Plugins.LiquidPlus/BTCPayServer.Plugins.LiquidPlus.csproj +++ b/Plugins/BTCPayServer.Plugins.LiquidPlus/BTCPayServer.Plugins.LiquidPlus.csproj @@ -11,7 +11,7 @@ Liquid+ Enhanced support for the liquid network. - 1.0.8 + 1.1.0 diff --git a/Plugins/BTCPayServer.Plugins.LiquidPlus/LiquidPlusPlugin.cs b/Plugins/BTCPayServer.Plugins.LiquidPlus/LiquidPlusPlugin.cs index 43fa2bf..770abd6 100644 --- a/Plugins/BTCPayServer.Plugins.LiquidPlus/LiquidPlusPlugin.cs +++ b/Plugins/BTCPayServer.Plugins.LiquidPlus/LiquidPlusPlugin.cs @@ -16,11 +16,12 @@ namespace BTCPayServer.Plugins.LiquidPlus { public override IBTCPayServerPlugin.PluginDependency[] Dependencies { get; } = { - new() { Identifier = nameof(BTCPayServer), Condition = ">=1.7.4" } + new() { Identifier = nameof(BTCPayServer), Condition = ">=1.9.0" } }; public override void Execute(IServiceCollection services) { services.AddSingleton(new UIExtension("LiquidNav", "store-integrations-nav")); + services.AddSingleton(new UIExtension("OnChainWalletSetupLiquidExtension", "onchain-wallet-setup-post-body")); services.AddSingleton(new UIExtension("CustomLiquidAssetsNavExtension", "server-nav")); services.AddSingleton(new UIExtension("StoreNavLiquidExtension", "store-nav")); services.AddSingleton(); diff --git a/Plugins/BTCPayServer.Plugins.LiquidPlus/Views/Shared/OnChainWalletSetupLiquidExtension.cshtml b/Plugins/BTCPayServer.Plugins.LiquidPlus/Views/Shared/OnChainWalletSetupLiquidExtension.cshtml new file mode 100644 index 0000000..d66d51b --- /dev/null +++ b/Plugins/BTCPayServer.Plugins.LiquidPlus/Views/Shared/OnChainWalletSetupLiquidExtension.cshtml @@ -0,0 +1,116 @@ +@using System.Reflection.Metadata +@using BTCPayServer +@using BTCPayServer.Abstractions.TagHelpers +@using BTCPayServer.Models.StoreViewModels +@using NBitcoin +@using NBitcoin.Altcoins.Elements +@model dynamic + +@if (Model is WalletSetupViewModel walletSetupViewModel && walletSetupViewModel.Network is ElementsBTCPayNetwork elementsBtcPayNetwork) +{ + if (walletSetupViewModel.Method == WalletSetupMethod.GenerateOptions) + { + + } + + if (!walletSetupViewModel.Confirmation && walletSetupViewModel.Method == WalletSetupMethod.ImportOptions) + { + + } + if (!walletSetupViewModel.Confirmation && walletSetupViewModel.Method is WalletSetupMethod.HotWallet or WalletSetupMethod.Seed) + { + var canUseRpcImport = ViewData["CanUseRPCImport"] is true; + + if (!canUseRpcImport) + { + + } + else + { + string masterBlindKey = null; + if (walletSetupViewModel.Method == WalletSetupMethod.HotWallet) + { + var seed = new Mnemonic(Wordlist.English); + var slip21 = Slip21Node.FromSeed(seed.DeriveSeed()); + var slip77 = slip21.GetSlip77Node(); + masterBlindKey = slip77.Key.ToHex(); + + + + } + + } + } +} \ No newline at end of file diff --git a/Plugins/BTCPayServer.Plugins.LiquidPlus/Views/_ViewImports.cshtml b/Plugins/BTCPayServer.Plugins.LiquidPlus/Views/_ViewImports.cshtml index afa82bb..32c6cc7 100644 --- a/Plugins/BTCPayServer.Plugins.LiquidPlus/Views/_ViewImports.cshtml +++ b/Plugins/BTCPayServer.Plugins.LiquidPlus/Views/_ViewImports.cshtml @@ -1 +1,2 @@ -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, BTCPayServer.Abstractions +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers \ No newline at end of file diff --git a/submodules/btcpayserver b/submodules/btcpayserver index a918288..eb3f0db 160000 --- a/submodules/btcpayserver +++ b/submodules/btcpayserver @@ -1 +1 @@ -Subproject commit a918288e3b7da722921c509f978c1288bb36af6f +Subproject commit eb3f0dbf93fa3bd120a153ce7941994482f3ad34