comit-network / app

Moved to
https://github.com/comit-network/taker-ui
MIT License
1 stars 1 forks source link

Maker Backend & Taker Frontend: Implement swaps #5

Closed yosriady closed 4 years ago

yosriady commented 4 years ago

Technical specs

The Node.js backend API is responsible for making BTC-DAI offers for the user and proceed with the swap if someone takes the offer from the desktop client.

This task implements:

I'm not yet clear of which of the functionality is already implemented by the SDK and which needs to be implemented.

Definition of Done

Phase 1 **TODOs** - [x] Evaluate browser wallet integration / walletconnect - [ ] ~~Grok `EthereumWallet` SDK interface under the hood to evaluate integration with Ledger / other wallets~~ Halting wallet integration - [ ] ~~Research injecting providers for ledger support https://github.com/MetaMask/web3-provider-engine~~ Extracted to issue - [x] Go through https://comit.network/docs/getting-started/create-comit-app/ - [ ] Set up infra for maker backend - [ ] ~~Run Bitcoin and Ethereum nodes for the service (locally)~~ Halting node setup - [ ] Go through https://github.com/comit-network/create-comit-app/tree/master/scripts to run nodes locally (separate pairs) for maker backend and for desktop app - [x] Set up https://en.bitcoin.it/wiki/Bitcoind - [x] https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md - `./src/bitcoind` / `./src/bitcoin-cli stop` - [x] Grok `InMemoryBitcoinWallet` config parameters https://github.com/bcoin-org/bcoin/blob/master/docs/README.md - [x] https://medium.com/@bitstein/setting-up-a-bitcoin-lightning-network-test-environment-ab967167594a - [x] Clarify about 'regtest` network and what it affects - [ ] Grok https://github.com/bitcoin/bitcoin/blob/master/share/examples/bitcoin.conf - rpc settings - [x] Create bitcoin.conf with the following config https://github.com/comit-network/create-comit-app/blob/master/scripts/src/docker/bitcoin.rs#L52-L62 - [ ] Set up Ganache locally for Ethereum (URI, private key, erc20 contract address) - [ ] Set up `cnd` locally - [ ] configure `.env` in its proper directory under `maker/` - [ ] ~~Evaluate hosted services for nodes e.g. https://alchemyapi.io/infrastructure~~ Extracted to issue - [ ] Config environment variables - ~~`~/.create-comit-app/env` is bad DX, is there a way to configure where the env should live? Right now, developers cannot use `comit-scripts` for anything other than running the example.~~ Not meant for actual use - [ ] ~~Once Bitcoin and Ethereum infra is set up,~~ Proceeding with local nodes from `comit-scripts`, see below spec

TODOs Phase 2

Open Questions

D4nte commented 4 years ago
  • Running a Bitcoin and Ethereum node as the maker, using the SDK (?)

Hi @yosriady, just to be sure we are on the same page. We prefer that you tell us (or you open PRs) to update the SDK so it's usable than not using the SDK 🙂

yosriady commented 4 years ago

@D4nte

Are developers supposed to use comit-scripts to manage their production nodes? Since it was part of create-comit-app and not comit-sdk, I thought it was more for running a development environment to run the examples.

For a production-ready setup, wouldn't developers need to run their own nodes? Maybe I'm missing something here. I don't see how you can run a Bitcoin and Ethereum node using the SDK. 🤔

bonomat commented 4 years ago

Really good question: comit-script should just help to spin up a developer environment and the comit-sdk does not concern the environment at all.

For a production-ready setup a developer would need to provide their own nodes.