-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
record Nick's comments on hs ledger bindings #2340
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,27 @@ | ||
# Usage | ||
|
||
Using the ledger bindings outside of this repository can be a bit | ||
There is currently no separate documentation for the haskell ledger bindings, | ||
over and above the existing ledger API doc. | ||
|
||
The [.proto files](/ledger-api/grpc-definitions/com/digitalasset/ledger/api/v1) | ||
are the best primary source of truth for the API. The [Haskell | ||
bindings](/language-support/hs/bindings/src/DA/Ledger/Services) match closely | ||
the names of the services and RPCs, but of course you get much better | ||
[types](/language-support/hs/bindings/src/DA/Ledger/Types.hs). | ||
|
||
The entry point is at [DA.Ledger](/language-support/hs/bindings/src/DA/Ledger.hs). | ||
|
||
To use the bindings **in this repo**, you need the following `BUILD` dep: | ||
``` | ||
"//language-support/hs/bindings:hs-ledger", | ||
``` | ||
And then you can import the `DA.Ledger` module in your Haskell code. | ||
|
||
You can find some usage examples | ||
[here](/language-support/hs/bindings/test/DA/Ledger/Tests.hs) and | ||
[here](/language-support/hs/bindings/examples/chat/src/DA/Chat/ChatLedger.hs). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This link is broken for me There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for catching this! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in #2349. |
||
|
||
Using these bindings **outside of this repository** can be a bit | ||
tricky since there are quite a few packages required that are not | ||
published to Hackage at the moment. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make the
in this repo
part bold and maybe point out explicitly that this is only for this repo since I don’t expect that most people will use it in the repo.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I've also switched the order, which I believe reads better as a logical sequence: how the code is structured, how to use in repo, how to use out of repo. (As opposed to previous commit which had how to use outside, how code is structured, how to use inside.)