Skip to content
CCPEDIAby Unity Nodes
VideosWhat are the command line tools in Daml?

What are the command line tools in Daml?

Nothing is loaded from YouTube until you press play, and then without tracking cookies.

About this video

๐Ÿ“– Get started with Daml: bit.ly/tryDaml ๐Ÿ“š Learn more about Daml Smart Contracts: bit.ly/learn_daml ๐Ÿ“ฎCheck out our blogs: bit.ly/daml-blog-engineering ๐Ÿ“‹ Become a Daml certified expert: bit.ly/daml-certification

DAML is an open-source smart contract language designed to build composable applications on an abstract ledger model.

DAML is a high level language that focuses on data privacy and authorization of distributed applications. These concepts are represented first class in the language.

By abstracting data privacy and authorization, DAML takes the burden off the programmer to think about concrete cryptographic primitives and lets her focus on workflow logic.

DAML is a statically typed functional language.

Applications specified in DAML can be deployed on a growing number of platforms including Amazon Aurora , VMWare Concord , R3 Corda , Hyperledger Fabric , Hyperledger Sawtooth , Project DABL and PostgreSQL .

We will show how to: Install the daml assistant Create a new DAML/React full stack project Create a new DAML project Build project and start sandbox Build project Start IDE Upload a dar to the ledger Project configuration file

We used the 1.2.0 SDK version for this video.

#commandlinetools #distributedapplications #smartcontracts

Transcript

973 words

Captions as YouTube publishes them, usually machine-generated, so names such as Daml and Canton can be misheard.

  1. 0:00

    today I'm going to show you a little bit about the command-line tool that we installed in the last episode what I'm referencing here is a rub and crumbs cheat sheet I've zoomed in a lot so it's easy to see but there's there's quite a lot of things on the cheat sheet for covering demo so if after watching this video you just saw you want to explore a little more it's just a great reference

  2. 0:23

    to have I mean I use it pretty much all the time so today I'm just going to show some of the basics of using the demo command line it might differ slightly from the cheat sheet but here we go so first thing this is my OB er project it's a really simple little toy project to kind of show how demo works and how you can make agreements really easily with demo it's you know just very short backends for this this case but we're in our project and they generally look like

  3. 0:53

    this you'll have a demo folder that's going to have all your source files in it you'll have da mo mo which is basically your configuration file and then you may or may not have other files depending on your project but when it comes to a download project those are the main two so one of the first things we'd want to do with our project after we read in the code is run demo builds

  4. 1:17

    and that's gonna build our dar file for us this is basically like a jar file in Java I think it actually is even the same format you know essentially a bunch of things all zipped up together to make execution deployment nice and easy since so on one nice little bundled file next we want to start up our demo sandbox this is basically our testing environment and this is changing slightly over time now but this is what we would use when we're testing locally

  5. 1:49

    so we'll start our demo sandbox which will give us a local a localized ledger and now that that's button up we can go ahead and connect our JSON API to it so much like we have demo sandbox we also have demo JSON API and we can run that from pretty much wherever and that'll then connect to our larger ports so our ledger is running locally on six eight six five in this Jason API

  6. 2:22

    is basically it's another process that's going to talk to the ledger on port six eight six five and then give us a consumable JSON API on seven five seven five that we can then take and consume that in our in our UI or wherever our application happens to live in this case it's a small little UI ribbon in a few so I'll start up the JSON API and now up and we're bound our local port I can go ahead and I could start my UI and that's going to be the entire way we

  7. 3:00

    spin up a demo app in most cases and interestingly here you know over here we did demo sandbox we're talking to the just the sandbox itself that's built into demo but if it was another type of Fletcher we would be able to just run our rundown I'll deploy instead of demo sandbox against that ledger and then go ahead and hook up our Jason API to that instead we would get basically the same exact thing where the ledger itself

  8. 3:33

    wouldn't matter to us we would just be consuming the Jason API so the API that my application is using right now against the demo sandbox would be the same exact API that would use against the fabric or sawtooth or other types of Ledger's so now my UI should be spun up so I'm just going to connect it to localhost and we can see here we have my little application and I can log in and

  9. 4:06

    then I can go ahead and do something let's see I could give Francesco who's one of my co-workers offer him a beer and that's going to be recorded so now what just happened here is that the Jason API one and community we went on communicated to our Jason API that was running over here it received some requests and then it went and submitted the requests to the ledger and yeah that's basically it actually that's not the correct output I should have made

  10. 4:39

    the output more verbose so we could see it but you can just trust me with that that we went through very simply and our API request went and sent it to the ledger I can actually show the API request too because it is rather rather small and also will demonstrate how we can also start our demo studio demo studio is essentially Visual Studio with some nice plugins that make reading tamil very easy that we're still you

  11. 5:11

    know building out a little bit and let's see here where would my API wares be they'd be over here somewhere yeah the API queries are very simp simple so when I was doing get beers I was basically querying you know first sir and template and then I was just hitting this endpoints there's only a few endpoints that you actually needs a hit when interacting with the demo ledger their search and exercise and a couple other small ones but they're all

  12. 5:41

    basic very small queries that that power these things and yeah so that's how to use the demo command line and how does then take that and spin it up into a full working application and yeah so thank you very much for watching and look forward to doing the next episode