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

x/lucid/src/mod.ts>Data

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.
Go to Latest
class Data
Re-export
import { Data } from "https://deno.land/x/lucid@0.7.8/src/mod.ts";

Static Methods

Convert Cbor encoded data to PlutusData

Convert conveniently a Json object (e.g. Metadata) to PlutusData. Note: Constructor cannot be used here.

to(plutusData: PlutusData): Datum | Redeemer

Convert PlutusData to Cbor encoded data

toJson(plutusData: PlutusData): Json

Convert PlutusData to a Json object. Note: Constructor cannot be used here, also only bytes/integers as Json keys.