Browse Source

Add suredbits-wallet app (#1147)

Co-authored-by: Luke Childs <lukechilds123@gmail.com>
Co-authored-by: Ivan <erickson.ivan@gmail.com>
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
apps-test
rorp 3 years ago
committed by GitHub
parent
commit
80deae32dc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      apps/registry.json
  2. 0
      apps/suredbits-wallet/data/log/.gitkeep
  3. 0
      apps/suredbits-wallet/data/wallet/.gitkeep
  4. 52
      apps/suredbits-wallet/docker-compose.yml
  5. 2
      scripts/app
  6. 9
      scripts/configure
  7. 4
      templates/.env-sample
  8. 8
      templates/torrc-server-sample

25
apps/registry.json

@ -378,6 +378,31 @@
"defaultUsername": "",
"defaultPassword": ""
},
{
"id": "suredbits-wallet",
"category": "Wallets",
"name": "Suredbits Wallet",
"version": "1.8.0-160-2066447c",
"tagline": "A universal DLC wallet",
"description": "The Suredbits Wallet is your one stop shop for building Discreet Log Contracts. With our wallet you can create prop bets like Trump vs Biden in the 2020 US Presidential election or complicated financial derivatives such as contracts for difference that can be used to hedge risk or engage in speculation.\n\nWARNING: This is an Alpha software, don't put too much money in.",
"developer": "Suredbits",
"website": "https://suredbits.com",
"dependencies": [
"bitcoind"
],
"repo": "https://github.com/bitcoin-s/bitcoin-s",
"support": "https://join.slack.com/t/suredbits/shared_invite/zt-eavycu0x-WQL7XOakzQo8tAy7jHHZUw",
"port": 3020,
"gallery": [
"1.jpg",
"2.jpg",
"3.jpg"
],
"path": "",
"defaultUsername": "",
"defaultPassword": "",
"deterministicPassword": true
},
{
"id": "sphinx-relay",
"category": "Social",

0
apps/suredbits-wallet/data/log/.gitkeep

0
apps/suredbits-wallet/data/wallet/.gitkeep

52
apps/suredbits-wallet/docker-compose.yml

@ -0,0 +1,52 @@
version: "3.7"
services:
web:
image: bitcoinscala/wallet-server-ui:0.0.1-23764b9b-SNAPSHOT@sha256:608e09a8a7b58d62ae4c18b49597e1881024bb40c32e599b3c550c5f11de883c
user: "1000:1000"
restart: on-failure
stop_grace_period: 1m
volumes:
- ${APP_DATA_DIR}/data/wallet:/home/bitcoin-s/.bitcoin-s
- ${APP_DATA_DIR}/data/log:/log
environment:
LOG_PATH: "/log/"
BACKUP_PATH: "/home/bitcoin-s/.bitcoin-s/"
MEMPOOL_API_URL: "http://umbrel.local:${APP_MEMPOOL_PORT}/api"
WALLET_SERVER_API_URL: "http://${APP_SUREDBITS_WALLET_SERVER_IP}:9999/"
WALLET_SERVER_WS: "ws://${APP_SUREDBITS_WALLET_SERVER_IP}:19999/events"
TOR_PROXY: socks5://${TOR_PROXY_IP}:${TOR_PROXY_PORT}
DEFAULT_UI_PASSWORD: $APP_PASSWORD
BITCOIN_S_SERVER_RPC_PASSWORD: $APP_PASSWORD
ports:
- "${APP_SUREDBITS_WALLET_PORT}:3002"
networks:
default:
ipv4_address: $APP_SUREDBITS_WALLET_IP
depends_on:
- walletserver
walletserver:
image: bitcoinscala/bitcoin-s-server:1.8.0-160-2066447c-SNAPSHOT@sha256:5c8e9050730407e528864937cf6365a49e3b5fc1d317615c4cb76d3825956876
user: "1000:1000"
restart: on-failure
volumes:
- ${APP_DATA_DIR}/data/wallet:/home/bitcoin-s/.bitcoin-s
environment:
BITCOIN_S_NETWORK: $BITCOIN_NETWORK
BITCOIN_S_KEYMANAGER_ENTROPY: $APP_SEED
BITCOIN_S_PROXY_ENABLED: "false"
BITCOIN_S_TOR_ENABLED: "false"
BITCOIN_S_TOR_PROVIDED: "true"
BITCOIN_S_DLCNODE_PROXY_ENABLED: "true"
BITCOIN_S_DLCNODE_PROXY_SOCKS5: "${TOR_PROXY_IP}:${TOR_PROXY_PORT}"
BITCOIN_S_DLCNODE_EXTERNAL_IP: $SUREDBITS_WALLET_P2P_HIDDEN_SERVICE
BITCOIN_S_BITCOIND_HOST: $BITCOIN_IP
BITCOIN_S_BITCOIND_PORT: $BITCOIN_RPC_PORT
BITCOIN_S_BITCOIND_USER: $BITCOIN_RPC_USER
BITCOIN_S_BITCOIND_PASSWORD: $BITCOIN_RPC_PASS
BITCOIN_S_SERVER_RPC_PASSWORD: $APP_PASSWORD
ports:
- "$APP_SUREDBITS_WALLET_P2P_PORT:$APP_SUREDBITS_WALLET_P2P_PORT"
networks:
default:
ipv4_address: $APP_SUREDBITS_WALLET_SERVER_IP

2
scripts/app

@ -124,6 +124,7 @@ compose() {
local dojo_hidden_service_file="${UMBREL_ROOT}/tor/data/app-${app}-dojo/hostname"
local whirlpool_hidden_service_file="${UMBREL_ROOT}/tor/data/app-${app}-whirlpool/hostname"
local squeaknode_p2p_hidden_service_file="${UMBREL_ROOT}/tor/data/app-${app}-p2p/hostname"
local suredbits_wallet_p2p_hidden_service_file="${UMBREL_ROOT}/tor/data/app-${app}-p2p/hostname"
export SAMOURAI_SERVER_DOJO_HIDDEN_SERVICE="$(cat "${dojo_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")"
export SAMOURAI_SERVER_WHIRLPOOL_HIDDEN_SERVICE="$(cat "${whirlpool_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")"
export SAMOURAI_SERVER_NODE_API_KEY=$(derive_entropy "env-${app_entropy_identifier}-NODE_API_KEY")
@ -131,6 +132,7 @@ compose() {
export SAMOURAI_SERVER_NODE_JWT_SECRET=$(derive_entropy "env-${app_entropy_identifier}-NODE_JWT_SECRET")
export SAMOURAI_SERVER_WHIRLPOOL_API_KEY=$(derive_entropy "env-${app_entropy_identifier}-WHIRLPOOL_API_KEY")
export SQUEAKNODE_P2P_HIDDEN_SERVICE="$(cat "${squeaknode_p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")"
export SUREDBITS_WALLET_P2P_HIDDEN_SERVICE="$(cat "${suredbits_wallet_p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")"
docker-compose \
--env-file "${env_file}" \

9
scripts/configure

@ -228,7 +228,10 @@ APP_KOLLIDER_PORT="4243"
APP_KOLLIDER_WS_IP="10.21.21.71"
APP_KOLLIDER_WS_PORT="4244"
APP_KOLLIDER_HH_IP="10.21.21.72"
APP_SUREDBITS_WALLET_IP="10.21.21.73"
APP_SUREDBITS_WALLET_PORT="3020"
APP_SUREDBITS_WALLET_SERVER_IP="10.21.21.74"
APP_SUREDBITS_WALLET_P2P_PORT="2862"
# Generate RPC credentials
if [[ -z ${BITCOIN_RPC_USER+x} ]] || [[ -z ${BITCOIN_RPC_PASS+x} ]] || [[ -z ${BITCOIN_RPC_AUTH+x} ]]; then
@ -459,6 +462,10 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" "
sed -i "s/<app-kollider-ws-ip>/${APP_KOLLIDER_WS_IP}/g" "${template}"
sed -i "s/<app-kollider-ws-port>/${APP_KOLLIDER_WS_PORT}/g" "${template}"
sed -i "s/<app-kollider-hh-ip>/${APP_KOLLIDER_HH_IP}/g" "${template}"
sed -i "s/<app-suredbits-wallet-ip>/${APP_SUREDBITS_WALLET_IP}/g" "${template}"
sed -i "s/<app-suredbits-wallet-port>/${APP_SUREDBITS_WALLET_PORT}/g" "${template}"
sed -i "s/<app-suredbits-wallet-server-ip>/${APP_SUREDBITS_WALLET_SERVER_IP}/g" "${template}"
sed -i "s/<app-suredbits-wallet-p2p-port>/${APP_SUREDBITS_WALLET_P2P_PORT}/g" "${template}"
done
##########################################################

4
templates/.env-sample

@ -128,3 +128,7 @@ APP_KOLLIDER_PORT=<app-kollider-port>
APP_KOLLIDER_WS_IP=<app-kollider-ws-ip>
APP_KOLLIDER_WS_PORT=<app-kollider-ws-port>
APP_KOLLIDER_HH_IP=<app-kollider-hh-ip>
APP_SUREDBITS_WALLET_IP=<app-suredbits-wallet-ip>
APP_SUREDBITS_WALLET_PORT=<app-suredbits-wallet-port>
APP_SUREDBITS_WALLET_SERVER_IP=<app-suredbits-wallet-server-ip>
APP_SUREDBITS_WALLET_P2P_PORT=<app-suredbits-wallet-p2p-port>

8
templates/torrc-server-sample

@ -185,3 +185,11 @@ HiddenServicePort 80 <app-bitfeed-ip>:80
HiddenServiceDir /data/app-kollider
HiddenServicePort 80 <app-kollider-ip>:3000
HiddenServicePort 4244 <app-kollider-ws-ip>:8080
# suredbits-wallet Hidden Service
HiddenServiceDir /data/app-suredbits-wallet
HiddenServicePort 80 <app-suredbits-wallet-ip>:3002
# suredbits-wallet p2p Hidden Service
HiddenServiceDir /data/app-suredbits-wallet-p2p
HiddenServicePort <app-suredbits-wallet-p2p-port> <app-suredbits-wallet-server-ip>:<app-suredbits-wallet-p2p-port>

Loading…
Cancel
Save