Evolution SDK
Assets

Asset Units

Understanding policy IDs, asset names, and units

Asset Units

Every native asset on Cardano is identified by two components: a policy ID (28-byte hash of the minting policy script) and an asset name (0-32 bytes chosen by the minter). Together, these form the asset's unique identifier or "unit."

Structure

ComponentSizeFormatExample
Policy ID28 bytesHex (56 chars)7edb7a2d...c9d8e7f6
Asset Name0-32 bytesHex-encoded4d79546f6b656e ("MyToken")
UnitCombinedpolicyId + assetName7edb7a2d...4d79546f6b656e

Working with Assets

import {  } from "@evolution-sdk/evolution"

const  = "7edb7a2d9fbc4d2a68e4c9e9d3d7a5c8f2d1e9f8a7b6c5d4e3f2a1b0c9d8e7f6"
const  = "4d79546f6b656e" // "MyToken" in hex

// Add native token to an asset bundle
let  = .(2_000_000n) // Min ADA for UTxO
 = .(, , , 1000n)

Lovelace

ADA's smallest unit is lovelace. 1 ADA = 1,000,000 lovelace. Lovelace is always represented separately from native tokens in asset bundles:

import {  } from "@evolution-sdk/evolution"

const  = .(5_000_000n)

// Common amounts
const  = 1_000_000n
const  = 500_000n
const  = 10_000_000n

Minimum ADA

Every UTxO must contain a minimum amount of ADA (determined by coinsPerUtxoByte protocol parameter). UTxOs with native tokens require more ADA because they're larger. The transaction builder calculates this automatically.

Next Steps