<p>A 1st cut of the API CLI's <code>createoffer</code> method implementation, pushed too early to get feedback early.</p>
<p>To see it work, start supporting apps in regtest/dao mode:</p>
<pre><code>$./bisq-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon  --shutdownAfterTests=false
</code></pre>
<p>Tail the alicedaemon log:</p>
<pre><code>$tail -n 2000 -f apitest/build/resources/main/bisq-BTC_REGTEST_Alice_dao/bisq.log
</code></pre>
<p>Use the CLI to see the default payment accts (and get the payment-acct-id for <code>createoffer</code>):</p>
<pre><code>$./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 
</code></pre>
<p>Create a BUY / USD offer:</p>
<pre><code>$./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
</code></pre>
<p>View offers:</p>
<pre><code>$./bisq-cli --password=xyz getoffers buy usd
</code></pre>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/4559'>https://github.com/bisq-network/bisq/pull/4559</a></p>

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

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-2e75814f8e05472c745f29bef59dd621">apitest/scripts/mainnet-test.sh</a>
    (6)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-ab83ed121d460c904088b42ed18de10f">apitest/scripts/version-parser.bash</a>
    (5)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-e682e7ff1d87bbe0764afc91e1c96b6d">apitest/src/test/java/bisq/apitest/method/CreateOfferTest.java</a>
    (112)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-5b0cceb2a0d73cceb0928c2ce90a8091">apitest/src/test/java/bisq/apitest/method/CreatePaymentAccountTest.java</a>
    (98)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-6d158dc3de2c806c8ad7b561c9eba091">apitest/src/test/java/bisq/apitest/method/MethodTest.java</a>
    (56)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-f4c0c7647f8f55f67730694f7918bc77">apitest/src/test/java/bisq/apitest/method/RegisterDisputeAgentsTest.java</a>
    (15)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-c373779aeb2c0f02199d152b537b0fd1">cli/src/main/java/bisq/cli/CliMain.java</a>
    (64)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-363f459105956a5f70b16fa31a07a4b5">cli/src/main/java/bisq/cli/CurrencyFormat.java</a>
    (30)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-a0364ea0a764fdddbf77c3b2517271b1">cli/src/main/java/bisq/cli/NegativeNumberOptions.java</a>
    (80)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-46ca0d5a34640a3f705b388adb2fc8ba">cli/src/main/java/bisq/cli/TableFormat.java</a>
    (17)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-defe707a4d38994a1dd5a818fc078522">core/src/main/java/bisq/core/api/CoreApi.java</a>
    (48)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-d7353096fea115841d9ac980fe68b3af">core/src/main/java/bisq/core/api/CoreOffersService.java</a>
    (85)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-d4059c1d76936ff1d5186eb5730cb9a4">core/src/main/java/bisq/core/api/CorePaymentAccountsService.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-690160b50eded4c680fd5cbefb2deb72">core/src/main/java/bisq/core/support/dispute/agent/DisputeAgent.java</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-073db9176bdbf520d57c0bb69bcde77e">daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java</a>
    (64)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4559/files#diff-328b3309bc03d9ffb3ffb9e780dc7e91">proto/src/main/proto/grpc.proto</a>
    (4)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/4559.patch'>https://github.com/bisq-network/bisq/pull/4559.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/4559.diff'>https://github.com/bisq-network/bisq/pull/4559.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4559">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNVVPHG6TQR3JBQF4DDSHKA3DANCNFSM4RXT56GA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNRENOZ6VXCNWOZIF53SHKA3DA5CNFSM4RXT56GKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KRPKOZA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4559",
"url": "https://github.com/bisq-network/bisq/pull/4559",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>