Skip to content

Commit

Permalink
Merge pull request #12 from bisq-network/split-up-take-btc-offer-bots
Browse files Browse the repository at this point in the history
Split take BTC offer bots into take BTC-FIAT and XMR-BTC offer bots
  • Loading branch information
ghubstan authored Jul 5, 2022
2 parents 0148f2a + 7da06a3 commit 3170e71
Show file tree
Hide file tree
Showing 22 changed files with 1,918 additions and 583 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@ client example code, and developing new Java and Python clients and bots.

It contains four subprojects:

1. [reference-doc-builder](https://github.com/bisq-network/bisq-api-reference/tree/main/reference-doc-builder) -- The Java
application that produces the [API Reference](https://bisq-network.github.io/slate) content, from Bisq protobuf
1. [reference-doc-builder](https://github.com/bisq-network/bisq-api-reference/tree/main/reference-doc-builder) -- The
Java application that produces the [API Reference](https://bisq-network.github.io/slate) content, from Bisq protobuf
definition files.
2. [cli-examples](https://github.com/bisq-network/bisq-api-reference/tree/main/cli-examples) -- A folder of bash scripts
demonstrating how to run API CLI commands. Each script is named for the RPC method call being demonstrated.
3. [java-examples](https://github.com/bisq-network/bisq-api-reference/tree/main/java-examples) -- A Java project
demonstrating how to call the API from Java gRPC clients. Each class in
the [bisq.rpccalls](https://github.com/bisq-network/bisq-api-reference/tree/main/java-examples/src/main/java/bisq/rpccalls)
package is named for the RPC method call being demonstrated.
4. [python-examples](https://github.com/bisq-network/bisq-api-reference/tree/main/python-examples) -- A Python3 project
demonstrating how to call the API from Java gRPC clients. Each class in the
[bisq.rpccalls](https://github.com/bisq-network/bisq-api-reference/tree/main/java-examples/src/main/java/bisq/rpccalls)
package is named for the RPC method call being demonstrated. There are also some mainnet-ready Java API bots in the
[bisq.bots](https://github.com/bisq-network/bisq-api-reference/tree/main/java-examples/src/main/java/bisq/bots)
package.
5. [python-examples](https://github.com/bisq-network/bisq-api-reference/tree/main/python-examples) -- A Python3 project
demonstrating how to call the API from Python3 gRPC clients. Each class in
the [bisq.rpccalls](https://github.com/bisq-network/bisq-api-reference/tree/main/python-examples/bisq/rpccalls) package
is named for the RPC method call being demonstrated. There are also some simple bot examples in
the [bisq.bots](https://github.com/bisq-network/bisq-api-reference/tree/main/python-examples/bisq/bots) package.
the [bisq.rpccalls](https://github.com/bisq-network/bisq-api-reference/tree/main/python-examples/bisq/rpccalls)
package is named for the RPC method call being demonstrated. There are also some simple (not-ready-for-mainnet) bot
examples in the [bisq.bots](https://github.com/bisq-network/bisq-api-reference/tree/main/python-examples/bisq/bots)
package.

The RPC method examples are also displayed in the [API Reference](https://bisq-network.github.io/slate). While
navigating the RPC method links in the reference's table of contents on the left side of the page, they appear in the
Expand Down
403 changes: 398 additions & 5 deletions java-examples/README.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions java-examples/scripts/create-bot-jars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ extractdistribution
./create-runnable-jar.sh "$GRADLE_DIST_NAME" bisq.bots.TakeBestPricedOfferToBuyBtc
./create-runnable-jar.sh "$GRADLE_DIST_NAME" bisq.bots.TakeBestPricedOfferToSellBtc

./create-runnable-jar.sh "$GRADLE_DIST_NAME" bisq.bots.TakeBestPricedOfferToBuyXmr
./create-runnable-jar.sh "$GRADLE_DIST_NAME" bisq.bots.TakeBestPricedOfferToSellXmr

./create-runnable-jar.sh "$GRADLE_DIST_NAME" bisq.bots.TakeBestPricedOfferToBuyBsq
./create-runnable-jar.sh "$GRADLE_DIST_NAME" bisq.bots.TakeBestPricedOfferToSellBsq

Expand Down
10 changes: 5 additions & 5 deletions java-examples/scripts/create-runnable-jar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ MAINCLASS_FILE_PATH=$(getmainclassfilepath "$FULLY_QUALIFIED_CLASSNAME")

# Extract the Main-Class from the distribution jar, to the current working directory.
jar xfv "lib/$GRADLE_DIST_NAME.jar" "$MAINCLASS_FILE_PATH" "$SIMPLE_CLASSNAME.properties"
echo "Extracted one class:"
ls -l bisq/bots/pazza
echo "Extracted $SIMPLE_CLASSNAME.class:"
ls -l "bisq/bots/$SIMPLE_CLASSNAME.class"
mv "$SIMPLE_CLASSNAME.properties" "$JAR_BASENAME.conf"
echo "Extracted one properties file and renamed it $JAR_BASENAME.conf"
ls -l *.conf
echo "Extracted $SIMPLE_CLASSNAME.properties and renamed it $JAR_BASENAME.conf"
ls -l "$JAR_BASENAME.conf"

# Now it can be added to the empty jar with the correct path.
jar uf "$JAR_BASENAME.jar" "$MAINCLASS_FILE_PATH"
# Remove bisq (bisq/bots/junk).
# Remove workarea.
rm -rf bisq

echo "Runnable $JAR_BASENAME.jar is ready to use."
Expand Down
Loading

0 comments on commit 3170e71

Please sign in to comment.