This example shows how to use a CIP-45 wallet such as Eternl to sign Marlowe transactions. The example contract here simply receives a deposit and sends the funds to the Marlowe role-payout address for the benefit of a specified party. The funding policy ID and token name specify the native token to be sent; leave these blank to send ada.
A video demonstration is available.
The URL for Marlowe Runtime and the recipient's role token policy ID and asset name are specified as parameters to dapp's URL.
runtimeUrl=
the URL for the Marlowe Runtime instance.recipientPolicy=
the policy ID for the recipient of the funds.recipientName=
the asset name for the recipient of the funds.
On mainnet
, for example, one can use an Ada Handle (policy ID f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a
) or an Ada Domain (policy ID fc411f546d01e88a822200243769bbc1e1fbdde8fa0f6c5179934edb
) for the recipient. Note that for an Ada Handle do not include the $
prefix in the asset name and for an Ada Domain do not include the .ada
suffix in the asset name. The holder of the handle or domain can redeem the funds from the Marlowe payout address using their NFT using the Marlowe Payouts dapp.
- index.html: The HTML page for the application.
- view.css: The CSS styling for the application
- src/controller.js: The JavaScript source code for the application.
- If you have Nix installed, simply execute ./run.sh.
- Alternatively, if you have NodeJS installed, execute
npm install
and thennpx webpack-dev-server
.
The application is served from http://127.0.0.1:3000. It was tested with the Eternl wallet.