cocktail

Vodka cocktail provides utility functions to build Aiken onchain code

All onchain utility functions are grouped with a naming convention of vodka_<type>, and all can be imported directly with use cocktail

Cardano data types

Transaction types

Constants

address_pub_key: fn(Address) -> Option<VerificationKeyHash>

Documentation please refer to vodka_address

address_script_hash: fn(Address) -> Option<ScriptHash>

Documentation please refer to vodka_address

all_key_signed: fn(List<ByteArray>, List<ByteArray>) -> Bool

Documentation please refer to vodka_extra_signatories

check_policy_only_burn: fn(Value, PolicyId) -> Bool

Documentation please refer to vodka_mints

compare_address: fn(Address, Address) -> Ordering

Documentation please refer to vodka_address

compare_output_reference: fn(ScriptPurpose, ScriptPurpose) -> Ordering

Documentation please refer to vodka_redeemers

compare_script_address: fn(Address, Address) -> Ordering

Documentation please refer to vodka_address

convert_int_to_bytes: fn(Int) -> ByteArray

Documentation please refer to vodka_converter

get_all_value_from: fn(List<Input>, Address) -> Value

Documentation please refer to vodka_value

get_all_value_to: fn(List<Output>, Address) -> Value

Documentation please refer to vodka_value

get_number_digit: fn(Int) -> Int

Documentation please refer to vodka_converter

input_inline_datum: fn(Input) -> Data

Documentation please refer to vodka_inputs

inputs_at: fn(List<Input>, Address) -> List<Input>

Documentation please refer to vodka_inputs

inputs_at_with: fn(List<Input>, Address, PolicyId, AssetName) -> List<Input>

Documentation please refer to vodka_inputs

inputs_at_with_policy: fn(List<Input>, Address, PolicyId) -> List<Input>

Documentation please refer to vodka_inputs

inputs_token_quantity: fn(List<Input>, (PolicyId, AssetName)) -> Int

Documentation please refer to vodka_inputs

inputs_with: fn(List<Input>, PolicyId, AssetName) -> List<Input>

Documentation please refer to vodka_inputs

inputs_with_policy: fn(List<Input>, PolicyId) -> List<Input>

Documentation please refer to vodka_inputs

key_signed: fn(List<ByteArray>, ByteArray) -> Bool

Documentation please refer to vodka_extra_signatories

one_of_keys_signed: fn(List<ByteArray>, List<ByteArray>) -> Bool

Documentation please refer to vodka_extra_signatories

only_input_datum_with: fn(List<Input>, PolicyId, AssetName) -> Data

Documentation please refer to vodka_inputs

only_minted_token: fn(Value, PolicyId, AssetName, Int) -> Bool

Documentation please refer to vodka_mints

output_inline_datum: fn(Output) -> Data

Documentation please refer to vodka_outputs

outputs_at: fn(List<Output>, Address) -> List<Output>

Documentation please refer to vodka_outputs

outputs_at_with: fn(List<Output>, Address, PolicyId, AssetName) -> List<Output>

Documentation please refer to vodka_outputs

outputs_at_with_policy: fn(List<Output>, Address, PolicyId) -> List<Output>

Documentation please refer to vodka_outputs

outputs_with: fn(List<Output>, PolicyId, AssetName) -> List<Output>

Documentation please refer to vodka_outputs

outputs_with_policy: fn(List<Output>, PolicyId) -> List<Output>

Documentation please refer to vodka_outputs

redeemer_from: fn(
  Pairs<ScriptPurpose, Redeemer>,
  List<Input>,
  OutputReference,
  Address,
) -> Option<Redeemer>

Documentation please refer to vodka_redeemers

token_minted: fn(Value, PolicyId, AssetName, Int) -> Bool

Documentation please refer to vodka_mints

valid_after: fn(ValidityRange, Int) -> Bool

Documentation please refer to vodka_validity_range

valid_before: fn(ValidityRange, Int) -> Bool

Documentation please refer to vodka_validity_range

value_geq: fn(Value, Value) -> Bool

Documentation please refer to vodka_value

value_length: fn(Value) -> Int

Documentation please refer to vodka_value

value_policy_info: fn(Value, ByteArray) -> Option<(ByteArray, ByteArray, Int)>

Documentation please refer to vodka_value

value_tokens: fn(Value) -> List<(ByteArray, ByteArray, Int)>

Documentation please refer to vodka_value

withdrawal_redeemer: fn(Pairs<ScriptPurpose, Redeemer>, ByteArray) ->
  Option<Redeemer>

Documentation please refer to vodka_redeemers

Search Document