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

x/lucid/src/utils/utils.ts>fromUnit

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
function fromUnit
import { fromUnit } from "https://deno.land/x/lucid@0.7.0/src/utils/utils.ts";

Splits unit into policy id, name and label if applicable. name will be returned in Hex.

Returns

{ policyId: PolicyId; name: string | null; label: number | null; }