Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/How to create API services for DAML smart contract?Forum ↗

How to create API services for DAML smart contract?

App Development4 posts217 viewsLast activity Jun 2023
AR
arijitltimOP
Jun 2023

I have implemented a small DAML smart contract. Now I want to build a NodeJS application where I will create an API that will invoke the DAML smart contract and create the contract and also execute the choices.

ST
stefanobaghino-da
Jun 2023

The Ledger API allows you to do that. We have Java bindings for that, but the Ledger API itself uses gRPC, so in principle you can create your own custom bindings. We actually used to have Node.js bindings, but they have been deprecated some time ago. You can find all the information you need here on the documentation (you might want to have a look at the whole section using the navigation menu on the left (there’s a primer on creating custom bindings here, for example).

AR
arijitltim
Jun 2023

The Java code generator will generate the Java code based on the DAML smart contract. It will not generate any APIs in Spingboot, right?

ST
stefanobaghino-da
Jun 2023

You are correct. The idea is that you would use the generated classes to easily deserialize contract payloads to use them in your application (which can of course in turn be based on Spring Boot).

← Back to Discussions