aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2021-11-24 23:00:07 -0800
committerAdam Soltys <[email protected]>2021-11-24 23:00:07 -0800
commit453275f83b94c70248918ccf19213d5a133a51df (patch)
treeea168c1b5006135cecf08275e7a94be39700ec4b
parentf88efde28804203905324e536c60047c8cb8d99a (diff)
downloadcoinos-server-453275f83b94c70248918ccf19213d5a133a51df.tar.gz
coinos-server-453275f83b94c70248918ccf19213d5a133a51df.zip
add bitcoin electrs
-rw-r--r--docker-compose.dev.yml26
-rw-r--r--lib/buildtx.js2
2 files changed, 27 insertions, 1 deletions
diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml
index 9a8f79a3..86b819a1 100644
--- a/docker-compose.dev.yml
+++ b/docker-compose.dev.yml
@@ -11,6 +11,32 @@ services:
NODE_ENV: development
volumes:
- ../coinos-ui:/coinos-ui
+ electrsb:
+ image: ghcr.io/vulpemventures/electrs
+ container_name: electrsb
+ entrypoint:
+ - /build/electrs
+ command:
+ - -vvvv
+ - --network
+ - regtest
+ - --daemon-dir
+ - /config
+ - --daemon-rpc-addr
+ - bitcoin:18443
+ - --cookie
+ - admin1:123
+ - --http-addr
+ - 0.0.0.0:3095
+ - --electrum-rpc-addr
+ - 0.0.0.0:60400
+ - --cors
+ - "*"
+ volumes:
+ - ./config/bitcoin/:/config
+ restart: unless-stopped
+ ports:
+ - 3095:3095
electrs-liquid:
image: asoltys/electrs-liquid:latest
container_name: electrs
diff --git a/lib/buildtx.js b/lib/buildtx.js
index 5e0fe29f..99fd6daa 100644
--- a/lib/buildtx.js
+++ b/lib/buildtx.js
@@ -2,7 +2,7 @@ const axios = require("axios");
const bitcoin = require("bitcoinjs-lib");
const coinselect = require("coinselect");
const split = require("coinselect/split");
-const api = prod ? "https://blockstream.info/api" : "http://localhost:3095";
+const api = prod ? "https://blockstream.info/api" : "http://electrsb:3095";
const SATS = 100000000;
const network = prod
? bitcoin.networks["bitcoin"]