Adds all the gRPC server boilerplate, and a simple help service
that serves method help in man page format. Help text is maintained
in text files located in core/src/main/resources/help.
Only some of the method help text files are defined in this
change, more to be added.
This is a feature that will not be included in api v1, but partial
support is added in this change to the server. CLI will pass a
default triggerPrice of 0 (unused) with the createoffer command.
When fully implemented, an optional trigger-price param will be
added to the CLI's createoffer method, and the value will only be
visible to offer owners. New enableoffer and disableoffer
methods will also need to be added.
The confirmation details include amount, recipient address and txId.
Includes a link to open txId details in the user's external block explorer.
@m52go reworded the BSQ conf explanation note.
Added "don't show again" checkbox.
- Injected OfferFilter into CoreOffersService and CoreTradesService.
The filter constrains 'getoffer(s)' results to offers an api user
can take, as the first part of ongoing protection tools / api
integration.
- Created a new CoreContext singleton.
Initially, lets Core*Services know if the user is using the api --
isApiUser=true if the current thread's name is "BisqDaemonMain" or
the name contains "grpc". We do this anticipating future :desktop
dependencies on the core api, and we don't pass hardcoded
isApiUser=true params to lower level domain objects.
We cannot check BisqDaemonMain.class.getSimpleName() because :core
cannot have a circular dependency on :daemon, but there is probably a
better way to do this than depending on the thread name set in
BisqDaemonMain#configUserThread().
- Added @Singleton annotation to all Core*Service classes.
A log statement was mismatching argument placeholders with argument
values because it was formatted as
log.info("msg={}, \n" + args...)
instead of
log.info("msg={}", args...)
Some code formatting was also done to this block, and a closer approximation
of a CLI 'createoffer` param list replaces the following log statement.
Remove unnecessary setPeerType calls. ConnectionState is handling that.
Only PeerManager does the setting of isSeedNode as we do not have the
required dependency in ConnectionState.
Similar to 'getoffers' and 'getoffer', but filters out offers not
created by the user. The new methods are so similar some offer list
filtering and sorting was refactored in CoreOffersService.
Also fixed some createoffer apitest cases in anticipation of a new OfferFilter,
which will filter out offers not matching any user payment account.