Skip to content

docs: document OnChainBalance in core domain model - #264

Merged
ifsantana merged 1 commit into
mainfrom
docs/onchain-balance-domain-model
Aug 17, 2026
Merged

docs: document OnChainBalance in core domain model#264
ifsantana merged 1 commit into
mainfrom
docs/onchain-balance-domain-model

Conversation

@ifsantana

Copy link
Copy Markdown
Collaborator

Summary

docs/domain-model.md is the reference spec for the core module, but it never covered the balance domain at all. PR #262 (feat: per-token on-chain balance breakdown on GET /balance) added finance.idem.core.ledger.OnChainBalance and BalanceCalculator.computeOnChain(), and that gap is now visible: the doc documents every other core.ledger class (Account, JournalLine, Transaction, Settlement, repository interfaces) but not this one.

Adds a new "Balance domain — OnChainBalance" section, in the same style as the existing "Reconciliation domain — Settlement" section: package, purpose, signature, and behavior notes (per-token netting across chains, sorted by token name, DEBIT/CREDIT convention, empty list for fiat-only accounts), plus a pointer to where it's surfaced (GET /balance, getBalance MCP tool, docs/mcp-server.md).

No code changes — documentation only.

Test plan

  • ./mvnw clean verify passes locally
  • Unit tests added/updated
  • Integration tests added/updated (or: no I/O boundary touched, N/A)

N/A — documentation-only change, no code touched.

Checklist

  • All commits are signed off (git commit -s) — required by DCO
  • No new framework dependencies in core or application (Spring/JPA/web/persistence/etc)
  • Module dependency rules respected (see CONTRIBUTING.md)
  • Docs updated if behavior changed (KDoc, OpenAPI, README, Bruno collection)

Generated by Claude Code

PR #262 added core.ledger.OnChainBalance and BalanceCalculator.computeOnChain()
for the per-token on-chain balance breakdown, but docs/domain-model.md — the
reference spec for the core module — never mentioned it.

Signed-off-by: Claude <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@ifsantana
ifsantana merged commit a0981f2 into main Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants