Ledgers
Each ledger in your team is a discrete, append-only, cryptographically linked record. Transactions are committed in one order, timestamped by the core, and never edited or removed afterwards; everything else — balances, histories, reports — is derived by reading that record back.
On this page
Ledgers do not share data with one another. A credential is checked against the team and the ledger it names, so separating two lines of business, or two jurisdictions, is a matter of giving each its own ledger.
You will likely create several to support your development process. For example:
- Production —
prod - Staging —
staging - Alice's development ledger —
alice-dev - Bob's development ledger —
bob-dev
Create a ledgerLink to this section
Open the Ledgers page in the console and choose New ledger.
You will be asked for a name: lowercase letters, numbers and hyphens, starting with a letter or number, up to 64 characters, and unique within your team. The name addresses the ledger in the SDKs and in the console, so it is worth choosing one you can live with.
Ledger ModeLink to this section
A ledger is created in one of two modes: development or production.
Development ledgers are for prototyping and testing. Create as many as you need — one per developer is common — and reset them freely.
Production ledgers hold the real record. You will typically have one. For safety, the core refuses to reset a production ledger.
The mode is fixed at creation and cannot be changed afterwards. The two behave identically at the API, though, so an application built against a development ledger moves to production by pointing at a production ledger instead. No code changes are required.
Reset a ledgerLink to this section
A ledger is append-only, so committed transactions cannot be edited or discarded. During development, though, it is often quicker to start again than to unwind: resetting a ledger empties it.
Reset is a development utility, and the SDKs keep it out of the way to say so:
DevUtils.reset(ledger);await ledger.devUtils.reset()ledger.dev_utils.resetResetting discards all keys, assets, accounts, transactions, actions, tokens, and feeds in the ledger. It cannot be undone, and the core refuses it on a production ledger.