particle4dev / dicoapp-e

SPV lightweight GUI wallet with barterDEX swap capabilities
MIT License
1 stars 11 forks source link

start marketmaker application in background #10

Closed particle4dev closed 6 years ago

particle4dev commented 6 years ago

Title: Start marketmaker application in the background

Business/User Value: As user, I want to interact with blockchain

Acceptance Criteria

DEV NOTES

DESIGN Notes None

---other items that you may add to a story---

NEEDS PM None

NEEDS DESIGN None

/label ~"story"

particle4dev commented 6 years ago

This is a good tutorial: https://stackoverflow.com/questions/40688173/how-to-launch-an-external-process-synchronously-in-electron Using child_process.execFileSync

particle4dev commented 6 years ago

Where should I store the marketmaker app?

https://github.com/chentsulin/electron-react-boilerplate/wiki/Module-Structure----Two-package.json-Structure#how-to-build-native-modules

particle4dev commented 6 years ago

Creating a loading screen https://discuss.atom.io/t/help-creating-a-splash-screen-on-electron/19089

particle4dev commented 6 years ago

The client can start marketmaker application via ipc #13

particle4dev commented 6 years ago

API

import marketmaker from 'marketmaker';

marketmaker.start();

marketmaker.stop();

marketmaker.isRunning();
particle4dev commented 6 years ago

Params https://docs.komodoplatform.com/barterDEX/barterDEX-API.html#client

const startparams = {
  'gui': 'dICOapp-cm', // - to identify the CLI/GUI being used to run marketmaker.
  'client': 1, // - to start marketmaker as client mode.
  'canbind': 0,
  'userhome': `${process.env.HOME}`, // - defines the data dir for barterDEX. DB dir contains PRICES, SWAPS, UNSPENTS and instantdex_deposit (0conf) files.
  'passphrase': "default",
  'coins': coindata
};

https://github.com/particle4dev/dicoapp-e/blob/start-marketmaker-application-in-background/app/plugins/marketmaker.js#L32

https://github.com/chainmakers/dicoapp/blob/glxt/.desktop/modules/marketmaker/index.js#L238