Class: Ledger

Ledger

Entrypoint for the Ledger API.

new Ledger()

Methods


<async, static> getLedger(ctx)

Get a Ledger instance which represents the current ledger state.
Parameters:
Name Type Description
ctx Context The transaction context
Returns:
A new Ledger instance
Type
Promise.<Ledger>

<async> getCollection(collectionName)

Get a Collection instance for the named collection.
Parameters:
Name Type Description
collectionName string The name of the collection
Returns:
A new Collection instance
Type
Promise.<Collection>

<async> getDefaultCollection()

Get a Collection instance representing the default world state.
Returns:
A new Collection instance
Type
Promise.<Collection>