Overview
Marlowe Runtime
Marlowe Runtime consists of a series of services that can be divided into frontend and backend components. Marlowe Runtime backend services are off-chain components largely responsible for interfacing with a Cardano node. They offer abstractions to hide many implementation details of Plutus and Cardano node directly.
There are two ways to interface with Marlowe Runtime:
- Marlowe Runtime web REST API
- Using
marlowe-runtime-cli
There are two main use cases when considering usage of Marlowe as a layer for smart contract developers. Depending on the complexity of the smart contract and DApp, higher level operations provide a simplified interface for focusing mainly on smart contract logic rather than implementation details. However, more complex workflows might need lower level control where an understanding of Plutus might be required.
High level operation
- Supports a straightforward workflow for users that just want to run contracts from the command line.
- Hides details of input and state of Marlowe contracts.
- Hides and automates many aspects of Plutus and interaction with the Cardano node.
- Focuses on the Marlowe contract.
Low level operation
- Supports developer workflows for debugging and fine-grained control of each atomic operation involved in running Marlowe contracts.
- Controls modification of Marlowe state and construction of Marlowe input.
- Controls construction and submission of validators, datums, and redeemers.
- Focuses on the mechanics of Marlowe on Plutus and Cardano.
Running your Marlowe contract on the Cardano blockchain
Design your contract using Marlowe Playground.
Press the
Send to Simulator
button and then pressDownload as JSON
to download your contract in JSON format.
Running your contract using Marlowe CLI
- If you want to run your contract at the command line using
marlowe-cli
, installmarlowe-cli
and follow the instructions Running Contracts with Marlowe CLI. A video lecture playlist Marlowe CLI provides an overview of themarlowe-cli
tool.
Running your contract in a Jupyter notebook
- If you want to run your contract in a Jupyter notebook, then use git to clone github.com/input-output-hk/marlowe-cardano, run
nix develop --command jupyter-lab
from themarlowe-cli/
folder, open the notebook Marlowe CLI Lecture 4, and follow the instructions. A video lecture Running a Marlowe Contract with Marlowe CLI demonstrates running a contract from within a Jupyter notebook.
Running your contract with Marlowe Runtime
- If you want to run your contract from the command-line using the Marlowe Runtime backend, then follow the tutorial for Marlowe Runtime. A video Marlowe Runtime Tutorial demonstrates its use.