diff --git a/example.env b/example.env index 3a33568..e3a2bd3 100644 --- a/example.env +++ b/example.env @@ -3,3 +3,6 @@ EXTOLLO_LOGGING_LEVEL=6 DATABASE_PASSWORD=extollo DATABASE_HOST=db01.platform.local FIREBASE_CREDENTIALS=/home/USER/firebase.json + +GPG_KEY_PUB=public.gpg.key +GPG_KEY_PRIV=private.gpg.key diff --git a/src/app/configs/app.config.ts b/src/app/configs/app.config.ts index fb7bfbd..a332486 100644 --- a/src/app/configs/app.config.ts +++ b/src/app/configs/app.config.ts @@ -4,6 +4,13 @@ import * as fs from "fs" export default { name: env('APP_NAME', 'Extollo'), + gpg: { + key: { + public: fs.readFileSync(env('GPG_KEY_PUB')).toString('utf-8'), + private: fs.readFileSync(env('GPG_KEY_PRIV')).toString('utf-8'), + }, + }, + firebase: { credentials: JSON.parse( fs.readFileSync(env('FIREBASE_CREDENTIALS')) diff --git a/src/app/units/Blockchain.ts b/src/app/units/Blockchain.ts index f930455..2033bfd 100644 --- a/src/app/units/Blockchain.ts +++ b/src/app/units/Blockchain.ts @@ -7,6 +7,7 @@ import * as crypto from "crypto" import {collect} from "@extollo/util"; export class Block implements BlockResourceItem { + firebaseID: string; seqID: number; uuid: string; combinedHash: string; @@ -17,6 +18,7 @@ export class Block implements BlockResourceItem { lastBlockUUID: string; constructor(rec: BlockResourceItem) { + this.firebaseID = rec.firebaseID; this.seqID = rec.seqID this.uuid = rec.uuid this.combinedHash = rec.combinedHash