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" />
                    
Directory.Packages.props
<PackageReference Include="ApiBtc.Client" />
                    
Project file
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
                    
#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
                    
Install as a Cake Addin
#tool nuget:?package=ApiBtc.Client&version=1.0.3
                    
Install as a Cake Tool

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 regtest API documentation is available via Swagger here.
  • Mainnet Environment: We do not provide a publicly hosted mainnet API endpoint. You can run your own mainnet instance 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 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 4,762 7/21/2025
1.0.2 4,686 7/21/2025
1.0.1 4,438 4/27/2025
1.0.0 4,400 4/25/2025
0.0.1 4,439 4/7/2025