Questions tagged [daml]

Daml is an open source smart contract language which codifies multi-party agreements. This tag should be used for any questions relating to Daml programming and tools supplied with the Daml SDK.

DAML (the Digital Asset Modeling Language) is a contract modeling language which can run on the Digital Asset Ledger, and codifies multi-party agreements over a distributed ledger. More details on DAML and various use cases are given on the DAML Driven blog.

147 questions
0
votes
1 answer

Facing issue while running Daml scenarios

Recently installed Daml SDK v: 1.18.0 for Windows following all the steps given on [https://docs.daml.com/getting-started/installation.html][1] I have even set the environment variables as required. When I run daml build I'm able to create .dar…
Shalabh Negi
  • 621
  • 7
  • 18
0
votes
1 answer

DAML finance library usage

About DAML finance library, I have found some docs. But I still can not understand what's the key usage of this library, and what is the difference/benefits between "normal" smart contract and using Finlib of digital asset creation/transfer/redeem?
natureoo
  • 31
  • 3
0
votes
1 answer

Exercise a choice via HTTP JSON API

Exercise a choice via HTTP JSON API -> The choice has 'party' choice Something: Optional (ContractId Request) with party: Party controller party do ...... What do i input in ARGUMENTS in my HTTP JSON…
Alex
  • 11
  • 1
0
votes
3 answers

Is there any built-in function to validate digital signature in Daml?

I want to look at libraries that can implement crypto functions to validate digital signatures.
0
votes
1 answer

Specifying a signatory from another contract

In Daml, I have setup an Agent contract. This is its down Agent.daml file. I then have a proposal contract (Proposal.daml), in which I imported the Agent module. I wanted to specify agentname is the signatory for the proposal contract, but compiler…
0
votes
2 answers

How can i get timestamp difference in DAML choice execution?

I am trying to execute 2 choices one after the another. Both are executing so fast, that they have same timestamp. timestamp = 1607079031453, Thus making it difficult to arrange via ascending order in a table. Canyou suggest any work aroud for this?
Shalabh Negi
  • 621
  • 7
  • 18
0
votes
2 answers

how to use merge in daml contract map value?

MapKey k => (k -> a -> Optional c) -> (k -> b -> Optional c) -> (k -> a -> b -> Optional c) -> Map k a -> Map k b -> Map k c difficult to understand syntax please provide example for declaring this merge for map values and also provide brief…
arjun a
  • 151
  • 7
0
votes
1 answer

How to compare two lists in daml

compare1:[Int] -> Book Compare1[x] =([x] == [x]) Test1 = scenario do Debug(compare1 [11,12]) What's wrong with the above code why the error daml:44-1-30:Non-exhaustive patterns in function compare1 is appearing?
CgirlS
  • 1
0
votes
1 answer

How to mention keys of a Map as observers in DAML?

I want to have a Map of (Party, CustomObj) as an attribute/argument in my Contract Template. Also I want to specify the list of keys as observers in the Contract Template. How can I achieve this? Thanks.
Anurag
  • 45
  • 7
0
votes
1 answer

How a DAML application is adapted from Fabric network?

I was reading this documentation https://github.com/digital-asset/daml-on-fabric but I am confused. I am trying to understand the workflow and the architecture for the daml on fabric network. The network has 2 orgs and each org has 1 peer.On step 4…
HectorCode
  • 205
  • 2
  • 11
0
votes
1 answer

How do I check if an element is present in list of records in DAML?

Suppose Event is record with fields like eventName and eventParameter. I want to assert for the condition if some eventName say "EV1" is present in list of records. For list of native Data types (let say Parties) I can simply check with (elem in…
0
votes
1 answer

Usage of Party Ids on Project DABL on a React Typescript Web Application (cloned create-daml-app)

I'm trying to create a Web Application based on create-daml-app and this Web Applications React Typescript will be deployed to Project DABL as well. How can we use the Parties that were been setup on the Project DABL Ledger Settings and be used as…
0
votes
1 answer

What is the purpose of M.empty in Daml Map function?

when am using Map function it requires to declare M.empty,if am missing into an error,what is definition behind out of this M.empty usage,how exactly Map function work in DAML. Error getting like below. ** could not Match Excepted type Map Text…
arjun a
  • 151
  • 7
0
votes
1 answer

How can I fix this yarn when using daml 1.0.1?

In the process of building the create-daml-app project using daml SDK 1.0.1, I'm running into a yarn error when I do daml codegen js .daml/dist/create-daml-app-0.1.0.dar -o daml.js. It returns Failure: "yarn install --pure-lockfile" exited with…
Quantifier
  • 135
  • 1
  • 8
0
votes
1 answer

How to find on Daml-dazl app a transaction by key?

For example in a smart contract like this: daml 1.2 module Example where template Account with owner : Party number : Text money : Int where signatory owner key (owner, number) : (Party, Text) maintainer key._1 It is…
HectorCode
  • 205
  • 2
  • 11