Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/lucid/src/core/mod.ts

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.
Very Popular
Go to Latest
import * as lucid from "https://deno.land/x/lucid@0.10.10/src/core/mod.ts";

Classes

ED25519 key used as public key

We introduce a builder-pattern format for creating transaction outputs This is because:

  1. Some fields (i.e. data hash) are optional, and we can't easily expose Option<> in WASM
  2. Some fields like amounts have many ways it could be set (some depending on other field values being known)
  3. Easier to adapt as the output format gets more complicated in future Cardano releases

Builder de-duplicates witnesses as they are added

Variables

JSON <-> PlutusData conversion schemas. Follows ScriptDataJsonSchema in cardano-cli defined at: https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254

Each new language uses a different namespace for hashing its script This is because you could have a language where the same bytes have different semantics So this avoids scripts in different languages mapping to the same hash Note that the enum value here is different than the enum value for deciding the cost model of a script https://github.com/input-output-hk/cardano-ledger/blob/9c3b4737b13b30f71529e76c5330f403165e28a6/eras/alonzo/impl/src/Cardano/Ledger/Alonzo.hs#L127

Used to choose the schema for a script JSON string

Functions

Receives a script JSON string and returns a NativeScript. Cardano Wallet and Node styles are supported.

Instantiates an instance of the Wasm module returning its functions.

Instantiates an instance of the Wasm module along with its exports.

Gets if the Wasm module has been instantiated.

Instantiates an instance of the Wasm module returning its functions.

Instantiates an instance of the Wasm module along with its exports.

Gets if the Wasm module has been instantiated.