Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const EventEmitter = require('events')
const OrbitDB = require('orbit-db')
const Pubsub = require('orbit-db-pubsub')
const AccessControllers = require('orbit-db-access-controllers')
const resolveDID = require('did-resolver').default
const {
LegacyIPFS3BoxAccessController,
ThreadAccessController,
ModeratorAccessController
} = require('3box-orbitdb-plugins')
AccessControllers.addAccessController({ AccessController: LegacyIPFS3BoxAccessController })
AccessControllers.addAccessController({ AccessController: ThreadAccessController })
AccessControllers.addAccessController({ AccessController: ModeratorAccessController })
const config = require('./config')
const PINNING_NODE = config.pinning_node
const PINNING_ROOM = config.pinning_room
const ORBITDB_OPTS = config.orbitdb_options
const ODB_STORE_OPTS = {
...ORBITDB_OPTS,
accessController: {
type: 'legacy-ipfs-3box',
skipManifest: true
}
}
const entryTypes = {
SPACE: 'space',
ADDRESS_LINK: 'address-link',
AUTH_DATA: 'auth-data'