SDK Overview
LedgerCore.Sdk: the official .NET client for the Shiwake API.
LedgerCore.Sdk is the official .NET client for Shiwake. It ships as a
single NuGet package targeting net8.0 and gives you three layers you can
mix and match:
Core client
ILedgerCoreClient: a typed, 1:1 mapping of the core ledger REST API.
One method per endpoint, throws LedgerCoreException on non-success.
Banking client (simple)
IBankingClient: opinionated convenience layer over the core ledger:
open client account, deposit, withdraw, transfer via direct journal entries.
Banking API client (full)
IBankingApiClient: typed 1:1 client for the full /api/v1/banking/*
surface: wallets, fee schedules, limits, suspense, statements, audit.
When to use which
Use the core client when you want direct control: posting arbitrary journal entries, managing holds, running reconciliation. This is the right layer for accounting-aware code.
Use the simple banking client when you're building a very small product that thinks in terms of "clients have a balance, they deposit, withdraw, and transfer." It collapses the platform-float + customer-liability pattern into one-line calls and writes journal entries directly. No wallets, no fees, no limits.
Use the banking API client for everything else, and most production banking workloads fall here. It covers the full banking domain: wallet products and tiers, hold/capture withdrawals, fee schedules, per-tier limits, suspense and reconciliation, statements, and the audit log.
All three share the same HttpClient and the same tenant API key, so you
can register any combination and mix them freely in the same service.
Design goals
- Typed everything. Every request and response has a C# record or
class. No dictionaries, no
dynamic. - No hidden retries. The SDK throws on
429and5xx; your app owns the retry policy (we recommend Polly: see Rate Limiting). - DI-first. One-line
AddLedgerCoreSdkregisters anHttpClient-backed client viaIHttpClientFactory. - Idempotency is your job. Mutating methods take an
idempotencyKeyparameter explicitly so you have to think about it.
Next steps
Last updated on