Skip to content

Commit

Permalink
fix: Removing encryption key manager
Browse files Browse the repository at this point in the history
  • Loading branch information
simonas-notcat committed Dec 10, 2019
1 parent 0a47c70 commit 65ba8a2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/daf-cli/src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import * as SD from 'daf-selective-disclosure'
import * as TG from 'daf-trust-graph'
import * as DBG from 'daf-debug'
import * as DIDComm from 'daf-did-comm'
import { SodiumFsEncryptionKeyManager } from 'daf-sodium-fs'

import { NodeSqlite3 } from 'daf-node-sqlite3'
import { DataStore } from 'daf-data-store'
Expand All @@ -22,8 +21,7 @@ const debug = Debug('main')
const defaultPath = process.env.HOME + '/.daf'

const identityStoreFilename = process.env.DAF_IDENTITY_STORE ?? defaultPath + '/identity-store.json'
const dataStoreFilename = process.env.DAF_DATA_STORE ?? defaultPath + '/data-store.sqlite3'
const encryptionStoreFilename = process.env.DAF_ENCRYPTION_STORE ?? defaultPath + '/encryption-store.json'
const dataStoreFilename = process.env.DAF_DATA_STORE ?? defaultPath + '/data-store-cli.sqlite3'
const infuraProjectId = process.env.DAF_INFURA_ID ?? '5ffc47f65c4042ce847ef66a3fa70d4c'

if (!process.env.DAF_IDENTITY_STORE || process.env.DAF_DATA_STORE || process.env.DAF_ENCRYPTION_STORE) {
Expand Down Expand Up @@ -65,7 +63,6 @@ actionHandler
.setNext(new SD.ActionHandler())

const serviceControllersWithConfig = [
// { controller: Rnd.RandomMessageService, config: {}},
{
controller: TG.TrustGraphServiceController,
config: {
Expand All @@ -76,15 +73,12 @@ const serviceControllersWithConfig = [
},
]

const encryptionKeyManager = new SodiumFsEncryptionKeyManager(encryptionStoreFilename)

export const core = new Daf.Core({
identityControllers,
serviceControllersWithConfig,
didResolver,
messageValidator,
actionHandler,
encryptionKeyManager,
})

const db = new NodeSqlite3(dataStoreFilename)
Expand Down

0 comments on commit 65ba8a2

Please sign in to comment.