Dear DAML community,
I am very new to DAML and am trying to understand if it is possible to add a call to an external API within a template?
after quite a bit of searching I couldn’t find any similar query that might help me understand if it is possible or no.
An example use case would be a call to an external authentication API within a template ‘UserAuth’
type UAuthID = ContractId UserAuth
template UserAuth
with
user : Party
backend : Party
token : Text
where
signatory backend
observer user
controller backend can
Authenticate : UAuthID
with
newToken : Text
do
-- need to call an external API here to validate token.
create this with
token = newToken
I wanted to know if this kind of action is possible or not.
Thank you in advance!