CanDoItAll.Ledger.Sdk 0.1.18

dotnet add package CanDoItAll.Ledger.Sdk --version 0.1.18
                    
NuGet\Install-Package CanDoItAll.Ledger.Sdk -Version 0.1.18
                    
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="CanDoItAll.Ledger.Sdk" Version="0.1.18" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CanDoItAll.Ledger.Sdk" Version="0.1.18" />
                    
Directory.Packages.props
<PackageReference Include="CanDoItAll.Ledger.Sdk" />
                    
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 CanDoItAll.Ledger.Sdk --version 0.1.18
                    
#r "nuget: CanDoItAll.Ledger.Sdk, 0.1.18"
                    
#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 CanDoItAll.Ledger.Sdk@0.1.18
                    
#: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=CanDoItAll.Ledger.Sdk&version=0.1.18
                    
Install as a Cake Addin
#tool nuget:?package=CanDoItAll.Ledger.Sdk&version=0.1.18
                    
Install as a Cake Tool

CanDoItAll.Ledger.Sdk

Typed node client and dependency-injection integration for CanDoItAll Ledger account and transaction workflows.

Use this package to connect .NET applications, services, tools, and drivers to a running Ledger node. It provides health and bootstrap contracts, account and transaction queries, transaction submission, treasury/admin request models, business-object account composition, and configurable API-key or JWT authentication.

Requirements

  • .NET 10
  • A reachable CanDoItAll Ledger node

Install

dotnet add package CanDoItAll.Ledger.Sdk

Connect Directly

using CanDoItAll.Ledger.Sdk;

using var node = new LedgerNodeLedgerClient(
    new Uri("http://127.0.0.1:8080/"),
    new LedgerNodeLedgerClientOptions
    {
        ApiBasePath = "api/v1",
        ApiKey = Environment.GetEnvironmentVariable("LEDGER_API_KEY")
            ?? throw new InvalidOperationException(
                "Set LEDGER_API_KEY for protected node reads.")
    });

NodeHealthResponse health =
    await node.GetHealthAsync(CancellationToken.None);

NodeBootstrapInfo bootstrap =
    await node.GetBootstrapInfoAsync(CancellationToken.None);

The default API base path is api/v1.

Register With Dependency Injection

using CanDoItAll.Ledger.Sdk;

builder.Services.AddLedgerSdkWithNodeDriver(
    new Uri(builder.Configuration["Ledger:NodeBaseUri"]
        ?? throw new InvalidOperationException("Node URI is missing.")),
    options =>
    {
        options.ApiBasePath = "api/v1";
        options.BearerToken =
            builder.Configuration["Ledger:BearerToken"];
    });

Registration choices:

  • AddLedgerSdk() adds client-side canonicalization, hashing, rules, clock, and LedgerClient, but does not choose a gateway.
  • AddLedgerSdkWithBusinessObjectLayer() adds the account layer and defaults to the in-process gateway unless the host registered ILedgerGateway and ILedgerReadClient first.
  • AddLedgerSdkWithNodeDriver(...) selects the HTTP node gateway and read client.
  • AddLedgerSdkWithBrowserNodeDriver(...) adds browser account signing and node access. Register Web Crypto and IndexedDB separately with CanDoItAll.Ledger.Cryptography.Browser and AddCanDoItAllBrowserCrypto().
  • AddLedgerSdkWithGateway<TGateway>() selects an application-owned gateway.

Authentication And Results

LedgerNodeLedgerClientOptions supports ApiBasePath, ApiKeyHeaderName, ApiKey, and BearerToken. A bearer token takes precedence when both token and API key are configured.

  • Liveness may be public while readiness, bootstrap, reads, or writes require node authorization.
  • Never embed API keys or bearer tokens in published WebAssembly. Put privileged calls behind a server or trusted same-origin proxy.
  • Catch LedgerNodeRequestException to inspect HTTP status and Problem Details returned by the node.
  • Check LedgerSubmitResult.Accepted for submitted signed transactions; HTTP transport success alone is not ledger acceptance.

See the Node and AccountApp quickstart, driver integration guide, and full source.

This package is part of the CanDoItAll ecosystem and uses the repository's MIT License.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (1)

Showing the top 1 NuGet packages that depend on CanDoItAll.Ledger.Sdk:

Package Downloads
CanDoItAll.Ledger.Components

Reusable Blazor components and workspaces for ledger accounts, transactions, business objects, analytics, and node operations.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.18 0 7/31/2026
0.1.17 31 7/30/2026