| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Plutus.Script.Utils.Value
Synopsis
- adaSymbol :: CurrencySymbol
- adaToken :: TokenName
- assetClass :: CurrencySymbol -> TokenName -> AssetClass
- assetClassValue :: AssetClass -> Integer -> Value
- assetClassValueOf :: Value -> AssetClass -> Integer
- currencyMPSHash :: CurrencySymbol -> MintingPolicyHash
- currencySymbol :: ByteString -> CurrencySymbol
- flattenValue :: Value -> [(CurrencySymbol, TokenName, Integer)]
- geq :: Value -> Value -> Bool
- gt :: Value -> Value -> Bool
- isZero :: Value -> Bool
- leq :: Value -> Value -> Bool
- lt :: Value -> Value -> Bool
- mpsSymbol :: MintingPolicyHash -> CurrencySymbol
- singleton :: CurrencySymbol -> TokenName -> Integer -> Value
- split :: Value -> (Value, Value)
- symbols :: Value -> [CurrencySymbol]
- toString :: TokenName -> String
- tokenName :: ByteString -> TokenName
- unionWith :: (Integer -> Integer -> Integer) -> Value -> Value -> Value
- valueOf :: Value -> CurrencySymbol -> TokenName -> Integer
- newtype AssetClass = AssetClass {}
- newtype CurrencySymbol = CurrencySymbol {
- unCurrencySymbol :: BuiltinByteString
- newtype TokenName = TokenName {
- unTokenName :: BuiltinByteString
- newtype Value = Value {
- getValue :: Map CurrencySymbol (Map TokenName Integer)
- scale :: Module s v => s -> v -> v
- noAdaValue :: Value -> Value
- adaOnlyValue :: Value -> Value
- isAdaOnlyValue :: Value -> Bool
- currencyValueOf :: Value -> CurrencySymbol -> Value
Documentation
assetClass :: CurrencySymbol -> TokenName -> AssetClass #
assetClassValue :: AssetClass -> Integer -> Value #
assetClassValueOf :: Value -> AssetClass -> Integer #
currencySymbol :: ByteString -> CurrencySymbol #
flattenValue :: Value -> [(CurrencySymbol, TokenName, Integer)] #
symbols :: Value -> [CurrencySymbol] #
newtype AssetClass #
Constructors
| AssetClass | |
Fields | |
Instances
newtype CurrencySymbol #
Constructors
| CurrencySymbol | |
Fields
| |
Instances
Constructors
| TokenName | |
Fields
| |
Instances
Constructors
| Value | |
Fields
| |
Instances
| Eq Value | |
| Data Value | |
Defined in Plutus.V1.Ledger.Value Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Value -> c Value Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Value Source # toConstr :: Value -> Constr Source # dataTypeOf :: Value -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Value) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Value) Source # gmapT :: (forall b. Data b => b -> b) -> Value -> Value Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Value -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Value -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Value -> m Value Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Value -> m Value Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Value -> m Value Source # | |
| Show Value | |
| Generic Value | |
| Semigroup Value | |
| Monoid Value | |
| NFData Value | |
Defined in Plutus.V1.Ledger.Value | |
| AdditiveGroup Value | |
Defined in Plutus.V1.Ledger.Value | |
| AdditiveMonoid Value | |
Defined in Plutus.V1.Ledger.Value | |
| AdditiveSemigroup Value | |
Defined in Plutus.V1.Ledger.Value | |
| Eq Value | |
Defined in Plutus.V1.Ledger.Value | |
| FromData Value | |
Defined in Plutus.V1.Ledger.Value Methods fromBuiltinData :: BuiltinData -> Maybe Value | |
| Group Value | |
Defined in Plutus.V1.Ledger.Value | |
| JoinSemiLattice Value | |
Defined in Plutus.V1.Ledger.Value | |
| MeetSemiLattice Value | |
Defined in Plutus.V1.Ledger.Value | |
| Monoid Value | |
Defined in Plutus.V1.Ledger.Value | |
| Pretty Value | |
Defined in Plutus.V1.Ledger.Value | |
| Semigroup Value | |
Defined in Plutus.V1.Ledger.Value | |
| ToData Value | |
Defined in Plutus.V1.Ledger.Value Methods toBuiltinData :: Value -> BuiltinData | |
| UnsafeFromData Value | |
Defined in Plutus.V1.Ledger.Value Methods unsafeFromBuiltinData :: BuiltinData -> Value | |
| Module Integer Value | |
| Lift DefaultUni Value | |
Defined in Plutus.V1.Ledger.Value | |
| Typeable DefaultUni Value | |
Defined in Plutus.V1.Ledger.Value | |
| type Rep Value | |
Defined in Plutus.V1.Ledger.Value type Rep Value = D1 ('MetaData "Value" "Plutus.V1.Ledger.Value" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'True) (C1 ('MetaCons "Value" 'PrefixI 'True) (S1 ('MetaSel ('Just "getValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map CurrencySymbol (Map TokenName Integer))))) | |
noAdaValue :: Value -> Value Source #
Value without any Ada.
adaOnlyValue :: Value -> Value Source #
Value without any non-Ada.
isAdaOnlyValue :: Value -> Bool Source #
currencyValueOf :: Value -> CurrencySymbol -> Value Source #
Get the quantities of just the given CurrencySymbol in the Value. This
is useful when implementing minting policies as they are responsible for
checking all minted/burnt tokens of their own CurrencySymbol.