cardano-ledger-shelley-ma-0.1.0.0: Shelley ledger with multiasset and time lock support.
Safe Haskell None
Language Haskell2010

Cardano.Ledger.Mary.Value

Synopsis

Documentation

newtype PolicyID crypto Source #

Policy ID

Constructors

PolicyID

Fields

Instances

Instances details
Eq ( PolicyID crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Ord ( PolicyID crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Show ( PolicyID crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

NFData ( PolicyID crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Methods

rnf :: PolicyID crypto -> () Source #

Crypto crypto => ToCBOR ( PolicyID crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Crypto crypto => FromCBOR ( PolicyID crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

NoThunks ( PolicyID crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

newtype AssetName Source #

Asset Name

Instances

Instances details
Eq AssetName Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Ord AssetName Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Show AssetName Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

NFData AssetName Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

ToCBOR AssetName Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

FromCBOR AssetName Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

NoThunks AssetName Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

data Value crypto Source #

The Value representing MultiAssets

Instances

Instances details
Crypto crypto => Eq ( CompactForm ( Value crypto)) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Crypto crypto => Eq ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Show ( CompactForm ( Value crypto)) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Show ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Generic ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Associated Types

type Rep ( Value crypto) :: Type -> Type Source #

Methods

from :: Value crypto -> Rep ( Value crypto) x Source #

to :: Rep ( Value crypto) x -> Value crypto Source #

Semigroup ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Monoid ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

NFData ( CompactForm ( Value crypto)) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

NFData ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Methods

rnf :: Value crypto -> () Source #

Crypto crypto => ToCBOR ( CompactForm ( Value crypto)) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Crypto crypto => ToCBOR ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Crypto crypto => FromCBOR ( CompactForm ( Value crypto)) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Crypto crypto => FromCBOR ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Crypto crypto => Val ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Crypto crypto => DecodeNonNegative ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Crypto crypto => DecodeMint ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Crypto crypto => EncodeMint ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Crypto crypto => Compactible ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Associated Types

data CompactForm ( Value crypto) Source #

Group ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

Abelian ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

NoThunks ( CompactForm ( Value crypto)) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

NoThunks ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

type Rep ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

newtype CompactForm ( Value crypto) Source #
Instance details

Defined in Cardano.Ledger.Mary.Value

newtype CompactForm ( Value crypto) = CompactValue (CompactValue crypto)

insert :: ( Integer -> Integer -> Integer ) -> PolicyID crypto -> AssetName -> Integer -> Value crypto -> Value crypto Source #

insert comb policy asset n v, if comb = old new -> old, the integer in the Value is prefered over n if comb = old new -> new, then n is prefered over the integer in the Value if (comb old new) == 0, then that value should not be stored in the Map part of the Value.

policies :: Value crypto -> Set ( PolicyID crypto) Source #

Extract the set of policies in the Value.

This function is equivalent to computing the support of the value in the spec.

showValue :: Value crypto -> String Source #

Display a Value as a String, one token per line

valueFromList :: Integer -> [( PolicyID era, AssetName , Integer )] -> Value era Source #

Rather than using prune to remove 0 assets, when can avoid adding them in the first place by using valueFromList to construct a Value.

gettriples' :: Value crypto -> ( Integer , [( PolicyID crypto, AssetName , Integer )], [ PolicyID crypto]) Source #

Turn the nested Value map-of-maps representation into a flat sequence of policyID, asset name and quantity, plus separately the ada quantity.