Ledgers

Formance Ledger is a multi-ledger ledger. Behind the fanciness of that statement, lies the simple meaning that you can operate multiple individual ledgers in a single instance of the Formance Ledger service. Each ledger is completely independent of the others, and can be used for different purposes.

info

Ledgers are identified by their alphanumeric name, and providing a name is a required parameter for all ledger operations.

Ledger data model​

A ledger exposes and contains the following resources:

AccountsTransactions
Containers for assets, see AccountsMovement of assets between accounts, see Transactions

Beneath these resources lie the immutable log of all operations performed on the ledger. This log is the primary source of truth for the ledger, and is used to construct the state of accounts and transactions. It contains entries of the following types:

• NEW_TRANSACTION
• SET_METADATA

Ont thing to keep in mind is that all the resources listed above are fully logically separated by ledger. This means that you can have e.g. two ledgers with the same account name, and they will not interfere with each other.

The name of your ledger is an alphanumeric string. It is used to identify your ledger in all operations, and is also used by the storage layer to create seggregated locations for your ledger data. Good names are short, descriptive, and unique and depend on both your application and your single vs multi-ledger strategy. A good generic name for a single ledger strategy is main.