From 94584ff57ba86cbb2a6affad29a1efe62dfede99 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 24 Jan 2023 13:11:13 -0800 Subject: readme update --- README.md | 38 +++++--------------------------------- sampleconfig/bitcoin/bitcoin.conf | 21 --------------------- sampleconfig/index.js | 16 ---------------- sampleconfig/lightning/config | 8 -------- sampledata/bitcoin/bitcoin.conf | 21 +++++++++++++++++++++ sampledata/index.js | 16 ++++++++++++++++ sampledata/lightning/config | 8 ++++++++ 7 files changed, 50 insertions(+), 78 deletions(-) delete mode 100644 sampleconfig/bitcoin/bitcoin.conf delete mode 100644 sampleconfig/index.js delete mode 100644 sampleconfig/lightning/config create mode 100644 sampledata/bitcoin/bitcoin.conf create mode 100644 sampledata/index.js create mode 100644 sampledata/lightning/config diff --git a/README.md b/README.md index 699bd928..ae2b09ec 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # coinos-server -Coinos is a bitcoin wallet app that supports payments over the bitcoin, liquid and lightning networks. Try it out at coinos.io. +Coinos is a bitcoin wallet app that supports payments over the bitcoin and lightning networks. Try it out at coinos.io. -This repository contains the code for the backend API server which is implemented as a NodeJS application. The code for the frontend UI is tracked separately here. +This repository contains the code for the API server. The frontend code is at https://github.com/coinos/coinos-ui-v2 ## Install @@ -11,39 +11,11 @@ The follow commands will set up bitcoin, liquid and lightning nodes in regtest m ```bash git clone https://github.com/coinos/coinos-server cd coinos-server -cp -r sampleconfig config cp -r sampledata data -mkdir uploads -sudo chown $(id -u):$(id -g) config/liquid -sudo chown $(id -u):$(id -g) config/bitcoin -cp .env.sample .env -cp fx.sample fx -docker network create net --gateway 172.18.0.1 --subnet 172.18.0.0/16 docker run -it -v $(pwd):/app --entrypoint pnpm asoltys/coinos-server i docker-compose up -d -docker exec -i maria mysql -u root -ppassword < db/schema.sql -docker exec -it bitcoin bitcoin-cli createwallet coinos -docker exec -it bitcoin bitcoin-cli rescanblockchain -docker exec -it bitcoin bitcoin-cli generatetoaddress 500 $(docker exec -it bitcoin bitcoin-cli getnewaddress "" "p2sh-segwit") -docker exec -it liquid elements-cli createwallet coinos -docker exec -it liquid elements-cli rescanblockchain -docker exec -it liquid elements-cli sendtoaddress AzpsKhC6xE9FEK4aWAzMnbvueMLiSa5ym1xpuYogFkHzWgMHSt8B79aNNbFppQzCSQ2yZ9E4nL6RQJU7 1000000 -docker exec -it liquid elements-cli generatetoaddress 1 AzpsKhC6xE9FEK4aWAzMnbvueMLiSa5ym1xpuYogFkHzWgMHSt8B79aNNbFppQzCSQ2yZ9E4nL6RQJU7 -curl localhost:3119/register -H "content-type: application/json" -d '{"user": { "username": "coinosfees", "password": "password"}}' +docker exec -it bc bitcoin-cli createwallet coinos +docker exec -it bc bitcoin-cli rescanblockchain +docker exec -it bc bitcoin-cli generatetoaddress 500 $(docker exec -it bitcoin bitcoin-cli getnewaddress "" "p2sh-segwit") ``` -After successful creation of all docker containers coinos ui will be available at http://localhost:8085 and coinos server will be available at http://localhost:3119 - -### License - -This code is [licensed]. Coinos is free for personal use. Anyone can fork as long as it stays AGPLv3. - -To purchase a commercial license or to inquire about customized, managed instances - please reach out to us at [contact@coinos.io] - - -[Config changes]:(#config-changes) -[config/lnd/lnd.conf]:./sampleconfig/lnd/lnd.conf -[pwd file]:./sampleconfig/lnd/pwd -[licensed]:./LICENSE.md -[contact@coinos.io]:mailto:contact@coinos.io -[generate some BTC]:./doc/fund-server-bitcoin-cli.md diff --git a/sampleconfig/bitcoin/bitcoin.conf b/sampleconfig/bitcoin/bitcoin.conf deleted file mode 100644 index 5da37e5a..00000000 --- a/sampleconfig/bitcoin/bitcoin.conf +++ /dev/null @@ -1,21 +0,0 @@ -regtest=1 -testnet=0 -dnsseed=0 -upnp=0 - -[regtest] -fallbackfee=0.00002 -server=1 -txindex=1 - -rpcuser=admin1 -rpcpassword=123 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -rpcwallet=coinos - -wallet=coinos -wallet=external - -zmqpubrawblock=tcp://0.0.0.0:18506 -zmqpubrawtx=tcp://0.0.0.0:18507 diff --git a/sampleconfig/index.js b/sampleconfig/index.js deleted file mode 100644 index 8fcb0a6f..00000000 --- a/sampleconfig/index.js +++ /dev/null @@ -1,16 +0,0 @@ -export default { - port: 3119, - nostr: "ws://nostr:8080", - ipxapi: "4275|PqKjKaxIlzooToria2m4XFLzvHihSpsZMX4hvgxu", - postmark: "f64dffd2-84ea-47c7-ba9f-95e053a2d0ae", - jwt: "00d0ab4f7738a83feb37f661526512063c41e49278b7c32cba87314269a5788b", - bitcoin: { - host: "bitcoin", - wallet: "coinos", - username: "admin1", - password: "123", - network: "regtest", - port: 18443 - }, - lightning: "/app/config/lightning/regtest/lightning-rpc" -}; diff --git a/sampleconfig/lightning/config b/sampleconfig/lightning/config deleted file mode 100644 index 9ac922ba..00000000 --- a/sampleconfig/lightning/config +++ /dev/null @@ -1,8 +0,0 @@ -alias=coinos -rgb=006000 -bitcoin-rpcconnect=bitcoin -bitcoin-rpcport=18443 -bitcoin-rpcuser=admin1 -bitcoin-rpcpassword=123 -network=regtest -addr=172.18.0.31:9735 diff --git a/sampledata/bitcoin/bitcoin.conf b/sampledata/bitcoin/bitcoin.conf new file mode 100644 index 00000000..5da37e5a --- /dev/null +++ b/sampledata/bitcoin/bitcoin.conf @@ -0,0 +1,21 @@ +regtest=1 +testnet=0 +dnsseed=0 +upnp=0 + +[regtest] +fallbackfee=0.00002 +server=1 +txindex=1 + +rpcuser=admin1 +rpcpassword=123 +rpcallowip=0.0.0.0/0 +rpcbind=0.0.0.0 +rpcwallet=coinos + +wallet=coinos +wallet=external + +zmqpubrawblock=tcp://0.0.0.0:18506 +zmqpubrawtx=tcp://0.0.0.0:18507 diff --git a/sampledata/index.js b/sampledata/index.js new file mode 100644 index 00000000..8fcb0a6f --- /dev/null +++ b/sampledata/index.js @@ -0,0 +1,16 @@ +export default { + port: 3119, + nostr: "ws://nostr:8080", + ipxapi: "4275|PqKjKaxIlzooToria2m4XFLzvHihSpsZMX4hvgxu", + postmark: "f64dffd2-84ea-47c7-ba9f-95e053a2d0ae", + jwt: "00d0ab4f7738a83feb37f661526512063c41e49278b7c32cba87314269a5788b", + bitcoin: { + host: "bitcoin", + wallet: "coinos", + username: "admin1", + password: "123", + network: "regtest", + port: 18443 + }, + lightning: "/app/config/lightning/regtest/lightning-rpc" +}; diff --git a/sampledata/lightning/config b/sampledata/lightning/config new file mode 100644 index 00000000..9ac922ba --- /dev/null +++ b/sampledata/lightning/config @@ -0,0 +1,8 @@ +alias=coinos +rgb=006000 +bitcoin-rpcconnect=bitcoin +bitcoin-rpcport=18443 +bitcoin-rpcuser=admin1 +bitcoin-rpcpassword=123 +network=regtest +addr=172.18.0.31:9735 -- cgit v1.2.3