diff --git a/build.clj b/build.clj index d251649d9..6c69a30b3 100644 --- a/build.clj +++ b/build.clj @@ -3,7 +3,7 @@ [deps-deploy.deps-deploy :as dd])) (def lib 'com.fluree/db) -(def version "3.0.0-alpha1") +(def version "3.0.0-alpha2") (def class-dir "target/classes") (def basis (b/create-basis {:project "deps.edn"})) @@ -20,9 +20,10 @@ :version version :basis basis :src-dirs ["src"] - :scm {:url source-uri - :connection "scm:git:https://github.com/fluree/db.git" - :developerConnection "scm:git:git@github.com:fluree/db.git"}}) + :scm + {:url source-uri + :connection "scm:git:https://github.com/fluree/db.git" + :developerConnection "scm:git:git@github.com:fluree/db.git"}}) (b/copy-dir {:src-dirs ["src" "resources"] :target-dir class-dir}) (b/jar {:class-dir class-dir diff --git a/docs/fluree.db.json-ld.api.html b/docs/fluree.db.json-ld.api.html index 696659a32..1c76cbfc7 100644 --- a/docs/fluree.db.json-ld.api.html +++ b/docs/fluree.db.json-ld.api.html @@ -1,34 +1,31 @@ -fluree.db.json-ld.api documentation

fluree.db.json-ld.api

address?

(address? ledger-alias-or-address)
Returns true if the argument is a full ledger address, false if it is just an
-alias.

alias->address

(alias->address conn ledger-alias)
Returns a core.async channel with the connection-specific address of the
-given ledger-alias.

branch

(branch)
Creates a new branch of a given ledger
-

combine

(combine)
Combines multiple ledgers into a new, read-only ledger.
-

commit!

(commit! ledger db)(commit! ledger db opts)
Commits a staged database to the ledger with all changes since the last commit
+fluree.db.json-ld.api documentation

fluree.db.json-ld.api

address?

(address? ledger-alias-or-address)
Returns true if the argument is a full ledger address, false if it is just an
+alias.

alias->address

(alias->address conn ledger-alias)
Returns a core.async channel with the connection-specific address of the
+given ledger-alias.

branch

(branch)
Creates a new branch of a given ledger
+

combine

(combine)
Combines multiple ledgers into a new, read-only ledger.
+

commit!

(commit! ledger db)(commit! ledger db opts)
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.

connect

(connect {:keys [method parallelism remote-servers], :as opts})
Forms connection to ledger, enabling automatic pulls of new updates, event
+distributed rules.

connect

(connect {:keys [method parallelism remote-servers], :as opts})
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)
-  

connect-ipfs

(connect-ipfs opts)
Forms an ipfs connection using default settings.
+  

connect-file

(connect-file opts)

connect-ipfs

(connect-ipfs opts)
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.

connect-memory

(connect-memory opts)
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.

create

(create conn)(create conn ledger-alias)(create conn ledger-alias opts)
Creates a new json-ld ledger. A connection (conn)
+- did - (optional) DId information to use, if storing blocks as verifiable credentials

connect-memory

(connect-memory opts)
Forms an in-memory connection using default settings.
+- did - (optional) DId information to use, if storing blocks as verifiable credentials

create

(create conn)(create conn ledger-alias)(create conn ledger-alias opts)
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

create-with-txn

(create-with-txn conn txn)(create-with-txn conn txn opts)
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).

db

(db ledger)(db ledger opts)
Retrieves latest db, or optionally a db at a moment in time
-and/or permissioned to a specific identity.

default-context

(default-context db)
Returns the current default context set on the db.
-

default-context-at-t

(default-context-at-t ledger t)

exists?

(exists? conn ledger-alias-or-address)
Returns a promise with true if the ledger alias or address exists, false
-otherwise.

expand-iri

(expand-iri db compact-iri)(expand-iri db compact-iri context)
Expands given IRI with the default database context, or provided context.
-

from-query

(from-query conn q)(from-query conn q opts)
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.

history

(history ledger query)
Return the change history over a specified time range. Optionally include the commit
-that produced the changes.

index

(index ledger)
Performs indexing operation on the specified ledger
-

internal-id

(internal-id db iri)
Returns the internal Fluree integer id for a given IRI.
+- did - DId information to use, if storing blocks as verifiable credentials

create-with-txn

(create-with-txn conn txn)

db

(db ledger)(db ledger opts)
Retrieves latest db, or optionally a db at a moment in time
+and/or permissioned to a specific identity.

exists?

(exists? conn ledger-alias-or-address)
Returns a promise with true if the ledger alias or address exists, false
+otherwise.

expand-iri

(expand-iri context compact-iri)
Expands given IRI with the default database context, or provided context.
+

history

(history ledger query)
Return the change history over a specified time range. Optionally include the commit
+that produced the changes.

index

(index ledger)
Performs indexing operation on the specified ledger
+

internal-id

(internal-id db iri)
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

load

(load conn ledger-alias)
Loads an existing ledger by its alias (which will be converted to a
-connection-specific address first).

load-from-address

(load-from-address address)(load-from-address conn address)
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:....

merge

(merge)
Merges changes from one branch into another branch.
-

promise-wrap

(promise-wrap port)
Wraps an async channel that will contain a response in a promise.
-

pull

(pull)
Checks name service for ledger and pulls latest version locally.
-

push

(push)
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.

query

(query db q)(query db q opts)
Queries a db value and returns a promise with the results.
-

range

(range db index test match)(range db index start-test start-match end-test end-match)
Performs a range scan against the specified index using test functions
-of >=, <=, >, <

slice

(slice db index match)
Like range, but returns all flakes that match the supplied flake parts.
-

squash

(squash)
Squashes multiple unpublished commits into a single unpublished commit
-

stage

(stage db json-ld)(stage db json-ld opts)
Performs a transaction and queues change if valid (does not commit)
-

status

(status ledger)(status ledger branch)
Returns current status of ledger branch.
-

transact!

(transact! conn json-ld opts)
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

load

(load conn alias-or-address)
Loads an existing ledger by its alias (which will be converted to a
+connection-specific address first).

merge

(merge)
Merges changes from one branch into another branch.
+

notify

(notify conn commit-map)
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.

update-default-context

(update-default-context db default-context)
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.

validate

(validate)
Validates a ledger, checks block integrity along with signatures.
-

wrap-policy

(wrap-policy db identity-map)
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.

promise-wrap

(promise-wrap port)
Wraps an async channel that will contain a response in a promise.
+

pull

(pull)
Checks name service for ledger and pulls latest version locally.
+

push

(push)
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.

query

(query db q)(query db q opts)
Queries a db value and returns a promise with the results.
+

query-connection

(query-connection conn q)(query-connection conn q opts)
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.

range

(range db index test match)(range db index start-test start-match end-test end-match)
Performs a range scan against the specified index using test functions
+of >=, <=, >, <

slice

(slice db index match)
Like range, but returns all flakes that match the supplied flake parts.
+

squash

(squash)
Squashes multiple unpublished commits into a single unpublished commit
+

stage

(stage db json-ld)(stage db json-ld opts)
Performs a transaction and queues change if valid (does not commit)
+

status

(status ledger)(status ledger branch)
Returns current status of ledger branch.
+

transact!

(transact! conn txn)

validate

(validate)
Validates a ledger, checks block integrity along with signatures.
+

wrap-policy

(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 +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

com.fluree/db 3.0.0-alpha1

Fluree DB Clojure API Documentation.

Namespaces

fluree.db.json-ld.api

\ No newline at end of file +com.fluree/db 3.0.0-alpha2

com.fluree/db 3.0.0-alpha2

Fluree DB Clojure API Documentation.

Namespaces

fluree.db.json-ld.api

\ No newline at end of file diff --git a/js-packages/browser/package.json b/js-packages/browser/package.json index 4382b55fd..9bcdd50e1 100644 --- a/js-packages/browser/package.json +++ b/js-packages/browser/package.json @@ -11,6 +11,6 @@ }, "keywords" : [ "fluree", "javascript", "database", "ledger" ], "author" : "Fluree PBC (https://flur.ee)", - "version" : "3.0.0-alpha1", + "version" : "3.0.0-alpha2", "main" : "fluree-browser-sdk.js" } \ No newline at end of file diff --git a/js-packages/nodejs/package.json b/js-packages/nodejs/package.json index aadb23463..6024036dd 100644 --- a/js-packages/nodejs/package.json +++ b/js-packages/nodejs/package.json @@ -7,7 +7,7 @@ "keywords" : [ "fluree", "nodejs" ], "author" : "Fluree PBC (https://flur.ee)", "requires" : true, - "version" : "3.0.0-alpha1", + "version" : "3.0.0-alpha2", "main" : "fluree-node-sdk.js", "dependencies" : { "source-map-support" : "^0.5.21", diff --git a/js-packages/webworker/package.json b/js-packages/webworker/package.json index 6df5773fa..b7caf0729 100644 --- a/js-packages/webworker/package.json +++ b/js-packages/webworker/package.json @@ -11,6 +11,6 @@ }, "keywords" : [ "fluree", "fluree-webworker", "react", "javascript", "service worker" ], "author" : "Fluree PBC (https://flur.ee)", - "version" : "3.0.0-alpha1", + "version" : "3.0.0-alpha2", "main" : "fluree-webworker.js" } \ No newline at end of file