An unofficial asynchronous .NET Core library for interacting with the Blockchain.info Wallet API V2.
Example code for instancing a BlockchainWallet
:
var blockchainWallet = new BlockchainWallet(new BlockchainWalletConfiguration()
{
Host = "http://localhost:3000",
Identifier = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
Password = "xXxXxXxXxXxXxXxX"
});
Example code for sending a payment:
var recipients = new Dictionary<string, long>()
{
{ "1LaiteuxHEH4GsMC9aVmnwgUEZyrG6BiTH", 1337 }
};
var payment = await blockchainWallet.SendPaymentAsync(recipients, feePerByte: 50);
if (payment.Success)
{
Console.WriteLine($"Payment sent: {payment.TXID}");
}
else
{
Console.WriteLine("An error occurred while sending the payment.");
}
Your help and ideas are welcome, feel free to fork this repo and submit a pull request.
However, please make sure to follow the current code base/style.
Telegram: @Matty
Email: matt@laiteux.dev
If you would like to support this project, please consider donating.
Donations are greatly appreciated and a motivation to keep improving.
- Bitcoin:
1LaiteuxHEH4GsMC9aVmnwgUEZyrG6BiTH
- Switch to POST requests or then use Flurl
- Handle Blockchain API errors & exceptions