diff --git a/apps/registry.json b/apps/registry.json index 9bc3c28..b908fc3 100644 --- a/apps/registry.json +++ b/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", diff --git a/apps/suredbits-wallet/data/log/.gitkeep b/apps/suredbits-wallet/data/log/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/apps/suredbits-wallet/data/wallet/.gitkeep b/apps/suredbits-wallet/data/wallet/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/apps/suredbits-wallet/docker-compose.yml b/apps/suredbits-wallet/docker-compose.yml new file mode 100644 index 0000000..e2c4733 --- /dev/null +++ b/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 diff --git a/scripts/app b/scripts/app index c23cd51..4da9a3a 100755 --- a/scripts/app +++ b/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}" \ diff --git a/scripts/configure b/scripts/configure index d8806a3..44b6996 100755 --- a/scripts/configure +++ b/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}/g" "${template}" sed -i "s//${APP_KOLLIDER_WS_PORT}/g" "${template}" sed -i "s//${APP_KOLLIDER_HH_IP}/g" "${template}" + sed -i "s//${APP_SUREDBITS_WALLET_IP}/g" "${template}" + sed -i "s//${APP_SUREDBITS_WALLET_PORT}/g" "${template}" + sed -i "s//${APP_SUREDBITS_WALLET_SERVER_IP}/g" "${template}" + sed -i "s//${APP_SUREDBITS_WALLET_P2P_PORT}/g" "${template}" done ########################################################## diff --git a/templates/.env-sample b/templates/.env-sample index c4d32e7..9e84e62 100644 --- a/templates/.env-sample +++ b/templates/.env-sample @@ -128,3 +128,7 @@ APP_KOLLIDER_PORT= APP_KOLLIDER_WS_IP= APP_KOLLIDER_WS_PORT= APP_KOLLIDER_HH_IP= +APP_SUREDBITS_WALLET_IP= +APP_SUREDBITS_WALLET_PORT= +APP_SUREDBITS_WALLET_SERVER_IP= +APP_SUREDBITS_WALLET_P2P_PORT= diff --git a/templates/torrc-server-sample b/templates/torrc-server-sample index 9a300bb..5465ac7 100644 --- a/templates/torrc-server-sample +++ b/templates/torrc-server-sample @@ -185,3 +185,11 @@ HiddenServicePort 80 :80 HiddenServiceDir /data/app-kollider HiddenServicePort 80 :3000 HiddenServicePort 4244 :8080 + +# suredbits-wallet Hidden Service +HiddenServiceDir /data/app-suredbits-wallet +HiddenServicePort 80 :3002 + +# suredbits-wallet p2p Hidden Service +HiddenServiceDir /data/app-suredbits-wallet-p2p +HiddenServicePort :