Document Type <accountLedger>
Typed container of <transaction> documents.
For all types except message, all transactions are included in abbreviated form
(nymboxRecord, inboxRecord, ..., see below).
Those include the hash of the transaction in the record's receiptHash attribute.
The transactions themselves are stored separately, see <transaction>.
If the type is message, the transactions are included in full as a list of
transaction elements.
Elements and attributes
- Attribute 
version: Integer. - Attribute 
type: String. Specifies the ledger type. See Ledger Types below. - Attribute 
numPartialRecords: Integer. In abbreviated form, it is the number of transaction elements (see below). In full form, it is constant 0. - Attribute 
accountID: Identifier. - Attribute 
nymID: Identifier. The Nym the ledger belongs to. - Attribute 
notaryID: Identifier. The Notary the ledger is stored with. 
For ledgers in full form (only for ledgers of type message), for each
transaction:
- Element 
transaction:<transaction>document. 
For ledgers in abbreviated form, the transactions are stored in abbreviated form:
- For ledger type 
nymbox: ElementnymboxRecord:nymboxRecorddocument - For ledger type 
inbox: ElementinboxRecord:inboxRecorddocument - For ledger type 
outbox: ElementoutboxRecord:outboxRecorddocument - For ledger type 
paymentInbox: ElementpaymentInboxRecord:paymentInboxRecorddocument - For ledger type 
recordBox: ElementrecordBoxRecord:recordBoxRecorddocument - For ledger type 
expiredBox: ElementexpiredBoxRecord:expiredBoxRecorddocument 
Ledger Types
nymbox. Nym-scoped.inbox. Account-scoped. Contains pending incoming transfers.outbox. Account-scoped. Contains pending outgoing transfers.message. Apparently used in OTMessage. Not abbreviated. TODO where and how.paymentInbox. Client-side only.recordBox. Client-side only.expiredBox. Client-side only.
References
Notes
Possible improvements:
- Remove attribute 
numPartialRecords. It is redundant information, as it is either: - The number of transactions, if the ledger is in abbreviated form
 - 0 otherwise
 
I.e., numPartialRecords is the number of
abbreviated transaction elements. That element was
probably added to make parsing simpler. The format should be easy to parse in
the first place.