Commits a staged database to the ledger with all changes since the last commit
aggregated together.
Commits are tracked in the local environment, but if the ledger is distributed
it will still need a 'push' to ensure it is published and verified as per the
-distributed rules.
Forms connection to ledger, enabling automatic pulls of new updates, event
services, index service.
Multiple connections to same endpoint will share underlying network connection.
Options include:
- - did - (optional) DiD information to use, if storing blocks as verifiable credentials,
+ - did - (optional) DId information to use, if storing blocks as verifiable credentials,
or issuing queries against a permissioned database.
- - context - (optional) Default @context map to use for ledgers formed with this connection.
- write - (optional) Function to use for all writes, if empty will store in memory until a commit is performed
- read - (optional) Function to use for reads of persisted blocks/data
- commit - (optional) Function to use to write commits. If persistence desired, this must be defined
- push - (optional) Function(s) in a vector that will attempt to push the commit to naming service(s)
-
Forms an ipfs connection using default settings.
- server - (optional) IPFS http api server endpoint, defaults to http://127.0.0.1:5001/
- profile - (optional) IPFS stored profile to use.
-- did - (optional) DiD information to use, if storing blocks as verifiable credentials
-- context - (optional) Default @context map to use for ledgers formed with this connection.
Forms an in-memory connection using default settings.
-- did - (optional) DiD information to use, if storing blocks as verifiable credentials
-- context - (optional) Default @context map to use for ledgers formed with this connection.
Creates a new json-ld ledger. A connection (conn)
must always be supplied.
Ledger-name (optional) is a friendly name that is used for:
@@ -44,55 +41,37 @@
graph which can be referenced by name.
Options map (opts) can include:
-- did - DiD information to use, if storing blocks as verifiable credentials
-- defaultContext - Default @context map to use for ledgers formed with this connection
Creates a new ledger named by the @id key (or its context alias) in txn if it
-doesn't exist and transacts the data in txn's @graph (or its context alias)
-into it. Returns a promise with the transaction result (a db value).
Queries the latest db in the ledger specified by the 'from' parameter in the
-query (what that actually looks like is format-specific). Returns a promise
-with the results.
Returns the internal Fluree integer id for a given IRI.
This can be used for doing range scans, slices and for other
more advanced needs.
-Returns promise
Loads a ledger defined with a Fluree address, e.g.:
-fluree:ipfs://Qmaq4ip1bJq6255S5PhU8veo6gxaq2yyucKZmJkV1WW8YG
-fluree:ipns://k51qzi5uqu5dljuijgifuqz9lt1r45lmlnvmu3xzjew9v8oafoqb122jov0mr2
-fluree:ipns://my.dns.com/movies/top-rated
-fluree:file://my/db
-fluree:s3:....
Pushes all commits since last push to a naming service, e.g. a Fluree Network, IPNS, DNS, Fluree Nexus.
-Depending on consensus requirements for a Fluree Network, will accept or reject push as newest update.
Expects a conn and json-ld document containing at least the following keys:
-`https://ns.flur.ee/ledger#ledger`: the id of the ledger to transact to
-`@graph`: the data to be transacted
-
-Loads the specified ledger and performs stage and commit! operations.
-Returns the new db.
+Returns promise
Notifies the connection with a new commit map (parsed JSON commit with string keys).
-Note: Loading the ledger results in a new ledger object, so references to existing
-ledger objects will be rendered stale. To obtain a ledger with the new changes,
-call `load` on the ledger alias.
Updates the default context on a given database.
-Currently, the updated default context will only be
-written with a new commit, which requires staging
-changed data.
-
-Returns an updated db.
Wraps a db object with specified permission attributes.
+If the connection knows of the ledger, and is currently maintaining
+an in-memory version of the ledger, will attempt to update the db if the commit
+is for the next 't' value. If a commit is for a past 't' value, noop.
+If commit is for a future 't' value, will drop in-memory ledger for reload upon next request.
Pushes all commits since last push to a name service, e.g. a Fluree Network, IPNS, DNS, Fluree Nexus.
+Depending on consensus requirements for a Fluree Network, will accept or reject push as newest update.
Queries the latest db in the ledger specified by the 'from' parameter in the
+query (what that actually looks like is format-specific). Returns a promise
+with the results.
(wrap-policy db identity-map)(wrap-policy db identity-map context)
Wraps a db object with specified permission attributes.
When requesting a db from a ledger, permission attributes can
be requested at that point, however if one has a db already, this
allows the permission attributes to be modified.
-Returns promise
\ No newline at end of file
diff --git a/docs/index.html b/docs/index.html
index 0e62e9b2d..7ba89bb0c 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1,3 +1,3 @@
-com.fluree/db 3.0.0-alpha1