Rename Castle Accounting extension to Libra
Full identifier rename: module path lnbits.extensions.castle →
lnbits.extensions.libra, DB ext_castle → ext_libra, URL prefix
/castle/ → /libra/, manifest id castle → libra, fava ledger slug
default castle-ledger → libra-ledger, Beancount source metadata
castle-api → libra-api and link prefixes castle-{entry,tx}- →
libra-{entry,tx}-, column castle_wallet_id → libra_wallet_id, all
Python/JS/HTML identifiers (castle_ext, CastleSettings,
castle_reference, castleWalletConfigured, etc.).
Display name "Castle Accounting" → "Libra" (the scales/balance
metaphor — fits double-entry bookkeeping).
No backward compat: production hosts will be force-updated. Old
castle-prefixed Beancount metadata in existing Fava ledgers is
historical; new entries use libra-* prefixes going forward.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9c577c740c
commit
c174cda48d
44 changed files with 953 additions and 953 deletions
|
|
@ -496,7 +496,7 @@ Improvement: 5-10x faster
|
|||
## Test Results and Findings
|
||||
|
||||
**Date**: November 10, 2025
|
||||
**Status**: ⚠️ **NOT FEASIBLE for Castle's Current Data Structure**
|
||||
**Status**: ⚠️ **NOT FEASIBLE for Libra's Current Data Structure**
|
||||
|
||||
### Implementation Completed
|
||||
|
||||
|
|
@ -523,7 +523,7 @@ Improvement: 5-10x faster
|
|||
|
||||
### Root Cause: Architecture Limitation
|
||||
|
||||
**Current Castle Ledger Structure:**
|
||||
**Current Libra Ledger Structure:**
|
||||
```
|
||||
Posting format:
|
||||
Amount: -360.00 EUR ← Position (BQL can query this)
|
||||
|
|
@ -549,7 +549,7 @@ SELECT account, sum(meta["sats-equivalent"]) WHERE account ~ 'User-'
|
|||
|
||||
### Why Manual Aggregation is Necessary
|
||||
|
||||
1. **SATS are Castle's primary currency** for balance tracking
|
||||
1. **SATS are Libra's primary currency** for balance tracking
|
||||
2. **SATS values are in metadata**, not positions
|
||||
3. **BQL has no metadata query capability**
|
||||
4. **Must iterate through postings** to read `meta["sats-equivalent"]`
|
||||
|
|
@ -590,7 +590,7 @@ SELECT account, sum(meta["sats-equivalent"]) WHERE account ~ 'User-'
|
|||
|
||||
## Future Consideration: Ledger Format Change
|
||||
|
||||
**If** Castle's ledger format changes to use SATS as position amounts:
|
||||
**If** Libra's ledger format changes to use SATS as position amounts:
|
||||
|
||||
```beancount
|
||||
; Current format (EUR position, SATS in metadata):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue