mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 23:06:39 +01:00
This commit introduces a new `grpc` module including the following key types: - BisqGrpcServer: The API implementation itself, along with generated gRPC Response/Reploy types defined in grpc/src/main/proto/grpc.proto. - BisqGrpcServerMain: A 'headless' / daemon-like entry point for running a Bisq node without the JavaFX desktop UI. - BisqGrpcClient: A simple, repl-style client for the API that allows the user to exercise the various endpoints as seen in the example below. In the `desktop` module, the BisqAppMain class has been modified to start a BisqGrpcServer instance if the `--desktopWithGrpcApi` option has been set to `true`. In the `core` module, a new `CoreApi` class has been introduced providing a kind of comprehensive facade for all Bisq functionality to be exposed via the RPC API. How to explore the proof of concept: 1. Run the main() method in BisqAppMain providing `--desktopWithGrpcApi=true` as a program argument or alternatively, run the main() method in BisqGrpcServerMain, where no special option is required. In either case, you'll notice the following entry in the log output: INFO bisq.grpc.BisqGrpcServer: Server started, listening on 8888 2. Now run the main() method in BisqGrpcClient. Once it has started up you are connected to the gRPC server started in step 1 above. To exercise the API, type `getVersion` via stdin and hit return. You should see the following response: INFO bisq.grpc.BisqGrpcClient - 1.2.4 Likewise, you can type `getBalance` and you'll see the following response: INFO bisq.grpc.BisqGrpcClient - 0.00 BTC and so forth for each of the implemented endpoints. For a list of implemented endpoints, see BisqGrpcServer.start(). Note once again that the code here is merely a proof of concept and should not be considered complete or production-ready in any way. In a subsequent commit, the `--desktopWithGrpcApi` option will be disabled in order to avoid any potential production use. The content of this commit is the result of squashing a number of commits originally authored by chimp1984 in the `chimp1984` fork's `grpc` branch. Co-authored-by: Chris Beams <chris@beams.io>
116 lines
11 KiB
Groovy
116 lines
11 KiB
Groovy
// To update the `dependencyVerification` block below (we don't add local bisq modules and org.openjfx libraries as
|
|
// those cause problems):
|
|
//
|
|
// 1. Remove the block entirely
|
|
// 2. Replace the block with the following command:
|
|
//
|
|
// ./gradlew -q calculateChecksums | grep -v 'bisq:\|org.openjfx:' >> gradle/witness/gradle-witness.gradle
|
|
//
|
|
// 3. Run `git diff` to verify that expected hashes have changed
|
|
// 4. Commit the changes
|
|
//
|
|
// See https://github.com/signalapp/gradle-witness#using-witness for further details.
|
|
|
|
dependencyVerification {
|
|
verify = [
|
|
'aopalliance:aopalliance:0addec670fedcd3f113c5c8091d783280d23f75e3acb841b61a9cdb079376a08',
|
|
'ch.qos.logback:logback-classic:e66efc674e94837344bc5b748ff510c37a44eeff86cbfdbf9e714ef2eb374013',
|
|
'ch.qos.logback:logback-core:4cd46fa17d77057b39160058df2f21ebbc2aded51d0edcc25d2c1cecc042a005',
|
|
'com.fasterxml.jackson.core:jackson-annotations:2566b3a6662afa3c6af4f5b25006cb46be2efc68f1b5116291d6998a8cdf7ed3',
|
|
'com.fasterxml.jackson.core:jackson-core:3083079be6088db2ed0a0c6ff92204e0aa48fa1de9db5b59c468f35acf882c2c',
|
|
'com.fasterxml.jackson.core:jackson-databind:fcf3c2b0c332f5f54604f7e27fa7ee502378a2cc5df6a944bbfae391872c32ff',
|
|
'com.github.JesusMcCloud.netlayer:tor.external:10c3acfbcf8f80154a3f10640c4d4d275c4fc9baaf5c476d631da4e2382aaa5b',
|
|
'com.github.JesusMcCloud.netlayer:tor.native:fba4dca6a139af741c36713bcfe3680a92870009dbb59a3a14f9dae7f6cd116e',
|
|
'com.github.JesusMcCloud.netlayer:tor:57d16a909ceeb1ba3b5818eaeebfef8cb6c55fbea892dc13c843fe4487ee35d2',
|
|
'com.github.JesusMcCloud.tor-binary:tor-binary-geoip:1fd8b0af71ab706c7ec36888bc0af41c3d82f6e1455f674076ed6989c3d7fa7c',
|
|
'com.github.JesusMcCloud.tor-binary:tor-binary-linux32:e73b9fbb9347c6d34434f25795d4eb6bd01fc6bdb40d7b43594aad2286e395c9',
|
|
'com.github.JesusMcCloud.tor-binary:tor-binary-linux64:5c8a2567debe3c98d5c9e25c8029cbeb7cb917e4a8aab9575389c117477337a4',
|
|
'com.github.JesusMcCloud.tor-binary:tor-binary-macos:716c967ce7c4a66e2b7d4e64724544851d92a3280addd22cbd43699e70d7bab9',
|
|
'com.github.JesusMcCloud.tor-binary:tor-binary-windows:d02c9f4614b5d8d6b3c9afb02156ef6f0fe6043b446a3c3e4ec035983daa558d',
|
|
'com.github.JesusMcCloud:jtorctl:904f7c53332179a3479c64d63fb303afa6a02b6889aabdab5b235f3efc725ca7',
|
|
'com.github.bisq-network.bitcoinj:bitcoinj-core:f979c2187e61ee3b08dd4cbfc49a149734cff64c045d29ed112f2e12f34068a3',
|
|
'com.github.ravn:jsocks:3c71600af027b2b6d4244e4ad14d98ff2352a379410daebefff5d8cd48d742a4',
|
|
'com.github.sarxos:webcam-capture:d960b7ea8ec3ddf2df0725ef214c3fccc9699ea7772df37f544e1f8e4fd665f6',
|
|
'com.google.android:annotations:ba734e1e84c09d615af6a09d33034b4f0442f8772dec120efb376d86a565ae15',
|
|
'com.google.api.grpc:proto-google-common-protos:ad25472c73ee470606fb500b376ae5a97973d5406c2f5c3b7d07fb25b4648b65',
|
|
'com.google.auth:google-auth-library-credentials:aaeea9333fff9b763715bca0174ec76c4f9551b5731c89a95f263cdc82b4b56e',
|
|
'com.google.auth:google-auth-library-oauth2-http:fa9a1589c8bc279416988d437c2636967cd5e4eff70fbddc986b9c5a77b0231b',
|
|
'com.google.auto.value:auto-value-annotations:3bf4b9e74a6bf0f38ac70af571e0f8a9d85ccba4c0693a72fea9ea46def0d5a0',
|
|
'com.google.code.findbugs:jsr305:766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7',
|
|
'com.google.code.gson:gson:233a0149fc365c9f6edbd683cfe266b19bdc773be98eabdaf6b3c924b48e7d81',
|
|
'com.google.errorprone:error_prone_annotations:ec59f1b702d9afc09e8c3929f5c42777dec623a6ea2731ac694332c7d7680f5a',
|
|
'com.google.guava:guava:36a666e3b71ae7f0f0dca23654b67e086e6c93d192f60ba5dfd5519db6c288c8',
|
|
'com.google.http-client:google-http-client-jackson2:480b67711dd75054b45ec4f88056e53fda9773145117a1a852c803e2cb4b84e0',
|
|
'com.google.http-client:google-http-client:2b4353d8ca918f92f3a5fcd6b6b2de09858eae683423225773f24c828cd06cc8',
|
|
'com.google.inject:guice:d258ff1bd9b8b527872f8402648226658ad3149f1f40e74b0566d69e7e042fbc',
|
|
'com.google.j2objc:j2objc-annotations:21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b',
|
|
'com.google.protobuf:protobuf-java-util:619b0b0dc344cb141e493cbedc5687c8fb7c985e609a1b035e621bfab2f89021',
|
|
'com.google.protobuf:protobuf-java:161d7d61a8cb3970891c299578702fd079646e032329d6c2cabf998d191437c9',
|
|
'com.google.zxing:core:11aae8fd974ab25faa8208be50468eb12349cd239e93e7c797377fa13e381729',
|
|
'com.google.zxing:javase:0ec23e2ec12664ddd6347c8920ad647bb3b9da290f897a88516014b56cc77eb9',
|
|
'com.googlecode.jcsv:jcsv:73ca7d715e90c8d2c2635cc284543b038245a34f70790660ed590e157b8714a2',
|
|
'com.jfoenix:jfoenix:4739e37a05e67c3bc9d5b391a1b93717b5a48fa872992616b0964d3f827f8fe6',
|
|
'com.lambdaworks:scrypt:9a82d218099fb14c10c0e86e7eefeebd8c104de920acdc47b8b4b7a686fb73b4',
|
|
'com.madgag.spongycastle:core:8d6240b974b0aca4d3da9c7dd44d42339d8a374358aca5fc98e50a995764511f',
|
|
'com.nativelibs4java:bridj:101bcd9b6637e6bc16e56deb3daefba62b1f5e8e9e37e1b3e56e3b5860d659cf',
|
|
'com.squareup.okhttp:okhttp:b4c943138fcef2bcc9d2006b2250c4aabbedeafc5947ed7c0af7fd103ceb2707',
|
|
'com.squareup.okio:okio:114bdc1f47338a68bcbc95abf2f5cdc72beeec91812f2fcd7b521c1937876266',
|
|
'commons-codec:commons-codec:e599d5318e97aa48f42136a2927e6dfa4e8881dff0e6c8e3109ddbbff51d7b7d',
|
|
'commons-io:commons-io:cc6a41dc3eaacc9e440a6bd0d2890b20d36b4ee408fe2d67122f328bb6e01581',
|
|
'commons-logging:commons-logging:daddea1ea0be0f56978ab3006b8ac92834afeefbd9b7e4e6316fca57df0fa636',
|
|
'de.jensd:fontawesomefx-commons:5539bb3335ecb822dbf928546f57766eeb9f1516cc1417a064b5709629612149',
|
|
'de.jensd:fontawesomefx-materialdesignfont:dbad8dfdd1c85e298d5bbae25b2399aec9e85064db57b2427d10f3815aa98752',
|
|
'de.jensd:fontawesomefx:73bacc991a0a6f5cf0f911767c8db161e0949dbca61e8371eb4342e3da96887b',
|
|
'io.github.microutils:kotlin-logging:4992504fd3c6ecdf9ed10874b9508e758bb908af9e9d7af19a61e9afb6b7e27a',
|
|
'io.grpc:grpc-alts:177aa1e578c10e274f8feedd6f555c2e7741c195a84f533f9a51fb82dbe8a596',
|
|
'io.grpc:grpc-api:a269094009588213ab5386a6fb92426b8056a130b2653d3b4e59e971f2f1ef08',
|
|
'io.grpc:grpc-auth:782ae07923d53b56f54326e7b32480b425eb3df71deb5a4a33bbfc6487e706a4',
|
|
'io.grpc:grpc-context:f4c8f878c320f6fb56c1c14692618f6df8253314b556176e32727afbc5921a73',
|
|
'io.grpc:grpc-core:d67fa113fd9cc45a02710f9c41dda9c15191448c14e9e96fcc21839a41345d4c',
|
|
'io.grpc:grpc-grpclb:aaac0d6063204dfc52abc51af94f16b6cecfd582bb477ee1d232e42920bf49e3',
|
|
'io.grpc:grpc-netty-shaded:9edfd45da473d2efbb5683fc3eaf1857e82d2148033d82dd558a7ac38731ea33',
|
|
'io.grpc:grpc-netty:167e834788f6d4f7bd129bfb244d4e09d061a0e7165288378386ae871e3cfe51',
|
|
'io.grpc:grpc-protobuf-lite:9ba9aaa3e6997a04c707793c25e3ec88c6bad86f8d6f6b8b7a1a0c33ea2429d8',
|
|
'io.grpc:grpc-protobuf:454dae7e246dac25526ed5b795d97a5dafedd3cc2042cfc810f02051d7d3e3cb',
|
|
'io.grpc:grpc-stub:1532e291c0e9fd8230a6416c8ebbd902d99c7e2760241ae638ea761aa3dd5f43',
|
|
'io.netty:netty-buffer:7b0171a4e8bcd573e08d9f2bba053c67b557ab5012106a5982ccbae5743814c0',
|
|
'io.netty:netty-codec-http2:8bac9625eb68635396eb0c13c9cc0b22bde7c83d0cd2dae3fe9b6f9cf929e372',
|
|
'io.netty:netty-codec-http:eb349c0f1b249af7c7a8fbbd1c761d65d9bc230880cd8d37feab9e8278292625',
|
|
'io.netty:netty-codec-socks:7f14b3a95ee9aa5a26f66af668690578a81a883683ac1c4ca9e9afdf4d4c7894',
|
|
'io.netty:netty-codec:e96ced697fb7df589da7c20c995e01f75a9cb246be242bbc4cd3b4af424ff189',
|
|
'io.netty:netty-common:3d0a918d78292eeca02a7bb2188daa4e5053b6e29b71e6308309033e121242b5',
|
|
'io.netty:netty-handler-proxy:25f22da21c29ab0d3b6b889412351bcfc5f9ccd42e07d2d5513d5c4eb571f343',
|
|
'io.netty:netty-handler:11eda86500c33b9d386719b5419f513fd9c097d13894f25dd0c75b610d636e03',
|
|
'io.netty:netty-resolver:89768242b6b7cce9bd9f5945ad21d1b4bae515c6b1bf03a8af5d1899779cebc9',
|
|
'io.netty:netty-tcnative-boringssl-static:0ea1a935a1023a88e99a4f9b1aba2e3ff2799d4d1994f4bff848f85b367d48ed',
|
|
'io.netty:netty-transport:dfa817a156ea263aa9ad8364a2e226527665c9722aca40a7945f228c2c14f1da',
|
|
'io.opencensus:opencensus-api:8e2cb0f6391d8eb0a1bcd01e7748883f0033b1941754f4ed3f19d2c3e4276fc8',
|
|
'io.opencensus:opencensus-contrib-grpc-metrics:29fc79401082301542cab89d7054d2f0825f184492654c950020553ef4ff0ef8',
|
|
'io.opencensus:opencensus-contrib-http-util:d62fd27175a842bde135f6f6b1d6f25d42e9bd59a87bc98709a4760fe399ee14',
|
|
'io.perfmark:perfmark-api:b734ba2149712409a44eabdb799f64768578fee0defe1418bb108fe32ea43e1a',
|
|
'javax.inject:javax.inject:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff',
|
|
'net.glxn:qrgen:c85d9d8512d91e8ad11fe56259a7825bd50ce0245447e236cf168d1b17591882',
|
|
'net.jcip:jcip-annotations:be5805392060c71474bf6c9a67a099471274d30b83eef84bfc4e0889a4f1dcc0',
|
|
'net.sf.jopt-simple:jopt-simple:6f45c00908265947c39221035250024f2caec9a15c1c8cf553ebeecee289f342',
|
|
'network.bisq.btcd-cli4j:btcd-cli4j-core:203156fc63dc1202774de9818e4f21149549f79b25d356b08bb0c784be40c0e8',
|
|
'network.bisq.btcd-cli4j:btcd-cli4j-daemon:0a2783a851add6e3d8ae899ade48c041b250bfac64b6a4c5f6380ebcdbbe6848',
|
|
'org.apache.commons:commons-compress:5f2df1e467825e4cac5996d44890c4201c000b43c0b23cffc0782d28a0beb9b0',
|
|
'org.apache.commons:commons-lang3:8ac96fc686512d777fca85e144f196cd7cfe0c0aec23127229497d1a38ff651c',
|
|
'org.apache.httpcomponents:httpclient:6c7e3bb423d8c5574f28157fe42b4c38d6a3477bfa2954cfe5f330b14ecad8a9',
|
|
'org.apache.httpcomponents:httpcore:d799522d579aac06b170603f8f080f6e3248dadc01f9652cdd7ea7bc318c21ce',
|
|
'org.bitcoinj:orchid:f836325cfa0466a011cb755c9b0fee6368487a2352eb45f4306ad9e4c18de080',
|
|
'org.bouncycastle:bcpg-jdk15on:de3355b821fc81dd32e1f3f560d5b3eca1c678fd2400011d0bfc69fb91bcde85',
|
|
'org.bouncycastle:bcprov-jdk15on:963e1ee14f808ffb99897d848ddcdb28fa91ddda867eb18d303e82728f878349',
|
|
'org.codehaus.mojo:animal-sniffer-annotations:92654f493ecfec52082e76354f0ebf87648dc3d5cec2e3c3cdb947c016747a53',
|
|
'org.conscrypt:conscrypt-openjdk-uber:27f4314bf01e5af288ade537f06cb6eb7f0c760aed4a8d7cf441de71de0a7abb',
|
|
'org.fxmisc.easybind:easybind:666af296dda6de68751668a62661571b5238ac6f1c07c8a204fc6f902b222aaf',
|
|
'org.jetbrains.kotlin:kotlin-stdlib-common:6c91dea17d7dce5f0b550c3de3305767e5fb46247b6d1eb7eca0ca1fe18458de',
|
|
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:25e2409aba0ec37d2fd7c77727d7835b511879de8d9bf4862af0b493aabbe39e',
|
|
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:f7dbbaee3e0841758187a213c052388a4e619e11c87ab16f4bc229cfe7ce5fed',
|
|
'org.jetbrains.kotlin:kotlin-stdlib:6ea3d0921b26919b286f05cbdb906266666a36f9a7c096197114f7495708ffbc',
|
|
'org.jetbrains:annotations:ace2a10dc8e2d5fd34925ecac03e4988b2c0f851650c94b8cef49ba1bd111478',
|
|
'org.slf4j:slf4j-api:3a4cd4969015f3beb4b5b4d81dbafc01765fb60b8a439955ca64d8476fef553e',
|
|
'org.springframework:spring-core:c451e8417adb2ffb2445636da5e44a2f59307c4100037a1fe387c3fba4f29b52',
|
|
'org.tukaani:xz:a594643d73cc01928cf6ca5ce100e094ea9d73af760a5d4fb6b75fa673ecec96',
|
|
]
|
|
}
|