Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/lucid/src/utils/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.
Very Popular
Go to Latest
class Data
import { Data } from "https://deno.land/x/lucid@0.5.2/src/utils/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 obviously

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