Pass custom keystore via options

This commit is contained in:
thiagodelgado111 2018-02-08 00:29:17 -02:00
parent e65cd581f8
commit 207d00806e

View File

@ -35,7 +35,7 @@ class OrbitDB {
: new Pubsub(this._ipfs, this.id) : new Pubsub(this._ipfs, this.id)
this.stores = {} this.stores = {}
this.directory = directory || './orbitdb' this.directory = directory || './orbitdb'
this.keystore = Keystore.create(path.join(this.directory, this.id, '/keystore')) this.keystore = options.keystore || Keystore.create(path.join(this.directory, this.id, '/keystore'))
this.key = this.keystore.getKey(this.id) || this.keystore.createKey(this.id) this.key = this.keystore.getKey(this.id) || this.keystore.createKey(this.id)
} }