@vespr-wallet/lucid-cardano
v0.10.7
Published
This is a fork of the original Lucid repo compiled into CommonJS, based on jpg-store's lucid fork. For more information check https://github.com/spacebudz/lucid
Downloads
371
Readme
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/[email protected]/mod.ts";
Web
<script type="module">
import { Lucid } from "https://unpkg.com/[email protected]/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/[email protected]/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