{"_id":"@adawg/lucid-cardano","name":"@adawg/lucid-cardano","dist-tags":{"latest":"0.10.7"},"versions":{"0.10.7":{"name":"@adawg/lucid-cardano","version":"0.10.7","description":"Lucid is a library, which allows you to create Cardano transactions and off-chain code for your Plutus contracts in JavaScript, Deno and Node.js.","author":{"name":"Alessandro Konrad"},"repository":{"type":"git","url":"git+https://github.com/spacebudz/lucid.git"},"license":"MIT","main":"./esm/mod.js","module":"./esm/mod.js","exports":{".":{"import":"./esm/mod.js"}},"engines":{"node":">=14"},"type":"module","dependencies":{"node-fetch":"^3.2.3","@peculiar/webcrypto":"^1.4.0","ws":"^8.10.0"},"types":"./esm/mod.d.ts","gitHead":"a0e182fe77d553f6480d2b3ff5d1f38eee22e4e9","bugs":{"url":"https://github.com/spacebudz/lucid/issues"},"homepage":"https://github.com/spacebudz/lucid#readme","_id":"@adawg/lucid-cardano@0.10.7","_nodeVersion":"20.11.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-JjdRt0ytrtr8J+Zw55leUezm73LPCILqWeIN40kGJgLP7IZOupMjvzMv6a6V3ODqVWX2b08JTyzvFpP4l+fFZw==","shasum":"1b606ff3ecf12998dd8e48ef67a53502e83c035f","tarball":"https://registry.npmjs.org/@adawg/lucid-cardano/-/lucid-cardano-0.10.7.tgz","fileCount":87,"unpackedSize":5439312,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDbF2yFiPhx3j5Nb+gB2iVNhCozvNsw0N1Fnw90Y2SOAIhAOYi3MQgTlWg4n75me7PYY0L4coC59wMMFVdL2tJvkFs"}]},"_npmUser":{"name":"adawg","email":"ullasmahalingappa@gmail.com"},"directories":{},"maintainers":[{"name":"adawg","email":"ullasmahalingappa@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lucid-cardano_0.10.7_1724779263658_0.3532890541001401"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-27T17:21:03.503Z","0.10.7":"2024-08-27T17:21:03.888Z","modified":"2024-08-27T17:21:04.152Z"},"maintainers":[{"name":"adawg","email":"ullasmahalingappa@gmail.com"}],"description":"Lucid is a library, which allows you to create Cardano transactions and off-chain code for your Plutus contracts in JavaScript, Deno and Node.js.","homepage":"https://github.com/spacebudz/lucid#readme","repository":{"type":"git","url":"git+https://github.com/spacebudz/lucid.git"},"author":{"name":"Alessandro Konrad"},"bugs":{"url":"https://github.com/spacebudz/lucid/issues"},"license":"MIT","readme":"<p align=\"center\">\r\n  <img width=\"100px\" src=\"./logo/lucid.svg\" align=\"center\"/>\r\n  <h1 align=\"center\">Lucid</h1>\r\n  <p align=\"center\">Lucid is a library, which allows you to create Cardano transactions and off-chain code for your Plutus contracts in JavaScript, Deno and Node.js.</p>\r\n\r\n<p align=\"center\">\r\n    <img src=\"https://img.shields.io/github/commit-activity/m/berry-pool/lucid?style=for-the-badge\" />\r\n    <a href=\"https://www.npmjs.com/package/lucid-cardano\">\r\n      <img src=\"https://img.shields.io/npm/v/lucid-cardano?style=for-the-badge\" />\r\n    </a>\r\n     <a href=\"https://doc.deno.land/https://deno.land/x/lucid/mod.ts\">\r\n      <img src=\"https://img.shields.io/readthedocs/cardano-lucid?style=for-the-badge\" />\r\n    </a>\r\n    <a href=\"https://www.npmjs.com/package/lucid-cardano\">\r\n      <img src=\"https://img.shields.io/npm/dw/lucid-cardano?style=for-the-badge\" />\r\n    </a>\r\n    <img src=\"https://img.shields.io/npm/l/lucid-cardano?style=for-the-badge\" />\r\n    <a href=\"https://twitter.com/spacebudzNFT\">\r\n      <img src=\"https://img.shields.io/twitter/follow/spacebudzNFT?style=for-the-badge&logo=twitter\" />\r\n    </a>\r\n  </p>\r\n\r\n</p>\r\n\r\n### Get started\r\n\r\n#### NPM\r\n\r\n```\r\nnpm install lucid-cardano\r\n```\r\n\r\n#### Deno 🦕\r\n\r\nFor JavaScript and TypeScript\r\n\r\n```js\r\nimport { Lucid } from \"https://deno.land/x/lucid@0.10.7/mod.ts\";\r\n```\r\n\r\n#### Web\r\n\r\n```html\r\n<script type=\"module\">\r\nimport { Lucid } from \"https://unpkg.com/lucid-cardano@0.10.7/web/mod.js\"\r\n// ...\r\n</script>\r\n```\r\n\r\n### \r\n\r\n### Build from source\r\n\r\nBuild NPM and Web target\r\n\r\n```\r\ndeno task build\r\n```\r\n\r\nOutputs a `dist` folder\r\n\r\n### Examples\r\n\r\n- [Basic examples](./src/examples/)\r\n- [Next.js Blockfrost Proxy API Example](https://github.com/GGAlanSmithee/cardano-lucid-blockfrost-proxy-example)\r\n\r\n### Basic usage\r\n\r\n```js\r\n// import { Blockfrost, Lucid } from \"https://deno.land/x/lucid@0.10.7/mod.ts\"; Deno\r\nimport { Blockfrost, Lucid } from \"lucid-cardano\"; // NPM\r\n\r\nconst lucid = await Lucid.new(\r\n  new Blockfrost(\"https://cardano-preview.blockfrost.io/api/v0\", \"<projectId>\"),\r\n  \"Preview\",\r\n);\r\n\r\n// Assumes you are in a browser environment\r\nconst api = await window.cardano.nami.enable();\r\nlucid.selectWallet(api);\r\n\r\nconst tx = await lucid.newTx()\r\n  .payToAddress(\"addr...\", { lovelace: 5000000n })\r\n  .complete();\r\n\r\nconst signedTx = await tx.sign().complete();\r\n\r\nconst txHash = await signedTx.submit();\r\n\r\nconsole.log(txHash);\r\n```\r\n\r\n### Test\r\n\r\n```\r\ndeno task test\r\n```\r\n\r\n### Build Core\r\n\r\nThis library is built on top of a customized version of the serialization-lib\r\n(cardano-multiplatform-lib) and on top of the message-signing library, which are\r\nwritten in Rust.\r\n\r\n```\r\ndeno task build:core\r\n```\r\n\r\n### Test Core\r\n\r\n```\r\ndeno task test:core\r\n```\r\n\r\n### Docs\r\n\r\n[View docs](https://doc.deno.land/https://deno.land/x/lucid/mod.ts) 📖\r\n\r\nYou can generate documentation with:\r\n\r\n```\r\ndeno doc\r\n```\r\n\r\n### Compatibility\r\n\r\nLucid is an ES Module, so to run it in the browser any bundler which allows for\r\ntop level await and WebAssembly is recommended. If you use Webpack 5 enable in\r\nthe `webpack.config.js`:\r\n\r\n```\r\nexperiments: {\r\n    asyncWebAssembly: true,\r\n    topLevelAwait: true,\r\n    layers: true // optional, with some bundlers/frameworks it doesn't work without\r\n  }\r\n```\r\n\r\nTo run the library in Node.js you need to set `{\"type\" : \"module\"}` in your\r\nproject's `package.json`. Otherwise you will get import issues.\r\n\r\n### Contributing\r\n\r\nContributions and PRs are welcome!\\\r\nThe [contribution instructions](./CONTRIBUTING.md).\r\n\r\nJoin us on [Discord](https://discord.gg/82MWs63Tdm)!\r\n\r\n### Use Lucid with React\r\n\r\n[use-cardano](https://use-cardano.alangaming.com/) a React context, hook and set\r\nof components built on top of Lucid.\r\n\r\n### Use Lucid with Next.js\r\n\r\n[Cardano Starter Kit](https://cardano-starter-kit.alangaming.com/) a Next.js\r\nstarter kit for building Cardano dApps.\r\n","readmeFilename":"README.md"}