cocktail/vodka_value
Functions
value_length (value: Value) -> Int
Calulate the length of a value
let value_length = value_length(value)
get_all_value_to (outputs: List<Output>, address: Address) -> Value
Get the value send to a particular address in a list of outputs
let value_to = get_all_value_to(outputs, address)
get_all_value_from (inputs: List<Input>, address: Address) -> Value
Get the value coming from a particular address in a list of inputs
let value_from = get_all_value_from(inputs, address)
value_geq (greater: Value, smaller: Value) -> Bool
Check if the first value provided is greater than or equal to the second value
let is_geq = value_geq(supposed_greater, supposed_smaller)
value_policy_info (
value: Value,
policy: ByteArray,
) -> Option<(ByteArray, ByteArray, Int)>
Obtain the information (i.e. flattened value) of a policy in a value
expect Some((policyId, assetName, quantity)) = value_policy_info(value, policy)
value_tokens (value: Value) -> List<(PolicyId, AssetName, Int)>
Obtain the non-lovelace information (i.e. flattened value) of a policy in a value
let tokens = value_tokens(value)