ApiBtc.Client
1.0.3
dotnet add package ApiBtc.Client --version 1.0.3
NuGet\Install-Package ApiBtc.Client -Version 1.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ApiBtc.Client" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ApiBtc.Client" Version="1.0.3" />
<PackageReference Include="ApiBtc.Client" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ApiBtc.Client --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ApiBtc.Client, 1.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ApiBtc.Client@1.0.3
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ApiBtc.Client&version=1.0.3
#tool nuget:?package=ApiBtc.Client&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
APIBTC - Current Status
Please Note: Currently, our publicly hosted API endpoint is available exclusively on the Bitcoin regtest network for development and testing purposes.
- API Documentation (Swagger): The
regtestAPI documentation is available via Swagger here. - Mainnet Environment: We do not provide a publicly hosted
mainnetAPI endpoint. You can run your ownmainnetinstance using the provided Docker image. - More Information: For further details about the project, Docker images, and setup instructions, please visit the main project website.
⚠️ Important: The public API operates on regtest. Do not send real Bitcoin (BTC) to any addresses generated or used via this public regtest endpoint.
using System;
using NBitcoin;
using ApiBtc.Client;
class Program
{
static void Main()
{
// Declare API url
const string BASE_URL = "API_BASE_URL";
// Create two wallets
// Wallet 1 - Invoice Creator
Mnemonic mnemonic1 = new Mnemonic(Wordlist.English, WordCount.Twelve);
ExtKey hdRoot1 = mnemonic1.DeriveExtKey();
string privateKey1 = hdRoot1.PrivateKey.ToHex();
var wallet1 = new Wallet(BASE_URL, privateKey1);
// Wallet 2 - Invoice Payer
Mnemonic mnemonic2 = new Mnemonic(Wordlist.English, WordCount.Twelve);
ExtKey hdRoot2 = mnemonic2.DeriveExtKey();
string privateKey2 = hdRoot2.PrivateKey.ToHex();
var wallet2 = new Wallet(BASE_URL, privateKey2);
// Payment flow
// Create invoice with wallet1
var invoice = await wallet1.AddInvoice(1000, "Payment from wallet2", 3600);
// Pay invoice with wallet2
await wallet2.SendPayment(invoice.PaymentRequest, 30, 100);
// Check balances after payment
Console.WriteLine($"Wallet1 balance: {await wallet1.GetBalance()}");
Console.WriteLine($"Wallet2 balance: {await wallet2.GetBalance()}");
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- GigGossip.Network (>= 2.2.3)
- Microsoft.AspNetCore.SignalR.Client (>= 9.0.2)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.