import { Core } from "https://deno.land/x/lucid@0.5.2/src/mod.ts";
const { MultiAsset } = Core;
Methods
free(): void
get(policy_id: ScriptHash): Assets | undefined
all assets under {policy_id}, if any exist, or else None (undefined in JS)
get_asset(policy_id: ScriptHash, asset_name: AssetName): BigNum
returns the amount of asset {asset_name} under policy {policy_id} If such an asset does not exist, 0 is returned.
insert(policy_id: ScriptHash, assets: Assets): Assets | undefined
set (and replace if it exists) all assets with policy {policy_id} to a copy of {assets}
keys(): ScriptHashes
returns all policy IDs used by assets in this multiasset
len(): number
the number of unique policy IDs in the multiasset
sets the asset {asset_name} to {value} under policy {policy_id} returns the previous amount if it was set, or else None (undefined in JS)
sub(rhs_ma: MultiAsset): MultiAsset
removes an asset from the list if the result is 0 or less does not modify this object, instead the result is returned
to_bytes(): Uint8Array
to_json(): string