diff options
| author | Adam Soltys <[email protected]> | 2021-11-24 23:00:07 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-11-24 23:00:07 -0800 |
| commit | 453275f83b94c70248918ccf19213d5a133a51df (patch) | |
| tree | ea168c1b5006135cecf08275e7a94be39700ec4b | |
| parent | f88efde28804203905324e536c60047c8cb8d99a (diff) | |
| download | coinos-server-453275f83b94c70248918ccf19213d5a133a51df.tar.gz coinos-server-453275f83b94c70248918ccf19213d5a133a51df.zip | |
add bitcoin electrs
| -rw-r--r-- | docker-compose.dev.yml | 26 | ||||
| -rw-r--r-- | lib/buildtx.js | 2 |
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"] |
