diff --git a/BTCPayServer/BTCPayNetworkProvider.Bitcore.cs b/BTCPayServer/BTCPayNetworkProvider.Bitcore.cs new file mode 100644 index 000000000..62090b39a --- /dev/null +++ b/BTCPayServer/BTCPayNetworkProvider.Bitcore.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using BTCPayServer.Services.Rates; +using NBitcoin; +using NBXplorer; + +namespace BTCPayServer +{ + public partial class BTCPayNetworkProvider + { + public void InitBitcore() + { + var nbxplorerNetwork = NBXplorerNetworkProvider.GetFromCryptoCode("BTX"); + Add(new BTCPayNetwork() + { + CryptoCode = nbxplorerNetwork.CryptoCode, + DisplayName = "Bitcore", + BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://insight.bitcore.cc/tx/{0}" : "https://insight.bitcore.cc/tx/{0}", + NBitcoinNetwork = nbxplorerNetwork.NBitcoinNetwork, + NBXplorerNetwork = nbxplorerNetwork, + UriScheme = "bitcore", + DefaultRateRules = new[] + { + "BTX_X = BTX_BTC * BTC_X", + "BTX_BTC = cryptopia(BTX_BTC)" + }, + CryptoImagePath = "imlegacy/bitcore.svg", + LightningImagePath = "imlegacy/bitcore-lightning.svg", + DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType), + CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("160'") : new KeyPath("1'") + }); + } + } +} diff --git a/BTCPayServer/BTCPayNetworkProvider.cs b/BTCPayServer/BTCPayNetworkProvider.cs index b31f2f7c2..b7ad6fa50 100644 --- a/BTCPayServer/BTCPayNetworkProvider.cs +++ b/BTCPayServer/BTCPayNetworkProvider.cs @@ -47,6 +47,7 @@ namespace BTCPayServer NetworkType = networkType; InitBitcoin(); InitLitecoin(); + InitBitcore(); InitDogecoin(); InitBitcoinGold(); InitMonacoin(); diff --git a/BTCPayServer/wwwroot/imlegacy/bitcore-lightning.png b/BTCPayServer/wwwroot/imlegacy/bitcore-lightning.png new file mode 100644 index 000000000..cc4698d98 Binary files /dev/null and b/BTCPayServer/wwwroot/imlegacy/bitcore-lightning.png differ diff --git a/BTCPayServer/wwwroot/imlegacy/bitcore-lightning.svg b/BTCPayServer/wwwroot/imlegacy/bitcore-lightning.svg new file mode 100644 index 000000000..bc01d2bb8 --- /dev/null +++ b/BTCPayServer/wwwroot/imlegacy/bitcore-lightning.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BTCPayServer/wwwroot/imlegacy/bitcore.svg b/BTCPayServer/wwwroot/imlegacy/bitcore.svg new file mode 100644 index 000000000..bc01d2bb8 --- /dev/null +++ b/BTCPayServer/wwwroot/imlegacy/bitcore.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index ae484a9ea..1773ed0db 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ Thanks to the apps built on top of it, you can use BTCPay to receive donations o In addition to Bitcoin, BTCPay supports the following cryptocurrencies: * BGold +* Bitcore * Dash * Dogecoin * Feathercoin