[bisq-network/bisq] [WIP] Print 'createoffer' reply in the CLI console (#4559)

Stan notifications at github.com
Wed Sep 23 23:35:13 UTC 2020


A 1st cut of the API CLI's `createoffer` method implementation, pushed too early to get feedback early.

To see it work, start supporting apps in regtest/dao mode:

    $./bisq-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon  --shutdownAfterTests=false

Tail the alicedaemon log:

    $tail -n 2000 -f apitest/build/resources/main/bisq-BTC_REGTEST_Alice_dao/bisq.log

Use the CLI to see the default payment accts (and get the payment-acct-id for `createoffer`):

    $./bisq-cli --password=xyz getpaymentaccts

    Name                Currency  Payment Method  ID                                                    
    PerfectMoney dummy       EUR  PERFECT_MONEY   c1ca87a6-918f-4a57-960a-979596dee7f6                
    ETH dummy                ETH  BLOCK_CHAINS    d55040c4-aff4-4ed4-a900-73df578f9d2a 

Create a BUY / USD offer:

    $./bisq-cli --password=xyz createoffer buy c1ca87a6-918f-4a57-960a-979596dee7f6 usd 0.0625 0.05 true 0.00 0.15

    Buy/Sell  Price in usd for 1 BTC  BTC(min - max)            usd(min - max)  Payment Method  Creation Date (UTC)   ID
    BUY                  10,264.6136  0.05000000 - 0.06250000        513 - 642  Perfect Money   2020-09-23T23:21:29Z  KnuOzBKi-4b9cd6b7-7c2c-493e-8744-3083e0fafb28-139

View offers:

    $./bisq-cli --password=xyz getoffers buy usd

You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/4559

-- Commit Summary --

  * Replace hardcoded version with Version.java value
  * Remove comment
  * Move test dispute agent type constants to core
  * Fix indentation
  * Add simple create payment acct test
  * Remove final modifiers
  * Don't use static boilerplate helpers if not necessary
  * Remove comment
  * Add get default payment acct helper
  * Stub out createoffer method in CLI
  * Change API's createoffer return value from bool to Offer
  * Add API CreateOfferTest case
  * Fix imports
  * Fix unnecessary use of fully qualified name
  * Add options helper for handling negative number CLI params
  * Add license comment
  * Add license comment and btc-string to satoshi converter
  * Print createoffer's reply in the CLI's console

-- File Changes --

    M apitest/scripts/mainnet-test.sh (6)
    A apitest/scripts/version-parser.bash (5)
    A apitest/src/test/java/bisq/apitest/method/CreateOfferTest.java (112)
    A apitest/src/test/java/bisq/apitest/method/CreatePaymentAccountTest.java (98)
    M apitest/src/test/java/bisq/apitest/method/MethodTest.java (56)
    M apitest/src/test/java/bisq/apitest/method/RegisterDisputeAgentsTest.java (15)
    M cli/src/main/java/bisq/cli/CliMain.java (64)
    M cli/src/main/java/bisq/cli/CurrencyFormat.java (30)
    A cli/src/main/java/bisq/cli/NegativeNumberOptions.java (80)
    M cli/src/main/java/bisq/cli/TableFormat.java (17)
    M core/src/main/java/bisq/core/api/CoreApi.java (48)
    M core/src/main/java/bisq/core/api/CoreOffersService.java (85)
    M core/src/main/java/bisq/core/api/CorePaymentAccountsService.java (2)
    M core/src/main/java/bisq/core/support/dispute/agent/DisputeAgent.java (6)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java (64)
    M proto/src/main/proto/grpc.proto (4)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/4559.patch
https://github.com/bisq-network/bisq/pull/4559.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4559
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200923/4c869922/attachment.html>


More information about the bisq-github mailing list