mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-05 03:56:26 +03:00
ecf6ece8c4
Submitting a command via the CommandService now returns either the transaction id (SubmitAndWaitForTransactionId), the flat transaction (SubmitAndWaitForTransactionResponse), or the transaction tree (SubmitAndWaitForTransactionTreeResponse). This means that users don't have to wade through the transaction stream to retrieve the resulting transaction. This is particularly useful in combination with #479. Fixes #406 |
||
---|---|---|
.. | ||
src | ||
BUILD.bazel | ||
README.md |
Ledger Client Binding
This module contains the glue code between nanobot-framework
, scala-codegen
and prototype-client
(Scala binding for the ledger API). The gRPC API provided
by prototype-client
as it is is not type-safe. The incomming Transaction
s
from LedgerClient
is routed to DomainTransactionMapper
, which will:
- convert the data in
Transaction
to type-safe types coming fromapi-refinements
- call the
EventDecoder
provided byscala-codegen
for created events - verify that the messages contain all the neccessary fields, and remove
Optional
wrappers
The result of this will be the Domain*
classes.
In the other directions (for the commands coming out from the nanobots) the
'CompositeCommandAdapter' will be used to transform back to the gRPC interface
(SubmitRequest
). After the command submission, the outcoming Completion
will
be used to check the result, and based on that the CommandRetryFlow
can decide
wether the command should be retried or an error should be reported.