@vespr-wallet/lucid-cardano
TypeScript icon, indicating that this package has built-in type declarations

0.10.7 • Public • Published

Lucid

This is a fork of lucid-cardano compiled into CommonJS.

For details about documentation go to the original repo and check the documentation.

Disclaimer

This package may not work on Deno or Browser in contrast with the original repo. This fork arises from the need of having a CJS build of lucid.

Get started

NPM

npm install @vespr-wallet/lucid-cardano

Deno 🦕

For JavaScript and TypeScript

import { Lucid } from "https://deno.land/x/lucid@0.10.7/mod.ts";

Web

<script type="module">
import { Lucid } from "https://unpkg.com/lucid-cardano@0.10.7/web/mod.js"
// ...
</script>

Build from source

Build NPM and Web target

deno task build

Outputs a dist folder

Examples

Basic usage

// import { Blockfrost, Lucid } from "https://deno.land/x/lucid@0.10.7/mod.ts"; Deno
import { Blockfrost, Lucid } from "lucid-cardano"; // NPM

const lucid = await Lucid.new(
  new Blockfrost("https://cardano-preview.blockfrost.io/api/v0", "<projectId>"),
  "Preview",
);

// Assumes you are in a browser environment
const api = await window.cardano.nami.enable();
lucid.selectWallet(api);

const tx = await lucid.newTx()
  .payToAddress("addr...", { lovelace: 5000000n })
  .complete();

 Contributions are welcomed



### Get started

#### NPM

npm install @vespr-wallet/lucid-cardano

Readme

Keywords

none

Package Sidebar

Install

npm i @vespr-wallet/lucid-cardano

Weekly Downloads

91

Version

0.10.7

License

MIT

Unpacked Size

11 MB

Total Files

136

Last publish

Collaborators

  • alexjeefo