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

x/lucid/src/plutus/data.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
namespace Data
import { Data } from "https://deno.land/x/lucid@0.10.1/src/plutus/data.ts";
type alias Data
import { type Data } from "https://deno.land/x/lucid@0.10.1/src/plutus/data.ts";
definition:
| bigint
| string
| Array<Data>
| Map<Data, Data>
variable Data
import { Data } from "https://deno.land/x/lucid@0.10.1/src/plutus/data.ts";

type

{ Integer: (options?: { minimum?: number; maximum?: number; exclusiveMinimum?: number; exclusiveMaximum?: number; }) => unknown; Bytes: (options?: { minLength?: number; maxLength?: number; enum?: string[]; }) => unknown; Boolean: () => unknown; Any: () => unknown; Array: <T extends TSchema>(items: T, options?: { minItems?: number; maxItems?: number; uniqueItems?: boolean; }) => unknown; Map: <T extends TSchema, U extends TSchema>(
keys: T,
values: U,
options?: { minItems?: number; maxItems?: number; },
) => unknown; Object: <T extends TProperties>(properties: T, options?: { hasConstr?: boolean; }) => unknown; Enum: <T extends TSchema>(items: T[]) => unknown; Tuple: <T extends TSchema[]>(items: [...T], options?: { hasConstr?: boolean; }) => unknown; Literal: <T extends TLiteralValue>(title: T) => TLiteral<T>; Nullable: <T extends TSchema>(item: T) => unknown; to; from; fromJson; toJson; void: () => Datum | Redeemer; castFrom; castTo; }