I have written a daml smart contract and deployed it in canton participant node. To interact with daml smart contract, I am going write the ledger client app using java bindings. Does the daml supports only maven project or supports both gradle and maven? Can you please provide any reference for how to create client app and how to query the ledger api (PQS)?
Thanks for the questions, and well done on getting your contract successfully deployed. I took these to be your questions, and please find the following answers:
Questions:
Does the daml supports only maven project or supports both gradle and maven?
Can you please provide any reference for how to create client app
How do I query the ledger api (PQS)?
Daml supports building applications with both Maven and Gradle. The SDK provides templates and instructions for both build tools.
To create a client app, you can follow the Getting Started Guides (GSG): Java and JavaScript.
These both walk through initializing a project, connecting to a ledger, and querying contracts.
To directly query the ledger API:
Initialize a LedgerClient using the ledger hostname/port
Build a query using LedgerQuery and the desired template filter
Submit the query using LedgerClient.queries
Process the results which contain contract IDs and decoded data
The Ledger API is exposed as GRPC (and there is a JSON variant). This means you can use any language to build applications if you want, but depending on the language, the user experience may vary. We do have some client side tooling to represent contracts as data objects within two languages: java & typescript and most of our examples are using these, as these languages are very standard.