Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

marlowe-runtime-lifecycle-txpipe

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marlowe-runtime-lifecycle-txpipe

Entry Point for Running remotely Marlowe Contracts over a backend instance of the runtime using a connected wallet.

latest
Source
npmnpm
Version
0.2.2-beta
Version published
Maintainers
1
Created
Source

Description

The Marlowe Lifecycle package contains code to query, create and interact with the Marlowe Contracts associated with a given wallet. In other words, it let you interact with "your" contracts.

Getting started

The @marlowe.io/lifecycle package is released as an ESM module and can be used with a modern bundler or imported directly in the browser (without any bundler) as long as you use an import map.

Browser

<html>
  <body>
    <script src="https://cdn.jsdelivr.net/gh/input-output-hk/marlowe-ts-sdk@0.2.0-beta/jsdelivr-npm-importmap.js"></script>
    <script type="module">
      import { mkRuntimeLifecycle } from "@marlowe.io/runtime-lifecycle/browser";
      const walletName = "nami";
      const runtimeURL = "http://localhost:32788";

      console.log(
        `<h2>Connecting the runtime instance at ${runtimeURL} and the ${walletName} Wallet Extension</h2>`
      );
      const runtimeLifecycle = await mkRuntimeLifecycle({
        walletName: walletName,
        runtimeURL: runtimeURL,
      });
      console.log("");
      console.log("Connected to runtime...");
      console.log("");

      const avalaiblePayouts = await runtimeLifecycle.payouts
        .available()
        .catch((err) =>
          log(`Error while retrieving availaible payouts : ${err}`)
        );
      console.log(`nbPayouts retrieved : ${avalaiblePayouts.length}`);
      console.log("Payouts flow done 🎉");
    </script>
  </body>
</html>

FAQs

Package last updated on 04 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts