@marlowe.io/wallet
v0.4.0-beta
Published
Cardano Wallet Capabalities for Marlowe specific environment
Downloads
60
Readme
Description
This package provides wallet functionality for the rest of the SDK packages.
It has the following modules:
- @{@link api | marlowe.io/wallet/api}: provides an abstract interface to work with a wallet.
- @{@link browser | marlowe.io/wallet/browser}: provides a browser implementation of the api using the CIP30 specification.
- @{@link lucid | marlowe.io/wallet/lucid}: provides a implementation of the api that can work in the browser, node.js and deno using Lucid.
- @{@link index | marlowe.io/wallet}: Re-exports of the other modules.
Getting started
The @marlowe.io/wallet
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/[email protected]/jsdelivr-npm-importmap.js"></script>
<script type="module">
import { mkBrowserWallet, getInstalledWalletExtensions } from "@marlowe.io/wallet";
const installedWalletExtensions = getInstalledWalletExtensions();
console.log(`Available Browser Wallet Extensions: ${installedWalletExtensions}`);
const wallet = await mkBrowserWallet(installedWalletExtensions[0]);
</script>
</body>
</html>
Examples
There is a simple HTML file in the examples folder that shows how to use the wallet package to connect to a wallet extension and get basic info.