diff --git a/README.md b/README.md index 5381de2..df5f7d1 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,10 @@ NOTE: All lncli commands need to be prepended with `docker-compose exec lnd`, th You can run your own Sphinx node in order to have full ownership over your communication! +### guide + +mynode users: here is a complete guide provided by someone who is running Relay at home: [MyNode Guide](https://github.com/stakwork/sphinx-relay/blob/master/install_guide_myNode.md) + ### download `git clone https://github.com/stakwork/sphinx-relay` diff --git a/api/controllers/chats.ts b/api/controllers/chats.ts index b853e38..11a3ec9 100644 --- a/api/controllers/chats.ts +++ b/api/controllers/chats.ts @@ -5,8 +5,9 @@ import * as helpers from '../helpers' import * as socket from '../utils/socket' import { sendNotification } from '../hub' import * as md5 from 'md5' +import * as path from 'path' -const constants = require(__dirname + '/../../config/constants.json') +const constants = require(path.join(__dirname,'../../config/constants.json')) async function getChats(req, res) { const chats = await models.Chat.findAll({ where:{deleted:false}, raw: true }) diff --git a/api/controllers/confirmations.ts b/api/controllers/confirmations.ts index 902409b..5cfa874 100644 --- a/api/controllers/confirmations.ts +++ b/api/controllers/confirmations.ts @@ -3,8 +3,9 @@ import {models} from '../models' import * as socket from '../utils/socket' import * as jsonUtils from '../utils/json' import * as helpers from '../helpers' +import * as path from 'path' -const constants = require(__dirname + '/../../config/constants.json') +const constants = require(path.join(__dirname,'../../config/constants.json')) export function sendConfirmation({ chat, sender, msg_id }) { helpers.sendMessage({ diff --git a/api/controllers/contacts.ts b/api/controllers/contacts.ts index a12f5c3..6c64d0f 100644 --- a/api/controllers/contacts.ts +++ b/api/controllers/contacts.ts @@ -5,8 +5,9 @@ import * as helpers from '../helpers' import * as jsonUtils from '../utils/json' import {success, failure} from '../utils/res' import password from '../utils/password' +import * as path from 'path' -const constants = require(__dirname + '/../../config/constants.json') +const constants = require(path.join(__dirname,'../../config/constants.json')) const getContacts = async (req, res) => { const contacts = await models.Contact.findAll({ where:{deleted:false}, raw: true }) diff --git a/api/controllers/details.ts b/api/controllers/details.ts index 82b187b..55b2019 100644 --- a/api/controllers/details.ts +++ b/api/controllers/details.ts @@ -2,9 +2,10 @@ import {loadLightning} from '../utils/lightning' import { success, failure } from '../utils/res' import * as readLastLines from 'read-last-lines' import { nodeinfo } from '../utils/nodeinfo'; +import * as path from 'path' const env = process.env.NODE_ENV || 'development'; -const config = require(__dirname + '/../../config/app.json')[env]; +const config = require(path.join(__dirname,'../../config/app.json'))[env] const defaultLogFiles = [ '/home/lnd/.pm2/logs/app-error.log', diff --git a/api/controllers/index.ts b/api/controllers/index.ts index 6e2e385..cdbfe24 100644 --- a/api/controllers/index.ts +++ b/api/controllers/index.ts @@ -2,8 +2,9 @@ import {models} from '../models' import * as lndService from '../grpc' import {checkTag} from '../utils/gitinfo' import {checkConnection} from '../utils/lightning' +import * as path from 'path' -const constants = require(__dirname + '/../../config/constants.json'); +const constants = require(path.join(__dirname,'../../config/constants.json')) const env = process.env.NODE_ENV || 'development'; console.log("=> env:",env) @@ -78,6 +79,7 @@ async function set(app) { app.post('/contacts', controllers.contacts.createContact) app.delete('/contacts/:id', controllers.contacts.deleteContact) + app.get('/allmessages', controllers.messages.getAllMessages) app.get('/messages', controllers.messages.getMessages) app.delete('/message/:id', controllers.messages.deleteMessage) app.post('/messages', controllers.messages.sendMessage) diff --git a/api/controllers/invoices.ts b/api/controllers/invoices.ts index 5453281..ccc8c16 100644 --- a/api/controllers/invoices.ts +++ b/api/controllers/invoices.ts @@ -7,8 +7,9 @@ import * as helpers from '../helpers' import { sendNotification } from '../hub' import { success } from '../utils/res' import {sendConfirmation} from './confirmations' +import * as path from 'path' -const constants = require(__dirname + '/../../config/constants.json'); +const constants = require(path.join(__dirname,'../../config/constants.json')) const payInvoice = async (req, res) => { const lightning = await loadLightning() diff --git a/api/controllers/media.ts b/api/controllers/media.ts index d6a34d0..d1650e2 100644 --- a/api/controllers/media.ts +++ b/api/controllers/media.ts @@ -12,10 +12,11 @@ import {CronJob} from 'cron' import * as zbase32 from '../utils/zbase32' import * as schemas from './schemas' import {sendConfirmation} from './confirmations' +import * as path from 'path' const env = process.env.NODE_ENV || 'development'; -const config = require(__dirname + '/../../config/app.json')[env]; -const constants = require(__dirname + '/../../config/constants.json'); +const config = require(path.join(__dirname,'../../config/app.json'))[env] +const constants = require(path.join(__dirname,'../../config/constants.json')) /* diff --git a/api/controllers/messages.ts b/api/controllers/messages.ts index 8148b19..deee17c 100644 --- a/api/controllers/messages.ts +++ b/api/controllers/messages.ts @@ -7,8 +7,9 @@ import * as jsonUtils from '../utils/json' import * as helpers from '../helpers' import { success } from '../utils/res' import {sendConfirmation} from './confirmations' +import * as path from 'path' -const constants = require(__dirname + '/../../config/constants.json') +const constants = require(path.join(__dirname,'../../config/constants.json')) const getMessages = async (req, res) => { const dateToReturn = req.query.date; @@ -69,9 +70,12 @@ const getMessages = async (req, res) => { } const getAllMessages = async (req, res) => { - const messages = await models.Message.findAll({ order: [['id', 'asc']] }) + const limit = (req.query.limit && parseInt(req.query.limit)) || 1000 + const offset = (req.query.offset && parseInt(req.query.offset)) || 0 + + const messages = await models.Message.findAll({ order: [['id', 'asc']], limit, offset }) const chatIds = messages.map(m => m.chatId) - console.log('=> getAllMessages, chatIds',chatIds) + console.log(`=> getAllMessages, limit: ${limit}, offset: ${offset}`) let chats = chatIds.length > 0 ? await models.Chat.findAll({ where: {deleted:false, id: chatIds} }) : [] const chatsById = indexBy(chats, 'id') @@ -210,5 +214,6 @@ export { receiveMessage, clearMessages, readMessages, - deleteMessage + deleteMessage, + getAllMessages, } \ No newline at end of file diff --git a/api/controllers/subscriptions.ts b/api/controllers/subscriptions.ts index 19de737..e840506 100644 --- a/api/controllers/subscriptions.ts +++ b/api/controllers/subscriptions.ts @@ -8,8 +8,9 @@ import * as jsonUtils from '../utils/json' import * as helpers from '../helpers' import * as rsa from '../crypto/rsa' import * as moment from 'moment' +import * as path from 'path' -const constants = require(__dirname + '/../../config/constants.json'); +const constants = require(path.join(__dirname,'../../config/constants.json')) // store all current running jobs in memory let jobs = {} diff --git a/api/controllers/uploads.ts b/api/controllers/uploads.ts index 50d7fe7..39c1fde 100644 --- a/api/controllers/uploads.ts +++ b/api/controllers/uploads.ts @@ -1,13 +1,14 @@ import {models} from '../models' +import * as path from 'path' const env = process.env.NODE_ENV || 'development'; -const config = require(__dirname + '/../../config/app.json')[env]; +const config = require(path.join(__dirname,'../../config/app.json'))[env] // setup disk storage var multer = require('multer') var avatarStorage = multer.diskStorage({ destination: (req, file, cb) => { - let dir = __dirname.includes('/dist/') ? __dirname+'/..' : __dirname + let dir = __dirname.includes('/dist/') ? path.join(__dirname,'..') : __dirname cb(null, dir + '/../../public/uploads') }, filename: (req, file, cb) => { diff --git a/api/grpc/index.ts b/api/grpc/index.ts index 4b419d1..b86089c 100644 --- a/api/grpc/index.ts +++ b/api/grpc/index.ts @@ -6,8 +6,9 @@ import * as decodeUtils from '../utils/decode' import {loadLightning, SPHINX_CUSTOM_RECORD_KEY, verifyAscii} from '../utils/lightning' import * as controllers from '../controllers' import * as moment from 'moment' +import * as path from 'path' -const constants = require(__dirname + '/../../config/constants.json'); +const constants = require(path.join(__dirname,'../../config/constants.json')) // VERIFY PUBKEY OF SENDER async function parseAndVerifyPayload(data){ diff --git a/api/hub.ts b/api/hub.ts index 289e4a8..f134c9e 100644 --- a/api/hub.ts +++ b/api/hub.ts @@ -6,10 +6,11 @@ import * as jsonUtils from './utils/json' import * as helpers from './helpers' import {nodeinfo} from './utils/nodeinfo' import { loadLightning } from './utils/lightning' +import * as path from 'path' -const constants = require(__dirname + '/../config/constants.json'); +const constants = require(path.join(__dirname, '../config/constants.json')) const env = process.env.NODE_ENV || 'development'; -const config = require('../config/app.json')[env]; +const config = require(path.join(__dirname,'../config/app.json'))[env]; const checkInviteHub = async (params = {}) => { if (env != "production") { diff --git a/api/models/index.ts b/api/models/index.ts index c6cb1c2..f36c8a7 100644 --- a/api/models/index.ts +++ b/api/models/index.ts @@ -1,12 +1,19 @@ import {Sequelize} from 'sequelize-typescript'; +import * as path from 'path' +import Chat from './ts/chat' +import Contact from './ts/contact' +import Invite from './ts/invite' +import Message from './ts/message' +import Subscription from './ts/subscription' +import MediaKey from './ts/mediaKey' const env = process.env.NODE_ENV || 'development'; -const config = require(__dirname + '/../../config/config.json')[env]; +const config = require(path.join(__dirname,'../../config/config.json'))[env] const sequelize = new Sequelize({ ...config, logging: process.env.SQL_LOG==='true' ? console.log : false, - models: [__dirname + '/ts'] + models: [Chat,Contact,Invite,Message,Subscription,MediaKey] }) const models = sequelize.models diff --git a/api/utils/ldat.ts b/api/utils/ldat.ts index e390c0d..8911aab 100644 --- a/api/utils/ldat.ts +++ b/api/utils/ldat.ts @@ -1,8 +1,9 @@ import * as zbase32 from './zbase32' import {signBuffer} from './lightning' +import * as path from 'path' const env = process.env.NODE_ENV || 'development' -const config = require(__dirname + '/../../config/app.json')[env] +const config = require(path.join(__dirname,'../../config/app.json'))[env] /* Lightning Data Access Token diff --git a/api/utils/lightning.ts b/api/utils/lightning.ts index 8e77081..495a73e 100644 --- a/api/utils/lightning.ts +++ b/api/utils/lightning.ts @@ -4,9 +4,11 @@ import * as grpc from 'grpc' import { sleep } from '../helpers'; import * as sha from 'js-sha256' import * as crypto from 'crypto' +import * as path from 'path' + // var protoLoader = require('@grpc/proto-loader') const env = process.env.NODE_ENV || 'development'; -const config = require(__dirname + '/../../config/app.json')[env]; +const config = require(path.join(__dirname,'../../config/app.json'))[env] const LND_KEYSEND_KEY = 5482373484 const SPHINX_CUSTOM_RECORD_KEY = 133773310 diff --git a/api/utils/setup.ts b/api/utils/setup.ts index 1bbff9d..b4902ed 100644 --- a/api/utils/setup.ts +++ b/api/utils/setup.ts @@ -114,7 +114,7 @@ async function printQR(){ return } let theIP = public_ip - if(!theIP.includes(":")) theIP = public_ip+':3001' + // if(!theIP.includes(":")) theIP = public_ip+':3001' const b64 = Buffer.from(`ip::${theIP}::${password||''}`).toString('base64') console.log('Scan this QR in Sphinx app:') diff --git a/api/utils/socket.ts b/api/utils/socket.ts index dccf58d..8f8cfdd 100644 --- a/api/utils/socket.ts +++ b/api/utils/socket.ts @@ -1,7 +1,9 @@ import * as WebSocket from 'ws' -let connections = new Map() -let connectionCounter = 0 +// let connections = new Map() +// let connectionCounter = 0 + +let lastConn: any const connect = (server) => { server = new WebSocket.Server({ server }) @@ -10,16 +12,18 @@ const connect = (server) => { server.on('connection', socket => { console.log('=> [socket] connection received') - var id = connectionCounter++; - connections.set(id, socket) + // var id = connectionCounter++; + // connections.set(id, socket) + lastConn = socket }) } const send = (body) => { - connections.forEach((socket, index) => { - socket.send(body) - }) + // connections.forEach((socket, index) => { + // socket.send(body) + // }) + if(lastConn) lastConn.send(body) } const sendJson = (object) => { diff --git a/app.ts b/app.ts index 4a4da2f..804118c 100644 --- a/app.ts +++ b/app.ts @@ -3,6 +3,7 @@ import * as bodyParser from 'body-parser' import * as helmet from 'helmet' import * as cookieParser from 'cookie-parser' import * as crypto from 'crypto' +import * as path from 'path' import {models} from './api/models' import logger from './api/utils/logger' import {pingHubInterval, checkInvitesHubInterval} from './api/hub' @@ -13,7 +14,7 @@ import * as socket from './api/utils/socket' let server: any = null const port = process.env.PORT || 3001; const env = process.env.NODE_ENV || 'development'; -const config = require(__dirname + '/config/app.json')[env]; +const config = require(path.join(__dirname, 'config/app.json'))[env]; process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA' diff --git a/binaries/node_sqlite3.node b/binaries/node_sqlite3.node new file mode 100755 index 0000000..ae6101e Binary files /dev/null and b/binaries/node_sqlite3.node differ diff --git a/config/app.json b/config/app.json index 05c4384..7fa1eaf 100644 --- a/config/app.json +++ b/config/app.json @@ -1,28 +1,32 @@ { "development": { - "macaroon_location": "/relay/.lnd/data/chain/bitcoin/mainnet/admin.macaroon", - "tls_location": "/relay/.lnd/tls.cert", - "node_ip": "172.22.0.2", - "lnd_port": "10009", + "senza_url": "http://localhost:3000/api/v2", + "macaroon_location": "/Users/evanfeenstra/code/lnd-dev/alice/data/chain/bitcoin/simnet/admin.macaroon", + "tls_location": "/Users/evanfeenstra/Library/Application Support/Lnd/tls.cert", + "node_ip": "127.0.0.1", + "lnd_port": "10001", "node_http_protocol": "http", - "node_http_port": "3000", - "hub_api_url": "http://hub.sphinx.chat/api/v1", - "hub_url": "http://hub.sphinx.chat/ping", - "hub_invite_url": "http://hub.sphinx.chat/invites", - "hub_check_invite_url": "http://hub.sphinx.chat/check_invite", - "media_host": "memes.sphinx.chat" + "node_http_port": "3001", + "hub_api_url": "http://lvh.me/api/v1", + "hub_url": "http://lvh.me/ping", + "hub_invite_url": "http://lvh.me/invites", + "hub_check_invite_url": "http://lvh.me/check_invite", + "media_host": "localhost:5000" }, "production": { - "macaroon_location": "/relay/.lnd/data/chain/bitcoin/mainnet/admin.macaroon", - "tls_location": "/relay/.lnd/tls.cert", + "senza_url": "https://staging.senza.us/api/v2/", + "macaroon_location": "/home/ubuntu/.lnd/data/chain/bitcoin/mainnet/admin.macaroon", + "tls_location": "/home/ubuntu/.lnd/tls.cert", + "lnd_log_location": "/home/ubuntu/.lnd/logs/bitcoin/mainnet/lnd.log", + "lncli_location": "/home/ubuntu/go/bin", "node_ip": "localhost", - "lnd_port": "10009", "node_http_protocol": "http", - "node_http_port": "3000", + "node_http_port": "80", + "lnd_port": "10009", "hub_api_url": "https://hub.sphinx.chat/api/v1", "hub_url": "https://hub.sphinx.chat/ping", "hub_invite_url": "https://hub.sphinx.chat/invites", "hub_check_invite_url": "https://hub.sphinx.chat/check_invite", "media_host": "memes.sphinx.chat" } -} +} \ No newline at end of file diff --git a/config/config.json b/config/config.json index 0a2a9e8..ba232b8 100644 --- a/config/config.json +++ b/config/config.json @@ -13,6 +13,6 @@ }, "production": { "dialect": "sqlite", - "storage": "./.lnd/sphinx.db" + "storage": "/home/ubuntu/sphinx.db" } } diff --git a/dist/api/controllers/chats.js b/dist/api/controllers/chats.js index ad2ffbf..c832506 100644 --- a/dist/api/controllers/chats.js +++ b/dist/api/controllers/chats.js @@ -16,7 +16,8 @@ const helpers = require("../helpers"); const socket = require("../utils/socket"); const hub_1 = require("../hub"); const md5 = require("md5"); -const constants = require(__dirname + '/../../config/constants.json'); +const path = require("path"); +const constants = require(path.join(__dirname, '../../config/constants.json')); function getChats(req, res) { return __awaiter(this, void 0, void 0, function* () { const chats = yield models_1.models.Chat.findAll({ where: { deleted: false }, raw: true }); diff --git a/dist/api/controllers/chats.js.map b/dist/api/controllers/chats.js.map index 252697c..752e9f3 100644 --- a/dist/api/controllers/chats.js.map +++ b/dist/api/controllers/chats.js.map @@ -1 +1 @@ -{"version":3,"file":"chats.js","sourceRoot":"","sources":["../../../api/controllers/chats.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAkC;AAClC,2CAA0C;AAC1C,sCAA+C;AAC/C,sCAAqC;AACrC,0CAAyC;AACzC,gCAAyC;AACzC,2BAA0B;AAE1B,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,8BAA8B,CAAC,CAAA;AAErE,SAAe,QAAQ,CAAC,GAAG,EAAE,GAAG;;QAC/B,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAC,EAAC,OAAO,EAAC,KAAK,EAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;QAC7E,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QACxD,aAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;IAChB,CAAC;CAAA;AAqSA,4BAAQ;AAnST,SAAe,IAAI,CAAC,GAAG,EAAE,GAAG;;QAC3B,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QACpC,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAA;QAEtC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EA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AC,CAAA;IAChG,OAAO;QACN,IAAI,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,IAAI,IAAI,EAAE;QACvC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC;QACzC,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC,KAAK;KAChC,CAAA;AACF,CAAC;AASD,SAAe,YAAY,CAAC,KAAK,EAAE,QAAQ;;QAC1C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAChD,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAC7C;IACF,CAAC;CAAA"} \ No newline at end of file diff --git a/dist/api/controllers/confirmations.js b/dist/api/controllers/confirmations.js index fa00873..35e8a54 100644 --- a/dist/api/controllers/confirmations.js +++ b/dist/api/controllers/confirmations.js @@ -14,7 +14,8 @@ const models_1 = require("../models"); const socket = require("../utils/socket"); const jsonUtils = require("../utils/json"); const helpers = require("../helpers"); -const constants = require(__dirname + '/../../config/constants.json'); +const path = require("path"); +const constants = require(path.join(__dirname, '../../config/constants.json')); function sendConfirmation({ chat, sender, msg_id }) { helpers.sendMessage({ chat, diff --git a/dist/api/controllers/confirmations.js.map b/dist/api/controllers/confirmations.js.map index 502c59d..ec7f167 100644 --- a/dist/api/controllers/confirmations.js.map +++ b/dist/api/controllers/confirmations.js.map @@ -1 +1 @@ -{"version":3,"file":"confirmations.js","sourceRoot":"","sources":["../../../api/controllers/confirmations.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,wCAAgC;AAChC,sCAAgC;AAChC,0CAAyC;AACzC,2CAA0C;AAC1C,sCAAqC;AAErC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,8BAA8B,CAAC,CAAA;A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QAAQ,CAAC,CAAC,CAAC,CAAA;YAC3B,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAA;YAEvD,MAAM,CAAC,QAAQ,CAAC;gBACf,IAAI,EAAE,cAAc;gBACpB,QAAQ,EAAE,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC;aACxD,CAAC,CAAA;SACF;IACF,CAAC;CAAA;AA3DD,kDA2DC"} \ No newline at end of file +{"version":3,"file":"confirmations.js","sourceRoot":"","sources":["../../../api/controllers/confirmations.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,wCAAgC;AAChC,sCAAgC;AAChC,0CAAyC;AACzC,2CAA0C;AAC1C,sCAAqC;AACrC,6BAA4B;AAE5B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAE7E,SAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE;IACxD,OAAO,CAAC,WAAW,CAAC;QACnB,IAAI;QACJ,MAAM;QACN,OAAO,EAAE,EAAC,EAAE,EAAC,MAAM,EAAC;QACpB,IAAI,EAAE,SAAS,CAAC,aAAa,CAAC,YAAY;KAC1C,CAAC,CAAA;AACH,CAAC;AAPD,4CAOC;AAED,SAAsB,mBAAmB,CAAC,OAAO;;QAChD,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,OAAO,EAAE,CAAC,CAAA;QAEjD,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAA;QACtC,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAA;QAC/B,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,EAAE,CAAA;QAC7B,MAAM,cAAc,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAA;QAEzC,M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IAAI,EAAE,MAAM,CAAC;yBACxD,CAAC,CAAA;qBACF;oBACD,IAAI,EAAE,CAAA;gBACP,CAAC;aAAA,CAAC,CAAA;SACF;aAAM,EAAE,YAAY;YACpB,MAAM,QAAQ,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC;gBAC7C,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE;oBACN,MAAM,EAAE,IAAI,CAAC,EAAE;oBACf,MAAM,EAAE,KAAK,CAAC,EAAE;oBAChB,IAAI,EAAE;wBACL,SAAS,CAAC,aAAa,CAAC,OAAO;wBAC/B,SAAS,CAAC,aAAa,CAAC,OAAO;wBAC/B,SAAS,CAAC,aAAa,CAAC,UAAU;qBAClC;oBACD,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,OAAO;iBAClC;gBACD,KAAK,EAAE,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;aAC9B,CAAC,CAAA;YAEF,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;YAC3B,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAA;YAEvD,MAAM,CAAC,QAAQ,CAAC;gBACf,IAAI,EAAE,cAAc;gBACpB,QAAQ,EAAE,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC;aACxD,CAAC,CAAA;SACF;IACF,CAAC;CAAA;AA3DD,kDA2DC"} \ No newline at end of file diff --git a/dist/api/controllers/contacts.js b/dist/api/controllers/contacts.js index 6fa2607..6887fb4 100644 --- a/dist/api/controllers/contacts.js +++ b/dist/api/controllers/contacts.js @@ -16,7 +16,8 @@ const helpers = require("../helpers"); const jsonUtils = require("../utils/json"); const res_1 = require("../utils/res"); const password_1 = require("../utils/password"); -const constants = require(__dirname + '/../../config/constants.json'); +const path = require("path"); +const constants = require(path.join(__dirname, '../../config/constants.json')); const getContacts = (req, res) => __awaiter(void 0, void 0, void 0, function* () { const contacts = yield models_1.models.Contact.findAll({ where: { deleted: false }, raw: true }); const invites = yield models_1.models.Invite.findAll({ raw: true }); diff --git a/dist/api/controllers/contacts.js.map b/dist/api/controllers/contacts.js.map index 9eb4503..2efb693 100644 --- a/dist/api/controllers/contacts.js.map +++ b/dist/api/controllers/contacts.js.map @@ -1 +1 @@ -{"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../../api/controllers/contacts.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,iCAAgC;AAChC,0CAAyC;AACzC,sCAAqC;AACrC,2CAA0C;AAC1C,sCAA6C;AAC7C,gDAAwC;AAExC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,8BAA8B,CAAC,CAAA;AAErE,MAAM,WAAW,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IACtC,MAAM,QAAQ,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAC,EAAC,OAAO,EAAC,KAAK,EAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;IACnF,MAAM,OAAO,GAAG,MAAM,eAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;IAC1D,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAC,EAAC,OAAO,EAAC,KAAK,EAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;IAC7E,MAAM,aAAa,GAAG,MAAM,eAAM,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;IAEtE,MAAM,gBAAgB,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;QAC/C,IAAI,WAAW,GAAG,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QAClD,IAAI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AG,SAAS,EAAE;YAC7C,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,kBAAkB,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAA;SACtE;aAAM;YACN,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAC,CAAA;SACjD;QAED,MAAM,CAAC,QAAQ,CAAC;YACf,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC;SACzC,CAAC,CAAA;KACF;IAED,OAAO,CAAC,eAAe,CAAC;QACvB,aAAa,EAAE,cAAc;QAC7B,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,SAAS,CAAC,aAAa,CAAC,wBAAwB;KACtD,CAAC,CAAA;AACH,CAAC,CAAA,CAAA;AAoBA,8CAAiB;AAlBlB,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE;IAC3B,IAAI,gBAAgB,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAA;IAC/G,IAAI,KAAK,GAAG,EAAE,CAAA;IACd,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QAC/B,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACnC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAA;SACtB;IACF,CAAC,CAAC,CAAA;IACF,OAAO,KAAK,CAAA;AACb,CAAC,CAAA"} \ No newline at end of file +{"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../../api/controllers/contacts.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,iCAAgC;AAChC,0CAAyC;AACzC,sCAAqC;AACrC,2CAA0C;AAC1C,sCAA6C;AAC7C,gDAAwC;AACxC,6BAA4B;AAE5B,MAAM,SAAS,GA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AAK;QACb,IAAI,EAAE,SAAS,CAAC,aAAa,CAAC,wBAAwB;KACtD,CAAC,CAAA;AACH,CAAC,CAAA,CAAA;AAoBA,8CAAiB;AAlBlB,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE;IAC3B,IAAI,gBAAgB,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAA;IAC/G,IAAI,KAAK,GAAG,EAAE,CAAA;IACd,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QAC/B,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACnC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAA;SACtB;IACF,CAAC,CAAC,CAAA;IACF,OAAO,KAAK,CAAA;AACb,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/api/controllers/details.js b/dist/api/controllers/details.js index c3280d9..8898c57 100644 --- a/dist/api/controllers/details.js +++ b/dist/api/controllers/details.js @@ -13,8 +13,9 @@ const lightning_1 = require("../utils/lightning"); const res_1 = require("../utils/res"); const readLastLines = require("read-last-lines"); const nodeinfo_1 = require("../utils/nodeinfo"); +const path = require("path"); const env = process.env.NODE_ENV || 'development'; -const config = require(__dirname + '/../../config/app.json')[env]; +const config = require(path.join(__dirname, '../../config/app.json'))[env]; const defaultLogFiles = [ '/home/lnd/.pm2/logs/app-error.log', '/var/log/syslog', diff --git a/dist/api/controllers/details.js.map b/dist/api/controllers/details.js.map index 817a368..1aa9238 100644 --- a/dist/api/controllers/details.js.map +++ b/dist/api/controllers/details.js.map @@ -1 +1 @@ -{"version":3,"file":"details.js","sourceRoot":"","sources":["../../../api/controllers/details.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,kDAAgD;AAChD,sCAA+C;AAC/C,iDAAgD;AAChD,gDAA6C;AAE7C,MAAM,GA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AAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC;SAChH;aAAM;YACN,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;SAC7B;QACD,GAAG,CAAC,GAAG,EAAE,CAAC;IACT,CAAC,CAAC,CAAA;AACL,CAAC,CAAA,CAAC;AAmBD,sDAAqB;AAjBtB,MAAM,WAAW,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IACtC,IAAI,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC;IAC9C,IAAG,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAC;QAC1E,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QACf,GAAG,CAAC,GAAG,EAAE,CAAA;QACT,OAAM;KACN;IACD,MAAM,IAAI,GAAG,MAAM,mBAAQ,EAAE,CAAA;IAC7B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IACf,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACd,GAAG,CAAC,GAAG,EAAE,CAAA;AACV,CAAC,CAAA,CAAA;AAQA,kCAAW;AAGZ,SAAe,YAAY,CAAC,KAAK,EAAE,QAAQ;;QAC1C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAChD,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAC7C;IACF,CAAC;CAAA"} \ No newline at end of file diff --git a/dist/api/controllers/index.js b/dist/api/controllers/index.js index b54bd1a..1cf0027 100644 --- a/dist/api/controllers/index.js +++ b/dist/api/controllers/index.js @@ -13,7 +13,8 @@ const models_1 = require("../models"); const lndService = require("../grpc"); const gitinfo_1 = require("../utils/gitinfo"); const lightning_1 = require("../utils/lightning"); -const constants = require(__dirname + '/../../config/constants.json'); +const path = require("path"); +const constants = require(path.join(__dirname, '../../config/constants.json')); const env = process.env.NODE_ENV || 'development'; console.log("=> env:", env); let controllers = { @@ -83,6 +84,7 @@ function set(app) { app.post('/contacts/:id/keys', controllers.contacts.exchangeKeys); app.post('/contacts', controllers.contacts.createContact); app.delete('/contacts/:id', controllers.contacts.deleteContact); + app.get('/allmessages', controllers.messages.getAllMessages); app.get('/messages', controllers.messages.getMessages); app.delete('/message/:id', controllers.messages.deleteMessage); app.post('/messages', controllers.messages.sendMessage); diff --git a/dist/api/controllers/index.js.map b/dist/api/controllers/index.js.map index dcc4b14..bb4e3cc 100644 --- a/dist/api/controllers/index.js.map +++ b/dist/api/controllers/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,sCAAqC;AACrC,8CAAyC;AACzC,kDAAkD;AAElD,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,8BAA8B,CAAC,CAAC;AAEtE,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,OAAO,CAAC,GAAG,CAAC,SAAS,EAAC,GAAG,CAAC,CAAA;AAE1B,IAAI,WAAW,GAAG;IACjB,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC;IAC7B,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC;IAC7B,QAAQ,EAAE,OAAO,CAAC,WAAW,CAAC;IAC9B,OAAO,EAAE,OAAO,C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,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC;IAE1B,IAAI,IAAI,IAAI,QAAQ,EAAE;QACrB,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YACjE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAChB,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;YACpD,GAAG,CAAC,GAAG,EAAE,CAAC;QACX,CAAC,CAAC,CAAA;KACF;SAAM;QACN,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChB,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QAC7B,GAAG,CAAC,GAAG,EAAE,CAAC;KACV;AACF,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/api/controllers/invoices.js b/dist/api/controllers/invoices.js index 5d089be..6116a3d 100644 --- a/dist/api/controllers/invoices.js +++ b/dist/api/controllers/invoices.js @@ -18,7 +18,8 @@ const helpers = require("../helpers"); const hub_1 = require("../hub"); const res_1 = require("../utils/res"); const confirmations_1 = require("./confirmations"); -const constants = require(__dirname + '/../../config/constants.json'); +const path = require("path"); +const constants = require(path.join(__dirname, '../../config/constants.json')); const payInvoice = (req, res) => __awaiter(void 0, void 0, void 0, function* () { const lightning = yield lightning_1.loadLightning(); const { payment_request } = req.body; diff --git a/dist/api/controllers/invoices.js.map b/dist/api/controllers/invoices.js.map index 8f2ea97..87b25dc 100644 --- a/dist/api/controllers/invoices.js.map +++ b/dist/api/controllers/invoices.js.map @@ -1 +1 @@ -{"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../../api/controllers/invoices.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAkC;AA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AAC,CAAC;QAC7C,IAAG,GAAG,EAAE;YACN,IAAI,GAAG,CAAC,WAAW,IAAI,cAAc,EAAE;gBACrC,WAAW,GAAG,GAAG,CAAC,KAAK,CAAC;aACzB;iBAAM,IAAI,GAAG,CAAC,WAAW,IAAI,aAAa,EAAE;gBAC3C,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC;aAClB;iBAAM,IAAI,GAAG,CAAC,WAAW,IAAI,QAAQ,EAAE;gBACtC,iBAAiB,GAAG,GAAG,CAAC,KAAK,CAAC;aAC/B;SACF;KACF;IAED,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC,QAAQ,EAAE,GAAG,KAAK,CAAC,CAAC;IACnE,IAAI,WAAW,GAAG,QAAQ,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,GAAG,KAAK,CAAC,CAAC;IAErF,IAAI,MAAM,GAAG,qBAAqB,CAAC,qBAAqB,CAAC,CAAC,QAAQ,CAAC,CAAC;IACpE,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE;QAC5B,IAAI,GAAG,MAAM,CAAC;QACd,GAAG,GAAG,MAAM,GAAG,IAAI,CAAC;KACrB;IAED,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAA;AACzE,CAAC"} \ No newline at end of file +{"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../../api/controllers/invoices.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAkC;AAClC,kDAAkD;AAClD,0CAAyC;AACzC,2CAA0C;AAC1C,+CAA8C;AAC9C,sCAAqC;AACrC,gCAAyC;AACzC,sCAAsC;AACtC,mDAAgD;AAChD,6BAA4B;AAE5B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CA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I,GAAG,CAAC,WAAW,IAAI,aAAa,EAAE;gBAC3C,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC;aAClB;iBAAM,IAAI,GAAG,CAAC,WAAW,IAAI,QAAQ,EAAE;gBACtC,iBAAiB,GAAG,GAAG,CAAC,KAAK,CAAC;aAC/B;SACF;KACF;IAED,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC,QAAQ,EAAE,GAAG,KAAK,CAAC,CAAC;IACnE,IAAI,WAAW,GAAG,QAAQ,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,GAAG,KAAK,CAAC,CAAC;IAErF,IAAI,MAAM,GAAG,qBAAqB,CAAC,qBAAqB,CAAC,CAAC,QAAQ,CAAC,CAAC;IACpE,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE;QAC5B,IAAI,GAAG,MAAM,CAAC;QACd,GAAG,GAAG,MAAM,GAAG,IAAI,CAAC;KACrB;IAED,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAA;AACzE,CAAC"} \ No newline at end of file diff --git a/dist/api/controllers/media.js b/dist/api/controllers/media.js index 38ba80e..bbf95f9 100644 --- a/dist/api/controllers/media.js +++ b/dist/api/controllers/media.js @@ -23,9 +23,10 @@ const cron_1 = require("cron"); const zbase32 = require("../utils/zbase32"); const schemas = require("./schemas"); const confirmations_1 = require("./confirmations"); +const path = require("path"); const env = process.env.NODE_ENV || 'development'; -const config = require(__dirname + '/../../config/app.json')[env]; -const constants = require(__dirname + '/../../config/constants.json'); +const config = require(path.join(__dirname, '../../config/app.json'))[env]; +const constants = require(path.join(__dirname, '../../config/constants.json')); /* TODO line 233: parse that from token itself, dont use getMediaInfo at all diff --git a/dist/api/controllers/media.js.map b/dist/api/controllers/media.js.map index 35a2ce4..4d31b87 100644 --- a/dist/api/controllers/media.js.map +++ b/dist/api/controllers/media.js.map @@ -1 +1 @@ -{"version":3,"file":"media.js","sourceRoot":"","sources":["../../../api/controllers/media.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,0CAAyC;AACzC,2CAA0C;AAC1C,yCAAwC;AACxC,sCAAqC;AACrC,gCAAyC;AACzC,kDAA8D;AAC9D,sCAAqC;AACrC,kDAAkD;AAClD,wCAAqF;AACrF,+BAA4B;AAC5B,4CAA2C;AAC3C,qCAAoC;AACpC,mDAAgD;AAEhD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,wBAAwB,CAAC,CAAC,GAAG,CAAC,CAAC;AAClE,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,8BAA8B,CAAC,CAAC;AAEtE;;;;;;;;;;;;;;;;EAgBE;AAEF,MAAM,qBAAqB,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IAC/C,QAAQ;IACR,8CAA8C;IAC9C,eAAe;IACf,4CAA4C;IAC5C,IAAI;IAEJ,MAAM,EACJ,OAAO,EACP,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,eAAe,EACf,aAAa,EACb,UAAU,EACV,SAAS,EACT,GAAG,EACH,KAAK,GACN,GAAG,GAAG,CAAC,IAAI,CAAA;IAEZ,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;IAE1C,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAC,CAAC,CAAA;IACvE,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,gBAAgB,CAAC;QAC1C,OAAO;QACP,QAAQ,EAAE,KA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,CAAC,CAAA;YACF,OAAO,GAAG,CAAA;SACX;QAAC,OAAM,CAAC,EAAE;YACT,OAAO,IAAI,CAAA;SACZ;IACH,CAAC;CAAA"} \ No newline at end of file +{"version":3,"file":"media.js","sourceRoot":"","sources":["../../../api/controllers/media.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,0CAAyC;AACzC,2CAA0C;AAC1C,yCAAwC;AACxC,sCAAqC;AACrC,gCAAyC;AACzC,kDAA8D;AAC9D,sCAAqC;AACrC,kDAAkD;AAClD,wCAAqF;AACrF,+BAA4B;AAC5B,4CAA2C;AAC3C,qCAAoC;AACpC,mDAAgD;AAChD,6BAA4B;AAE5B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,uBAAuB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AACzE,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAE7E;;;;;;;;;;;;;;;;EAgBE;AAEF,MAAM,qBAAqB,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IAC/C,QAAQ;IACR,8CAA8C;IAC9C,eAAe;IACf,4CAA4C;IAC5C,IAAI;IAEJ,MAAM,EACJ,OAAO,EACP,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,eAAe,EACf,aAAa,EACb,UAAU,EACV,SAAS,EACT,GAAG,EACH,KAAK,GACN,GAAG,GAAG,CAAC,IAAI,CAAA;IAEZ,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;IAE1C,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EA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,OAAO,EAAE;oBACP,eAAe,EAAE,UAAU,KAAK,EAAE;oBAClC,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAC,IAAI;aACV,CAAC,CAAA;YACF,OAAO,GAAG,CAAA;SACX;QAAC,OAAM,CAAC,EAAE;YACT,OAAO,IAAI,CAAA;SACZ;IACH,CAAC;CAAA"} \ No newline at end of file diff --git a/dist/api/controllers/messages.js b/dist/api/controllers/messages.js index a719557..3554dce 100644 --- a/dist/api/controllers/messages.js +++ b/dist/api/controllers/messages.js @@ -18,7 +18,8 @@ const jsonUtils = require("../utils/json"); const helpers = require("../helpers"); const res_1 = require("../utils/res"); const confirmations_1 = require("./confirmations"); -const constants = require(__dirname + '/../../config/constants.json'); +const path = require("path"); +const constants = require(path.join(__dirname, '../../config/constants.json')); const getMessages = (req, res) => __awaiter(void 0, void 0, void 0, function* () { const dateToReturn = req.query.date; if (!dateToReturn) { @@ -68,9 +69,11 @@ const getMessages = (req, res) => __awaiter(void 0, void 0, void 0, function* () }); exports.getMessages = getMessages; const getAllMessages = (req, res) => __awaiter(void 0, void 0, void 0, function* () { - const messages = yield models_1.models.Message.findAll({ order: [['id', 'asc']] }); + const limit = (req.query.limit && parseInt(req.query.limit)) || 1000; + const offset = (req.query.offset && parseInt(req.query.offset)) || 0; + const messages = yield models_1.models.Message.findAll({ order: [['id', 'asc']], limit, offset }); const chatIds = messages.map(m => m.chatId); - console.log('=> getAllMessages, chatIds', chatIds); + console.log(`=> getAllMessages, limit: ${limit}, offset: ${offset}`); let chats = chatIds.length > 0 ? yield models_1.models.Chat.findAll({ where: { deleted: false, id: chatIds } }) : []; const chatsById = underscore_1.indexBy(chats, 'id'); res_1.success(res, { @@ -78,6 +81,7 @@ const getAllMessages = (req, res) => __awaiter(void 0, void 0, void 0, function* confirmed_messages: [] }); }); +exports.getAllMessages = getAllMessages; function deleteMessage(req, res) { return __awaiter(this, void 0, void 0, function* () { const id = req.params.id; diff --git a/dist/api/controllers/messages.js.map b/dist/api/controllers/messages.js.map index 93a04b1..e5cb6b1 100644 --- a/dist/api/controllers/messages.js.map +++ b/dist/api/controllers/messages.js.map @@ -1 +1 @@ -{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../api/controllers/messages.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,yCAA8B;AAC9B,2CAAoC;AACpC,gCAAyC;AACzC,0CAAyC;AACzC,2CAA0C;AAC1C,sCAAqC;AACrC,sCAAsC;AACtC,mDAAgD;AAEhD,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,8BAA8B,CAAC,CAAA;AAErE,MAAM,WAAW,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IACtC,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;IAEpC,IAAI,CAAC,YAAY,EAAE;QAClB,OAAO,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;KAC/B;IACD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;IACzB,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;IACxE,mCAAmC;IAEnC,IAAI,gBAAgB,GAAG;QACtB,IAAI,EAAE,EAAE,CAAC,cAAE,CAAC,GAAG,CAAC,EAAE,YAAY,EAAE;QAChC,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE;YACR,EAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAC;YACpB,EAAC,QAAQ,EAAE,IAAI,EAAC;SAChB;KACD,CAAA;IAED,IAAI,sBAAsB,GAAG;QAC5B,UAAU,EAAE,EAAE,CAAC,cAAE,CAAC,GAAG,CAAC,EAAE,YAAY,EAAE;QACtC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,QAAQ;QACnC,MAAM,EAAE,KAAK,CAAC,EAAE;KAChB,CAAA;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AAE,IAAI,EAAE,EAAE;QACrC,KAAK,EAAE;YACL,MAAM,EAAE;gBACT,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE;aACf;YACD,MAAM,EAAE,OAAO;SAChB;KACD,CAAC,CAAC;IAEH,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA,CAAA;AAaC,oCAAY;AAXd,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IAClC,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAErD,aAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA;AAMC,sCAAa"} \ No newline at end of file +{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../api/controllers/messages.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,yCAA8B;AAC9B,2CAAoC;AACpC,gCAAyC;AACzC,0CAAyC;AACzC,2CAA0C;AAC1C,sCAAqC;AACrC,sCAAsC;AACtC,mDAAgD;AAChD,6BAA4B;AAE5B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAE7E,MAAM,WAAW,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IACtC,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;IAEpC,IAAI,CAAC,YAAY,EAAE;QAClB,OAAO,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;KAC/B;IACD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;IACzB,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAA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C,GAAG,EAAE,EAAE,CAAC,CAAA;AACjB,CAAC,CAAA;AAMC,sCAAa"} \ No newline at end of file diff --git a/dist/api/controllers/subscriptions.js b/dist/api/controllers/subscriptions.js index 3ffad03..03707d4 100644 --- a/dist/api/controllers/subscriptions.js +++ b/dist/api/controllers/subscriptions.js @@ -19,7 +19,8 @@ const jsonUtils = require("../utils/json"); const helpers = require("../helpers"); const rsa = require("../crypto/rsa"); const moment = require("moment"); -const constants = require(__dirname + '/../../config/constants.json'); +const path = require("path"); +const constants = require(path.join(__dirname, '../../config/constants.json')); // store all current running jobs in memory let jobs = {}; // init jobs from DB diff --git a/dist/api/controllers/subscriptions.js.map b/dist/api/controllers/subscriptions.js.map index a0dee7d..681285b 100644 --- a/dist/api/controllers/subscriptions.js.map +++ b/dist/api/controllers/subscriptions.js.map @@ -1 +1 @@ -{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../../api/controllers/subscriptions.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,sCAA6C;AAC7C,+BAA4B;AAC5B,wCAAqC;AACrC,2CAA0C;AAC1C,0CAAyC;AACzC,2CAA0C;AAC1C,sCAAqC;AACrC,qCAAoC;AACpC,iCAAgC;AAEhC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,8BAA8B,CAAC,CAAC;AAEtE,2CAA2C;AAC3C,IAAI,IAAI,GAAG,EAAE,CAAA;AAEb,oBAAoB;AACpB,MAAM,kBAAkB,GAAG,GAAS,EAAE;IACpC,MAAM,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACzB,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAA;IAC1D,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QAChC,OAAO,CAAC,GAAG,CAAC,mCAAmC,EAAC,GAAG,CAAC,EAA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gBAAE,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,CAAA;YAE3C,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YACvC,MAAM,GAAG,GAAG,uCAAuC,CAAC,GAAG,CAAC,CAAA;YACxD,IAAG,GAAG,EAAE;gBACN,MAAM,SAAS,CAAC,MAAM,CAAC,EAAC,KAAK,EAAC,IAAI,EAAC,CAAC,CAAA;gBACpC,OAAO,IAAI,CAAC,EAAE,CAAC,CAAA;aAChB;iBAAM;gBACL,YAAY,CAAC,GAAG,CAAC,CAAA,CAAC,UAAU;aAC7B;YACD,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAC,CAAC,CAAA;YAClE,aAAO,CAAC,GAAG,EAAE,SAAS,CAAC,kBAAkB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAA;SACtD;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,CAAC,CAAC,CAAA;YAC1C,aAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;SAChB;IACH,CAAC;CAAA;AAoBC,4CAAgB;AApBjB,CAAC;AAEF,SAAS,kBAAkB,CAAC,CAAC;IAC3B,OAAO,CAAC,GAAG,CAAC,IAAI,EAAC,CAAC,CAAC,CAAA;IACnB,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;IACvC,OAAO,cAAO,iCACT,CAAC,KACJ,IAAI,IACJ,CAAA;AACJ,CAAC"} \ No newline at end of file +{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../../api/controllers/subscriptions.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,sCAA6C;AAC7C,+BAA4B;AAC5B,wCAAqC;AACrC,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A;SACtD;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,CAAC,CAAC,CAAA;YAC1C,aAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;SAChB;IACH,CAAC;CAAA;AAoBC,4CAAgB;AApBjB,CAAC;AAEF,SAAS,kBAAkB,CAAC,CAAC;IAC3B,OAAO,CAAC,GAAG,CAAC,IAAI,EAAC,CAAC,CAAC,CAAA;IACnB,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;IACvC,OAAO,cAAO,iCACT,CAAC,KACJ,IAAI,IACJ,CAAA;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/api/controllers/uploads.js b/dist/api/controllers/uploads.js index 6eece59..b01cff8 100644 --- a/dist/api/controllers/uploads.js +++ b/dist/api/controllers/uploads.js @@ -10,13 +10,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", { value: true }); const models_1 = require("../models"); +const path = require("path"); const env = process.env.NODE_ENV || 'development'; -const config = require(__dirname + '/../../config/app.json')[env]; +const config = require(path.join(__dirname, '../../config/app.json'))[env]; // setup disk storage var multer = require('multer'); var avatarStorage = multer.diskStorage({ destination: (req, file, cb) => { - let dir = __dirname.includes('/dist/') ? __dirname + '/..' : __dirname; + let dir = __dirname.includes('/dist/') ? path.join(__dirname, '..') : __dirname; cb(null, dir + '/../../public/uploads'); }, filename: (req, file, cb) => { diff --git a/dist/api/controllers/uploads.js.map b/dist/api/controllers/uploads.js.map index 086567c..a53aee1 100644 --- a/dist/api/controllers/uploads.js.map +++ b/dist/api/controllers/uploads.js.map @@ -1 +1 @@ -{"version":3,"file":"uploads.js","sourceRoot":"","sources":["../../../api/controllers/uploads.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAEhC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IA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,EAAE,GAAG,EAAE,EAAE;IACpC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,IAAI,CAAA;IACxC,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,CAAA;IAEpB,MAAM,SAAS,GACb,MAAM,CAAC,kBAAkB;QACzB,KAAK;QACL,OAAO,CAAC,GAAG,CAAC,OAAO;QACnB,kBAAkB;QAClB,IAAI,CAAC,QAAQ,CAAA;IAEf,IAAG,UAAU,EAAC;QACZ,MAAM,OAAO,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,CAAC,CAAA;QAC3E,IAAG,OAAO;YAAE,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAA;KACpD;IAED,IAAG,OAAO,EAAC;QACT,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC,CAAA;QAClE,IAAG,IAAI;YAAE,IAAI,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAA;KAC9C;IAED,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IACf,GAAG,CAAC,IAAI,CAAC;QACP,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,QAAQ,CAAC,UAAU,IAAE,CAAC,CAAC;QACnC,OAAO,EAAE,QAAQ,CAAC,OAAO,IAAE,CAAC,CAAC;QAC7B,SAAS;KACV,CAAC,CAAC;IACH,GAAG,CAAC,GAAG,EAAE,CAAC;AACZ,CAAC,CAAA,CAAA;AAIA,gCAAU"} \ No newline at end of file diff --git a/dist/api/grpc/index.js b/dist/api/grpc/index.js index cf6dfe0..078e464 100644 --- a/dist/api/grpc/index.js +++ b/dist/api/grpc/index.js @@ -17,7 +17,8 @@ const decodeUtils = require("../utils/decode"); const lightning_1 = require("../utils/lightning"); const controllers = require("../controllers"); const moment = require("moment"); -const constants = require(__dirname + '/../../config/constants.json'); +const path = require("path"); +const constants = require(path.join(__dirname, '../../config/constants.json')); // VERIFY PUBKEY OF SENDER function parseAndVerifyPayload(data) { return __awaiter(this, void 0, void 0, function* () { diff --git a/dist/api/grpc/index.js.map b/dist/api/grpc/index.js.map index eaf3372..9fbc155 100644 --- a/dist/api/grpc/index.js.map +++ b/dist/api/grpc/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/grpc/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,0CAAyC;AACzC,gCAAsD;AACtD,2CAA0C;AAC1C,+CAA8C;AAC9C,kDAAuF;AACvF,8CAA6C;AAC7C,iCAAgC;AAEhC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,8BAA8B,CAAC,CAAC;AAEtE,0BAA0B;AAC1B,SAAe,qBAAqB,CAAC,IAAI;;QACxC,IAAI,OAAO,CAAA;QACX,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;QAChC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAC,EAAE,GAAC,CAAC,CAAC,CAAA;QAClC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,GAAC,CAAC,CAAC,CAAA;QAChC,IAAI;YACH,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YACzB,IAAG,OAAO,EAAE;gBACX,MAAM,CAAC,GAAG,MAAM,uBAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;gBACrC,IAAG,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,MAAM,EAAE;oBAC5B,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAE,EAAE,CAAA;oBACnC,OAAO,CAAC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A;QACF,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;YACd,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,EAAE,CAAC;YAC1D,OAAO,CAAC,GAAG,CAAC,iBAAiB,GAAG,EAAE,CAAC,CAAC;YACpC,oCAAoC;YACpC,cAAc,EAAE,CAAA;QACjB,CAAC,CAAC,CAAC;QACH,UAAU,CAAC,GAAE,EAAE;YACd,OAAO,CAAC,IAAI,CAAC,CAAA;QACd,CAAC,EAAC,GAAG,CAAC,CAAA;IACP,CAAC,CAAA,CAAC,CAAA;AACH,CAAC;AAkBA,8CAAiB;AAhBlB,IAAI,CAAC,GAAG,CAAC,CAAA;AACT,SAAe,cAAc;;QAC5B,CAAC,EAAE,CAAA;QACH,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,EAAE,CAAC,CAAA;QACrD,IAAI;YACH,MAAM,WAAW,CAAC,oBAAoB,EAAE,CAAA;YACxC,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,EAAE,CAAC;YAC1D,OAAO,CAAC,GAAG,CAAC,yBAAyB,GAAG,EAAE,CAAC,CAAA;SAC3C;QAAC,OAAM,CAAC,EAAE;YACV,UAAU,CAAC,GAAO,EAAE;gBACnB,MAAM,cAAc,EAAE,CAAA;YACvB,CAAC,CAAA,EAAC,IAAI,CAAC,CAAA;SACP;IACF,CAAC;CAAA"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/grpc/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,0CAAyC;AACzC,gCAAsD;AACtD,2CAA0C;AAC1C,+CAA8C;AAC9C,kDAAuF;AACvF,8CAA6C;AAC7C,iCAAgC;AAChC,6BAA4B;AAE5B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CA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,WAAW,CAAC,oBAAoB,EAAE,CAAA;YACxC,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,EAAE,CAAC;YAC1D,OAAO,CAAC,GAAG,CAAC,yBAAyB,GAAG,EAAE,CAAC,CAAA;SAC3C;QAAC,OAAM,CAAC,EAAE;YACV,UAAU,CAAC,GAAO,EAAE;gBACnB,MAAM,cAAc,EAAE,CAAA;YACvB,CAAC,CAAA,EAAC,IAAI,CAAC,CAAA;SACP;IACF,CAAC;CAAA"} \ No newline at end of file diff --git a/dist/api/hub.js b/dist/api/hub.js index ec735d7..dacf9cb 100644 --- a/dist/api/hub.js +++ b/dist/api/hub.js @@ -17,9 +17,10 @@ const jsonUtils = require("./utils/json"); const helpers = require("./helpers"); const nodeinfo_1 = require("./utils/nodeinfo"); const lightning_1 = require("./utils/lightning"); -const constants = require(__dirname + '/../config/constants.json'); +const path = require("path"); +const constants = require(path.join(__dirname, '../config/constants.json')); const env = process.env.NODE_ENV || 'development'; -const config = require('../config/app.json')[env]; +const config = require(path.join(__dirname, '../config/app.json'))[env]; const checkInviteHub = (params = {}) => __awaiter(void 0, void 0, void 0, function* () { if (env != "production") { return; diff --git a/dist/api/hub.js.map b/dist/api/hub.js.map index 3ac3630..997734c 100644 --- a/dist/api/hub.js.map +++ b/dist/api/hub.js.map @@ -1 +1 @@ -{"version":3,"file":"hub.js","sourceRoot":"","sources":["../../api/hub.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA+B;AAC/B,oCAAmC;AACnC,yCAA8B;AAC9B,yCAAwC;AACxC,0CAAyC;AACzC,qCAAoC;AACpC,+CAAyC;AACzC,iDAAiD;AAEjD,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,2BAA2B,CAAC,CAAC;AACnE,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,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AC,OAAO,EAAE;QAChB,OAAO,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAA;QAC3D,OAAM;KACP;IAED,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAC,CAAC,CAAA;IAEvE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;QACnB,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAA;QACpE,OAAM;KACP;IAED,MAAM,cAAc,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAA;IAE9G,MAAM,MAAM,GAAG;QACb,SAAS,EAAE,KAAK,CAAC,QAAQ;QACzB,YAAY,EAAE;YACZ,OAAO,EAAE,IAAI,CAAC,EAAE;YAChB,OAAO;YACP,KAAK,EAAE,cAAc,CAAC,MAAM;SAC7B;KACF,CAAA;IAED,KAAK,CAAC,6CAA6C,EAAE;QACnD,MAAM,EAAE,MAAM;QACd,IAAI,EAAK,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QAC/B,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;KAChD,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;SACvB,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC,CAAA;AACxD,CAAC,CAAA,CAAA;AAMC,4CAAgB"} \ No newline at end of file diff --git a/dist/api/models/index.js b/dist/api/models/index.js index 8e1b97c..a4cadb7 100644 --- a/dist/api/models/index.js +++ b/dist/api/models/index.js @@ -1,9 +1,16 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const sequelize_typescript_1 = require("sequelize-typescript"); +const path = require("path"); +const chat_1 = require("./ts/chat"); +const contact_1 = require("./ts/contact"); +const invite_1 = require("./ts/invite"); +const message_1 = require("./ts/message"); +const subscription_1 = require("./ts/subscription"); +const mediaKey_1 = require("./ts/mediaKey"); const env = process.env.NODE_ENV || 'development'; -const config = require(__dirname + '/../../config/config.json')[env]; -const sequelize = new sequelize_typescript_1.Sequelize(Object.assign(Object.assign({}, config), { logging: process.env.SQL_LOG === 'true' ? console.log : false, models: [__dirname + '/ts'] })); +const config = require(path.join(__dirname, '../../config/config.json'))[env]; +const sequelize = new sequelize_typescript_1.Sequelize(Object.assign(Object.assign({}, config), { logging: process.env.SQL_LOG === 'true' ? console.log : false, models: [chat_1.default, contact_1.default, invite_1.default, message_1.default, subscription_1.default, mediaKey_1.default] })); exports.sequelize = sequelize; const models = sequelize.models; exports.models = models; diff --git a/dist/api/models/index.js.map b/dist/api/models/index.js.map index be95817..8079952 100644 --- a/dist/api/models/index.js.map +++ b/dist/api/models/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/models/index.ts"],"names":[],"mappings":";;AAAA,+DAA+C;AAE/C,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,2BAA2B,CAAC,CAAC,GAAG,CAAC,CAAC;AAErE,MAAM,SAAS,GAAG,IAAI,gCAAS,iCAC1B,MAAM,KACT,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,KAAG,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAC3D,MAAM,EAAE,CAAC,SAAS,GAAG,KAAK,CAAC,IAC3B,CAAA;AAIA,8BAAS;AAHX,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAA;AAI7B,wBAAM"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/models/index.ts"],"names":[],"mappings":";;AAAA,+DAA+C;AAC/C,6BAA4B;AAC5B,oCAA4B;AAC5B,0CAAkC;AAClC,wCAAgC;AAChC,0CAAkC;AAClC,oDAA4C;AAC5C,4CAAoC;AAEpC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,0BAA0B,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AAE5E,MAAM,SAAS,GAAG,IAAI,gCAAS,iCAC1B,MAAM,KACT,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,KAAG,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAC3D,MAAM,EAAE,CAAC,cAAI,EAAC,iBAAO,EAAC,gBAAM,EAAC,iBAAO,EAAC,sBAAY,EAAC,kBAAQ,CAAC,IAC3D,CAAA;AAIA,8BAAS;AAHX,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAA;AAI7B,wBAAM"} \ No newline at end of file diff --git a/dist/api/utils/ldat.js b/dist/api/utils/ldat.js index 9ca902f..45f2068 100644 --- a/dist/api/utils/ldat.js +++ b/dist/api/utils/ldat.js @@ -11,8 +11,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", { value: true }); const zbase32 = require("./zbase32"); const lightning_1 = require("./lightning"); +const path = require("path"); const env = process.env.NODE_ENV || 'development'; -const config = require(__dirname + '/../../config/app.json')[env]; +const config = require(path.join(__dirname, '../../config/app.json'))[env]; /* Lightning Data Access Token Base64 strings separated by dots: diff --git a/dist/api/utils/ldat.js.map b/dist/api/utils/ldat.js.map index d65535a..25ebbfc 100644 --- a/dist/api/utils/ldat.js.map +++ b/dist/api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B"} \ No newline at end of file diff --git a/dist/api/utils/lightning.js b/dist/api/utils/lightning.js index ad98890..d30e7cb 100644 --- a/dist/api/utils/lightning.js +++ b/dist/api/utils/lightning.js @@ -15,9 +15,10 @@ const grpc = require("grpc"); const helpers_1 = require("../helpers"); const sha = require("js-sha256"); const crypto = require("crypto"); +const path = require("path"); // var protoLoader = require('@grpc/proto-loader') const env = process.env.NODE_ENV || 'development'; -const config = require(__dirname + '/../../config/app.json')[env]; +const config = require(path.join(__dirname, '../../config/app.json'))[env]; const LND_KEYSEND_KEY = 5482373484; exports.LND_KEYSEND_KEY = LND_KEYSEND_KEY; const SPHINX_CUSTOM_RECORD_KEY = 133773310; diff --git a/dist/api/utils/lightning.js.map b/dist/api/utils/lightning.js.map index 123dd7a..66101b5 100644 --- a/dist/api/utils/lightning.js.map +++ b/dist/api/utils/lightning.js.map @@ -1 +1 @@ -{"version":3,"file":"lightning.js","sourceRoot":"","sources":["../../../api/utils/lightning.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,yCAAwC;AACxC,yBAAwB;AACxB,6BAA4B;AAC5B,wCAAmC;AACnC,iCAAgC;AAChC,iCAAgC;AAChC,kDAAkD;AAClD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,wBAAwB,CAAC,CAAC,GAAG,CAAC,CAAC;AAElE,MAAM,eAAe,GAAG,UAAU,CAAA;AA6XhC,0CAAe;AA5XjB,MAAM,wBAAwB,GAAG,SAAS,CAAA;AA6XxC,4DAAwB;AA3X1B,IAAI,eAAe,GAAS,IAAI,CAAC;AACjC,IAAI,cAAc,GAAU,IAAI,CAAC;AAEjC,MAAM,eAAe,GAAG,GAAG,EAAE;IAC3B,IAAI,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACnD,IAAI,QAAQ,GAAG,IAAI,CAAC,WAA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AAkCC,sCAAa;AAhCf,SAAe,eAAe;;QAC7B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAC,MAAM,EAAC,EAAE;YACpC,MAAM,SAAS,GAAG,aAAa,EAAE,CAAA;YACjC,SAAS,CAAC,OAAO,CAAC,EAAE,EAAE,UAAS,GAAG,EAAE,QAAQ;gBAC3C,IAAI,GAAG,IAAI,IAAI,EAAE;oBAChB,OAAO,CAAC,QAAQ,CAAC,CAAA;iBACjB;qBAAM;oBACN,MAAM,CAAC,GAAG,CAAC,CAAA;iBACX;YACF,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAA;IACH,CAAC;CAAA;AA6BC,0CAAe;AA3BjB,SAAS,aAAa,CAAC,GAAG;IACzB,IAAI,IAAI,GAAc,EAAE,CAAC;IACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAG,EAAE;QAC5C,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACd;IACF,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC"} \ No newline at end of file diff --git a/dist/api/utils/setup.js b/dist/api/utils/setup.js index fd36814..f18e23c 100644 --- a/dist/api/utils/setup.js +++ b/dist/api/utils/setup.js @@ -131,8 +131,7 @@ function printQR() { return; } let theIP = public_ip; - if (!theIP.includes(":")) - theIP = public_ip + ':3001'; + // if(!theIP.includes(":")) theIP = public_ip+':3001' const b64 = Buffer.from(`ip::${theIP}::${password_1.default || ''}`).toString('base64'); console.log('Scan this QR in Sphinx app:'); console.log(b64); diff --git a/dist/api/utils/setup.js.map b/dist/api/utils/setup.js.map index 0c490f6..95acbf3 100644 --- a/dist/api/utils/setup.js.map +++ b/dist/api/utils/setup.js.map @@ -1 +1 @@ -{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../api/utils/setup.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2CAA2C;AAC3C,sCAA2C;AAC3C,iDAAoC;AACpC,iCAAgC;AAChC,sCAAqC;AACrC,gDAAwC;AACxC,8CAA0D;AAE1D,MAAM,YAAY,GAAG,CAAC,CAAA;AAEtB,MAAM,aAAa,GAAG,GAAS,EAAE;IAC/B,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAA;IACxC,MAAM,UAAU,EAAE,CAAA;IAClB,IAAI;QACF,MAAM,kBAAS,CAAC,IAAI,EAAE,CAAA;QACtB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAA;KACpC;IAAC,OAAM,CAAC,EAAE;QACT,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAC,CAAC,CAAC,CAAA;KAChC;IACD,MAAM,OAAO,EAAE,CAAA;IACf,iBAAiB,EAAE,CAAA;IACnB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;AACnC,CAAC,CAAA,CAAA;AAgEQ,sCAAa;AA9DtB,SAAe,UAAU;;QACvB,IAAI;YACF,MAAM,kBAAS,CAAC,KAAK,CAAC,yBAAyB,YAAY,EAAE,CAAC,CAAA;SAC/D;QAAC,OAAM,CAAC,EAAE;YACT,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAC,CAAC,CAAC,CAAA;SACtC;IACH,CAAC;CAAA;AAED,SAAe,OAAO;;QACpB,IAAI;YACF,MAAM,kBAAS,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAA;SACrE;QAAC,OAAM,CAAC,EAAE;YACT,oCAAoC;SACrC;IACH,CAAC;CAAA;AAED,MAAM,iBAAiB,GAAG,GAAS,EAAE;IACnC,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAA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aAAM;YACL,SAAS,GAAG,EAAE,CAAA;SACf;QACD,IAAG,CAAC,SAAS,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;YACvC,OAAM;SACP;QACD,IAAI,KAAK,GAAG,SAAS,CAAA;QACrB,qDAAqD;QAErD,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,KAAK,kBAAQ,IAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;QAC3E,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAA;QAC1C,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAChB,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAC,EAAC,IAAI,EAAC,UAAU,EAAC,EAAE,UAAU,GAAG,EAAE,GAAG;YACvD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAClB,CAAC,CAAC,CAAA;IACJ,CAAC;CAAA"} \ No newline at end of file diff --git a/dist/api/utils/socket.js b/dist/api/utils/socket.js index 827aff8..41b041f 100644 --- a/dist/api/utils/socket.js +++ b/dist/api/utils/socket.js @@ -1,22 +1,26 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const WebSocket = require("ws"); -let connections = new Map(); -let connectionCounter = 0; +// let connections = new Map() +// let connectionCounter = 0 +let lastConn; const connect = (server) => { server = new WebSocket.Server({ server }); console.log('=> [socket] connected to server'); server.on('connection', socket => { console.log('=> [socket] connection received'); - var id = connectionCounter++; - connections.set(id, socket); + // var id = connectionCounter++; + // connections.set(id, socket) + lastConn = socket; }); }; exports.connect = connect; const send = (body) => { - connections.forEach((socket, index) => { - socket.send(body); - }); + // connections.forEach((socket, index) => { + // socket.send(body) + // }) + if (lastConn) + lastConn.send(body); }; exports.send = send; const sendJson = (object) => { diff --git a/dist/api/utils/socket.js.map b/dist/api/utils/socket.js.map index a7b476f..e559fd2 100644 --- a/dist/api/utils/socket.js.map +++ b/dist/api/utils/socket.js.map @@ -1 +1 @@ -{"version":3,"file":"socket.js","sourceRoot":"","sources":["../../../api/utils/socket.ts"],"names":[],"mappings":";;AAAA,gCAA+B;AAE/B,IAAI,WAAW,GAAG,IAAI,GAAG,EAAE,CAAA;AAC3B,IAAI,iBAAiB,GAAG,CAAC,CAAA;AAEzB,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,EAAE;IACzB,MAAM,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;IAEzC,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAA;IAE9C,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE;QAC/B,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAA;QAC9C,IAAI,EAAE,GAAG,iBAAiB,EAAE,CAAC;QAC7B,WAAW,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;IAC7B,CAAC,CAAC,CAAA;AAEJ,CAAC,CAAA;AAaC,0BAAO;AAXT,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,EAAE;IACpB,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QACpC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACnB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAQC,oBAAI;AANN,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,EAAE;IAC1B,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAA;AAC9B,CAAC,CAAA;AAKC,4BAAQ"} \ No newline at end of file +{"version":3,"file":"socket.js","sourceRoot":"","sources":["../../../api/utils/socket.ts"],"names":[],"mappings":";;AAAA,gCAA+B;AAE/B,8BAA8B;AAC9B,4BAA4B;AAE5B,IAAI,QAAa,CAAA;AAEjB,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,EAAE;IACzB,MAAM,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;IAEzC,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAA;IAE9C,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE;QAC/B,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAA;QAC9C,gCAAgC;QAChC,8BAA8B;QAC9B,QAAQ,GAAG,MAAM,CAAA;IACnB,CAAC,CAAC,CAAA;AAEJ,CAAC,CAAA;AAcC,0BAAO;AAZT,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,EAAE;IACpB,2CAA2C;IAC3C,sBAAsB;IACtB,KAAK;IACL,IAAG,QAAQ;QAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAClC,CAAC,CAAA;AAQC,oBAAI;AANN,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,EAAE;IAC1B,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAA;AAC9B,CAAC,CAAA;AAKC,4BAAQ"} \ No newline at end of file diff --git a/dist/app.js b/dist/app.js index 48e22dc..e52b881 100644 --- a/dist/app.js +++ b/dist/app.js @@ -14,6 +14,7 @@ const bodyParser = require("body-parser"); const helmet = require("helmet"); const cookieParser = require("cookie-parser"); const crypto = require("crypto"); +const path = require("path"); const models_1 = require("./api/models"); const logger_1 = require("./api/utils/logger"); const hub_1 = require("./api/hub"); @@ -23,7 +24,7 @@ const socket = require("./api/utils/socket"); let server = null; const port = process.env.PORT || 3001; const env = process.env.NODE_ENV || 'development'; -const config = require(__dirname + '/config/app.json')[env]; +const config = require(path.join(__dirname, 'config/app.json'))[env]; process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA'; var i = 0; // START SETUP! diff --git a/dist/app.js.map b/dist/app.js.map index 8190527..57cce78 100644 --- a/dist/app.js.map +++ b/dist/app.js.map @@ -1 +1 @@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,IAAI,KAAK,IAAI,IAAI,EAAE;YAClB,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,yBAAyB,EAAE,EAAC,cAAc,EAAG,YAAY,EAAC,CAAC,CAAC;YAC5E,GAAG,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;SAClC;aAAM;YACN,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAC,CAAC,CAAA;YACtE,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC/E,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,IAAI,WAAW,EAAE;gBAC5D,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,yBAAyB,EAAE,EAAC,cAAc,EAAG,YAAY,EAAC,CAAC,CAAC;gBAC/E,GAAG,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;aAC/B;iBAAM;gBACN,IAAI,EAAE,CAAC;aACP;SACD;IACF,CAAC;CAAA;AAED,kBAAe,MAAM,CAAA"} \ No newline at end of file diff --git a/dist/public/uploads/.gitkeep b/dist/public/uploads/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/install_guide_myNode.md b/install_guide_myNode.md new file mode 100644 index 0000000..3b72e69 --- /dev/null +++ b/install_guide_myNode.md @@ -0,0 +1,112 @@ +# Guide: install Sphinx-relay on myNode. + +This guide is focused on installing Sphinx-relay on top of myNode. Information about myNode can be found at: https://mynodebtc.com/. + +### Preparations + +* Be able to connect with your node through SSH. +* Make sure you are running LND version `0.9.0` or higher. This can be seen at http://mynode.local/lnd at the right top. Or by inserting the following console command: + +```sh +$ lncli getinfo +> "version": "0.9.0-beta commit=v0.9.0-beta" +``` +* Open port `3001/TCP` on your router. How to do this is not included in this guide. https://www.yougetsignal.com/tools/open-ports/ is one of the many websites that can be used to check if a port is opened on your network. +--- +## Let's Start + +### Open port 3001 on myNode + +Open up a console window with SSH. And log in as root +```sh +$ sudo su +``` +Open up port 3001 on your machine and make sure it has been added to the list. +```sh +$ ufw allow 3001 comment 'allow Sphinx-Chat' +$ ufw status + +> Status: active +> +> To Action From +> -- ------ ---- +> 3001 (v6) ALLOW Anywhere (v6) # Sphinx-Chat +``` + +### Download + +login as user bitcoin. +```sh +$ sudo su bitcoin +$ cd +``` +Clone the repository from Github and install the package. +```sh +$ git clone https://github.com/stakwork/sphinx-relay +$ cd sphinx-relay +$ npm install +``` +### Dependencies +sqlite3: `$ apt-get install sqlite3` + +### Configure +Edit the "production" section of config/app.json. +```sh +$ cd +$ cd sphinx-relay/config/ +$ nano app.json +``` +Change the following 4 lines to: +``` +"macaroon_location": "/home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon", +"tls_location": "/mnt/hdd/mynode/lnd/tls.cert", +"lnd_log_location": "/home/bitcoin/.lnd/logs/bitcoin/mainnet/lnd.log", +"lncli_location": "/home/bitcoin/go/bin", +``` +Save and exit: +`Ctrl + X` + +`Y` + +`Enter` + +Edit the "production" section of config/config.json +```sh +$ nano config.json +``` +Change to following line to: +``` +"storage": "/home/bitcoin/sphinx.db" +``` +Save and exit: +`Ctrl + X` + +`Y` + +`Enter` + +To connect to your app: +(replace x.x.x.x with your IP) +```sh +$ cd +$ cd sphinx-relay/config/ +$ export NODE_IP=x.x.x.x:3001 +``` +For extra security: +```sh +$ export USE_PASSWORD=true +``` +### Activate keysend +We need LND to run with keysend activated. First we check if it is already activated on your node. To do that. Go to http://mynode.local/lnd/config and check if the line `accept-keysend=1` is included somewhere in the text. + +If `accept-keysend=1` is already included you can continue without changing anything. If `accept-keysend=1` is not included, add it to a new line and click the `Save` button. This will restart your device. (Restarting could take up to several minutes but also hours, so be patient.) + +### Run +Now it's time to run the software. + +```sh +$ cd +$ cd sphinx-relay/config/ +$ npm run prod +``` +When Relay starts up, it will print a QR in the terminal. You can scan this in your app (Android or iOS) to connect! diff --git a/package-lock.json b/package-lock.json index 4a230bc..7e38b94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6943,9 +6943,9 @@ } }, "needle": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.3.tgz", - "integrity": "sha512-EkY0GeSq87rWp1hoq/sH/wnTWgFVhYlnIkbJ0YJFfRgEFlz2RraCjBpFQ+vrEgEdp0ThfyHADmkChEhcb7PKyw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.1.tgz", + "integrity": "sha512-x/gi6ijr4B7fwl6WYL9FwlCvRQKGlUNvnceho8wxkwXqN8jvVmmmATTmZPRRG7b/yC1eode26C2HO9jl78Du9g==", "requires": { "debug": "^3.2.6", "iconv-lite": "^0.4.4", @@ -8365,11 +8365,6 @@ } } }, - "qrcode-terminal": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz", - "integrity": "sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==" - }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", @@ -9815,13 +9810,12 @@ "dev": true }, "sqlite3": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-4.1.1.tgz", - "integrity": "sha512-CvT5XY+MWnn0HkbwVKJAyWEMfzpAPwnTiB3TobA5Mri44SrTovmmh499NPQP+gatkeOipqPlBLel7rn4E/PCQg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-4.2.0.tgz", + "integrity": "sha512-roEOz41hxui2Q7uYnWsjMOTry6TcNUNmp8audCx18gF10P2NknwdpF+E+HKvz/F2NvPKGGBF4NGc+ZPQ+AABwg==", "requires": { "nan": "^2.12.1", - "node-pre-gyp": "^0.11.0", - "request": "^2.87.0" + "node-pre-gyp": "^0.11.0" } }, "sshpk": { diff --git a/package.json b/package.json index 6aaf6d1..1e3a257 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "prod": "cp config/app.json dist/config/app.json && cp config/config.json dist/config/config.json && env NODE_ENV=production node dist/app.js", "tsc": "rm -rf dist/ && tsc && cp -r public dist/public", "dev": "rm -rf dist/ && tsc && cp -r public dist/public && node --inspect ./dist/app.js", + "build-binaries": "rm -rf dist/ && tsc && cp config/app.json dist/config/app.json && cp config/config.json dist/config/config.json && pkg . --target node12-alpine-x64,node12-macos-x64 --out-path binaries", "start-ecs": "export NODE_ALIAS=$HOSTNAME && export NODE_IP=$(curl $ECS_CONTAINER_METADATA_URI | echo $(jq -r .DockerName).$NODE_DOMAIN) && export NODE_ENV=production && node dist/app.js" }, "keywords": [], @@ -65,7 +66,7 @@ "sequelize": "^5.19.3", "sequelize-cli": "^5.5.1", "sequelize-typescript": "^1.1.0", - "sqlite3": "^4.1.1", + "sqlite3": "^4.2.0", "tail": "^2.0.3", "ts-node": "^8.5.4", "tsc": "^1.20150623.0", @@ -87,5 +88,12 @@ "webpack": "^4.41.0", "webpack-cli": "^3.3.9", "webpack-dev-server": "^3.8.2" - } + }, + "pkg": { + "assets": [ + "config/*", + "dist/config/*" + ] + }, + "bin": "dist/app.js" }