rename all packages and other names from bisq to haveno

This commit is contained in:
woodser 2023-03-06 19:14:00 -05:00
parent ab0b9e3b77
commit 1a1fb130c0
1775 changed files with 14575 additions and 16767 deletions

View file

@ -1,6 +1,6 @@
import sys, os, json
# Writes a Bisq json F2F payment account form for the given country_code to the current working directory.
# Writes a Haveno json F2F payment account form for the given country_code to the current working directory.
if len(sys.argv) < 2:
print("usage: editf2faccountform.py country_code")

View file

@ -8,14 +8,14 @@
#
# - Linux or OSX with bash, Java 11-15 (JDK language compatibility 11), and bitcoin-core (v0.19 - v22).
#
# - Bisq must be fully built with apitest dao setup files installed.
# - Haveno must be fully built with apitest dao setup files installed.
# Build command: `./gradlew clean build :apitest:installDaoSetup`
#
# - All supporting nodes must be run locally, in dev/dao/regtest mode:
# bitcoind, seednode, arbdaemon, alicedaemon, bobdaemon
#
# These should be run using the apitest harness. From the root project dir, run:
# `$ ./bisq-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon,bobdaemon --shutdownAfterTests=false`
# `$ ./haveno-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon,bobdaemon --shutdownAfterTests=false`
#
# - Only regtest btc can be bought or sold with the test payment account.
#

View file

@ -1,13 +1,13 @@
#!/usr/bin/env bats
#
# Smoke tests for bisq-cli running against a live bisq-daemon (on mainnet)
# Smoke tests for haveno-cli running against a live haveno-daemon (on mainnet)
#
# Prerequisites:
#
# - bats-core 1.2.0+ must be installed (brew install bats-core on macOS)
# see https://github.com/bats-core/bats-core
#
# - Run `./bisq-daemon --apiPassword=xyz --appDataDir=$TESTDIR` where $TESTDIR
# - Run `./haveno-daemon --apiPassword=xyz --appDataDir=$TESTDIR` where $TESTDIR
# is empty or otherwise contains an unencrypted wallet with a 0 BTC balance
#
# Usage:
@ -17,28 +17,28 @@
# bats apitest/scripts/mainnet-test.sh
@test "test unsupported method error" {
run ./bisq-cli --password=xyz bogus
run ./haveno-cli --password=xyz bogus
[ "$status" -eq 1 ]
echo "actual output: $output" >&2 # printed only on test failure
[ "$output" = "Error: 'bogus' is not a supported method" ]
}
@test "test unrecognized option error" {
run ./bisq-cli --bogus getversion
run ./haveno-cli --bogus getversion
[ "$status" -eq 1 ]
echo "actual output: $output" >&2
[ "$output" = "Error: missing required 'password' option" ]
}
@test "test missing required password option error" {
run ./bisq-cli getversion
run ./haveno-cli getversion
[ "$status" -eq 1 ]
echo "actual output: $output" >&2
[ "$output" = "Error: missing required 'password' option" ]
}
@test "test incorrect password error" {
run ./bisq-cli --password=bogus getversion
run ./haveno-cli --password=bogus getversion
[ "$status" -eq 1 ]
echo "actual output: $output" >&2
[ "$output" = "Error: incorrect 'password' rpc header value" ]
@ -46,7 +46,7 @@
@test "test getversion call with quoted password" {
load 'version-parser'
run ./bisq-cli --password="xyz" getversion
run ./haveno-cli --password="xyz" getversion
[ "$status" -eq 0 ]
echo "actual output: $output" >&2
[ "$output" = "$CURRENT_VERSION" ]
@ -56,14 +56,14 @@
# Wait 1 second before calling getversion again.
sleep 1
load 'version-parser'
run ./bisq-cli --password=xyz getversion
run ./haveno-cli --password=xyz getversion
[ "$status" -eq 0 ]
echo "actual output: $output" >&2
[ "$output" = "$CURRENT_VERSION" ]
}
@test "test setwalletpassword \"a b c\"" {
run ./bisq-cli --password=xyz setwalletpassword --wallet-password="a b c"
run ./haveno-cli --password=xyz setwalletpassword --wallet-password="a b c"
[ "$status" -eq 0 ]
echo "actual output: $output" >&2
[ "$output" = "wallet encrypted" ]
@ -71,14 +71,14 @@
}
@test "test unlockwallet without password & timeout args" {
run ./bisq-cli --password=xyz unlockwallet
run ./haveno-cli --password=xyz unlockwallet
[ "$status" -eq 1 ]
echo "actual output: $output" >&2
[ "$output" = "Error: no password specified" ]
}
@test "test unlockwallet without timeout arg" {
run ./bisq-cli --password=xyz unlockwallet --wallet-password="a b c"
run ./haveno-cli --password=xyz unlockwallet --wallet-password="a b c"
[ "$status" -eq 1 ]
echo "actual output: $output" >&2
[ "$output" = "Error: no unlock timeout specified" ]
@ -86,34 +86,34 @@
@test "test unlockwallet \"a b c\" 8" {
run ./bisq-cli --password=xyz unlockwallet --wallet-password="a b c" --timeout=8
run ./haveno-cli --password=xyz unlockwallet --wallet-password="a b c" --timeout=8
[ "$status" -eq 0 ]
echo "actual output: $output" >&2
[ "$output" = "wallet unlocked" ]
}
@test "test getbalance while wallet unlocked for 8s" {
run ./bisq-cli --password=xyz getbalance
run ./haveno-cli --password=xyz getbalance
[ "$status" -eq 0 ]
sleep 8
}
@test "test unlockwallet \"a b c\" 6" {
run ./bisq-cli --password=xyz unlockwallet --wallet-password="a b c" --timeout=6
run ./haveno-cli --password=xyz unlockwallet --wallet-password="a b c" --timeout=6
[ "$status" -eq 0 ]
echo "actual output: $output" >&2
[ "$output" = "wallet unlocked" ]
}
@test "test lockwallet before unlockwallet timeout=6s expires" {
run ./bisq-cli --password=xyz lockwallet
run ./haveno-cli --password=xyz lockwallet
[ "$status" -eq 0 ]
echo "actual output: $output" >&2
[ "$output" = "wallet locked" ]
}
@test "test setwalletpassword incorrect old pwd error" {
run ./bisq-cli --password=xyz setwalletpassword --wallet-password="z z z" --new-wallet-password="d e f"
run ./haveno-cli --password=xyz setwalletpassword --wallet-password="z z z" --new-wallet-password="d e f"
[ "$status" -eq 1 ]
echo "actual output: $output" >&2
[ "$output" = "Error: incorrect old password" ]
@ -122,7 +122,7 @@
@test "test setwalletpassword oldpwd newpwd" {
# Wait 5 seconds before calling setwalletpassword again.
sleep 5
run ./bisq-cli --password=xyz setwalletpassword --wallet-password="a b c" --new-wallet-password="d e f"
run ./haveno-cli --password=xyz setwalletpassword --wallet-password="a b c" --new-wallet-password="d e f"
[ "$status" -eq 0 ]
echo "actual output: $output" >&2
[ "$output" = "wallet encrypted with new password" ]
@ -130,14 +130,14 @@
}
@test "test getbalance wallet locked error" {
run ./bisq-cli --password=xyz getbalance
run ./haveno-cli --password=xyz getbalance
[ "$status" -eq 1 ]
echo "actual output: $output" >&2
[ "$output" = "Error: wallet is locked" ]
}
@test "test removewalletpassword" {
run ./bisq-cli --password=xyz removewalletpassword --wallet-password="d e f"
run ./haveno-cli --password=xyz removewalletpassword --wallet-password="d e f"
[ "$status" -eq 0 ]
echo "actual output: $output" >&2
[ "$output" = "wallet decrypted" ]
@ -145,17 +145,17 @@
}
@test "test getbalance when wallet available & unlocked with 0 btc balance" {
run ./bisq-cli --password=xyz getbalance
run ./haveno-cli --password=xyz getbalance
[ "$status" -eq 0 ]
}
@test "test getfundingaddresses" {
run ./bisq-cli --password=xyz getfundingaddresses
run ./haveno-cli --password=xyz getfundingaddresses
[ "$status" -eq 0 ]
}
@test "test getaddressbalance missing address argument" {
run ./bisq-cli --password=xyz getaddressbalance
run ./haveno-cli --password=xyz getaddressbalance
[ "$status" -eq 1 ]
echo "actual output: $output" >&2
[ "$output" = "Error: no address specified" ]
@ -164,24 +164,24 @@
@test "test getaddressbalance bogus address argument" {
# Wait 1 second before calling getaddressbalance again.
sleep 1
run ./bisq-cli --password=xyz getaddressbalance --address=bogus
run ./haveno-cli --password=xyz getaddressbalance --address=bogus
[ "$status" -eq 1 ]
echo "actual output: $output" >&2
[ "$output" = "Error: address bogus not found in wallet" ]
}
@test "test getpaymentmethods" {
run ./bisq-cli --password=xyz getpaymentmethods
run ./haveno-cli --password=xyz getpaymentmethods
[ "$status" -eq 0 ]
}
@test "test getpaymentaccts" {
run ./bisq-cli --password=xyz getpaymentaccts
run ./haveno-cli --password=xyz getpaymentaccts
[ "$status" -eq 0 ]
}
@test "test getoffers missing direction argument" {
run ./bisq-cli --password=xyz getoffers
run ./haveno-cli --password=xyz getoffers
[ "$status" -eq 1 ]
echo "actual output: $output" >&2
[ "$output" = "Error: no direction (buy|sell) specified" ]
@ -190,42 +190,42 @@
@test "test getoffers sell eur check return status" {
# Wait 1 second before calling getoffers again.
sleep 1
run ./bisq-cli --password=xyz getoffers --direction=sell --currency-code=eur
run ./haveno-cli --password=xyz getoffers --direction=sell --currency-code=eur
[ "$status" -eq 0 ]
}
@test "test getoffers buy eur check return status" {
# Wait 1 second before calling getoffers again.
sleep 1
run ./bisq-cli --password=xyz getoffers --direction=buy --currency-code=eur
run ./haveno-cli --password=xyz getoffers --direction=buy --currency-code=eur
[ "$status" -eq 0 ]
}
@test "test getoffers sell gbp check return status" {
# Wait 1 second before calling getoffers again.
sleep 1
run ./bisq-cli --password=xyz getoffers --direction=sell --currency-code=gbp
run ./haveno-cli --password=xyz getoffers --direction=sell --currency-code=gbp
[ "$status" -eq 0 ]
}
@test "test help displayed on stderr if no options or arguments" {
run ./bisq-cli
run ./haveno-cli
[ "$status" -eq 1 ]
[ "${lines[0]}" = "Bisq RPC Client" ]
[ "${lines[1]}" = "Usage: bisq-cli [options] <method> [params]" ]
[ "${lines[0]}" = "Haveno RPC Client" ]
[ "${lines[1]}" = "Usage: haveno-cli [options] <method> [params]" ]
# TODO add asserts after help text is modified for new endpoints
}
@test "test --help option" {
run ./bisq-cli --help
run ./haveno-cli --help
[ "$status" -eq 0 ]
[ "${lines[0]}" = "Bisq RPC Client" ]
[ "${lines[1]}" = "Usage: bisq-cli [options] <method> [params]" ]
[ "${lines[0]}" = "Haveno RPC Client" ]
[ "${lines[1]}" = "Usage: haveno-cli [options] <method> [params]" ]
# TODO add asserts after help text is modified for new endpoints
}
@test "test takeoffer method --help" {
run ./bisq-cli --password=xyz takeoffer --help
run ./haveno-cli --password=xyz takeoffer --help
[ "$status" -eq 0 ]
[ "${lines[0]}" = "takeoffer" ]
}

View file

@ -12,14 +12,14 @@
#
# - Linux or OSX with bash, Java 11-15 (JDK language compatibility 11), and bitcoin-core (v0.19 - v22).
#
# - Bisq must be fully built with apitest dao setup files installed.
# - Haveno must be fully built with apitest dao setup files installed.
# Build command: `./gradlew clean build :apitest:installDaoSetup`
#
# - All supporting nodes must be run locally, in dev/dao/regtest mode:
# bitcoind, seednode, arbdaemon, alicedaemon, bobdaemon
#
# These should be run using the apitest harness. From the root project dir, run:
# `$ ./bisq-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon,bobdaemon --shutdownAfterTests=false`
# `$ ./haveno-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon,bobdaemon --shutdownAfterTests=false`
#
# - Only regtest btc can be bought or sold with the test payment account.
#

View file

@ -2,7 +2,7 @@
# This file must be sourced by the main driver.
export CLI_BASE="./bisq-cli --password=xyz"
export CLI_BASE="./haveno-cli --password=xyz"
export ARBITRATOR_PORT=9997
export ALICE_PORT=9998
export BOB_PORT=9999
@ -38,7 +38,7 @@ checksetup() {
echo "Bob & Alice daemons, and bitcoin-core's bitcoin-cli must be in the system PATH."
echo ""
echo "From the project's root dir, start all supporting nodes from a terminal:"
echo "./bisq-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon,bobdaemon --shutdownAfterTests=false"
echo "./haveno-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon,bobdaemon --shutdownAfterTests=false"
exit 1;
}
printdate "Checking $APP_HOME for some expected directories and files."
@ -48,16 +48,16 @@ checksetup() {
printdate "Error: Subproject apitest not found, maybe because you are not running the script from the project root dir."
exit 1
fi
if [ -f "$APP_HOME/bisq-cli" ]; then
printdate "The bisq-cli script exists.";
if [ -f "$APP_HOME/haveno-cli" ]; then
printdate "The haveno-cli script exists.";
else
printdate "Error: The bisq-cli script not found, maybe because you are not running the script from the project root dir."
printdate "Error: The haveno-cli script not found, maybe because you are not running the script from the project root dir."
exit 1
fi
printdate "Checking to see local bitcoind is running, and bitcoin-cli is in PATH."
checkbitcoindrunning
checkbitcoincliinpath
printdate "Checking to see bisq servers are running."
printdate "Checking to see haveno servers are running."
checkseednoderunning
checkarbnoderunning
checkalicenoderunning
@ -205,7 +205,7 @@ checkbitcoincliinpath() {
checkseednoderunning() {
if [[ "$LINUX" == "TRUE" ]]; then
if pgrep -f "bisq.seednode.SeedNodeMain" > /dev/null ; then
if pgrep -f "haveno.seednode.SeedNodeMain" > /dev/null ; then
printdate "The seed node is running on host."
else
printdate "Error: seed node is not running on host, exiting."
@ -226,14 +226,14 @@ checkseednoderunning() {
checkarbnoderunning() {
if [[ "$LINUX" == "TRUE" ]]; then
if pgrep -f "bisq.daemon.app.HavenoDaemonMain --appName=bisq-XMR_STAGENET_Arb" > /dev/null ; then
if pgrep -f "haveno.daemon.app.HavenoDaemonMain --appName=haveno-XMR_STAGENET_Arb" > /dev/null ; then
printdate "The arbitration node is running on host."
else
printdate "Error: arbitration node is not running on host, exiting."
apitestusage
fi
elif [[ "$DARWIN" == "TRUE" ]]; then
if ps -A | awk '/[b]isq.daemon.app.HavenoDaemonMain --appName=bisq-XMR_STAGENET_Arb/ {print $1}' > /dev/null ; then
if ps -A | awk '/[b]isq.daemon.app.HavenoDaemonMain --appName=haveno-XMR_STAGENET_Arb/ {print $1}' > /dev/null ; then
printdate "The arbitration node is running on host."
else
printdate "Error: arbitration node is not running on host, exiting."
@ -247,14 +247,14 @@ checkarbnoderunning() {
checkalicenoderunning() {
if [[ "$LINUX" == "TRUE" ]]; then
if pgrep -f "bisq.daemon.app.HavenoDaemonMain --appName=bisq-XMR_STAGENET_Alice" > /dev/null ; then
if pgrep -f "haveno.daemon.app.HavenoDaemonMain --appName=haveno-XMR_STAGENET_Alice" > /dev/null ; then
printdate "Alice's node is running on host."
else
printdate "Error: Alice's node is not running on host, exiting."
apitestusage
fi
elif [[ "$DARWIN" == "TRUE" ]]; then
if ps -A | awk '/[b]isq.daemon.app.HavenoDaemonMain --appName=bisq-XMR_STAGENET_Alice/ {print $1}' > /dev/null ; then
if ps -A | awk '/[b]isq.daemon.app.HavenoDaemonMain --appName=haveno-XMR_STAGENET_Alice/ {print $1}' > /dev/null ; then
printdate "Alice's node node is running on host."
else
printdate "Error: Alice's node is not running on host, exiting."
@ -268,14 +268,14 @@ checkalicenoderunning() {
checkbobnoderunning() {
if [[ "$LINUX" == "TRUE" ]]; then
if pgrep -f "bisq.daemon.app.HavenoDaemonMain --appName=bisq-XMR_STAGENET_Alice" > /dev/null ; then
if pgrep -f "haveno.daemon.app.HavenoDaemonMain --appName=haveno-XMR_STAGENET_Alice" > /dev/null ; then
printdate "Bob's node is running on host."
else
printdate "Error: Bob's node is not running on host, exiting."
apitestusage
fi
elif [[ "$DARWIN" == "TRUE" ]]; then
if ps -A | awk '/[b]isq.daemon.app.HavenoDaemonMain --appName=bisq-XMR_STAGENET_Alice/ {print $1}' > /dev/null ; then
if ps -A | awk '/[b]isq.daemon.app.HavenoDaemonMain --appName=haveno-XMR_STAGENET_Alice/ {print $1}' > /dev/null ; then
printdate "Bob's node node is running on host."
else
printdate "Error: Bob's node is not running on host, exiting."

View file

@ -535,7 +535,7 @@ executetrade() {
printbreak
# Complete the trade on both sides
printdate "BOB $BOB_ROLE: Closing trade and keeping funds in Bisq wallet."
printdate "BOB $BOB_ROLE: Closing trade and keeping funds in Haveno wallet."
CMD="$CLI_BASE --port=$BOB_PORT closetrade --trade-id=$OFFER_ID"
printdate "BOB CLI: $CMD"
KEEP_FUNDS_MSG=$($CMD)
@ -545,7 +545,7 @@ executetrade() {
sleeptraced 3
printbreak
printdate "ALICE (taker): Closing trade and keeping funds in Bisq wallet."
printdate "ALICE (taker): Closing trade and keeping funds in Haveno wallet."
CMD="$CLI_BASE --port=$ALICE_PORT closetrade --trade-id=$OFFER_ID"
printdate "ALICE CLI: $CMD"
KEEP_FUNDS_MSG=$($CMD)

View file

@ -9,14 +9,14 @@
#
# - Linux or OSX with bash, Java 11-15 (JDK language compatibility 11), and bitcoin-core (v0.19 - v22).
#
# - Bisq must be fully built with apitest dao setup files installed.
# - Haveno must be fully built with apitest dao setup files installed.
# Build command: `./gradlew clean build :apitest:installDaoSetup`
#
# - All supporting nodes must be run locally, in dev/dao/regtest mode:
# bitcoind, seednode, arbdaemon, alicedaemon, bobdaemon
#
# These should be run using the apitest harness. From the root project dir, run:
# `$ ./bisq-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon,bobdaemon --shutdownAfterTests=false`
# `$ ./haveno-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon,bobdaemon --shutdownAfterTests=false`
#
# - Only regtest btc can be bought or sold with the test payment account.
#

View file

@ -6,14 +6,14 @@
#
# - Linux or OSX with bash, Java 11-15 (JDK language compatibility 11), and bitcoin-core (v0.19 - v22).
#
# - Bisq must be fully built with apitest dao setup files installed.
# - Haveno must be fully built with apitest dao setup files installed.
# Build command: `./gradlew clean build :apitest:installDaoSetup`
#
# - All supporting nodes must be run locally, in dev/dao/regtest mode:
# bitcoind, seednode, arbdaemon, alicedaemon, bobdaemon
#
# These should be run using the apitest harness. From the root project dir, run:
# `$ ./bisq-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon,bobdaemon --shutdownAfterTests=false`
# `$ ./haveno-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon,bobdaemon --shutdownAfterTests=false`
#
# Usage:
#

View file

@ -2,4 +2,4 @@
# Bats helper script for parsing current version from Version.java.
export CURRENT_VERSION=$(grep "String VERSION =" common/src/main/java/bisq/common/app/Version.java | sed 's/[^0-9.]*//g')
export CURRENT_VERSION=$(grep "String VERSION =" common/src/main/java/haveno/common/app/Version.java | sed 's/[^0-9.]*//g')