diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md index 810029b..0b72666 100644 --- a/docs/GETTING_STARTED.md +++ b/docs/GETTING_STARTED.md @@ -308,4 +308,4 @@ These kinds of connectivity configurations are beyond the scope of OrbitDB. To f [Replication](./REPLICATION.md) provides a comprehensive overview of how to perform data replication across multiple peers. -[Replication](./ENCRYPTION.md) discusses database encryption using OrbitDB's modular architecture. +[Encryption](./ENCRYPTION.md) discusses database encryption using OrbitDB's modular architecture. diff --git a/src/databases/documents.js b/src/databases/documents.js index 8a5d50c..ffd3cfa 100644 --- a/src/databases/documents.js +++ b/src/databases/documents.js @@ -26,7 +26,7 @@ const DefaultOptions = { indexBy: '_id' } * @memberof module:Databases */ const Documents = ({ indexBy } = DefaultOptions) => async ({ ipfs, identity, address, name, access, directory, meta, headsStorage, entryStorage, indexStorage, referencesCount, syncAutomatically, onUpdate, encrypt }) => { - const database = await Database({ ipfs, identity, address, name, access, directory, meta, headsStorage, entryStorage, indexStorage, referencesCount, syncAutomatically }) + const database = await Database({ ipfs, identity, address, name, access, directory, meta, headsStorage, entryStorage, indexStorage, referencesCount, syncAutomatically, encrypt }) const { addOperation, log } = database diff --git a/src/orbitdb.js b/src/orbitdb.js index 38a10ca..cc055cb 100644 --- a/src/orbitdb.js +++ b/src/orbitdb.js @@ -104,7 +104,7 @@ const OrbitDB = async ({ ipfs, id, identity, identities, directory } = {}) => { * @param {module:Storage} [params.indexStorage=[ComposedStorage]{@link module:Storage.Storage-Composed}] A compatible storage instance for storing an " index of log entries. Defaults to ComposedStorage(LRUStorage, LevelStorage). * @param {number} [params.referencesCount] The number of references to * use for [Log]{@link module:Log} entries. - * @param {number} [params.encryption] Options for encrypting database payloads and entries. If provided, the encryption object must take the form { encryptPayloadFn, decryptPayloadFn, encryptEntryFn, decryptEntryFn }. To encrypt the payload, pass the payload encrypt/decrypt functions. To encrypt the entry, pass the entry encrypt/decrypt functions. To encrypt/decrypt both payload and entry, pass all functions. + * @param {number} [params.encryption] Encryption module to encrypt/decrypt database payloads and entries. If provided, the encryption object must take the form { replication: { encrypt, decrypt }, data: { encrypt, decrypt } }. * @memberof module:OrbitDB * @return {module:Database} A database instance. * @throws "Unsupported database type" if the type specified is not in the list