I am working in .net 5, and I saw your example on GitHub - digital-asset/daml-net , but It seems not very helpful. I want to write .NET API to write data on the ledger in JSON format.
That project is a community effort. You are welcome to work on that to improve it, if you really want to use the gRPC bindings.
If you’re interested in having access to a simplified view of active contracts and interact with them using a well-defined JSON encoding over a conventional HTTP connection, you can use the HTTP JSON API service.
Do you have any HTTP JSON API service examples?
The whole getting started guide uses it. It uses the HTTP JSON API directly on the browser, but you can reuse the concepts to build a back-end service using a CLR language.
Is it possible to trigger my own API service from the Contract running on DAML Hub. Like for example if I want some on request data and I click on the choice- as a result my service will be invoked (call to my exe)
Hi @Iqra_Mustafa1 ,
Calling external APIs in response to contract exercises via Daml Hub is not supported at this time. The recommended approach here is to have your service stream the ledger’s Active Contract Set via gRPC or the HTTP JSON API (websockets) and react to ledger events that way.
Please open up a new thread for a new question, that makes it much easier to track what has and has not been answered. Thanks!