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

x/lucid/src/mod.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
Re-export
import { fromUnit } from "https://deno.land/x/lucid@0.10.6/src/mod.ts";

Splits unit into policy id, asset name (entire asset name), name (asset name without label) and label if applicable. name will be returned in Hex.

Parameters

unit: Unit

Returns

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