Skip to main content
Version: Next

tx.value

Home > @blaze-cardano/tx > Value

Value namespace

Functions

Function

Description

assets(v)

Lists all assets (including 'lovelace' if present) in a Value object.

assetTypes(v)

Counts the number of distinct asset types in a Value object.

empty(v)

Determines if a Value object is empty (no coin and no multiassets).

intersect(a, b)

Determines the intersection of assets between two Value objects.

makeValue(lovelace, assets)

Creates a new Value object with the specified amount of lovelace and assets.

merge(a, b)

Merges two Value objects into a single Value object by combining their coins and multiassets.

negate(v)

Negates the coin and multiasset values of a Value object.

negatives(v)

Filters a Value object to retain only the negative coin and multiasset values.

positives(v)

Filters out the positive coin and multiasset values from a Value object.

sub(a, b)

Subtracts the values of one Value object from another.

sum(values)

Sums up a list of values into a single value instance.

zero()

A constant Value object with zero coins and no assets.