diff --git a/.gitignore b/.gitignore index a6a2eece..6993143b 100644 --- a/.gitignore +++ b/.gitignore @@ -52,10 +52,11 @@ Thumbs.db node_modules dist ng-dist -ng-dist/vendor.js -ng-dist/styles.css -ng-dist/scripts.js -ng-dist/polyfills.js -ng-dist/main.js -ng-dist/index.html -ng-dist/3rdpartylicenses.txt +ng-dist/vendor.js +ng-dist/styles.css +ng-dist/scripts.js +ng-dist/polyfills.js +ng-dist/main.js +ng-dist/index.html +ng-dist/3rdpartylicenses.txt +autoclaim.json diff --git a/build-liberland.js b/build-liberland.js new file mode 100644 index 00000000..d6bbd998 --- /dev/null +++ b/build-liberland.js @@ -0,0 +1,16 @@ +const fs = require('fs'); +const conf = require('./package.json'); + +conf.compilerVersion = "LIBERLAND TESTNET"; +conf.name = 'liberland-wallet'; +conf.appId = "io.eosrio.liberland-wallet"; +conf.productName = 'Liberland Wallet'; +conf.description = 'Liberland Blockchain Wallet'; +conf.build.appId = 'liberland-wallet'; +conf.build.win.icon = "src/assets/liberland_256_LdC_icon.ico"; +conf.build.dmg.icon = "src/assets/icons/liberland256x256.icns"; +conf.build.mac.icon = "liberland518x518.png"; +conf.build.linux.icon = "liberland256x256.png"; + +fs.writeFileSync('./package.json', JSON.stringify(conf, null, "\t")); + diff --git a/build-simpleos.js b/build-simpleos.js new file mode 100644 index 00000000..9160d494 --- /dev/null +++ b/build-simpleos.js @@ -0,0 +1,17 @@ +const fs = require('fs'); + +const conf = require('./package.json'); + +conf.compilerVersion = "EOS MAINNET"; +conf.name = 'simpleos'; +conf.appId = "io.eosrio.simpleos"; +conf.productName = 'simpleos'; +conf.description = 'EOSIO Blockchain Interface & Wallet'; +conf.build.appId = 'simpleos'; +conf.build.win.icon = "src/favicon.ico"; +conf.build.mac.icon = "icon.png"; +conf.build.dmg.icon = "src/assets/icons/256x256.icns"; +conf.build.linux.icon = "256x256.png"; + +fs.writeFileSync('./package.json', JSON.stringify(conf, null, "\t")); + diff --git a/index.js b/index.js index 465ff843..b5ef3611 100644 --- a/index.js +++ b/index.js @@ -1,201 +1,508 @@ -const {app, BrowserWindow, Menu, protocol, ipcMain} = require('electron'); +const {app, BrowserWindow, Menu, protocol, ipcMain, Notification, Tray, shell} = require('electron'); const path = require('path'); const url = require('url'); -const {version} = require('./package.json'); +const {version, productName, name} = require('./package.json'); app.getVersion = () => version; const PROTOCOL_PREFIX = 'simpleos'; const args = process.argv.slice(1); + +const portfinder = require('portfinder'); +portfinder['basePort'] = 47888; +portfinder['highestPort'] = 47900; + +const schedule = require('node-schedule'); + +const keytar = require('keytar'); +const fs = require('fs'); + +const {Api, JsonRpc, RpcError} = require('eosjs'); +const {TextEncoder, TextDecoder} = require('util'); +const fetch = require('isomorphic-fetch'); +const {JsSignatureProvider} = require('eosjs/dist/eosjs-jssig'); +const TextEnc = new TextEncoder(); +const TextDec = new TextDecoder(); + const cors = require('cors'); const bodyParser = require('body-parser'); const express = require('express')(); const PORT = 47888; const http = require('http').Server(express); -let win, devtools, serve; +let win, devtools, serve, isAutoLaunch; +let appIcon = null; let deepLink = null; +let job = null; devtools = args.some(val => val === '--devtools'); serve = args.some(val => val === '--serve'); +isAutoLaunch = args.some(val => val === '--autostart'); const contextMenu = require('electron-context-menu'); contextMenu(); -express.use(cors()); - -express.get('/ping', (req, res) => { - res.end('OK'); -}); - -express.get('/accounts', (req, res) => { - win.webContents.send('request', 'accounts'); - ipcMain.once('accountsResponse', (event, data) => { - console.log(data); - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(data)); - }); -}); - -express.get('/getPublicKeys', (req, res) => { - win.webContents.send('request', { - message: 'publicKeys' - }); - ipcMain.once('publicKeyResponse', (event, data) => { - console.log(data); - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(data)); - }); -}); - -express.post('/sign', bodyParser.json(), (req, res) => { - win.webContents.send('request', { - message: 'sign', - content: req.body - }); - ipcMain.once('signResponse', (event, data) => { - console.log(data); - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(data)); - }); -}); - -express.get('/connect', (req, res) => { - console.log('CONNECT REQUEST'); - win.webContents.send('request', { - message: 'connect', - content: { - appName: req.query['appName'], - chainId: req.query['chainId'] - } - }); - ipcMain.once('connectResponse', (event, data) => { - console.log(data); - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(data)); - }); -}); - -express.get('/login', (req, res) => { - console.log('LOGIN REQUEST'); - win.webContents.send('request', { - message: 'login', - content: { - account: req.query.account - } - }); - ipcMain.once('loginResponse', (event, data) => { - console.log(data); - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(data)); - }); -}); - -express.get('/logout', (req, res) => { - console.log('LOGOUT REQUEST'); - win.webContents.send('request', { - message: 'logout', - content: { - account: req.query.account - } - }); - ipcMain.once('logoutResponse', (event, data) => { - console.log(data); - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(data)); - }); -}); - -express.get('/disconnect', (req, res) => { - console.log('DISCONNECT REQUEST'); - win.webContents.send('request', { - message: 'disconnect' - }); - ipcMain.once('disconnectResponse', (event, data) => { - console.log(data); - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(data)); - }); -}); +function setupExpress() { + express.use(cors()); + + express.get('/ping', (req, res) => { + res.end('OK'); + }); + + express.get('/accounts', (req, res) => { + win.webContents.send('request', 'accounts'); + ipcMain.once('accountsResponse', (event, data) => { + console.log(data); + res.setHeader('Content-Type', 'application/json'); + res.end(JSON.stringify(data)); + }); + }); + + express.get('/getPublicKeys', (req, res) => { + win.webContents.send('request', { + message: 'publicKeys' + }); + ipcMain.once('publicKeyResponse', (event, data) => { + console.log(data); + res.setHeader('Content-Type', 'application/json'); + res.end(JSON.stringify(data)); + }); + }); + + express.post('/sign', bodyParser.json(), (req, res) => { + win.webContents.send('request', { + message: 'sign', + content: req.body + }); + getFocus(); + ipcMain.once('signResponse', (event, data) => { + console.log(data); + res.setHeader('Content-Type', 'application/json'); + if (data.status !== 'CANCELLED') { + unfocus(); + } + res.end(JSON.stringify(data)); + }); + }); + + express.get('/connect', (req, res) => { + console.log('CONNECT REQUEST'); + win.webContents.send('request', { + message: 'connect', + content: { + appName: req.query['appName'], + chainId: req.query['chainId'] + } + }); + if (req.query['appName'].length < 32 && req.query['chainId'].length === 64) { + ipcMain.once('connectResponse', (event, data) => { + console.log(data); + res.setHeader('Content-Type', 'application/json'); + res.end(JSON.stringify(data)); + }); + } + }); + + express.get('/login', (req, res) => { + win.webContents.send('request', { + message: 'login', + content: { + account: req.query.account + } + }); + getFocus(); + if (req.query.account) { + if (req.query.account.length > 13) { + res.end('ERROR'); + return false; + } + } + ipcMain.once('loginResponse', (event, data) => { + console.log(data); + if (data.status !== 'CANCELLED') { + unfocus(); + } + res.setHeader('Content-Type', 'application/json'); + res.end(JSON.stringify(data)); + }); + }); + + express.get('/logout', (req, res) => { + console.log('LOGOUT REQUEST'); + win.webContents.send('request', { + message: 'logout', + content: { + account: req.query.account + } + }); + if (req.query.account) { + if (req.query.account.length > 13) { + res.end('ERROR'); + return false; + } + } + ipcMain.once('logoutResponse', (event, data) => { + console.log(data); + res.setHeader('Content-Type', 'application/json'); + res.end(JSON.stringify(data)); + }); + }); + + express.get('/disconnect', (req, res) => { + console.log('DISCONNECT REQUEST'); + win.webContents.send('request', { + message: 'disconnect' + }); + ipcMain.once('disconnectResponse', (event, data) => { + console.log(data); + res.setHeader('Content-Type', 'application/json'); + res.end(JSON.stringify(data)); + }); + }); +} + +function getFocus() { + + if (win) { + if (win.isMinimized()) { + win.restore(); + } + win.focus(); + win.show(); + } + + if (process.platform === 'darwin') { + app.dock.hide(); + win.setAlwaysOnTop(false); + win.setVisibleOnAllWorkspaces(true); + win.setFullScreenable(false); + app.dock.show(); + } +} + +function unfocus() { + switch (process.platform) { + case "win32": { + win.minimize(); + break; + } + case "linux": { + win.hide(); + break; + } + case "darwin": { + Menu.sendActionToFirstResponder('hide:'); + break; + } + } +} + +function regURI() { + app.setAsDefaultProtocolClient(PROTOCOL_PREFIX); + protocol.registerHttpProtocol(PROTOCOL_PREFIX, (req, callback) => { + if (req.url < 128) { + deepLink = req; + alert(deepLink); + setTimeout(() => { + win.webContents.send('request', { + message: 'launch', + content: deepLink.url + }); + }, 5000); + } + callback(); + }); +} async function createWindow() { - app.setAsDefaultProtocolClient(PROTOCOL_PREFIX); - protocol.registerHttpProtocol(PROTOCOL_PREFIX, (req, callback) => { - deepLink = req; - alert(deepLink); - setTimeout(() => { - win.webContents.send('request', { - message: 'launch', - content: deepLink.url - }); - }, 5000); - callback(); - }); - win = new BrowserWindow({ - title: 'simplEOS', - webPreferences: { - nodeIntegration: true, - webSecurity: !serve, - devTools: true - }, - darkTheme: true, - width: 1440, - height: 920, - minWidth: 800, - minHeight: 600, - backgroundColor: '#222222', - frame: false, - icon: path.join(__dirname, 'src/assets/icons/ico/simpleos.ico') - }); - // win.removeMenu(); - if (serve) { - require('electron-reload')(__dirname, { - electron: path.join(__dirname, 'node_modules', '.bin', 'electron'), - hardResetMethod: 'exit' - }); - await win.loadURL('http://localhost:7777'); - } else { - await win.loadURL(url.format({ - pathname: path.join(__dirname, 'ng-dist/index.html'), - protocol: 'file:', - slashes: true - })); - } - - if (devtools) { - win.webContents.openDevTools(); - } - - win.on('closed', () => { - win = null; - }); + regURI(); + let _icon = path.join(__dirname, 'src/assets/icons/ico/simpleos.ico'); + let _bgColor = '#222222'; + if (name === 'liberland-wallet') { + _icon = path.join(__dirname, 'src/assets/icons/ico/ll.ico'); + _bgColor = '#084577'; + } + win = new BrowserWindow({ + title: productName, + webPreferences: { + nodeIntegration: true, + webSecurity: !serve, + devTools: false + }, + darkTheme: true, + width: 1440, + height: 920, + minWidth: 800, + minHeight: 600, + backgroundColor: _bgColor, + frame: false, + icon: _icon + }); + win.removeMenu(); + if (serve) { + require('electron-reload')(__dirname, { + electron: path.join(__dirname, 'node_modules', '.bin', 'electron'), + hardResetMethod: 'exit' + }); + await win.loadURL('http://localhost:7777'); + } else { + await win.loadURL(url.format({ + pathname: path.join(__dirname, 'ng-dist/index.html'), + protocol: 'file:', + slashes: true + })); + } + + if (devtools) { + win.webContents.openDevTools(); + } + + win.webContents.on('did-finish-load', () => { + win.setTitle(productName); + }); + + win.on('closed', () => { + win = null; + }); +} + +function notify(title, body, autoClose) { + const notification = new Notification({ + title: title, + body: body + }); + notification.show(); + notification.on('click', () => { + if (win) { + getFocus(); + } else { + launchApp(); + createWindow(); + } + }); + if (autoClose > 0) { + setTimeout(() => { + notification.close(); + }, autoClose); + } +} + +function notifyTrx(title, body, autoClose, trx_id) { + const notification = new Notification({ + title: title, + body: body + }); + notification.show(); + + notification.on('click', () => { + shell.openExternal('https://wax.bloks.io/transaction/' + trx_id); + }); + + if (autoClose > 0) { + setTimeout(() => { + notification.close(); + }, autoClose); + } +} + +function launchApp() { + const gotTheLock = app.requestSingleInstanceLock(); + if (!gotTheLock) { + app.quit() + } else { + portfinder.getPortPromise().then((port) => { + http.listen(port, "127.0.0.1", () => { + console.log('listening on 127.0.0.1:' + port); + }); + }).catch((err) => { + alert(err); + }); + + app.on('second-instance', () => { + console.log('launching second instance...'); + if (win) { + if (win.isMinimized()) { + win.restore(); + } + win.focus(); + } + }); + + app.on('ready', () => { + console.log('creating window...'); + createWindow(); + }); + + app.on('window-all-closed', () => { + app.quit(); + }); + + app.on('activate', async () => { + if (win === null) { + await createWindow(); + } + }); + } +} + +async function claimGBM(account_name, api_url, private_key, permission) { + const rpc = new JsonRpc(api_url, {fetch}); + const signatureProvider = new JsSignatureProvider([private_key]); + const api = new Api({rpc, signatureProvider, textDecoder: TextDec, textEncoder: TextEnc}); + + // check current votes + const accountData = await rpc.get_account(account_name); + let _producers = []; + let _proxy = ''; + if (accountData['voter_info']) { + if (accountData['voter_info']['proxy'] !== '') { + // voting on proxy + _proxy = accountData['voter_info']['proxy']; + } else { + // voting on producers + _producers = accountData['voter_info']['producers']; + } + } + + const _actions = []; + + _actions.push({ + account: 'eosio', + name: 'voteproducer', + authorization: [{ + actor: account_name, + permission: permission, + }], + data: { + voter: account_name, + proxy: _proxy, + producers: _producers + }, + }); + + _actions.push({ + account: 'eosio', + name: 'claimgenesis', + authorization: [{ + actor: account_name, + permission: 'claim', + }], + data: { + claimer: account_name + }, + }); + + _actions.push({ + account: 'eosio', + name: 'claimgbmvote', + authorization: [{ + actor: account_name, + permission: 'claim', + }], + data: { + owner: account_name + }, + }); + + try { + const result = await api.transact({ + actions: _actions + }, { + blocksBehind: 3, + expireSeconds: 30, + broadcast: true + }); + console.log(result); + const logFile = 'autoclaim-trx-log_' + (Date.now()) + '.txt'; + fs.writeFileSync(logFile, JSON.stringify(result)); + notifyTrx('Auto-claim executed', 'Account: ' + account_name, 0, result.transaction_id); + } catch (e) { + console.log('\nCaught exception: ' + e); + if (e instanceof RpcError) + console.log(JSON.stringify(e.json, null, 2)); + } } -const gotTheLock = app.requestSingleInstanceLock(); +function addTrayIcon() { + const trayIcon = path.join(__dirname, 'src/assets/icons/ico/simpleos-multi.ico'); + console.log(trayIcon); + appIcon = new Tray(trayIcon); + const trayMenu = Menu.buildFromTemplate([ + { + label: 'Quit SimplEOS Agent', click: () => { + appIcon.destroy(); + app.quit(); + } + } + ]); + appIcon.setToolTip('simplEOS Agent'); + appIcon.setContextMenu(trayMenu); + console.log('Adding tray icon'); +} + +function storeConfig(autoClaimConfig) { + try { + const data = JSON.stringify(autoClaimConfig, null, '\t'); + fs.writeFileSync('autoclaim.json', data); + } catch (e) { + const logFile = 'autoclaim-error_' + (Date.now()) + '.txt'; + fs.writeFileSync(logFile, e); + shell.openItem(logFile); + console.log(e); + } +} + +// Main startup logic + +function runAutoClaim() { + const cPath = 'autoclaim.json'; + if (fs.existsSync('autoclaim.json')) { + console.log('Loading configuration file...'); + fs.readFile(cPath, (err, data) => { + if (err) throw err; + let autoclaimConf = JSON.parse(data); + (async () => { + if (autoclaimConf['WAX-GBM']) { + for (const job of autoclaimConf['WAX-GBM']['jobs']) { + if (Date.now() - job['last_claim'] > (24 * 60 * 60 * 1000)) { + console.log(`${job.account} is ready to claim!`); + try { + await claimGBM(job.account, autoclaimConf['WAX-GBM']['apis'][0], (await keytar.getPassword('simpleos', job['public_key'])), job['permission']); + job['last_claim'] = Date.now(); + // const next_claim = (Date.now() + (24 * 60 * 60 * 1000)); + const next_claim = (Date.now() + (60 * 1000)); + console.log('Scheduling next claim to: ' + next_claim); + job['next_claim_time'] = next_claim; + schedule.scheduleJob(new Date(next_claim), () => { + runAutoClaim(); + }); + } catch (e) { + const logFile = 'autoclaim-error_' + (Date.now()) + '.txt'; + fs.writeFileSync(logFile, e); + shell.openItem(logFile); + console.log(e); + } + } else { + console.log(`${job.account} claims again at ${(new Date(job['last_claim'] + (24 * 60 * 60 * 1000)))}`); + } + } + storeConfig(autoclaimConf); + } + })(); + }); + + } else { + console.log('Configuration file not present, quitting'); + app.quit(); + } +} -if (!gotTheLock) { - app.quit() +if (isAutoLaunch) { + app.on('ready', () => { + console.log('READY!'); + addTrayIcon(); + }); + runAutoClaim(); } else { - http.listen(PORT, "127.0.0.1", () => { - console.log('listening on lcoalhost:' + PORT); - }); - app.on('second-instance', () => { - if (win) { - if (win.isMinimized()) { - win.restore(); - } - win.focus(); - } - }); - - app.on('ready', createWindow); - - app.on('window-all-closed', () => { - app.quit(); - }); - - app.on('activate', async () => { - if (win === null) { - await createWindow(); - } - }); + setupExpress(); + launchApp(); } diff --git a/liberland256x256.png b/liberland256x256.png new file mode 100644 index 00000000..482172e0 Binary files /dev/null and b/liberland256x256.png differ diff --git a/liberland518x518.png b/liberland518x518.png new file mode 100644 index 00000000..955c8003 Binary files /dev/null and b/liberland518x518.png differ diff --git a/package-lock.json b/package-lock.json index 00e04f11..516bbe67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "simpleos", - "version": "0.8.1", + "version": "0.8.1-rc3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1528,6 +1528,11 @@ "integrity": "sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA==", "dev": true }, + "applescript": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/applescript/-/applescript-1.0.0.tgz", + "integrity": "sha1-u4evVoytA0pOSMS9r2Bno6JwExc=" + }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", @@ -1737,6 +1742,18 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, + "auto-launch": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/auto-launch/-/auto-launch-5.0.5.tgz", + "integrity": "sha512-ppdF4mihhYzMYLuCcx9H/c5TUOCev8uM7en53zWVQhyYAJrurd2bFZx3qQVeJKF2jrc7rsPRNN5cD+i23l6PdA==", + "requires": { + "applescript": "^1.0.0", + "mkdirp": "^0.5.1", + "path-is-absolute": "^1.0.0", + "untildify": "^3.0.2", + "winreg": "1.2.4" + } + }, "autoprefixer": { "version": "9.6.0", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.6.0.tgz", @@ -2030,6 +2047,15 @@ "resolved": "https://registry.npmjs.org/bip32-path/-/bip32-path-0.4.2.tgz", "integrity": "sha1-XbBBataCJxLwd4NuJVe4aXwMfJk=" }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, "blob": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", @@ -2403,7 +2429,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, "requires": { "buffer-alloc-unsafe": "^1.1.0", "buffer-fill": "^1.0.0" @@ -2412,14 +2437,12 @@ "buffer-alloc-unsafe": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" }, "buffer-fill": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" }, "buffer-from": { "version": "1.1.1", @@ -3385,6 +3408,15 @@ "sha.js": "^2.4.8" } }, + "cron-parser": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-2.12.0.tgz", + "integrity": "sha512-1GU6CQJ6gT9XDEGeTuzfhZgFMf82BSs3ihFA3i2wr4qGKJLhO1kOvaIF9biIo39CaPgzZ17U8FgYxRv/+UR50A==", + "requires": { + "is-nan": "^1.2.1", + "moment-timezone": "^0.5.25" + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -3520,7 +3552,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, "requires": { "mimic-response": "^1.0.0" } @@ -3555,7 +3586,6 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, "requires": { "object-keys": "^1.0.12" }, @@ -3563,8 +3593,7 @@ "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" } } }, @@ -4273,7 +4302,6 @@ "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "dev": true, "requires": { "iconv-lite": "~0.4.13" } @@ -4282,7 +4310,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, "requires": { "once": "^1.4.0" } @@ -4602,6 +4629,11 @@ } } }, + "expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" + }, "express": { "version": "4.17.1", "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", @@ -5051,6 +5083,11 @@ "readable-stream": "^2.0.0" } }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "fs-extra": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", @@ -5745,6 +5782,11 @@ "assert-plus": "^1.0.0" } }, + "github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" + }, "glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", @@ -6653,6 +6695,14 @@ "is-path-inside": "^1.0.0" } }, + "is-nan": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.2.1.tgz", + "integrity": "sha1-n69ltvttskt/XAYoR16nH5iEAeI=", + "requires": { + "define-properties": "^1.1.1" + } + }, "is-npm": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-3.0.0.tgz", @@ -6741,8 +6791,7 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, "is-symbol": { "version": "1.0.2", @@ -6814,6 +6863,26 @@ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, + "isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "requires": { + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" + }, + "dependencies": { + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + } + } + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -7068,6 +7137,22 @@ "resolved": "https://registry.npmjs.org/keypress/-/keypress-0.2.1.tgz", "integrity": "sha1-HoBFQlABjbrUw/6USX1uZ7YmnHc=" }, + "keytar": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/keytar/-/keytar-4.11.0.tgz", + "integrity": "sha512-cGn2xd4NY0yCBrU5zQ/lwIagP1UBOhUEemi6iSJU2gshN1RHkxHekSdLUji9IWNo5B1Va/iwXXWzGD2p8ziqfQ==", + "requires": { + "nan": "2.14.0", + "prebuild-install": "5.3.0" + }, + "dependencies": { + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" + } + } + }, "keyv": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", @@ -7286,6 +7371,11 @@ "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" }, + "long-timeout": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz", + "integrity": "sha1-lyHXiLR+C8taJMLivuGg2lXatRQ=" + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -7565,8 +7655,7 @@ "mimic-response": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" }, "mini-css-extract-plugin": { "version": "0.7.0", @@ -7709,6 +7798,14 @@ "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" }, + "moment-timezone": { + "version": "0.5.25", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.25.tgz", + "integrity": "sha512-DgEaTyN/z0HFaVcVbSyVCUU6HeFdnNC3vE4c9cgu2dgMTvjBUBdBzWfasTBmAW45u5OIMeCJtU8yNjM22DHucw==", + "requires": { + "moment": ">= 2.9.0" + } + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -7776,6 +7873,11 @@ "to-regex": "^3.0.1" } }, + "napi-build-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.1.tgz", + "integrity": "sha512-boQj1WFgQH3v4clhu3mTNfP+vOBxorDlE8EKiMjUlLG3C4qAESnn9AxIOkFgTR2c9LtzNjPrjS60cT27ZKBhaA==" + }, "needle": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.1.tgz", @@ -7875,6 +7977,19 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "node-abi": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.9.0.tgz", + "integrity": "sha512-jmEOvv0eanWjhX8dX1pmjb7oJl1U1oR4FOh0b2GnvALwSYoOdU7sj+kLDSAyjo4pfC9aj/IxkloxdLJQhSSQBA==", + "requires": { + "semver": "^5.4.1" + } + }, + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" + }, "node-fetch-npm": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", @@ -7957,6 +8072,21 @@ "semver": "^5.3.0" } }, + "node-schedule": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-1.3.2.tgz", + "integrity": "sha512-GIND2pHMHiReSZSvS6dpZcDH7pGPGFfWBIEud6S00Q8zEIzAs9ommdyRK1ZbQt8y1LyZsJYZgPnyi7gpU2lcdw==", + "requires": { + "cron-parser": "^2.7.3", + "long-timeout": "0.1.1", + "sorted-array-functions": "^1.0.0" + } + }, + "noop-logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", + "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=" + }, "nopt": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", @@ -8909,6 +9039,36 @@ "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", "dev": true }, + "prebuild-install": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.0.tgz", + "integrity": "sha512-aaLVANlj4HgZweKttFNUVNRxDukytuIuxeK2boIMHjagNJCiVKWFsKF4tCE3ql3GbrD2tExPQ7/pwtEJcHNZeg==", + "requires": { + "detect-libc": "^1.0.3", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "napi-build-utils": "^1.0.1", + "node-abi": "^2.7.0", + "noop-logger": "^0.1.1", + "npmlog": "^4.0.1", + "os-homedir": "^1.0.1", + "pump": "^2.0.1", + "rc": "^1.2.7", + "simple-get": "^2.7.0", + "tar-fs": "^1.13.0", + "tunnel-agent": "^0.6.0", + "which-pm-runs": "^1.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, "prepend-http": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", @@ -9193,7 +9353,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -10229,6 +10388,21 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "single-line-log": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-1.1.2.tgz", @@ -10538,6 +10712,11 @@ "sort-keys": "^1.0.0" } }, + "sorted-array-functions": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.2.0.tgz", + "integrity": "sha512-sWpjPhIZJtqO77GN+LD8dDsDKcWZ9GCOJNqKzi1tvtjGIzwfoyuRH8S0psunmc6Z5P+qfDqztSbwYR5X/e1UTg==" + }, "source-list-map": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", @@ -11045,6 +11224,42 @@ "yallist": "^3.0.3" } }, + "tar-fs": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", + "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", + "requires": { + "chownr": "^1.0.1", + "mkdirp": "^0.5.1", + "pump": "^1.0.0", + "tar-stream": "^1.1.2" + }, + "dependencies": { + "pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, "temp-file": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/temp-file/-/temp-file-3.3.3.tgz", @@ -11398,6 +11613,11 @@ "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", "dev": true }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" + }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", @@ -11619,7 +11839,6 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, "requires": { "safe-buffer": "^5.0.1" } @@ -11798,6 +12017,11 @@ } } }, + "untildify": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.3.tgz", + "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==" + }, "unused-filename": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unused-filename/-/unused-filename-1.0.0.tgz", @@ -12827,6 +13051,11 @@ "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", "dev": true }, + "whatwg-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", + "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==" + }, "when": { "version": "3.6.4", "resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz", @@ -12848,6 +13077,11 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=" + }, "wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", @@ -12898,6 +13132,11 @@ } } }, + "winreg": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.4.tgz", + "integrity": "sha1-ugZWKbepJRMOFXeRCM9UCZDpjRs=" + }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", @@ -12992,8 +13231,7 @@ "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, "y18n": { "version": "3.2.1", diff --git a/package.json b/package.json index c56aed1f..55ec8454 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "name": "simpleos", - "version": "0.8.1", + "version": "0.8.1-rc5", "productName": "simpleos", + "appId": "io.eosrio.simpleos", "compilerVersion": "EOS MAINNET", "description": "EOSIO Blockchain Interface & Wallet", "author": { @@ -17,18 +18,19 @@ "electron:start": "npm run postinstall:electron && npm-run-all -p ng:serve electron:serve", "build": "ng build", "build:prod": "ng build --prod", + "config:default": "node build-simpleos.js", + "config:liberland": "node build-liberland.js", "build:mac": "electron-builder build --mac", "build:win": "electron-builder build --win", + "build:linux": "electron-builder build --linux", "pack": "electron-builder --dir", "dist": "electron-builder", - "release": "npm run build:prod && electron-builder", - "electron:serve-tsc": "tsc -p tsconfig-serve.json", + "release:default": "node build-simpleos.js && npm run build:prod && electron-builder", + "release:liberland": "node build-liberland.js && npm run build:prod && electron-builder", "electron:serve": "wait-on http-get://localhost:7777/ && electron index.js --serve --devtools", "start:electron-dev": "electron index.js --devtools", "start:electron-prod": "electron index.js", - "publish:win": "electron-builder build --win --ia32 --x64", - "publish:linux": "electron-builder build --linux -p always", - "publish:mac": "electron-builder build --mac -p always", + "start:electron-prod-automode": "electron index.js --autostart", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", @@ -184,6 +186,7 @@ "angular7-json-schema-form": "^1.0.4", "animate.css": "^3.7.0", "asn1-ber": "^1.0.9", + "auto-launch": "^5.0.5", "bip32-path": "^0.4.2", "body-parser": "^1.19.0", "chart.js": "^2.8.0", @@ -193,10 +196,15 @@ "eosjs": "^20.0.0", "express": "^4.17.1", "fcbuffer": "^2.2.1", + "isomorphic-fetch": "^2.2.1", + "keytar": "^4.11.0", "loaderjs": "^1.0.0", "menu": "^0.2.5", + "node-fetch": "^2.6.0", "node-pre-gyp": "^0.13.0", + "node-schedule": "^1.3.2", "open": "^6.3.0", + "portfinder": "latest", "primeicons": "^1.0.0", "quill": "^1.3.6", "socket.io": "^2.2.0", @@ -204,4 +212,4 @@ "tar": "^4.4.10", "tslib": "^1.9.3" } -} +} \ No newline at end of file diff --git a/package.json.bak b/package.json.bak new file mode 100644 index 00000000..8d154060 --- /dev/null +++ b/package.json.bak @@ -0,0 +1,208 @@ +{ + "name": "simpleos", + "version": "0.8.1-rc2", + "productName": "simpleos", + "compilerVersion": "EOS MAINNET", + "description": "EOSIO Blockchain Interface & Wallet", + "author": { + "name": "EOSRio", + "email": "contact@eosrio.io" + }, + "repository": "https://github.com/eosrio/simpleos", + "license": "MIT", + "scripts": { + "ng": "ng", + "ng:serve": "ng serve --port 7777", + "start": "npm run postinstall:web && ng serve --port 7777", + "electron:start": "npm run postinstall:electron && npm-run-all -p ng:serve electron:serve", + "build": "ng build", + "build:prod": "ng build --prod", + "build:mac": "electron-builder build --mac", + "build:win": "electron-builder build --win", + "build:linux": "electron-builder build --linux", + "pack": "electron-builder --dir", + "dist": "electron-builder", + "release": "npm run build:prod && electron-builder", + "electron:serve-tsc": "tsc -p tsconfig-serve.json", + "electron:serve": "wait-on http-get://localhost:7777/ && electron index.js --serve --devtools", + "start:electron-dev": "electron index.js --devtools", + "start:electron-prod": "electron index.js", + "publish:win": "electron-builder build --win --ia32 --x64", + "publish:linux": "electron-builder build --linux -p always", + "publish:mac": "electron-builder build --mac -p always", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e", + "build-watch": "ng build --prod --watch", + "postinstall2": "node patch.js && electron-builder install-app-deps", + "postinstall": "electron-builder install-app-deps", + "postinstall:web": "node postinstall-web", + "postinstall:electron": "node postinstall" + }, + "private": true, + "main": "index.js", + "build": { + "appId": "simpleos", + "files": [ + "ng-dist", + "index.js", + "native.js", + "node_modules/opn/index.js", + "node_modules/asn1-ber/index.js", + "node_modules/fcbuffer/lib/index.js", + "node_modules/@ledgerhq/hw-transport-node-hid/lib/TransportNodeHid.js" + ], + "mac": { + "category": "public.app-category.finance", + "target": [ + "dmg", + "zip" + ], + "icon": "icon.png" + }, + "dmg": { + "icon": "src/assets/icons/256x256.icns", + "format": "UDZO" + }, + "linux": { + "target": [ + "appImage", + "deb" + ], + "icon": "256x256.png", + "category": "Network" + }, + "win": { + "target": [ + "nsis" + ], + "publish": [ + { + "provider": "github", + "owner": "eosrio", + "repo": "simpleos" + } + ], + "icon": "src/favicon.ico" + }, + "nsis": { + "oneClick": true, + "createDesktopShortcut": true + }, + "protocols": [ + { + "name": "simpleos", + "role": "Viewer", + "schemes": [ + "simpleos" + ] + } + ] + }, + "files": [ + "*.js", + "build", + "Ng-dist", + "node_modules" + ], + "devDependencies": { + "@angular-devkit/build-angular": "^0.801.0", + "@angular/cli": "^8.1.0", + "@angular/compiler": "^8.1.0", + "@angular/compiler-cli": "^8.1.0", + "@angular/language-service": "^8.1.0", + "@types/echarts": "^4.1.8", + "@types/jasmine": "~2.8.6", + "@types/jasminewd2": "~2.0.3", + "@types/node": "^12.0.2", + "@webcomponents/custom-elements": "^1.2.2", + "ajv": "^6.10.0", + "angular2-text-mask": "^9.0.0", + "angular2-toaster": "^7.0.0", + "bootstrap": "^4.3.1", + "codelyzer": "~4.5.0", + "core-js": "^2.5.4", + "echarts": "^4.2.1", + "electron": "^5.0.6", + "electron-builder": "^20.44.4", + "electron-reload": "^1.4.0", + "fuse.js": "^3.4.5", + "hammerjs": "^2.0.8", + "jquery": "^3.4.0", + "lodash-es": "^4.17.11", + "lodash.get": "^4.4.2", + "lodash.set": "^4.3.2", + "moment": "^2.24.0", + "ng-lottie": "^0.3.2", + "ngx-echarts": "^4.2.1", + "ngx-electron": "^2.1.1", + "ngx-json-viewer": "^2.4.0", + "ngx-markdown": "^8.0.2", + "ngx-order-pipe": "^2.0.2", + "ngx-pagination": "^4.0.0", + "npm-run-all": "^4.1.5", + "popper.js": "^1.14.7", + "primeng": "^8.0.0", + "protractor": "^5.4.2", + "rxjs": "^6.5.1", + "rxjs-compat": "^6.5.1", + "text-encoding-shim": "latest", + "text-mask-addons": "^3.7.2", + "ts-node": "^7.0.1", + "tslint": "^5.12.0", + "typescript": "3.4.5", + "wait-on": "^3.0.1", + "webpack": "^4.12.0", + "webpack-dev-server": "^3.3.1", + "zone.js": "^0.9.0" + }, + "dependencies": { + "@angular/animations": "^8.1.0", + "@angular/cdk": "^8.0.2", + "@angular/common": "^8.1.0", + "@angular/core": "^8.1.0", + "@angular/flex-layout": "^8.0.0-beta.26", + "@angular/forms": "^8.1.0", + "@angular/http": "^8.0.0-beta.10", + "@angular/material": "^8.0.2", + "@angular/material-moment-adapter": "^8.0.2", + "@angular/platform-browser": "^8.1.0", + "@angular/platform-browser-dynamic": "^8.1.0", + "@angular/router": "^8.1.0", + "@clr/angular": "^2.0.1", + "@clr/icons": "^2.0.1", + "@clr/ui": "^2.0.1", + "@fortawesome/angular-fontawesome": "^0.4.0", + "@fortawesome/fontawesome-svg-core": "^1.2.19", + "@fortawesome/free-brands-svg-icons": "^5.9.0", + "@fortawesome/free-regular-svg-icons": "^5.9.0", + "@fortawesome/free-solid-svg-icons": "^5.9.0", + "@fortawesome/pro-light-svg-icons": "^5.9.0", + "@fortawesome/pro-regular-svg-icons": "^5.9.0", + "@fortawesome/pro-solid-svg-icons": "^5.9.0", + "@ledgerhq/hw-transport": "latest", + "@types/crypto-js": "^3.1.43", + "angular7-json-schema-form": "^1.0.4", + "animate.css": "^3.7.0", + "asn1-ber": "^1.0.9", + "bip32-path": "^0.4.2", + "body-parser": "^1.19.0", + "chart.js": "^2.8.0", + "cors": "^2.8.5", + "crypto-js": "^3.1.9-1", + "electron-context-menu": "^0.12.1", + "eosjs": "^20.0.0", + "express": "^4.17.1", + "fcbuffer": "^2.2.1", + "loaderjs": "^1.0.0", + "menu": "^0.2.5", + "node-pre-gyp": "^0.13.0", + "open": "^6.3.0", + "primeicons": "^1.0.0", + "quill": "^1.3.6", + "socket.io": "^2.2.0", + "socket.io-client": "^2.2.0", + "tar": "^4.4.10", + "tslib": "^1.9.3" + } +} diff --git a/package2.json b/package2.json new file mode 100644 index 00000000..a64ac05a --- /dev/null +++ b/package2.json @@ -0,0 +1,208 @@ +{ + "name": "simpleos", + "version": "0.8.1-rc2", + "productName": "simpleos", + "compilerVersion": "EOS MAINNET", + "description": "EOSIO Blockchain Interface & Wallet", + "author": { + "name": "EOSRio", + "email": "contact@eosrio.io" + }, + "repository": "https://github.com/eosrio/simpleos", + "license": "MIT", + "scripts": { + "ng": "ng", + "ng:serve": "ng serve --port 7777", + "start": "npm run postinstall:web && ng serve --port 7777", + "electron:start": "npm run postinstall:electron && npm-run-all -p ng:serve electron:serve", + "build": "ng build", + "build:prod": "ng build --prod", + "build:mac": "electron-builder build --mac", + "build:win": "electron-builder build --win", + "build:linux": "electron-builder build --linux", + "pack": "electron-builder --dir", + "dist": "electron-builder", + "release": "npm run build:prod && electron-builder", + "electron:serve-tsc": "tsc -p tsconfig-serve.json", + "electron:serve": "wait-on http-get://localhost:7777/ && electron index.js --serve --devtools", + "start:electron-dev": "electron index.js --devtools", + "start:electron-prod": "electron index.js", + "publish:win": "electron-builder build --win --ia32 --x64", + "publish:linux": "electron-builder build --linux -p always", + "publish:mac": "electron-builder build --mac -p always", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e", + "build-watch": "ng build --prod --watch", + "postinstall2": "node patch.js && electron-builder install-app-deps", + "postinstall": "electron-builder install-app-deps", + "postinstall:web": "node postinstall-web", + "postinstall:electron": "node postinstall" + }, + "private": true, + "main": "index.js", + "build": { + "appId": "simpleos", + "files": [ + "ng-dist", + "index.js", + "native.js", + "node_modules/opn/index.js", + "node_modules/asn1-ber/index.js", + "node_modules/fcbuffer/lib/index.js", + "node_modules/@ledgerhq/hw-transport-node-hid/lib/TransportNodeHid.js" + ], + "mac": { + "category": "public.app-category.finance", + "target": [ + "dmg", + "zip" + ], + "icon": "icon.png" + }, + "dmg": { + "icon": "src/assets/icons/256x256.icns", + "format": "UDZO" + }, + "linux": { + "target": [ + "appImage", + "deb" + ], + "icon": "256x256.png", + "category": "Network" + }, + "win": { + "target": [ + "nsis" + ], + "publish": [ + { + "provider": "github", + "owner": "eosrio", + "repo": "simpleos" + } + ], + "icon": "src/favicon.ico" + }, + "nsis": { + "oneClick": true, + "createDesktopShortcut": true + }, + "protocols": [ + { + "name": "simpleos", + "role": "Viewer", + "schemes": [ + "simpleos" + ] + } + ] + }, + "files": [ + "*.js", + "build", + "Ng-dist", + "node_modules" + ], + "devDependencies": { + "@angular-devkit/build-angular": "^0.801.0", + "@angular/cli": "^8.1.0", + "@angular/compiler": "^8.1.0", + "@angular/compiler-cli": "^8.1.0", + "@angular/language-service": "^8.1.0", + "@types/echarts": "^4.1.8", + "@types/jasmine": "~2.8.6", + "@types/jasminewd2": "~2.0.3", + "@types/node": "^12.0.2", + "@webcomponents/custom-elements": "^1.2.2", + "ajv": "^6.10.0", + "angular2-text-mask": "^9.0.0", + "angular2-toaster": "^7.0.0", + "bootstrap": "^4.3.1", + "codelyzer": "~4.5.0", + "core-js": "^2.5.4", + "echarts": "^4.2.1", + "electron": "^5.0.6", + "electron-builder": "^20.44.4", + "electron-reload": "^1.4.0", + "fuse.js": "^3.4.5", + "hammerjs": "^2.0.8", + "jquery": "^3.4.0", + "lodash-es": "^4.17.11", + "lodash.get": "^4.4.2", + "lodash.set": "^4.3.2", + "moment": "^2.24.0", + "ng-lottie": "^0.3.2", + "ngx-echarts": "^4.2.1", + "ngx-electron": "^2.1.1", + "ngx-json-viewer": "^2.4.0", + "ngx-markdown": "^8.0.2", + "ngx-order-pipe": "^2.0.2", + "ngx-pagination": "^4.0.0", + "npm-run-all": "^4.1.5", + "popper.js": "^1.14.7", + "primeng": "^8.0.0", + "protractor": "^5.4.2", + "rxjs": "^6.5.1", + "rxjs-compat": "^6.5.1", + "text-encoding-shim": "latest", + "text-mask-addons": "^3.7.2", + "ts-node": "^7.0.1", + "tslint": "^5.12.0", + "typescript": "3.4.5", + "wait-on": "^3.0.1", + "webpack": "^4.12.0", + "webpack-dev-server": "^3.3.1", + "zone.js": "^0.9.0" + }, + "dependencies": { + "@angular/animations": "^8.1.0", + "@angular/cdk": "^8.0.2", + "@angular/common": "^8.1.0", + "@angular/core": "^8.1.0", + "@angular/flex-layout": "^8.0.0-beta.26", + "@angular/forms": "^8.1.0", + "@angular/http": "^8.0.0-beta.10", + "@angular/material": "^8.0.2", + "@angular/material-moment-adapter": "^8.0.2", + "@angular/platform-browser": "^8.1.0", + "@angular/platform-browser-dynamic": "^8.1.0", + "@angular/router": "^8.1.0", + "@clr/angular": "^2.0.1", + "@clr/icons": "^2.0.1", + "@clr/ui": "^2.0.1", + "@fortawesome/angular-fontawesome": "^0.4.0", + "@fortawesome/fontawesome-svg-core": "^1.2.19", + "@fortawesome/free-brands-svg-icons": "^5.9.0", + "@fortawesome/free-regular-svg-icons": "^5.9.0", + "@fortawesome/free-solid-svg-icons": "^5.9.0", + "@fortawesome/pro-light-svg-icons": "^5.9.0", + "@fortawesome/pro-regular-svg-icons": "^5.9.0", + "@fortawesome/pro-solid-svg-icons": "^5.9.0", + "@ledgerhq/hw-transport": "latest", + "@types/crypto-js": "^3.1.43", + "angular7-json-schema-form": "^1.0.4", + "animate.css": "^3.7.0", + "asn1-ber": "^1.0.9", + "bip32-path": "^0.4.2", + "body-parser": "^1.19.0", + "chart.js": "^2.8.0", + "cors": "^2.8.5", + "crypto-js": "^3.1.9-1", + "electron-context-menu": "^0.12.1", + "eosjs": "^20.0.0", + "express": "^4.17.1", + "fcbuffer": "^2.2.1", + "loaderjs": "^1.0.0", + "menu": "^0.2.5", + "node-pre-gyp": "^0.13.0", + "open": "^6.3.0", + "primeicons": "^1.0.0", + "quill": "^1.3.6", + "socket.io": "^2.2.0", + "socket.io-client": "^2.2.0", + "tar": "^4.4.10", + "tslib": "^1.9.3" + } +} \ No newline at end of file diff --git a/src/app/app.component.css b/src/app/app.component.css index 09749001..12ab0abf 100644 --- a/src/app/app.component.css +++ b/src/app/app.component.css @@ -55,7 +55,6 @@ background-color: transparent; border: 1px solid #565656; box-shadow: none; - color: #adadad; } .chain-section { @@ -67,7 +66,7 @@ } .chain-section:not(.selected):hover { - background-color: #2b2b2b; + background-color: var(--main-background); cursor: pointer; } @@ -223,3 +222,17 @@ /*.alert-text {*/ /*margin-left: 21px;*/ /*}*/ + +/*JSON formatter*/ +/deep/ .segment-key { + color: var(--text-white-color) !important; +} + +/deep/ .transit-json .ngx-json-viewer { + font-family: 'open sans' !important; +} + +/deep/ .transit-json .ngx-json-viewer .segment-type-string > .segment-main > .segment-value { + color: #f34d4d !important; +} +/*JSON formatter end*/ diff --git a/src/app/app.component.html b/src/app/app.component.html index 0d898d76..04ee43de 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -17,30 +17,38 @@ - SimplEOS Wallet {{version}} - LIBERLAND Wallet {{version}} + SimplEOS Wallet {{version}} + LIBERLAND Wallet {{version}} -
+
- - + +
- + - + - + - +
@@ -49,7 +57,7 @@
- +
- +
@@ -64,7 +69,8 @@ Logout Options
-
*Your data will be cleared from this PC. Should you want to login again, you will have to @@ -82,8 +88,12 @@
- - + +
@@ -95,7 +105,9 @@
- +
@@ -118,10 +130,15 @@
* Last backup on {{lastBackupTime}}
- - + +
-
@@ -329,7 +346,7 @@
- +
+
+
+
+ +
Balance: {{gbmBalance}} WAX +
+
+ Estimated rewards per day: {{(gbmEstimatedDaily + voteRewardsDaily).toFixed(2)}} + WAX + + + Tip: win more rewards by voting for at least 16 block producers or a proxy below. + + + (GBM: {{gbmEstimatedDaily}} WAX + - Voter: {{voteRewardsDaily}} WAX) +
+
Last claim: {{gbmLastClaim}} +
+
Next claim ready {{gbmNextClaim}} +
+
You can claim now +
+
+ Do you want to set a custom permission to automatically claim your rewards? + +
+
+ Auto-claim setup verified. All good. + + +
+
+ {{claimSetupWarning}} + +
+
+
+
+
+
@@ -275,7 +348,7 @@
Choose a proxy that will vote in the block producers f - {{voteService.voteType === 1 ? nVotesProxy+'/1' : nVotes+'/30'}} + {{voteService.voteType === 1 ? nVotesProxy + '/1' : nVotes + '/30'}} @@ -322,7 +395,9 @@
Choose a proxy that will vote in the block producers f