2018-01-12 03:54:57 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using BTCPayServer.Services.Rates;
|
|
|
|
|
using NBitcoin;
|
|
|
|
|
using NBitpayClient;
|
|
|
|
|
using NBXplorer;
|
|
|
|
|
|
|
|
|
|
namespace BTCPayServer
|
|
|
|
|
{
|
|
|
|
|
public partial class BTCPayNetworkProvider
|
|
|
|
|
{
|
|
|
|
|
public void InitBitcoin()
|
|
|
|
|
{
|
|
|
|
|
var nbxplorerNetwork = NBXplorerNetworkProvider.GetFromCryptoCode("BTC");
|
|
|
|
|
Add(new BTCPayNetwork()
|
|
|
|
|
{
|
|
|
|
|
CryptoCode = nbxplorerNetwork.CryptoCode,
|
2018-07-17 06:25:28 +02:00
|
|
|
|
DisplayName = "Bitcoin",
|
2018-04-19 09:54:25 +02:00
|
|
|
|
BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://www.smartbit.com.au/tx/{0}" : "https://testnet.smartbit.com.au/tx/{0}",
|
2018-01-12 03:54:57 +01:00
|
|
|
|
NBitcoinNetwork = nbxplorerNetwork.NBitcoinNetwork,
|
|
|
|
|
NBXplorerNetwork = nbxplorerNetwork,
|
|
|
|
|
UriScheme = "bitcoin",
|
|
|
|
|
CryptoImagePath = "imlegacy/bitcoin-symbol.svg",
|
2018-02-26 07:33:03 +01:00
|
|
|
|
LightningImagePath = "imlegacy/btc-lightning.svg",
|
2018-04-19 09:54:25 +02:00
|
|
|
|
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
|
|
|
|
|
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("0'") : new KeyPath("1'")
|
2018-01-12 03:54:57 +01:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|