# BitcoinLib
.NET Bitcoin & Altcoins library
.config
file.Premium Support is available by our team of experts at: support@cryptean.com.
See LICENSE.
BitcoinLib is available on NuGet:
From version 1.4.0, BitcoinLib follows Semantic Versioning 2.0.0.
To build BitcoinLib from source, you will need either the .NET Core SDK or Visual Studio.
With Visual Studio you can build BitcoinLib and run the tests
from inside the IDE, otherwise with the dotnet
command-line
tool you can execute:
dotnet build
bitcoin.conf
file (in Windows it's under: %AppData%\Roaming\Bitcoin
, if it's not there just go ahead and create it) and add these lines:
rpcuser = MyRpcUsername
rpcpassword = MyRpcPassword
server=1
txindex=1
app.config
file in the Console test client to best fit your needs. Make sure you also update the bitcoin.conf
file when you alter the Bitcoin_RpcUsername
and Bitcoin_RpcPassword
parameters.litecoin.conf
under: %AppData%\Roaming\Litecoin
and its daemon is: litecoind
.IBitcoinService BitcoinService = new BitcoinService();
ILitecoinService LitecoinService = new LitecoinService();
ICryptocoinService
:
ICryptocoinService cryptocoinService = new CryptocoinService("daemonUrl", "rpcUsername", "rpcPassword", "walletPassword");
(ICryptocoinService).Parameters
to fully configure each coin pointer at run-time.Sample configuration:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<!-- BitcoinLib settings start -->
<!-- Shared RPC settings start -->
<add key="RpcRequestTimeoutInSeconds" value="10" />
<!-- Shared RPC settings end -->
<!-- Bitcoin settings start -->
<add key="Bitcoin_DaemonUrl" value="http://localhost:8332" />
<add key="Bitcoin_DaemonUrl_Testnet" value="http://localhost:18332" />
<add key="Bitcoin_WalletPassword" value="MyWalletPassword" />
<add key="Bitcoin_RpcUsername" value="MyRpcUsername" />
<add key="Bitcoin_RpcPassword" value="MyRpcPassword" />
<!-- Bitcoin settings end -->
<!-- BitcoinLib settings end -->
</appSettings>
</configuration>