What is a Value / token bundle in Plutus?

newtype Value = Value { getValue :: Map.Map CurrencySymbol (Map.Map TokenName Integer) }
    deriving stock (Generic)
    deriving anyclass (ToJSON, FromJSON, Hashable, NFData)
    deriving newtype (Serialise, PlutusTx.IsData)
    deriving Pretty via (PrettyShow Value)

Each native token, including Ada, is identified by 2 things:

  1. CurrencySymbol - newtype wrapper around ByteString
  2. TokenName - newtype wrapper around ByteString

This is also known as an AssetClass.

assetClass :: CurrencySymbol -> TokenName -> AssetClass
assetClass s t = AssetClass (s, t)

A Value shows how many units exist for a given asset class.

For ada symbol and token these are empty bytestrings.

We have smart constructors for value maps: lovelaceValueOf.