MultiAsset class
Represents a collection of multiple assets associated with policy IDs.
- Implemented types
- Mixed-in types
Constructors
-
MultiAsset(Map<
PolicyID, Assets> assets, {AssetsSerializationConfig serializationConfig = const AssetsSerializationConfig()}) -
Constructs an instance of MultiAsset.
factory
-
MultiAsset.deserialize(CborMapValue<
CborObject, CborObject> cbor) -
Constructs an instance of MultiAsset from a CBOR object.
factory
-
MultiAsset.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
assets
→ Map<
PolicyID, Assets> -
Map of policy IDs to assets.
final
- hasAsset → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serializationConfig → AssetsSerializationConfig
-
final
Methods
-
compareTo(
MultiAsset other) → int -
Compares this object to another object.
override
-
copyWith(
{Map< PolicyID, Assets> ? assets}) → MultiAsset -
getAssetNameBalance(
PolicyID id, AssetName name) → BigInt -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeAssetName(
{required PolicyID polcyId, required AssetName assetName}) → MultiAsset -
serialize(
) → List< int> -
Serializes the object to CBOR bytes.
inherited
-
serializeHex(
) → String -
Serializes the object to hexadecimal string.
inherited
-
toCbor(
) → CborObject -
Converts the object to a CBOR object.
override
-
toJson(
) → Map< String, dynamic> -
Converts the object to a JSON representation.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updateAssetName(
{required PolicyID polcyId, required AssetName assetName, required BigInt amount}) → MultiAsset
Operators
-
operator +(
MultiAsset other) → MultiAsset -
operator -(
MultiAsset other) → MultiAsset -
operator ==(
Object other) → bool -
The equality operator.
override
Static Properties
- empty → MultiAsset
-
final
Static Methods
-
compare(
MultiAsset lhs, MultiAsset rhs) → bool -
A Comparator that compares one comparable to another.
override