mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
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,
|
|
DisplayName = "Bitcoin",
|
|
BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://www.smartbit.com.au/tx/{0}" : "https://testnet.smartbit.com.au/tx/{0}",
|
|
NBitcoinNetwork = nbxplorerNetwork.NBitcoinNetwork,
|
|
NBXplorerNetwork = nbxplorerNetwork,
|
|
UriScheme = "bitcoin",
|
|
CryptoImagePath = "imlegacy/bitcoin.svg",
|
|
LightningImagePath = "imlegacy/bitcoin-lightning.svg",
|
|
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
|
|
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("0'") : new KeyPath("1'")
|
|
});
|
|
}
|
|
}
|
|
}
|