@tabcat/encrypted-docstore
Advanced tools
Comparing version 3.0.2 to 3.0.3
{ | ||
"name": "@tabcat/encrypted-docstore", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "mount encrypted docstores with a key", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -27,3 +27,3 @@ # encrypted-docstore | ||
// create the docstore with orbitdb: | ||
const dbConfig = { name:'asdf', type:'docstore', options: {} } | ||
const dbConfig = { name:'asdf', options: {} } // type will always be 'docstore' | ||
const encAddr = await EncryptedDocstore.determineAddress(orbitdb, dbConfig, aesKey) | ||
@@ -38,3 +38,3 @@ const docstore = await orbitdb.docs(encAddr, dbConfig.options) | ||
## API <br/> | ||
>EncDoc = EncryptedDocstore | ||
>EncDoc = EncryptedDocstore | ||
@@ -53,3 +53,3 @@ ### Static Methods: | ||
*orbitdb:* an instance of OrbitDB<br/> | ||
*dbConfig:* an object containing name, type and options for an orbit store settings<br/> | ||
*dbConfig:* an object containing name and options for an orbit store settings<br/> | ||
*aesKey:* instance of AesKey from generateKey, deriveKey, or importKey static methods.<br/> | ||
@@ -112,3 +112,3 @@ | ||
- is an async function | ||
- when calling with option fullOp: | ||
- when calling with option fullOp: | ||
+ the payload.value is the decrypted/decapsulated doc. | ||
@@ -115,0 +115,0 @@ + anything in the fullOp entry relating to hashing the real payload.value will not match the payload.value |
@@ -81,7 +81,7 @@ | ||
} | ||
if (dbConfig.type !== 'docstore') { | ||
if (dbConfig.type !== 'docstore' && dbConfig.type !== undefined) { | ||
throw new Error('dbConfig type must be docstore') | ||
} | ||
if (!dbConfig.name) throw new Error('') | ||
const { name, type, options } = dbConfig | ||
const { name, options } = dbConfig | ||
const type = 'docstore' | ||
const root = (await orbitdb.determineAddress(name, type, options)).root | ||
@@ -88,0 +88,0 @@ const decodedRoot = bs58.decode(root) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24340